summaryrefslogtreecommitdiff
path: root/arch/arm/mach-meson
diff options
context:
space:
mode:
authorxypron.glpk@gmx.de <xypron.glpk@gmx.de>2017-06-09 22:13:59 +0200
committerTom Rini <trini@konsulko.com>2017-07-22 15:36:18 -0400
commite42f096f78b85eb7077f6ab5505baaa83b41509c (patch)
treeffeb5f8b882119f5964671e1b66d6ae700f89a75 /arch/arm/mach-meson
parent9d364af23ea26414afd09152e85d62a0d950a50d (diff)
meson-gx: reserved memory regions
The Odroid C2 has two GiB of memory with two reserved regions. reg = <0x0 0x0 0x0 0x1000000>; reg = <0x0 0x10000000 0x0 0x200000>; Patch bfcef28ae4cf (arm: add initial support for Amlogic Meson and ODROID-C2) provided function dram_init_banksize to reserve the first 16 MiB of RAM for firmware in function dram_init_banksize in arch/arm/mach-meson/board.c and defined CONFIG_NR_DRAM_BANKS = 1. With this patch dram_init_banksize is changed to additionally reserve the 2MiB region for the ARM Trusted Firmware (BL31). CONFIG_NR_DRAM_BANKS is set to 2. Cc: Andreas Färber <afaerber@suse.de> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'arch/arm/mach-meson')
-rw-r--r--arch/arm/mach-meson/board.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/mach-meson/board.c b/arch/arm/mach-meson/board.c
index 273dbeb020..e89c6aace9 100644
--- a/arch/arm/mach-meson/board.c
+++ b/arch/arm/mach-meson/board.c
@@ -37,9 +37,11 @@ int dram_init(void)
int dram_init_banksize(void)
{
/* Reserve first 16 MiB of RAM for firmware */
- gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE + (16 * 1024 * 1024);
- gd->bd->bi_dram[0].size = gd->ram_size - (16 * 1024 * 1024);
-
+ gd->bd->bi_dram[0].start = 0x1000000;
+ gd->bd->bi_dram[0].size = 0xf000000;
+ /* Reserve 2 MiB for ARM Trusted Firmware (BL31) */
+ gd->bd->bi_dram[1].start = 0x10000000;
+ gd->bd->bi_dram[1].size = gd->ram_size - 0x10200000;
return 0;
}