rockchip: sdram: honor CFG_SYS_SDRAM_BASE when defining ram regions
authorHeiko Stuebner <heiko@sntech.de>
Tue, 15 Apr 2025 21:51:14 +0000 (23:51 +0200)
committerKever Yang <kever.yang@rock-chips.com>
Wed, 23 Apr 2025 14:12:05 +0000 (22:12 +0800)
commit7c3c1df6bf270a03c433c4db0493231b49b5deb7
treed893afd88b218a629e988170ac491ff2600bb0d7
parentccbddf645310241d1d031ed12780a78174ae5f7f
rockchip: sdram: honor CFG_SYS_SDRAM_BASE when defining ram regions

Currently the sdram code for arm64 expects CFG_SYS_SDRAM_BASE to be 0.
The ram being in front and the device-area behind it.

The upcoming RK3576 uses a different layout, with the device area
in front the ram, which then also extends past the 4G mark.

Adapt both the generic zone definitions as well as the ATAG parser
to be usable on devices where CFG_SYS_SDRAM_BASE is not 0.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/mach-rockchip/sdram.c