hikey: clean sram before mcu used

Clean cache to flush parameters into SRAM before MCU using them.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
This commit is contained in:
Haojian Zhuang 2018-04-11 19:06:14 +08:00
parent 1d999558cf
commit ed253f54da
1 changed files with 5 additions and 4 deletions

View File

@ -304,15 +304,13 @@ void bl2_platform_setup(void)
hikey_gpio_init();
hikey_pmussi_init();
hikey_hi6553_init();
/* Clear SRAM since it'll be used by MCU right now. */
memset((void *)SRAM_BASE, 0, SRAM_SIZE);
dsb();
hikey_ddr_init(DDR_FREQ_800M);
hikey_security_setup();
/* Clear SRAM since it'll be used by MCU right now. */
memset((void *)SRAM_BASE, 0, SRAM_SIZE);
clean_dcache_range(SRAM_BASE, SRAM_SIZE);
hikey_boardid_init();
init_acpu_dvfs();
hikey_rtc_init();
@ -321,6 +319,9 @@ void bl2_platform_setup(void)
hikey_mmc_pll_init();
/* Clean SRAM before MCU used */
clean_dcache_range(SRAM_BASE, SRAM_SIZE);
reset_dwmmc_clk();
memset(&params, 0, sizeof(dw_mmc_params_t));
params.reg_base = DWMMC0_BASE;