boards: imx_rt: Don't default FLASH_MCUX_FLEXSPI_XIP to enabled

Do not default FLASH_MCUX_FLEXSPI_XIP to enabled when code is not
located in flash, this will cause issues if code is executing from ITCM,
as the zephyr_code_relocate macro will relocate the flash driver code
into itcm, and overwrite the zephyr image.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2022-04-28 16:01:59 -05:00 committed by David Leach
parent 07bf22cc94
commit 2551a75c9e
8 changed files with 25 additions and 32 deletions

View File

@ -15,12 +15,12 @@ endchoice
config DISK_DRIVER_SDMMC
default y if DISK_DRIVERS
config FLASH_MCUX_FLEXSPI_NOR
default y if FLASH && BOARD_MIMXRT1020_EVK
if FLASH
config FLASH_MCUX_FLEXSPI_XIP
default y if FLASH && BOARD_MIMXRT1020_EVK
depends on MEMC_MCUX_FLEXSPI
config FLASH_MCUX_FLEXSPI_NOR
default y
endif #FLASH
if NETWORKING

View File

@ -12,12 +12,12 @@ choice CODE_LOCATION
default CODE_FLEXSPI
endchoice
config FLASH_MCUX_FLEXSPI_NOR
default y if FLASH
if FLASH
config FLASH_MCUX_FLEXSPI_XIP
default y if FLASH
depends on MEMC_MCUX_FLEXSPI
config FLASH_MCUX_FLEXSPI_NOR
default y
endif #FLASH
if NETWORKING

View File

@ -15,18 +15,17 @@ endchoice
config DISK_DRIVER_SDMMC
default y if DISK_DRIVERS
if FLASH
config FLASH_MCUX_FLEXSPI_HYPERFLASH
default y if FLASH && BOARD_MIMXRT1050_EVK
default n if FLASH && BOARD_MIMXRT1050_EVK_QSPI
default y if BOARD_MIMXRT1050_EVK
default n if BOARD_MIMXRT1050_EVK_QSPI
config FLASH_MCUX_FLEXSPI_NOR
default y if FLASH && BOARD_MIMXRT1050_EVK_QSPI
default n if FLASH && BOARD_MIMXRT1050_EVK
default y if BOARD_MIMXRT1050_EVK_QSPI
default n if BOARD_MIMXRT1050_EVK
config FLASH_MCUX_FLEXSPI_XIP
default y if FLASH
depends on MEMC_MCUX_FLEXSPI
endif #FLASH
config I2C
default y if KSCAN

View File

@ -16,6 +16,8 @@ endchoice
config DISK_DRIVER_SDMMC
default y if DISK_DRIVERS
if FLASH
config FLASH_MCUX_FLEXSPI_NOR
default y if BOARD_MIMXRT1060_EVK
default n if BOARD_MIMXRT1060_EVK_HYPERFLASH
@ -24,9 +26,7 @@ config FLASH_MCUX_FLEXSPI_HYPERFLASH
default y if BOARD_MIMXRT1060_EVK_HYPERFLASH
default n if BOARD_MIMXRT1060_EVK
config FLASH_MCUX_FLEXSPI_XIP
default y if FLASH
depends on MEMC_MCUX_FLEXSPI
endif #FLASH
config I2C
default y if KSCAN

View File

@ -15,12 +15,12 @@ endchoice
config DISK_DRIVER_SDMMC
default y if DISK_DRIVERS
config FLASH_MCUX_FLEXSPI_NOR
default y if FLASH
if FLASH
config FLASH_MCUX_FLEXSPI_XIP
default y if FLASH
depends on MEMC_MCUX_FLEXSPI
config FLASH_MCUX_FLEXSPI_NOR
default y
endif # FLASH
config I2C
default y if KSCAN

View File

@ -23,10 +23,6 @@ if FLASH
config FLASH_MCUX_FLEXSPI_NOR
default y
# XIP will not be enabled if CPU is cortex m4, since code is flashed to SRAM
config FLASH_MCUX_FLEXSPI_XIP
default y if CPU_CORTEX_M7
choice FLASH_MCUX_FLEXSPI_XIP_MEM_TARGET
default FLASH_MCUX_FLEXSPI_XIP_MEM_ITCM if CPU_CORTEX_M7
default FLASH_MCUX_FLEXSPI_XIP_MEM_SRAM if CPU_CORTEX_M4

View File

@ -29,9 +29,6 @@ if FLASH
config FLASH_MCUX_FLEXSPI_NOR
default y
config FLASH_MCUX_FLEXSPI_XIP
default y if CPU_CORTEX_M7
choice FLASH_MCUX_FLEXSPI_XIP_MEM_TARGET
default FLASH_MCUX_FLEXSPI_XIP_MEM_ITCM if CPU_CORTEX_M7
default FLASH_MCUX_FLEXSPI_XIP_MEM_SRAM if CPU_CORTEX_M4

View File

@ -72,6 +72,7 @@ config FLASH_MCUX_FLEXSPI_HYPERFLASH_WRITE_BUFFER
config FLASH_MCUX_FLEXSPI_XIP
bool "MCUX FlexSPI flash access with xip"
default y
depends on MEMC_MCUX_FLEXSPI
depends on (CODE_FLEXSPI || CODE_FLEXSPI2 || SOC_SERIES_IMX_RT6XX)
select XIP