On 2025/1/24 06:02, Jonas Karlman wrote:
Allow the first bank to extend beyond 4 GiB when the blob of space for
peripheral is located before start of DRAM, e.g. when start of DRAM
is 0x40000000 and continue beyond the 4 GiB mark.

Signed-off-by: Jonas Karlman <[email protected]>
Reviewed-by: Kever Yang <[email protected]>

Thanks,
- Kever
---
  arch/arm/mach-rockchip/sdram.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-rockchip/sdram.c b/arch/arm/mach-rockchip/sdram.c
index 7c21ae8efc44..3d3fc327234f 100644
--- a/arch/arm/mach-rockchip/sdram.c
+++ b/arch/arm/mach-rockchip/sdram.c
@@ -310,6 +310,8 @@ int dram_init_banksize(void)
        if (ram_top > SZ_4G && top < SZ_4G) {
                gd->bd->bi_dram[1].start = SZ_4G;
                gd->bd->bi_dram[1].size = ram_top - gd->bd->bi_dram[1].start;
+       } else if (ram_top > SZ_4G && top == SZ_4G) {
+               gd->bd->bi_dram[0].size = ram_top - gd->bd->bi_dram[0].start;
        }
  #else
  #ifdef CONFIG_SPL_OPTEE_IMAGE

Reply via email to