diff options
author | Peng Fan <peng.fan@nxp.com> | 2020-05-05 20:28:37 +0800 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2020-05-10 20:55:20 +0200 |
commit | f44afd546f6236479581469e1fb969c9ce9f9eac (patch) | |
tree | fb9d383b46afefed317d82eddf6a28348cfb09c8 /arch/arm/mach-imx/imx8/fdt.c | |
parent | bf9382addf94c9b90033a1eac5522afae9b7a0d7 (diff) |
imx: imx8qm/qxp: reserving DDR memory for M4
The DDR memory from 0x88000000 to 0x8FFFFFFF is assigned to M4 on
QM and QXP. The M4 can allocate this memory by two ways,
in SCD or u-boot.
In this patch, u-boot addes the memory reserve node to DTB to pass
the info to kernel, no matter the M4 memory is reserved in SCD
or u-boot. So kernel won't access M4 reserved memory.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'arch/arm/mach-imx/imx8/fdt.c')
-rw-r--r-- | arch/arm/mach-imx/imx8/fdt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx8/fdt.c b/arch/arm/mach-imx/imx8/fdt.c index 65c8ac1a7e..5993645378 100644 --- a/arch/arm/mach-imx/imx8/fdt.c +++ b/arch/arm/mach-imx/imx8/fdt.c @@ -8,6 +8,7 @@ #include <asm/arch/sys_proto.h> #include <dm/ofnode.h> #include <fdt_support.h> +#include <linux/libfdt.h> DECLARE_GLOBAL_DATA_PTR; @@ -279,6 +280,15 @@ static int ft_add_optee_node(void *fdt, bd_t *bd) int ft_system_setup(void *blob, bd_t *bd) { int ret; + int off; + + if (CONFIG_BOOTAUX_RESERVED_MEM_BASE) { + off = fdt_add_mem_rsv(blob, CONFIG_BOOTAUX_RESERVED_MEM_BASE, + CONFIG_BOOTAUX_RESERVED_MEM_SIZE); + if (off < 0) + printf("Failed to reserve memory for bootaux: %s\n", + fdt_strerror(off)); + } update_fdt_with_owned_resources(blob); |