From 49d32447986cd017c97eb65f92bbf251a8b96255 Mon Sep 17 00:00:00 2001 From: Benedikt Schmidt Date: Mon, 18 Dec 2023 10:36:03 +0100 Subject: [PATCH] soc: arm: use sys_cache* for enabling the caches in nxp_s32 Use sys_cache* for enabling the caches in nxp_s32. This automatically considers CONFIG_CACHE_MANAGEMENT and will activate the cases only if this is active. Signed-off-by: Benedikt Schmidt --- soc/arm/nxp_s32/s32k3/soc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/soc/arm/nxp_s32/s32k3/soc.c b/soc/arm/nxp_s32/s32k3/soc.c index 5db4204a89c..be822677189 100644 --- a/soc/arm/nxp_s32/s32k3/soc.c +++ b/soc/arm/nxp_s32/s32k3/soc.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -50,13 +51,8 @@ const struct ivt ivt_header __attribute__((section(".ivt_header"))) = { static int soc_init(void) { - SCB_EnableICache(); - - if (IS_ENABLED(CONFIG_DCACHE)) { - if (!(SCB->CCR & SCB_CCR_DC_Msk)) { - SCB_EnableDCache(); - } - } + sys_cache_instr_enable(); + sys_cache_data_enable(); OsIf_Init(NULL);