From 4961eafc25d0bfa7ac5f88ec78a7f7501c202fbb Mon Sep 17 00:00:00 2001 From: York Sun Date: Mon, 6 Mar 2017 09:02:34 -0800 Subject: armv8: layerscape: Update early MMU for DDR after initialization In early MMU table, DDR has to be mapped as device memory to avoid speculative access. After DDR is initialized, it needs to be updated to normal memory to allow code execution. To simplify the code, dram_init() is moved into a common file as a weak function. Signed-off-by: York Sun --- board/freescale/ls1043aqds/ls1043aqds.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'board/freescale/ls1043aqds') diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c index 8835a49..6507c09 100644 --- a/board/freescale/ls1043aqds/ls1043aqds.c +++ b/board/freescale/ls1043aqds/ls1043aqds.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -153,6 +154,10 @@ int dram_init(void) */ select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT); gd->ram_size = initdram(0); +#if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD) + /* This will break-before-make MMU for DDR */ + update_early_mmu_table(); +#endif return 0; } -- cgit v1.1