[U-Boot] [PATCH 19/35] rockchip: rk3288: move dram_init_banksize() into soc file

Kever Yang
2019-07-22T11:59:26Z

Mov edram_init_banksize() into rk3288.c so that we can re-use
the common SPL board file later.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

arch/arm/mach-rockchip/rk3288-board-spl.c | 15 ---------------
arch/arm/mach-rockchip/rk3288/rk3288.c | 15 +++++++++++++++
2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-rockchip/rk3288-board-spl.c b/arch/arm/mach-rockchip/rk3288-board-spl.c
index 13cd86079b..97853ccdc7 100644
--- a/arch/arm/mach-rockchip/rk3288-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3288-board-spl.c
@@ -156,18 +156,3 @@ void board_init_f(ulong dummy)
}
#endif
}
-
-#ifdef CONFIG_SPL_OS_BOOT
-
-#define PMU_BASE 0xff730000
-int dram_init_banksize(void)
-{
- struct rk3288_pmu *const pmu = (void *)PMU_BASE;
- size_t size = rockchip_sdram_size((phys_addr_t)&pmu->sys_reg[2]);
-
- gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_dram[0].size = size;
-
- return 0;
-}
-#endif
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c
index 7552472fbc..2526c04c58 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -57,3 +57,18 @@ void board_debug_uart_init(void)
GPIO7C6_UART2DBG_SIN << GPIO7C6_SHIFT);
}
#endif
+
+#ifdef CONFIG_SPL_OS_BOOT
+
+#define PMU_BASE 0xff730000
+int dram_init_banksize(void)
+{
+ struct rk3288_pmu *const pmu = (void *)PMU_BASE;
+ size_t size = rockchip_sdram_size((phys_addr_t)&pmu->sys_reg[2]);
+
+ gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+ gd->bd->bi_dram[0].size = size;
+
+ return 0;
+}
+#endif
--
2.17.1