From: Kever Yang Date: Mon, 22 Jul 2019 11:59:40 +0000 (+0800) Subject: rockchip: rk3399: move boot_devices into soc file X-Git-Tag: v2019.10-rc1~6^2~26 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4e1aeb89afcc63f4d498719e1d2e5dcac8ae9ffc;p=oweals%2Fu-boot.git rockchip: rk3399: move boot_devices into soc file 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 --- diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c index 81a99f8e40..e6325274c3 100644 --- a/arch/arm/mach-rockchip/rk3399-board-spl.c +++ b/arch/arm/mach-rockchip/rk3399-board-spl.c @@ -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) { diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c index c4337e6093..89c4d59267 100644 --- a/arch/arm/mach-rockchip/rk3399/rk3399.c +++ b/arch/arm/mach-rockchip/rk3399/rk3399.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -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,