
From: Heinrich Schuchardt xypron.glpk@gmx.de
The Odroid C2 has two GiB of memory with two reserved regions. reg = <0x0 0x0 0x0 0x1000000>; reg = <0x0 0x10000000 0x0 0x200000>;
The description has been created with the following patches:
Patch bfcef28ae4cf (arm: add initial support for Amlogic Meson and ODROID-C2) defined the available memory in arch/arm/dts/meson-gxbb-odroidc2.dts as reg = <0x0 0x0 0x0 0x80000000> and the number of RAM banks as #define CONFIG_NR_DRAM_BANKS 1.
Patch 4b3ab59d21ef (configs: gxbb: Introduce a common config header file) moved the number of RAM banks to include/configs/meson-gxbb-common.h.
Patch a3b02a1d4926 (arm: dts: update Meson GXBB / Odroid-C2 DT with recent) defined two reserved memory regions in arch/arm/dts/meson-gx.dtsi.
U-Boot does not support the concept of reserved memory regions.
Amongst other mishaps this leads to a wrong memory configuration when calling bootefi which may cause a memory violation.
The easiest way to correct this is to define multiple memory banks.
In the long run fdt support for reserved-memory might be implemented.
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de --- arch/arm/dts/meson-gxbb-odroidc2.dts | 7 ++++++- include/configs/meson-gxbb-common.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/arm/dts/meson-gxbb-odroidc2.dts b/arch/arm/dts/meson-gxbb-odroidc2.dts index c737183a29..35b8300e23 100644 --- a/arch/arm/dts/meson-gxbb-odroidc2.dts +++ b/arch/arm/dts/meson-gxbb-odroidc2.dts @@ -61,7 +61,12 @@
memory@0 { device_type = "memory"; - reg = <0x0 0x0 0x0 0x80000000>; + reg =<0x0 0x1000000 0x0 0xf000000>; + }; + + memory@1 { + device_type = "memory"; + reg = <0x0 0x10200000 0x0 0x6fe00000>; };
usb_otg_pwr: regulator-usb-pwrs { diff --git a/include/configs/meson-gxbb-common.h b/include/configs/meson-gxbb-common.h index 89e3807a14..ed55f441a4 100644 --- a/include/configs/meson-gxbb-common.h +++ b/include/configs/meson-gxbb-common.h @@ -10,7 +10,7 @@
#define CONFIG_CPU_ARMV8 #define CONFIG_REMAKE_ELF -#define CONFIG_NR_DRAM_BANKS 1 +#define CONFIG_NR_DRAM_BANKS 2 #define CONFIG_ENV_IS_NOWHERE 1 #define CONFIG_ENV_SIZE 0x2000 #define CONFIG_SYS_MAXARGS 32