hikey: clean dcache for SRAM after initialized

Although SRAM is initialized, DCACHE should be cleaned too.
Because MCU is a parrallel core to access SRAM. We need to make
sure that initialized value is really written to SRAM before
MCU using it.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
This commit is contained in:
Haojian Zhuang 2018-01-29 11:42:42 +08:00
parent 103c213c0d
commit a9b3021e14
1 changed files with 1 additions and 0 deletions

View File

@ -276,6 +276,7 @@ void bl2_early_platform_setup(meminfo_t *mem_layout)
/* 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);
sp804_timer_init(SP804_TIMER0_BASE, 10, 192);
dsb();