From 1f1b430d88dc52bf9bd0e38d3f7bcbaccc3c3f88 Mon Sep 17 00:00:00 2001 From: Benedikt Schmidt Date: Mon, 18 Dec 2023 10:45:47 +0100 Subject: [PATCH] soc: arm: remove redundant cache config options for kv5x Remove the redundant cache config options for kv5x and use the sys_cache* functions to enable the caches. This will automatically consider CONFIG_CACHE_MANAGEMENT. Signed-off-by: Benedikt Schmidt --- soc/arm/nxp_kinetis/kv5x/Kconfig.soc | 8 -------- soc/arm/nxp_kinetis/kv5x/soc.c | 11 +++-------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/soc/arm/nxp_kinetis/kv5x/Kconfig.soc b/soc/arm/nxp_kinetis/kv5x/Kconfig.soc index 3a9a6d3adf2..dd69ca523b0 100644 --- a/soc/arm/nxp_kinetis/kv5x/Kconfig.soc +++ b/soc/arm/nxp_kinetis/kv5x/Kconfig.soc @@ -57,12 +57,4 @@ config SOC_PART_NUMBER_KINETIS_KV5X number selection choice defines the default value for this string. -config KINETIS_KV5X_ENABLE_CODE_CACHE - bool "Code cache" - default y - -config KINETIS_KV5X_ENABLE_DATA_CACHE - bool "Data cache" - default y - endif # SOC_SERIES_KINETIS_KV5X diff --git a/soc/arm/nxp_kinetis/kv5x/soc.c b/soc/arm/nxp_kinetis/kv5x/soc.c index 4c566dadcd0..59b77f1c172 100644 --- a/soc/arm/nxp_kinetis/kv5x/soc.c +++ b/soc/arm/nxp_kinetis/kv5x/soc.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -90,14 +91,8 @@ static int kv5x_init(void) /* Initialize system clocks and PLL */ clk_init(); -#ifndef CONFIG_KINETIS_KV5X_ENABLE_CODE_CACHE - /* SystemInit will have enabled the code cache. Disable it here */ - SCB_DisableICache(); -#endif -#ifndef CONFIG_KINETIS_KV5X_ENABLE_DATA_CACHE - /* SystemInit will have enabled the data cache. Disable it here */ - SCB_DisableDCache(); -#endif + sys_cache_instr_enable(); + sys_cache_data_enable(); return 0; }