aboutsummaryrefslogtreecommitdiff
path: root/plat/hisilicon/hikey
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2018-04-11 19:06:14 +0800
committerHaojian Zhuang <haojian.zhuang@linaro.org>2018-04-11 19:06:14 +0800
commited253f54da83860978cfd319948ba11e9f0128c9 (patch)
tree8a7257d94ea110f2a4c87b5e7a2e0a3532eea75b /plat/hisilicon/hikey
parent1d999558cfa764d38a4227f2aa3c8685977dc93b (diff)
downloadtrusted-firmware-a-ed253f54da83860978cfd319948ba11e9f0128c9.tar.gz
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>
Diffstat (limited to 'plat/hisilicon/hikey')
-rw-r--r--plat/hisilicon/hikey/hikey_bl2_setup.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/plat/hisilicon/hikey/hikey_bl2_setup.c b/plat/hisilicon/hikey/hikey_bl2_setup.c
index 2d9768ff6b..a3fc607bb2 100644
--- a/plat/hisilicon/hikey/hikey_bl2_setup.c
+++ b/plat/hisilicon/hikey/hikey_bl2_setup.c
@@ -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;