arm: mach-k3: use CFG_MAX_MEM_SIZE
authorBryan Brattlof <bb@ti.com>
Fri, 25 Apr 2025 17:02:06 +0000 (12:02 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 2 May 2025 21:32:44 +0000 (15:32 -0600)
Rather than hard coding the maximum memory size, lets just define the
CFG_MAX_MEM_SIZE so get_effective_memsize() will return the correct
value without modification.

Signed-off-by: Bryan Brattlof <bb@ti.com>
arch/arm/mach-k3/common.c
arch/arm/mach-k3/common.h

index fa8cd93..fc230f1 100644 (file)
@@ -228,10 +228,6 @@ void spl_enable_cache(void)
        gd->arch.tlb_size = PGTABLE_SIZE;
 
        gd->ram_top += get_effective_memsize();
-       /* keep ram_top in the 32-bit address space */
-       if (gd->ram_top >= 0x100000000)
-               gd->ram_top = (phys_addr_t)0x100000000;
-
        gd->relocaddr = gd->ram_top;
 
        ret = spl_reserve_video_from_ram_top();
index 2ec60c7..02c7473 100644 (file)
@@ -10,6 +10,9 @@
 #include <asm/hardware.h>
 #include <mach/security.h>
 
+/* keep ram_top in the 32-bit address space */
+#define CFG_MAX_MEM_MAPPED             0x100000000
+
 #define K3_FIREWALL_BACKGROUND_BIT (8)
 
 struct fwl_data {