]> git.ipfire.org Git - thirdparty/u-boot.git/commit
rockchip: spl: do full dram_init instead of only probing
authorHeiko Stuebner <heiko.stuebner@theobroma-systems.com>
Mon, 25 May 2020 17:57:24 +0000 (19:57 +0200)
committerKever Yang <kever.yang@rock-chips.com>
Sun, 31 May 2020 14:22:07 +0000 (22:22 +0800)
commitb6740fb116ebb02ecf6306e4a6234dcea03842e0
tree838c41b86e34f1a3a292070cb598fbea359dca45
parent9fb8e24804ea65a0edead7d7d606da016a71fdd8
rockchip: spl: do full dram_init instead of only probing

Parts of later SPL may need RAM information as well, so do full
dram_init() call, which includes the existing dram probing but also
initializes the ram information in gd.

dram_init() from sdram.c does the following steps:
- uclass_get_device(UCLASS_RAM, ...) like the current code
- ret = ram_get_info(dev, &ram);
- gd->ram_size = ram.size;

CONFIG_SPL_RAM already makes sure that sdram.c gets compiled
and thus no other variant of dram_init() can exist.

So it's the same functionality as before and only adds that the
SPL now aquires knowledge about the amount of available ram,
which it didn't know about before.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/mach-rockchip/spl.c