diff options
author | York Sun <york.sun@nxp.com> | 2017-03-06 17:02:34 (GMT) |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2017-03-14 15:44:03 (GMT) |
commit | 4961eafc25d0bfa7ac5f88ec78a7f7501c202fbb (patch) | |
tree | f1e66358f067240368b3b3b70514f7b8b3c49dc5 /board/freescale/ls1012afrdm | |
parent | 7f9b9f318ff152bd8d2e8b573708e2bdc088c1b1 (diff) | |
download | u-boot-fsl-qoriq-4961eafc25d0bfa7ac5f88ec78a7f7501c202fbb.tar.xz |
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 <york.sun@nxp.com>
Diffstat (limited to 'board/freescale/ls1012afrdm')
-rw-r--r-- | board/freescale/ls1012afrdm/ls1012afrdm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c index 1f3adc1..25d22d2 100644 --- a/board/freescale/ls1012afrdm/ls1012afrdm.c +++ b/board/freescale/ls1012afrdm/ls1012afrdm.c @@ -12,6 +12,7 @@ #ifdef CONFIG_FSL_LS_PPA #include <asm/arch/ppa.h> #endif +#include <asm/arch/mmu.h> #include <asm/arch/soc.h> #include <hwconfig.h> #include <environment.h> @@ -48,6 +49,10 @@ int dram_init(void) mmdc_init(&mparam); gd->ram_size = CONFIG_SYS_SDRAM_SIZE; +#if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD) + /* This will break-before-make MMU for DDR */ + update_early_mmu_table(); +#endif return 0; } |