diff mbox series

[v3,6/6] sifive: fu540: Enable SF distro bootcmd

Message ID 20200604203949.550290-7-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
Enable SPI flash(SF) distro boot command in Sifive FU540.

This distro boot will read the boot script at specific
location at the flash and start sourcing the same.

Included the SF device at the last of the target devices
list since all the rest of the devices on the list have
more possibility to boot the distribution due to the
size of the SPI flash is concern.

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

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

Comments

Bin Meng June 22, 2020, 2:01 p.m. UTC | #1
On Fri, Jun 5, 2020 at 4:41 AM Jagan Teki <jagan at amarulasolutions.com> wrote:
>
> Enable SPI flash(SF) distro boot command in Sifive FU540.
>
> This distro boot will read the boot script at specific
> location at the flash and start sourcing the same.
>
> Included the SF device at the last of the target devices
> list since all the rest of the devices on the list have
> more possibility to boot the distribution due to the
> size of the SPI flash is concern.
>
> Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
> ---
> Changes for v3:
> - none
>
>  include/configs/sifive-fu540.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>

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 68fda14d76..f21411a701 100644
--- a/include/configs/sifive-fu540.h
+++ b/include/configs/sifive-fu540.h
@@ -43,9 +43,11 @@ 
 #ifndef CONFIG_SPL_BUILD
 #define BOOT_TARGET_DEVICES(func) \
 	func(MMC, mmc, 0) \
+	func(SF, sf, 0) \
 	func(DHCP, dhcp, na)
 
 #include <config_distro_bootcmd.h>
+#include <environment/distro/sf.h>
 
 #define TYPE_GUID_LOADER1	"5B193300-FC78-40CD-8002-E86C45580B47"
 #define TYPE_GUID_LOADER2	"2E54B353-1271-4842-806F-E436D6AF6985"
@@ -70,7 +72,8 @@ 
 	"type_guid_gpt_loader2=" TYPE_GUID_LOADER2 "\0" \
 	"type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \
 	"partitions=" PARTS_DEFAULT "\0" \
-	BOOTENV
+	BOOTENV \
+	BOOTENV_SF
 
 #define CONFIG_PREBOOT \
 	"setenv fdt_addr ${fdtcontroladdr};" \