From: Kever Yang Date: Mon, 22 Jul 2019 12:02:03 +0000 (+0800) Subject: rockchip: rk3036: move dram_init() into soc file X-Git-Tag: v2019.10-rc1~6^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7559f6e9f03ed1aac211d351427c0664666c35e9;p=platform%2Fkernel%2Fu-boot.git rockchip: rk3036: move dram_init() into soc file Move dram_init() into rk3036.c so that we can use to common board file later. Signed-off-by: Kever Yang --- diff --git a/arch/arm/mach-rockchip/rk3036-board.c b/arch/arm/mach-rockchip/rk3036-board.c index b7967b8..40f5e0a 100644 --- a/arch/arm/mach-rockchip/rk3036-board.c +++ b/arch/arm/mach-rockchip/rk3036-board.c @@ -13,7 +13,6 @@ #include #include #include -#include 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) { diff --git a/arch/arm/mach-rockchip/rk3036/rk3036.c b/arch/arm/mach-rockchip/rk3036/rk3036.c index 481af8a..be458cf 100644 --- a/arch/arm/mach-rockchip/rk3036/rk3036.c +++ b/arch/arm/mach-rockchip/rk3036/rk3036.c @@ -5,6 +5,9 @@ #include #include #include +#include + +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