soc: nxp: rw: define Kconfigs for MEMC_MCUX_FLEXSPI code relocation

MEMC_MCUX_FLEXSPI depends on code relocation being enabled on parts that
XIP from the FlexSPI by default and requires a string describing the RAM
region to relocate code into. Add these Kconfigs to the RW SOC port.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2024-03-13 15:28:51 -05:00 committed by Fabio Baltieri
parent 9021ce82fc
commit 90a8ef11fe
2 changed files with 11 additions and 2 deletions

View file

@ -25,7 +25,7 @@ config INIT_SYS_PLL
menuconfig NXP_RW6XX_BOOT_HEADER menuconfig NXP_RW6XX_BOOT_HEADER
bool "Create boot header" bool "Create boot header"
default y default y if !BOOTLOADER_MCUBOOT
help help
Create data structures required by the boot ROM to boot the Create data structures required by the boot ROM to boot the
application from an external flash device. application from an external flash device.
@ -57,6 +57,8 @@ config IMAGE_VECTOR_TABLE_OFFSET
the application entry point and device configuration data. The boot the application entry point and device configuration data. The boot
ROM requires a fixed IVT offset for each type of boot device. ROM requires a fixed IVT offset for each type of boot device.
endif # NXP_RW6XX_BOOT_HEADER
# Used for default value in FLASH_MCUX_FLEXSPI_XIP # Used for default value in FLASH_MCUX_FLEXSPI_XIP
DT_CHOSEN_Z_FLASH := zephyr,flash DT_CHOSEN_Z_FLASH := zephyr,flash
DT_COMPAT_FLEXSPI := nxp,imx-flexspi DT_COMPAT_FLEXSPI := nxp,imx-flexspi
@ -82,6 +84,9 @@ config NXP_RW_ROM_RAMLOADER
FlexSPI boot device into RAM region. The image will be loaded FlexSPI boot device into RAM region. The image will be loaded
from FLEXSPI into the region specified by `zephyr,flash` node. from FLEXSPI into the region specified by `zephyr,flash` node.
endif # NXP_RW6XX_BOOT_HEADER config FLASH_MCUX_FLEXSPI_XIP_MEM
string
default "RAM"
depends on MEMC_MCUX_FLEXSPI
endif # SOC_SERIES_RW6XX endif # SOC_SERIES_RW6XX

View file

@ -63,6 +63,10 @@ choice MEMC_LOG_LEVEL_CHOICE
default MEMC_LOG_LEVEL_OFF default MEMC_LOG_LEVEL_OFF
endchoice endchoice
# Code relocation is needed when MEMC driver is enabled
config CODE_DATA_RELOCATION_SRAM
default y if MEMC
endif # FLASH_MCUX_FLEXSPI_XIP endif # FLASH_MCUX_FLEXSPI_XIP
endif # SOC_SERIES_RW6XX endif # SOC_SERIES_RW6XX