diff options
author | Kever Yang <kever.yang@rock-chips.com> | 2017-06-23 16:11:06 +0800 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2017-07-11 12:13:44 +0200 |
commit | 7805cdf494beb0014590b8bc79338c02c3791f15 (patch) | |
tree | 45f16fb0058bcd01c9d5bb0db438bd9cf37df5a2 /board | |
parent | 6d1970fa8a8d315af2b5c2c6f0ad5e5c24a382b5 (diff) | |
download | u-boot-7805cdf494beb0014590b8bc79338c02c3791f15.tar.gz |
rockchip: use common sdram function
Replace the sdram_init() in board init and rockchip_sdram_size() in
sdram driver for all the Rockchip SoCs which enable CONFIG_RAM.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Make dram_init() in rk3036-board.c conditional on CONFIG_RAM:
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/geekbuying/geekbox/geekbox.c | 6 | ||||
-rw-r--r-- | board/rockchip/evb_px5/evb-px5.c | 7 | ||||
-rw-r--r-- | board/rockchip/evb_rk3328/evb-rk3328.c | 6 | ||||
-rw-r--r-- | board/rockchip/evb_rk3399/evb-rk3399.c | 22 | ||||
-rw-r--r-- | board/rockchip/sheep_rk3368/sheep_rk3368.c | 7 | ||||
-rw-r--r-- | board/theobroma-systems/puma_rk3399/puma-rk3399.c | 22 |
6 files changed, 0 insertions, 70 deletions
diff --git a/board/geekbuying/geekbox/geekbox.c b/board/geekbuying/geekbox/geekbox.c index 75d121d736..422a03878e 100644 --- a/board/geekbuying/geekbox/geekbox.c +++ b/board/geekbuying/geekbox/geekbox.c @@ -13,12 +13,6 @@ int board_init(void) return 0; } -int dram_init(void) -{ - gd->ram_size = 0x80000000; - return 0; -} - int dram_init_banksize(void) { gd->bd->bi_dram[0].start = 0; diff --git a/board/rockchip/evb_px5/evb-px5.c b/board/rockchip/evb_px5/evb-px5.c index 54e62dbb6e..7576581d9f 100644 --- a/board/rockchip/evb_px5/evb-px5.c +++ b/board/rockchip/evb_px5/evb-px5.c @@ -34,13 +34,6 @@ int board_init(void) return 0; } -int dram_init(void) -{ - gd->ram_size = 0x40000000; - - return 0; -} - int dram_init_banksize(void) { /* Reserve 0x200000 for ATF bl31 */ diff --git a/board/rockchip/evb_rk3328/evb-rk3328.c b/board/rockchip/evb_rk3328/evb-rk3328.c index 0a26ed56b6..75674bb38a 100644 --- a/board/rockchip/evb_rk3328/evb-rk3328.c +++ b/board/rockchip/evb_rk3328/evb-rk3328.c @@ -16,12 +16,6 @@ int board_init(void) return 0; } -int dram_init(void) -{ - gd->ram_size = 0x80000000; - return 0; -} - int dram_init_banksize(void) { /* Reserve 0x200000 for ATF bl31 */ diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c index f63f003209..950bde6af6 100644 --- a/board/rockchip/evb_rk3399/evb-rk3399.c +++ b/board/rockchip/evb_rk3399/evb-rk3399.c @@ -68,28 +68,6 @@ out: return 0; } -int dram_init(void) -{ - struct ram_info ram; - struct udevice *dev; - int ret; - - ret = uclass_get_device(UCLASS_RAM, 0, &dev); - if (ret) { - debug("DRAM init failed: %d\n", ret); - return ret; - } - ret = ram_get_info(dev, &ram); - if (ret) { - debug("Cannot get DRAM size: %d\n", ret); - return ret; - } - debug("SDRAM base=%llx, size=%x\n", ram.base, (unsigned int)ram.size); - gd->ram_size = ram.size; - - return 0; -} - int dram_init_banksize(void) { /* Reserve 0x200000 for ATF bl31 */ diff --git a/board/rockchip/sheep_rk3368/sheep_rk3368.c b/board/rockchip/sheep_rk3368/sheep_rk3368.c index df1fd9d2c3..e6d23611fd 100644 --- a/board/rockchip/sheep_rk3368/sheep_rk3368.c +++ b/board/rockchip/sheep_rk3368/sheep_rk3368.c @@ -21,13 +21,6 @@ int board_init(void) return 0; } -int dram_init(void) -{ - gd->ram_size = 0x80000000; - - return 0; -} - int dram_init_banksize(void) { gd->bd->bi_dram[0].start = 0x200000; diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c index 6fff3e1ae6..740baf52e4 100644 --- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c +++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c @@ -181,28 +181,6 @@ void get_board_serial(struct tag_serialnr *serialnr) } #endif -int dram_init(void) -{ - struct ram_info ram; - struct udevice *dev; - int ret; - - ret = uclass_get_device(UCLASS_RAM, 0, &dev); - if (ret) { - debug("DRAM init failed: %d\n", ret); - return ret; - } - ret = ram_get_info(dev, &ram); - if (ret) { - debug("Cannot get DRAM size: %d\n", ret); - return ret; - } - debug("SDRAM base=%llx, size=%x\n", ram.base, (unsigned int)ram.size); - gd->ram_size = ram.size; - - return 0; -} - int dram_init_banksize(void) { /* Reserve 0x200000 for ATF bl31 */ |