feat(st): allow AARCH64 compilation for common code

Use read_sctlr_el3() for aarch64 code instead of read_sctlr().

Change-Id: I17b5d1f8cb2918de6ab1d2d56c15cabca0ed43fd
Signed-off-by: Yann Gautier <yann.gautier@st.com>
This commit is contained in:
Yann Gautier 2020-09-09 18:13:44 +02:00
parent b0ce402457
commit dad7181698

View file

@ -113,7 +113,11 @@ bool stm32mp_lock_available(void)
const uint32_t c_m_bits = SCTLR_M_BIT | SCTLR_C_BIT;
/* The spinlocks are used only when MMU and data cache are enabled */
#ifdef __aarch64__
return (read_sctlr_el3() & c_m_bits) == c_m_bits;
#else
return (read_sctlr() & c_m_bits) == c_m_bits;
#endif
}
int stm32mp_map_ddr_non_cacheable(void)