MLK-17153-2 imx8mq_arm2: Resolve malloc memory problem for SPL NAND boot
authorYe Li <ye.li@nxp.com>
Tue, 12 Dec 2017 06:02:19 +0000 (00:02 -0600)
committerYe Li <ye.li@nxp.com>
Wed, 13 Dec 2017 04:55:20 +0000 (22:55 -0600)
commitab1895fb5e38d216ff86de292a44776099d159ab
tree19b991dfd8b75eb115b1a8eb7b843c1cb8cb5db2
parent56cb2142cfb29d01a3ee8c160737167ccc3b2be6
MLK-17153-2 imx8mq_arm2: Resolve malloc memory problem for SPL NAND boot

When using SPL NAND boot, the required malloc memory is larger than SD/eMMC boot.
Since we have used out OCRAM (for ATF) and OCRAM_S, there is no enough memory could be
allocated.

The solution is moving the malloc memory pool to DDR. The malloc pool is initialized in
board_init_r, so we moved the VDD_DRAM adjustment and DDR init to board_init_f. Then the DDR
can setup before memory pool initialization. Because the i2c and PMIC driver needs to malloc
data, this change has to enable malloc_f pool by setting CONFIG_MALLOC_F_ADDR to previous
malloc address on OCRAM_S.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
board/freescale/imx8mq_arm2/spl.c
include/configs/imx8mq_arm2.h