From 9b094d9d58dd393cce91dfb66859c54df26b745a Mon Sep 17 00:00:00 2001 From: CMY Date: Mon, 2 Mar 2015 11:44:54 +0800 Subject: [PATCH] arm64: mm: reserve memory region for uboot Signed-off-by: CMY --- arch/arm64/mm/init.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index ea0c0812ef8e..5c06413183f0 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -39,6 +39,10 @@ #include #include +#ifdef CONFIG_ARCH_ROCKCHIP +#include +#endif + #include "mm.h" static unsigned long phys_initrd_start __initdata = 0; @@ -143,22 +147,6 @@ static void arm64_memory_present(void) } #endif -#ifdef CONFIG_ARCH_ROCKCHIP -extern struct ion_platform_data ion_pdata; -extern void __init ion_reserve(struct ion_platform_data *data); -extern int __init rockchip_ion_find_heap(unsigned long node, - const char *uname, int depth, void *data); - -void __init rockchip_ion_reserve_bit64(void) -{ -#ifdef CONFIG_ION_ROCKCHIP - printk("%s\n", __func__); - of_scan_flat_dt(rockchip_ion_find_heap, (void*)&ion_pdata); - ion_reserve(&ion_pdata); -#endif -} -#endif - void __init arm64_memblock_init(void) { u64 *reserve_map, base, size; @@ -200,7 +188,11 @@ void __init arm64_memblock_init(void) early_init_fdt_scan_reserved_mem(); #ifdef CONFIG_ARCH_ROCKCHIP - rockchip_ion_reserve_bit64(); + /* reserve memory for uboot */ + rockchip_uboot_mem_reserve(); + + /* reserve memory for ION */ + rockchip_ion_reserve(); #endif /* 4GB maximum for 32-bit only capable devices */ -- 2.34.1