diff mbox series

[v2,07/11] rockchip: spl: allow more boot devices

Message ID d3b00916-743c-172f-7b1d-5d64e3ab027e@gmail.com (mailing list archive)
State New, archived
Headers show
Series Add Rockchip IDB device | expand

Commit Message

Johan Jonker July 9, 2022, 6:50 p.m. UTC
Rockchip SoCs have more boot device options then currently
included in the function spl_boot_device().
Make this function generic for SPI and NAND.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---

This patch should replace a patch in the serie called:
[PATCH v1 02/17] rockchip: spl: allow more boot devices
https://lore.kernel.org/u-boot/20220508150825.21711-3-jbx6244@gmail.com/

Changed:
  replace #elseif by #elif
---
 arch/arm/mach-rockchip/spl.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index ceef9d91..aab3804f 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -53,13 +53,16 @@  u32 spl_boot_device(void)
 {
 	u32 boot_device = BOOT_DEVICE_MMC1;
 
-#if defined(CONFIG_TARGET_CHROMEBOOK_JERRY) || \
+#if defined(CONFIG_SPI_BOOT) || \
+		defined(CONFIG_TARGET_CHROMEBOOK_JERRY) || \
 		defined(CONFIG_TARGET_CHROMEBIT_MICKEY) || \
 		defined(CONFIG_TARGET_CHROMEBOOK_MINNIE) || \
 		defined(CONFIG_TARGET_CHROMEBOOK_SPEEDY) || \
 		defined(CONFIG_TARGET_CHROMEBOOK_BOB) || \
 		defined(CONFIG_TARGET_CHROMEBOOK_KEVIN)
 	return BOOT_DEVICE_SPI;
+#elif defined(CONFIG_NAND_BOOT)
+	return BOOT_DEVICE_NAND;
 #endif
 	if (CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM))
 		return BOOT_DEVICE_BOOTROM;