mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
arm64: mm: reserve memory region for uboot
Signed-off-by: CMY <cmy@rock-chips.com>
This commit is contained in:
@@ -39,6 +39,10 @@
|
||||
#include <asm/sizes.h>
|
||||
#include <asm/tlb.h>
|
||||
|
||||
#ifdef CONFIG_ARCH_ROCKCHIP
|
||||
#include <linux/rockchip/common.h>
|
||||
#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 */
|
||||
|
||||
Reference in New Issue
Block a user