diff options
author | Kever Yang <kever.yang@rock-chips.com> | 2019-07-22 15:02:03 +0300 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2019-07-29 05:26:41 +0300 |
commit | 7559f6e9f03ed1aac211d351427c0664666c35e9 (patch) | |
tree | 3f8bb45b49207e6b563c1528e5592cfae3825b4a /arch/arm/mach-rockchip/rk3036 | |
parent | 5eb9a78fcdb3af09527f16698f251756eb07359f (diff) | |
download | u-boot-7559f6e9f03ed1aac211d351427c0664666c35e9.tar.xz |
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 <kever.yang@rock-chips.com>
Diffstat (limited to 'arch/arm/mach-rockchip/rk3036')
-rw-r--r-- | arch/arm/mach-rockchip/rk3036/rk3036.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/rk3036/rk3036.c b/arch/arm/mach-rockchip/rk3036/rk3036.c index 481af8a934..be458cfb64 100644 --- a/arch/arm/mach-rockchip/rk3036/rk3036.c +++ b/arch/arm/mach-rockchip/rk3036/rk3036.c @@ -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 |