]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3399: move boot_devices into soc file
authorKever Yang <kever.yang@rock-chips.com>
Mon, 22 Jul 2019 11:59:40 +0000 (19:59 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Mon, 29 Jul 2019 02:25:27 +0000 (10:25 +0800)
Move boot_devices definition into rk3399.c, so that we can
share the common code for board_spl_was_booted_from().

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/mach-rockchip/rk3399-board-spl.c
arch/arm/mach-rockchip/rk3399/rk3399.c

index 81a99f8e4021cbe784f6599a06f53e8fed8715f2..e6325274c334e2dfd5687e0d78b6bba3c96c6468 100644 (file)
@@ -23,11 +23,7 @@ void board_return_to_bootrom(void)
        back_to_bootrom(BROM_BOOT_NEXTSTAGE);
 }
 
-static const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-       [BROM_BOOTSOURCE_EMMC] = "/sdhci@fe330000",
-       [BROM_BOOTSOURCE_SPINOR] = "/spi@ff1d0000",
-       [BROM_BOOTSOURCE_SD] = "/dwmmc@fe320000",
-};
+__weak const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {};
 
 const char *board_spl_was_booted_from(void)
 {
index c4337e609342a3be1a68cc5975477e068e6e65da..89c4d592671d9dc8e4aedfceb23d48dd815c4424 100644 (file)
@@ -9,6 +9,7 @@
 #include <syscon.h>
 #include <asm/armv8/mmu.h>
 #include <asm/io.h>
+#include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/gpio.h>
 #include <asm/arch-rockchip/grf_rk3399.h>
@@ -20,6 +21,12 @@ DECLARE_GLOBAL_DATA_PTR;
 #define GRF_EMMCCORE_CON11 0xff77f02c
 #define GRF_BASE       0xff770000
 
+const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
+       [BROM_BOOTSOURCE_EMMC] = "/sdhci@fe330000",
+       [BROM_BOOTSOURCE_SPINOR] = "/spi@ff1d0000",
+       [BROM_BOOTSOURCE_SD] = "/dwmmc@fe320000",
+};
+
 static struct mm_region rk3399_mem_map[] = {
        {
                .virt = 0x0UL,