[PATCH 6/8] ARM: rk3568: Detect USB boot

Sascha Hauer s.hauer at pengutronix.de
Tue Oct 12 00:33:50 PDT 2021


The table of register content to bootsource mapping has been taken from
the vendor U-Boot. This table lacks an entry for USB boot. Add this
entry. It's unknown if this entry is entirely correct, it reflects the
value read from the register when doing USB boot.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/mach-rockchip/rk3568.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-rockchip/rk3568.c b/arch/arm/mach-rockchip/rk3568.c
index fcf3cb7053..4e6d3eef88 100644
--- a/arch/arm/mach-rockchip/rk3568.c
+++ b/arch/arm/mach-rockchip/rk3568.c
@@ -145,12 +145,12 @@ struct rk_bootsource {
 };
 
 static struct rk_bootsource bootdev_map[] = {
-	{ .src = BOOTSOURCE_UNKNOWN, .instance = 0 },
-	{ .src = BOOTSOURCE_NAND, .instance = 0 },
-	{ .src = BOOTSOURCE_MMC, .instance = 0 },
-	{ .src = BOOTSOURCE_SPI_NOR, .instance = 0 },
-	{ .src = BOOTSOURCE_SPI_NAND, .instance = 0 },
-	{ .src = BOOTSOURCE_MMC, .instance = 1 },
+	[0x1] = { .src = BOOTSOURCE_NAND, .instance = 0 },
+	[0x2] = { .src = BOOTSOURCE_MMC, .instance = 0 },
+	[0x3] = { .src = BOOTSOURCE_SPI_NOR, .instance = 0 },
+	[0x4] = { .src = BOOTSOURCE_SPI_NAND, .instance = 0 },
+	[0x5] = { .src = BOOTSOURCE_MMC, .instance = 1 },
+	[0xa] = { .src = BOOTSOURCE_USB, .instance = 0 },
 };
 
 static enum bootsource rk3568_bootsource(void)
-- 
2.30.2




More information about the barebox mailing list