diff options
author | Neil Zhang <zhangwm@marvell.com> | 2012-07-30 20:44:20 +0800 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2019-07-22 19:39:57 +0200 |
commit | 8a7a9966a5d6ebc07bfc1c5480cb1bf2097de80a (patch) | |
tree | 3c68adb69e10235796f9680e2ffff95c20433ea0 | |
parent | 150979a0de017f9c90e4049274f6117112334536 (diff) | |
download | linux-mmp3-dell-ariel-8a7a9966a5d6ebc07bfc1c5480cb1bf2097de80a.tar.gz |
ARM: mmp: remove OBM memory from kernel
We'd better remove OMB memory form kernel just like what CP memory do.
Change-Id: I3ef5be1fd196e4aa925a377f3842225be49ed389
Signed-off-by: Neil Zhang <zhangwm@marvell.com>
-rw-r--r-- | arch/arm/mach-mmp/pxa988.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/mach-mmp/pxa988.c b/arch/arm/mach-mmp/pxa988.c index 0e928a4f2c4988..9997c533334f4d 100644 --- a/arch/arm/mach-mmp/pxa988.c +++ b/arch/arm/mach-mmp/pxa988.c @@ -369,6 +369,16 @@ static void __init pxa988_reserve_cpmem(void) pr_info("Reserved CP memory: 0x%x@0x%x\n", cp_area_size, cp_area_addr); } +static void __init pxa988_reserve_obmmem(void) +{ + /* Reserve 16MB memory for CP */ + BUG_ON(memblock_reserve(PLAT_PHYS_OFFSET, 0x100000) != 0); + memblock_free(PLAT_PHYS_OFFSET, 0x100000); + memblock_remove(PLAT_PHYS_OFFSET, 0x100000); + pr_info("Reserved OBM memory: 0x%x@0x%lx\n", + 0x100000, PLAT_PHYS_OFFSET); +} + void __init pxa988_reserve(void) { /* @@ -376,7 +386,7 @@ void __init pxa988_reserve(void) * (Enhanced Marvell Memory Dump), kernel should not make use of this * memory, since it'll be corrupted by next reboot by obm. */ - BUG_ON(memblock_reserve(PLAT_PHYS_OFFSET, 0x100000)); + pxa988_reserve_obmmem(); pxa988_reserve_cpmem(); |