diff --git a/soc/arm/nxp_s32/s32k1/soc.c b/soc/arm/nxp_s32/s32k1/soc.c index 175b6fe64427d0..50cff147846a90 100644 --- a/soc/arm/nxp_s32/s32k1/soc.c +++ b/soc/arm/nxp_s32/s32k1/soc.c @@ -15,6 +15,10 @@ #include #include +#if defined(CONFIG_HAS_MCUX_CACHE) +#include +#endif + #if defined(CONFIG_WDOG_INIT) #define WDOG_UPDATE_KEY 0xD928C520U @@ -64,17 +68,7 @@ static int soc_init(void) #endif /* !CONFIG_ARM_MPU */ #if defined(CONFIG_HAS_MCUX_CACHE) && defined(CONFIG_NXP_S32_ENABLE_CODE_CACHE) - /* Invalidate all ways */ - IP_LMEM->PCCCR |= LMEM_PCCCR_INVW1_MASK | LMEM_PCCCR_INVW0_MASK; - IP_LMEM->PCCCR |= LMEM_PCCCR_GO_MASK; - - /* Wait until the command completes */ - while (IP_LMEM->PCCCR & LMEM_PCCCR_GO_MASK) { - ; - } - - /* Enable cache */ - IP_LMEM->PCCCR |= (LMEM_PCCCR_ENCACHE_MASK); + L1CACHE_EnableCodeCache(); barrier_isync_fence_full(); #endif diff --git a/west.yml b/west.yml index e31e126f361e35..ef8cbc55354a34 100644 --- a/west.yml +++ b/west.yml @@ -193,7 +193,7 @@ manifest: groups: - hal - name: hal_nxp - revision: d0c424e1c6ef0acac3099a07280a46a24951a47a + revision: 1b2f3608ab0d5f2cf2a4c2973ae9f6353fb43e72 path: modules/hal/nxp groups: - hal