summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-rockchip/rk3528/rk3528.c15
-rw-r--r--arch/arm/mach-rockchip/spl.c12
2 files changed, 11 insertions, 16 deletions
diff --git a/arch/arm/mach-rockchip/rk3528/rk3528.c b/arch/arm/mach-rockchip/rk3528/rk3528.c
index 57ead0006f1..f9bfc445b85 100644
--- a/arch/arm/mach-rockchip/rk3528/rk3528.c
+++ b/arch/arm/mach-rockchip/rk3528/rk3528.c
@@ -49,21 +49,6 @@ void board_debug_uart_init(void)
{
}
-u32 read_brom_bootsource_id(void)
-{
- u32 bootsource_id = readl(BROM_BOOTSOURCE_ID_ADDR);
-
- /* Re-map the raw value read from reg to an existing BROM_BOOTSOURCE
- * enum value to avoid having to create a larger boot_devices table.
- */
- if (bootsource_id == 0x81)
- return BROM_BOOTSOURCE_USB;
- else if (bootsource_id > BROM_LAST_BOOTSOURCE)
- log_debug("Unknown bootsource %x\n", bootsource_id);
-
- return bootsource_id;
-}
-
int arch_cpu_init(void)
{
u32 val;
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index 1ce3a3b0554..b9e7302d3b2 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -33,7 +33,17 @@ __weak const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
__weak u32 read_brom_bootsource_id(void)
{
- return readl(BROM_BOOTSOURCE_ID_ADDR);
+ u32 bootsource_id = readl(BROM_BOOTSOURCE_ID_ADDR);
+
+ /* Re-map the raw value read from reg to an existing BROM_BOOTSOURCE
+ * enum value to avoid having to create a larger boot_devices table.
+ */
+ if (bootsource_id == 0x81)
+ return BROM_BOOTSOURCE_USB;
+ else if (bootsource_id > BROM_LAST_BOOTSOURCE)
+ log_debug("Unknown bootsource %x\n", bootsource_id);
+
+ return bootsource_id;
}
const char *board_spl_was_booted_from(void)