arm: stm32mp: activate data cache on DDR in SPL
authorPatrick Delaunay <patrick.delaunay@st.com>
Thu, 30 Apr 2020 14:30:21 +0000 (16:30 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Thu, 14 May 2020 07:02:12 +0000 (09:02 +0200)
commitdc7e5f190de5ac89fafe3e6212a6167a2b7a36d0
tree7ecbf62873a7a19b8327a392fcd9593b3ab7effb
parent7e8471cae5c6614c54b9cfae2746d7299bd47a0c
arm: stm32mp: activate data cache on DDR in SPL

Activate cache on DDR to improve the accesses to DDR used by SPL:
- CONFIG_SPL_BSS_START_ADDR
- CONFIG_SYS_SPL_MALLOC_START

Cache is configured only when DDR is fully initialized,
to avoid speculative access and issue in get_ram_size().
Data cache is deactivated at the end of SPL, to flush the data cache
and the TLB.

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
arch/arm/mach-stm32mp/spl.c