Skip to content

Commit 9f31feb

Browse files
mmahadevan108kartben
authored andcommitted
soc: imxrt118x: Use the External Cache driver for CM33
The CM33 has a XCACHE controller to manage the External cache. Remove unused Kconfigs as we can use Zephyr API's to manage the CM33 cache, Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
1 parent 7044af4 commit 9f31feb

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

soc/nxp/imxrt/imxrt118x/Kconfig

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ config SOC_SERIES_IMXRT118X
2828

2929
config SOC_MIMXRT1189_CM33
3030
select CPU_CORTEX_M33
31+
select HAS_MCUX_XCACHE
32+
select CACHE_MANAGEMENT
3133

3234
config SOC_MIMXRT1189_CM7
3335
select CPU_CORTEX_M7
@@ -66,12 +68,4 @@ config S3MU_MCUX_S3MU
6668
default y
6769
bool "Use S3MU MCUX Driver"
6870

69-
config IMXRT118X_CM33_XCACHE_PS
70-
bool "Use CM33 XCACHE_PS"
71-
default y if SOC_MIMXRT1189_CM33
72-
help
73-
Use CM33 XCACHE_PS at boot. Please note XCACHE_PC have been
74-
enabled in SystemInit function. If this Kconfig is cleared,
75-
the XCACHE controller won't be enabled during SOC init
76-
7771
endif # SOC_SERIES_IMXRT118X

soc/nxp/imxrt/imxrt118x/Kconfig.defconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ config NXP_IMXRT_BOOT_HEADER
3434

3535
endif # SECOND_CORE_MCUX
3636

37+
choice CACHE_TYPE
38+
default EXTERNAL_CACHE if SOC_MIMXRT1189_CM33
39+
endchoice
40+
3741
endif # SOC_SERIES_IMXRT118X

soc/nxp/imxrt/imxrt118x/soc.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
#include <soc.h>
1111
#include <zephyr/linker/sections.h>
1212
#include <zephyr/linker/linker-defs.h>
13-
#if defined(CONFIG_SOC_MIMXRT1189_CM7)
1413
#include <zephyr/cache.h>
15-
#elif defined(CONFIG_IMXRT118X_CM33_XCACHE_PS)
16-
#include <fsl_cache.h>
17-
#endif
1814
#include <fsl_clock.h>
1915
#include <fsl_gpc.h>
2016
#include <fsl_pmu.h>
@@ -631,13 +627,8 @@ void soc_early_init_hook(void)
631627
trdc_enable_all_access();
632628

633629
/* Enable data cache */
634-
#if defined(CONFIG_IMXRT118X_CM33_XCACHE_PS)
635-
XCACHE_EnableCache(XCACHE_PC);
636-
XCACHE_EnableCache(XCACHE_PS);
637-
#elif defined(CONFIG_SOC_MIMXRT1189_CM7)
638-
sys_cache_instr_enable();
639630
sys_cache_data_enable();
640-
#endif
631+
641632
__ISB();
642633
__DSB();
643634
}

0 commit comments

Comments
 (0)