File tree Expand file tree Collapse file tree 4 files changed +70
-0
lines changed
Expand file tree Collapse file tree 4 files changed +70
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ zephyr_library_sources_ifdef(CONFIG_CACHE_ASPEED cache_aspeed.c)
1313zephyr_library_sources_ifdef(CONFIG_CACHE_BFLB_L1C cache_bflb_l1c.c)
1414zephyr_library_sources_ifdef(CONFIG_CACHE_NRF_CACHE cache_nrf.c)
1515zephyr_library_sources_ifdef(CONFIG_CACHE_NXP_LMEM_CACHE cache_nxp_lmem_cache.c)
16+ zephyr_library_sources_ifdef(CONFIG_CACHE_NXP_SYSCON_LPCAC cache_nxp_syscon_lpcac.c)
1617zephyr_library_sources_ifdef(CONFIG_CACHE_NXP_XCACHE cache_nxp_xcache.c)
1718zephyr_library_sources_ifdef(CONFIG_CACHE_STM32 cache_stm32.c)
1819# zephyr-keep-sorted-stop
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ source "drivers/cache/Kconfig.aspeed"
2424source "drivers/cache/Kconfig.bflb"
2525source "drivers/cache/Kconfig.nrf"
2626source "drivers/cache/Kconfig.nxp_lmem_cache"
27+ source "drivers/cache/Kconfig.nxp_syscon_lpcac"
2728source "drivers/cache/Kconfig.nxp_xcache"
2829source "drivers/cache/Kconfig.stm32"
2930# zephyr-keep-sorted-stop
Original file line number Diff line number Diff line change 1+ # Copyright 2025 NXP
2+ # SPDX-License-Identifier: Apache-2.0
3+
4+ config CACHE_NXP_SYSCON_LPCAC
5+ bool "NXP external cache driver for NXP syscon lpcac controller"
6+ default y
7+ select CACHE_HAS_DRIVER
8+ depends on HAS_MCUX_SYSCON_LPCAC
9+ help
10+ This option enables the syscon lpcac driver for NXP SoCs.
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2025 NXP
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ #include <zephyr/kernel.h>
8+ #include <zephyr/drivers/cache.h>
9+ #include <zephyr/logging/log.h>
10+ #include <fsl_cache_lpcac.h>
11+
12+ void cache_instr_enable (void )
13+ {
14+ L1CACHE_EnableCodeCache ();
15+ }
16+
17+ void cache_instr_disable (void )
18+ {
19+ L1CACHE_DisableCodeCache ();
20+ }
21+
22+ int cache_instr_flush_all (void )
23+ {
24+ return - ENOTSUP ;
25+ }
26+
27+ int cache_instr_invd_all (void )
28+ {
29+ L1CACHE_InvalidateCodeCache ();
30+
31+ return 0 ;
32+ }
33+
34+ int cache_instr_flush_and_invd_all (void )
35+ {
36+ return - ENOTSUP ;
37+ }
38+
39+ int cache_instr_flush_range (void * addr , size_t size )
40+ {
41+ ARG_UNUSED (addr );
42+ ARG_UNUSED (size );
43+ return - ENOTSUP ;
44+ }
45+
46+ int cache_instr_invd_range (void * addr , size_t size )
47+ {
48+ ARG_UNUSED (addr );
49+ ARG_UNUSED (size );
50+ return - ENOTSUP ;
51+ }
52+
53+ int cache_instr_flush_and_invd_range (void * addr , size_t size )
54+ {
55+ ARG_UNUSED (addr );
56+ ARG_UNUSED (size );
57+ return - ENOTSUP ;
58+ }
You can’t perform that action at this time.
0 commit comments