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:
Daniel DeGrasse 2022-12-22 15:22:51 -06:00 committed by David Leach
parent 2d59430fc0
commit a5994dbd1a
2 changed files with 2 additions and 2 deletions

View file

@ -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()

View file

@ -93,7 +93,7 @@ manifest:
groups: groups:
- hal - hal
- name: hal_nxp - name: hal_nxp
revision: 0594f3042da3ddc0f7e590142b0ff3e5935257ca revision: d33133de8863aac13bf826c02786fc9310380746
path: modules/hal/nxp path: modules/hal/nxp
groups: groups:
- hal - hal