diff options
| author | Jonas Karlman <jonas@kwiboo.se> | 2025-01-30 22:07:13 +0000 |
|---|---|---|
| committer | Kever Yang <kever.yang@rock-chips.com> | 2025-02-19 23:11:06 +0800 |
| commit | d5fc369a598d0e84dbcfe08e80d676cdd0a54a78 (patch) | |
| tree | d482614540de4b7d23a4b58919cedceee2db6ed0 /arch/arm/mach-rockchip/sdram.c | |
| parent | 356236126da7877ab115c65f8cb21215443beb2f (diff) | |
rockchip: sdram: Ensure ram_base is correct in SPL
Most Rockchip SoCs use 0x0 as DRAM base address, however some SoCs use
0x60000000 and RK3576 use 0x40000000 as DRAM base address.
CFG_SYS_SDRAM_BASE is defined with correct address for each SoC and
U-Boot proper use this to set correct gd->ram_base in setup_dest_addr().
SPL never assign any value to gd->ram_base and instead use the default,
0x0. Set correct gd->ram_base in dram_init() to ensure its correctness
in SPL.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'arch/arm/mach-rockchip/sdram.c')
| -rw-r--r-- | arch/arm/mach-rockchip/sdram.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/sdram.c b/arch/arm/mach-rockchip/sdram.c index 4b8b6b9da7c..f7d32829295 100644 --- a/arch/arm/mach-rockchip/sdram.c +++ b/arch/arm/mach-rockchip/sdram.c @@ -478,6 +478,7 @@ int dram_init(void) debug("Cannot get DRAM size: %d\n", ret); return ret; } + gd->ram_base = ram.base; gd->ram_size = ram.size; debug("SDRAM base=%lx, size=%lx\n", (unsigned long)ram.base, (unsigned long)ram.size); |
