summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvano di Ninno <silvano.dininno@nxp.com>2018-05-17 17:05:19 +0200
committerYe Li <ye.li@nxp.com>2018-05-23 04:15:59 -0700
commit95e018dc7eaf9735337c3aa35a3dc1910a86dbab (patch)
treef5d4d03b8ff8d907593fcda7f1ad919e4cbfc6e5
parent2b00bc79aad84160d5c8fc2aa4a6baba5e67b94d (diff)
MLK-18344: add OP-TEE support for i.Mx 8MM
like for i.MX 8mq ATF passes as argument to u-boot the start and the length of the BL32 firmware. u-boot uses this information to adjust the size of the DDR for linux. Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit e9ec5ea8dbe3d12b40ba22fe36400cfe98e1bd44)
-rw-r--r--arch/arm/mach-imx/imx8m/soc.c2
-rw-r--r--board/freescale/imx8mm_evk/imx8mm_evk.c6
-rw-r--r--include/configs/imx8mm_evk.h2
3 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index dc024508f3..c31f75b1e9 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -248,6 +248,7 @@ static int ft_add_optee_node(void *fdt, bd_t *bd)
int ft_system_setup(void *blob, bd_t *bd)
{
+#ifdef CONFIG_IMX8MQ
int i = 0;
int rc;
int nodeoff;
@@ -339,6 +340,7 @@ usb_modify_speed:
"cpu-idle-states");
}
}
+#endif
return ft_add_optee_node(blob, bd);
}
diff --git a/board/freescale/imx8mm_evk/imx8mm_evk.c b/board/freescale/imx8mm_evk/imx8mm_evk.c
index 9d57b3b946..9fec297fc5 100644
--- a/board/freescale/imx8mm_evk/imx8mm_evk.c
+++ b/board/freescale/imx8mm_evk/imx8mm_evk.c
@@ -135,7 +135,11 @@ int board_postclk_init(void)
int dram_init(void)
{
- gd->ram_size = PHYS_SDRAM_SIZE;
+ /* rom_pointer[1] contains the size of TEE occupies */
+ if (rom_pointer[1])
+ gd->ram_size = PHYS_SDRAM_SIZE - rom_pointer[1];
+ else
+ gd->ram_size = PHYS_SDRAM_SIZE;
return 0;
}
diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h
index 366ee02c3d..ae1dd6f696 100644
--- a/include/configs/imx8mm_evk.h
+++ b/include/configs/imx8mm_evk.h
@@ -316,4 +316,6 @@
#endif
+#define CONFIG_OF_SYSTEM_SETUP
+
#endif