soc: nxp: Centralize flexspi related configuration

Currently this code related to how to configure the
flash size and address when using flexspi to XIP is copy
pasted in all sort of places and ways all over the tree,
let's clean this up and have single point of control over
this configuration.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit is contained in:
Declan Snyder 2024-08-12 14:15:19 -05:00 committed by Alberto Escolar
commit a097cdc4fe
19 changed files with 63 additions and 218 deletions

View file

@ -60,20 +60,7 @@ config IMAGE_VECTOR_TABLE_OFFSET
endif # NXP_RW6XX_BOOT_HEADER
# Used for default value in FLASH_MCUX_FLEXSPI_XIP
DT_CHOSEN_Z_FLASH := zephyr,flash
DT_COMPAT_FLEXSPI := nxp,imx-flexspi
# Macros to shorten Kconfig definitions
DT_CHOSEN_FLASH_NODE := $(dt_chosen_path,$(DT_CHOSEN_Z_FLASH))
DT_CHOSEN_FLASH_PARENT := $(dt_node_parent,$(DT_CHOSEN_FLASH_NODE))
config FLASH_MCUX_FLEXSPI_XIP
bool "MCUX FlexSPI flash access with xip"
default $(dt_node_has_compat,$(DT_CHOSEN_FLASH_PARENT),$(DT_COMPAT_FLEXSPI))
select XIP
help
Allows for the soc to safely initialize the clocks for the
FlexSpi when planning to execute code in FlexSpi Memory.
rsource "../common/Kconfig.flexspi_xip"
config NXP_RW_ROM_RAMLOADER
depends on !FLASH_MCUX_FLEXSPI_XIP
@ -85,9 +72,4 @@ config NXP_RW_ROM_RAMLOADER
FlexSPI boot device into RAM region. The image will be loaded
from FLEXSPI into the region specified by `zephyr,flash` node.
config FLASH_MCUX_FLEXSPI_XIP_MEM
string
default "RAM"
depends on MEMC_MCUX_FLEXSPI
endif # SOC_SERIES_RW6XX