Skip to content

Commit 2b0befc

Browse files
mmahadevan108jhedberg
authored andcommitted
drivers: hal_nxp: Disable quick access for Cortex-A only
Not needed on Cortex-A as all code and data is in DDR memory and there is no quickaccess section in the Cortex-A linker script. Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 3fe6fcf commit 2b0befc

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

modules/hal_nxp/mcux/CMakeLists.txt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,18 @@ endif() # CONFIG_SOC_SDKNG_UNSUPPORTED
7474

7575
enable_language(C ASM)
7676

77-
zephyr_linker_sources(RWDATA
78-
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/quick_access_data.ld
79-
)
77+
if(CONFIG_CPU_CORTEX_A)
78+
zephyr_compile_definitions(FSL_SDK_DRIVER_QUICK_ACCESS_DISABLE)
79+
else()
80+
zephyr_linker_sources(RWDATA
81+
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/quick_access_data.ld
82+
)
8083

81-
zephyr_linker_sources_ifdef(CONFIG_ARCH_HAS_RAMFUNC_SUPPORT
82-
RAMFUNC_SECTION
83-
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/quick_access_code.ld
84-
)
84+
zephyr_linker_sources_ifdef(CONFIG_ARCH_HAS_RAMFUNC_SUPPORT
85+
RAMFUNC_SECTION
86+
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/quick_access_code.ld
87+
)
88+
endif()
8589

8690
zephyr_linker_sources_ifdef(CONFIG_NOCACHE_MEMORY
8791
NOCACHE_SECTION
@@ -107,8 +111,6 @@ zephyr_compile_definitions_ifdef(
107111
I2C_RETRY_TIMES=40000
108112
)
109113

110-
zephyr_compile_definitions(FSL_SDK_DRIVER_QUICK_ACCESS_DISABLE)
111-
112114
# note: if FSL_IRQSTEER_ENABLE_MASTER_INT is not
113115
# defined then it will automatically be defined
114116
# and set to 1 via fsl_irqsteer.h

0 commit comments

Comments
 (0)