Commit 95e018dc7eaf9735337c3aa35a3dc1910a86dbab
Committed by
Ye Li
1 parent
2b00bc79aa
Exists in
smarc_8mm-imx_v2018.03_4.14.98_2.0.0_ga
and in
5 other branches
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)
Showing 3 changed files with 9 additions and 1 deletions Side-by-side Diff
arch/arm/mach-imx/imx8m/soc.c
... | ... | @@ -248,6 +248,7 @@ |
248 | 248 | |
249 | 249 | int ft_system_setup(void *blob, bd_t *bd) |
250 | 250 | { |
251 | +#ifdef CONFIG_IMX8MQ | |
251 | 252 | int i = 0; |
252 | 253 | int rc; |
253 | 254 | int nodeoff; |
... | ... | @@ -339,6 +340,7 @@ |
339 | 340 | "cpu-idle-states"); |
340 | 341 | } |
341 | 342 | } |
343 | +#endif | |
342 | 344 | |
343 | 345 | return ft_add_optee_node(blob, bd); |
344 | 346 | } |
board/freescale/imx8mm_evk/imx8mm_evk.c
... | ... | @@ -135,7 +135,11 @@ |
135 | 135 | |
136 | 136 | int dram_init(void) |
137 | 137 | { |
138 | - gd->ram_size = PHYS_SDRAM_SIZE; | |
138 | + /* rom_pointer[1] contains the size of TEE occupies */ | |
139 | + if (rom_pointer[1]) | |
140 | + gd->ram_size = PHYS_SDRAM_SIZE - rom_pointer[1]; | |
141 | + else | |
142 | + gd->ram_size = PHYS_SDRAM_SIZE; | |
139 | 143 | |
140 | 144 | return 0; |
141 | 145 | } |