Skip to contentSkip to conversation

rockchip: rk3308: fix same-as-spl boot order

PATCH In review John Keeping 3 participants 3 messages Jul 14, 2022 – Aug 27, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rockchip: rk3308: fix same-as-spl boot order

Rockchip SoCs need the boot_devices array defined in order to map the bootloader's value to a U-Boot device. Implement this for rk3308.

---
 arch/arm/mach-rockchip/rk3308/rk3308.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/mach-rockchip/rk3308/rk3308.c +6 -0
index 70fe0d0ac3..dd9109b7c3 100644
@@ -8,6 +8,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/grf_rk3308.h>
+#include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/gpio.h>
 #include <debug_uart.h>
@@ -142,6 +143,11 @@ enum {
 
 #define GPIO0_A4	4
 
+const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
+	[BROM_BOOTSOURCE_EMMC] = "/mmc@ff490000",
+	[BROM_BOOTSOURCE_SD] = "/mmc@ff480000",
+};
+
 int rk_board_init(void)
 {
 	static struct rk3308_grf * const grf = (void *)GRF_BASE;
Signature · 1 line
2.37.1
Reviewed-by on v1 1/1
#2 lore raw
In reply to John Keeping
Quoted 4 lines · John Keeping

Rockchip SoCs need the boot_devices array defined in order to map the bootloader's value to a U-Boot device. Implement this for rk3308.

Thanks,
- Kever

Quoted 28 lines
---
  arch/arm/mach-rockchip/rk3308/rk3308.c | 6 ++++++
  1 file changed, 6 insertions(+)
arch/arm/mach-rockchip/rk3308/rk3308.c +6 -0
index 70fe0d0ac3..dd9109b7c3 100644
@@ -8,6 +8,7 @@
  #include <asm/global_data.h>
  #include <asm/io.h>
  #include <asm/arch/grf_rk3308.h>
+#include <asm/arch-rockchip/bootrom.h>
  #include <asm/arch-rockchip/hardware.h>
  #include <asm/gpio.h>
  #include <debug_uart.h>
@@ -142,6 +143,11 @@ enum {
 
  #define GPIO0_A4	4
 
+const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
+	[BROM_BOOTSOURCE_EMMC] = "/mmc@ff490000",
+	[BROM_BOOTSOURCE_SD] = "/mmc@ff480000",
+};
+
  int rk_board_init(void)
  {
  	static struct rk3308_grf * const grf = (void *)GRF_BASE;