From b46afd08fd56e2cec9763b9cac62cbd0a82588d0 Mon Sep 17 00:00:00 2001 From: Samin Guo Date: Wed, 16 Aug 2023 15:38:02 +0800 Subject: riscv: starfive: evb: add get_boot_mode add get_boot_mode function to support Multi-device boot Signed-off-by: Samin Guo --- board/starfive/evb/starfive_evb.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'board/starfive/evb') diff --git a/board/starfive/evb/starfive_evb.c b/board/starfive/evb/starfive_evb.c index 3fdbb29b6c..6d3ef222b7 100644 --- a/board/starfive/evb/starfive_evb.c +++ b/board/starfive/evb/starfive_evb.c @@ -202,6 +202,12 @@ static u32 get_chip_type(void) return value; } +static void get_boot_mode(void) +{ + /* evb only support flash boot */ + env_set("bootmode", "flash"); +} + #if CONFIG_IS_ENABLED(STARFIVE_OTP) static void get_cpu_voltage_type(struct udevice *dev) { @@ -289,6 +295,8 @@ int board_late_init(void) struct udevice *dev; int ret; + get_boot_mode(); + /* * save the memory info by environment variable in u-boot, * It will used to update the memory configuration in dts, -- cgit v1.2.3