drivers: memc: don't relocate MEMC functions unless CONFIG_FLASH=y
Only relocate memc driver when CONFIG_FLASH=y. CONFIG_FLASH_MCUX_FLEXSPI_XIP previously was dependent on CONFIG_FLASH, but the scope of this Kconfig has changed. Due to this, the memc driver now must have two checks, as it should not relocated when the driver is being used for a memory controller that does not expose the flash driver interface. Since the NXP HAL also relocates the underlying FlexSPI driver using a similar check, it is updated in this commit as well. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
parent
2d59430fc0
commit
a5994dbd1a
|
@ -12,6 +12,6 @@ zephyr_library_sources_ifdef(CONFIG_MEMC_MCUX_FLEXSPI_HYPERRAM memc_mcux_flexspi
|
||||||
|
|
||||||
zephyr_library_sources_ifdef(CONFIG_MEMC_SAM_SMC memc_sam_smc.c)
|
zephyr_library_sources_ifdef(CONFIG_MEMC_SAM_SMC memc_sam_smc.c)
|
||||||
|
|
||||||
if(CONFIG_FLASH_MCUX_FLEXSPI_XIP)
|
if((DEFINED CONFIG_FLASH_MCUX_FLEXSPI_XIP) AND (DEFINED CONFIG_FLASH))
|
||||||
zephyr_code_relocate(memc_mcux_flexspi.c ${CONFIG_FLASH_MCUX_FLEXSPI_XIP_MEM}_TEXT)
|
zephyr_code_relocate(memc_mcux_flexspi.c ${CONFIG_FLASH_MCUX_FLEXSPI_XIP_MEM}_TEXT)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue