]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
rockchip: rk3036: move dram_init() into soc file
authorKever Yang <kever.yang@rock-chips.com>
Mon, 22 Jul 2019 12:02:03 +0000 (20:02 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Mon, 29 Jul 2019 02:26:41 +0000 (10:26 +0800)
Move dram_init() into rk3036.c so that we can use to common board
file later.

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

index b7967b8577836f00e37328467219bd8183e75d1c..40f5e0aa3d771216dc6e8d87bf53bcdd36680f2d 100644 (file)
@@ -13,7 +13,6 @@
 #include <asm/arch-rockchip/periph.h>
 #include <asm/arch-rockchip/grf_rk3036.h>
 #include <asm/arch-rockchip/boot_mode.h>
-#include <asm/arch-rockchip/sdram_rk3036.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -34,19 +33,6 @@ int board_init(void)
        return 0;
 }
 
-#if !CONFIG_IS_ENABLED(RAM)
-/*
- * When CONFIG_RAM is enabled, the dram_init() function is implemented
- * in sdram_common.c.
- */
-int dram_init(void)
-{
-       gd->ram_size = sdram_size();
-
-       return 0;
-}
-#endif
-
 #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
 void enable_caches(void)
 {
index 481af8a934493f7ab7a7b9d7d0011f0d5a78da51..be458cfb6425d4bdbdae5189ceb229fb3f171228 100644 (file)
@@ -5,6 +5,9 @@
 #include <asm/io.h>
 #include <asm/arch-rockchip/grf_rk3036.h>
 #include <asm/arch-rockchip/hardware.h>
+#include <asm/arch-rockchip/sdram_rk3036.h>
+
+DECLARE_GLOBAL_DATA_PTR;
 
 #ifdef CONFIG_DEBUG_UART_BOARD_INIT
 void board_debug_uart_init(void)
@@ -36,3 +39,16 @@ void board_debug_uart_init(void)
                     GPIO1C2_UART2_SIN << GPIO1C2_SHIFT);
 }
 #endif
+
+#if !CONFIG_IS_ENABLED(RAM)
+/*
+ * When CONFIG_RAM is enabled, the dram_init() function is implemented
+ * in sdram_common.c.
+ */
+int dram_init(void)
+{
+       gd->ram_size = sdram_size();
+
+       return 0;
+}
+#endif