summaryrefslogtreecommitdiff
path: root/board/freescale/imx8mm_evk
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 /board/freescale/imx8mm_evk
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)
Diffstat (limited to 'board/freescale/imx8mm_evk')
-rw-r--r--board/freescale/imx8mm_evk/imx8mm_evk.c6
1 files changed, 5 insertions, 1 deletions
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;
}