ram: sifive: Avoid using hardcoded ram base and size
authorBin Meng <bin.meng@windriver.com>
Mon, 20 Jul 2020 06:06:35 +0000 (23:06 -0700)
committerAndes <uboot@andestech.com>
Fri, 24 Jul 2020 06:56:29 +0000 (14:56 +0800)
commitecb70bdb9f12b694e3a50895a759119b3fc27507
tree485ffa28131bed87158d66b6533654c168294661
parent142dd57c5d971d3291e8896b5ecd7e878f97e1f1
ram: sifive: Avoid using hardcoded ram base and size

At present the SiFive FU540 RAM driver uses hard-coded memory base
address and size to initialize the DDR controller. This may not be
true when this driver is used on another board based on FU540.

Update the driver to read the memory information from DT and use
that during the initialization.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Leo Liang <ycliang@andestech.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
drivers/ram/sifive/fu540_ddr.c