From ace75d642fa71034b248cde30709c79e06c52d61 Mon Sep 17 00:00:00 2001
From: Joost van Zwieten <joost@diskos.nl>
Date: Sun, 15 Jan 2023 00:57:30 +0100
Subject: [PATCH] odroid: limit boot memory to lowmem

In commit 4963f63fe61f ("image: Use gd->ram_base/_size in
env_get_bootm_size()") the size of the available memory for U-Boot to
use when relocating images, and not otherwise constrained, was changed
to include all known memory banks. In the case of this platform however,
all of the memory known to U-Boot is not also part of the Linux kernel
"lowmem" and so we must use CFG_SYS_BOOTMAPSZ to limit where we relocate
images to. We set a conservative limit of 256MB here to mirror the
previous behavior.

Signed-off-by: Joost van Zwieten <joost@diskos.nl>
[trini: Reword the commit messsage]
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 include/configs/odroid.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index 560a23c23e..7255efc2df 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -17,6 +17,7 @@
 #define CFG_SYS_PL310_BASE	0x10502000
 #endif
 
+#define CFG_SYS_BOOTMAPSZ	0x10000000
 #define CFG_SYS_SDRAM_BASE	0x40000000
 #define SDRAM_BANK_SIZE		(256 << 20)	/* 256 MB */
 #define PHYS_SDRAM_1		CFG_SYS_SDRAM_BASE
-- 
2.39.5