soc: arm: imx_rt10xx: enable code cache during boot

For certain combinations of configuration parameters,
z_arm_init_arch_hw_at_boot() disables the instruction cache. Make sure
to re-enable it if required.

Signed-off-by: Jan Peters <peters@kt-elektronik.de>
This commit is contained in:
Jan Peters 2023-04-28 10:53:23 +02:00 committed by Carles Cufí
commit b9235faf22

View file

@ -292,6 +292,11 @@ static int imxrt_init(void)
#ifndef CONFIG_IMXRT1XXX_CODE_CACHE #ifndef CONFIG_IMXRT1XXX_CODE_CACHE
/* SystemInit enables code cache, disable it here */ /* SystemInit enables code cache, disable it here */
SCB_DisableICache(); SCB_DisableICache();
#else
/* z_arm_init_arch_hw_at_boot() disables code cache if CONFIG_ARCH_CACHE is enabled,
* enable it here.
*/
SCB_EnableICache();
#endif #endif
if (IS_ENABLED(CONFIG_IMXRT1XXX_DATA_CACHE)) { if (IS_ENABLED(CONFIG_IMXRT1XXX_DATA_CACHE)) {