summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-05-24 07:33:13 +0300
committerAnup Patel <anup@brainfault.org>2020-06-05 06:32:34 +0300
commit86ec5341e421b3f6ac39c75da648b7a22e56f248 (patch)
treecfb4031238ab67050302a1eadd8eaa84eb8e71fe /firmware
parent4ce6b7a82ac2c9f57186c00f23223dd39067555b (diff)
downloadopensbi-86ec5341e421b3f6ac39c75da648b7a22e56f248.tar.xz
firmware: Allow fw_platform_init() to return updated FDT location
Currently, the fw_platform_init() does not return anything but we can further improve by allowing fw_platform_init() to return updated FDT location. It is certainly not mandatory for fw_platform_init() to return a new location of FDT (or modify FDT). In fact, the fw_platform_init() can always return the original FDT location (i.e. 'arg1') unmodified. This new capability of fw_platform_init() will allow platforms to: 1. Have multiple built-in FDTs and select one 2. Modify FDT before using based on platform specific straps or OTP Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/fw_base.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/fw_base.S b/firmware/fw_base.S
index b354cb8..b66ac41 100644
--- a/firmware/fw_base.S
+++ b/firmware/fw_base.S
@@ -198,7 +198,9 @@ _prev_arg1_override_done:
*/
MOV_5R s0, a0, s1, a1, s2, a2, s3, a3, s4, a4
call fw_platform_init
+ add t0, a0, zero
MOV_5R a0, s0, a1, s1, a2, s2, a3, s3, a4, s4
+ add a1, t0, zero
/* Preload HART details
* s7 -> HART Count
@@ -475,6 +477,7 @@ _start_hang:
.globl fw_platform_init
.weak fw_platform_init
fw_platform_init:
+ add a0, a1, zero
ret
.section .entry, "ax", %progbits