diff mbox series

[v3,5/6] sifive: fu540: Add boot flash script offset, size

Message ID 20200604203949.550290-6-jagan@amarulasolutions.com
State Superseded
Headers show
Series riscv: sifive/fu540: SPI boot | expand

Commit Message

Jagan Teki June 4, 2020, 8:39 p.m. UTC
HiFive-Unleashed-A00 has SPI flash with 32MiB size.
So, let's use the script offset at the end of 4K.
This way it cannot overlap any offsets being used
by software components in flash layout.

So, SF distrocmd will pick the script at desired
script address and run.

Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
---
Changes for v3:
- none

 include/configs/sifive-fu540.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Bin Meng June 22, 2020, 1:57 p.m. UTC | #1
On Fri, Jun 5, 2020 at 4:41 AM Jagan Teki <jagan at amarulasolutions.com> wrote:
>
> HiFive-Unleashed-A00 has SPI flash with 32MiB size.
> So, let's use the script offset at the end of 4K.
> This way it cannot overlap any offsets being used
> by software components in flash layout.
>
> So, SF distrocmd will pick the script at desired
> script address and run.
>
> Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
> ---
> Changes for v3:
> - none
>
>  include/configs/sifive-fu540.h | 2 ++
>  1 file changed, 2 insertions(+)
>

Reviewed-by: Bin Meng <bin.meng at windriver.com>
diff mbox series

Patch

diff --git a/include/configs/sifive-fu540.h b/include/configs/sifive-fu540.h
index 72c841eb9b..68fda14d76 100644
--- a/include/configs/sifive-fu540.h
+++ b/include/configs/sifive-fu540.h
@@ -62,6 +62,8 @@ 
 	"kernel_addr_r=0x84000000\0" \
 	"fdt_addr_r=0x88000000\0" \
 	"scriptaddr=0x88100000\0" \
+	"script_offset_f=0x1fff000\0" \
+	"script_size_f=0x1000\0" \
 	"pxefile_addr_r=0x88200000\0" \
 	"ramdisk_addr_r=0x88300000\0" \
 	"type_guid_gpt_loader1=" TYPE_GUID_LOADER1 "\0" \