File tree Expand file tree Collapse file tree 5 files changed +26
-12
lines changed Expand file tree Collapse file tree 5 files changed +26
-12
lines changed Original file line number Diff line number Diff line change @@ -79,10 +79,6 @@ void board_early_init_hook(void)
79
79
.coarseTrimEn = true,
80
80
};
81
81
82
- #ifndef CONFIG_IMXRT7XX_CODE_CACHE
83
- CACHE64_DisableCache (CACHE64_CTRL0 );
84
- #endif
85
-
86
82
POWER_DisablePD (kPDRUNCFG_PD_LPOSC );
87
83
88
84
/* Power up OSC */
Original file line number Diff line number Diff line change @@ -14,8 +14,13 @@ config SOC_MIMXRT798S_CM33_CPU0
14
14
select CPU_CORTEX_M_HAS_SYSTICK
15
15
select HAS_MCUX
16
16
select HAS_MCUX_SYSCON
17
- select HAS_MCUX_CACHE
17
+ select HAS_MCUX_XCACHE
18
+ select CACHE_MANAGEMENT
19
+ select CPU_HAS_ICACHE
20
+ select CPU_HAS_DCACHE
21
+ select INIT_ARCH_HW_AT_BOOT
18
22
select SOC_RESET_HOOK
23
+ select SOC_EARLY_INIT_HOOK
19
24
select HAS_MCUX_FLEXCOMM
20
25
21
26
config SOC_MIMXRT798S_CM33_CPU1
@@ -46,13 +51,6 @@ config GLIKEY_MCUX_GLIKEY
46
51
default y
47
52
bool "Use glikey MCUX Driver"
48
53
49
- config IMXRT7XX_CODE_CACHE
50
- bool "Code cache"
51
- default y if HAS_MCUX_CACHE
52
- help
53
- Enable code cache for XSPI region at boot. If this Kconfig is
54
- cleared, the CACHE64 controller will be disabled during SOC init
55
-
56
54
config MCUX_CORE_SUFFIX
57
55
default "_cm33_core0" if SOC_MIMXRT798S_CM33_CPU0
58
56
default "_cm33_core1" if SOC_MIMXRT798S_CM33_CPU1
Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ config NUM_IRQS
12
12
config SYS_CLOCK_HW_CYCLES_PER_SEC
13
13
default 237500000 if CORTEX_M_SYSTICK
14
14
15
+ choice CACHE_TYPE
16
+ default EXTERNAL_CACHE
17
+ endchoice
18
+
15
19
endif # SOC_MIMXRT798S_CM33_CPU0
16
20
17
21
if SOC_MIMXRT798S_CM33_CPU1
Original file line number Diff line number Diff line change 15
15
#include <zephyr/init.h>
16
16
#include <zephyr/devicetree.h>
17
17
#include <zephyr/linker/sections.h>
18
+ #include <zephyr/cache.h>
18
19
#include <soc.h>
19
20
21
+ void soc_early_init_hook (void )
22
+ {
23
+ /* Enable data cache */
24
+ sys_cache_data_enable ();
25
+
26
+ __ISB ();
27
+ __DSB ();
28
+ }
29
+
20
30
#ifdef CONFIG_SOC_RESET_HOOK
21
31
22
32
void soc_reset_hook (void )
Original file line number Diff line number Diff line change 20
20
#include <zephyr/sys/util.h>
21
21
#include <fsl_common.h>
22
22
23
+ /* CPU 0 has an instruction and data cache, provide the defines for XCACHE */
24
+ #ifdef CONFIG_SOC_MIMXRT798S_CM33_CPU0
25
+ #define NXP_XCACHE_INSTR XCACHE1
26
+ #define NXP_XCACHE_DATA XCACHE0
27
+ #endif
28
+
23
29
#ifdef __cplusplus
24
30
extern "C" {
25
31
#endif
You can’t perform that action at this time.
0 commit comments