aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-rockchip
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2019-07-22 19:59:40 +0800
committerKever Yang <kever.yang@rock-chips.com>2019-07-29 10:25:27 +0800
commit4e1aeb89afcc63f4d498719e1d2e5dcac8ae9ffc (patch)
tree52130ca1ec327f8ec7dbbeafc9e96480fec0b166 /arch/arm/mach-rockchip
parent47b0ead21a32f4a8b08ade4c2693f70e731b61fa (diff)
downloadu-boot-4e1aeb89afcc63f4d498719e1d2e5dcac8ae9ffc.zip
u-boot-4e1aeb89afcc63f4d498719e1d2e5dcac8ae9ffc.tar.gz
u-boot-4e1aeb89afcc63f4d498719e1d2e5dcac8ae9ffc.tar.bz2
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 <kever.yang@rock-chips.com>
Diffstat (limited to 'arch/arm/mach-rockchip')
-rw-r--r--arch/arm/mach-rockchip/rk3399-board-spl.c6
-rw-r--r--arch/arm/mach-rockchip/rk3399/rk3399.c7
2 files changed, 8 insertions, 5 deletions
diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c
index 81a99f8..e632527 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 c4337e6..89c4d59 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
@@ -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,