Skip to content

Commit b4ab92f

Browse files
committed
soc: stm32: symbol for application XiP from xspi external memory
Add a STM32_APP_IN_EXT_FLASH to determine that an application is eXecuting in Place on an external xspi flash. That will control the clock init of this external xspi controller. Signed-off-by: Francois Ramu <[email protected]>
1 parent 7a8bd3d commit b4ab92f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

soc/st/stm32/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,12 @@ config STM32_BACKUP_PROTECTION
104104
Enabled for SoCs for which access protection to backup domain
105105
resources needs to be explicitly handled.
106106

107+
config STM32_APP_IN_EXT_FLASH
108+
bool
109+
help
110+
Allows the SoC clock driver to correctly initialize the
111+
Q/O/XSPI controller clocks when the application is residing
112+
in external Flash and is chainloaded with MCUboot.
113+
Whether the app is eXecuted in Place (XiP) depends on the MCUboot mode used.
114+
107115
endif # SOC_FAMILY_STM32

soc/st/stm32/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ config FLASH_BASE_ADDRESS
8585
if $(DT_FLASH_PARENT_IS_XSPI)
8686
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH))
8787

88+
config STM32_APP_IN_EXT_FLASH
89+
default $(DT_FLASH_PARENT_IS_XSPI)
90+
8891
# The XSPI PSRAM driver creates a SMH region with attribute SMH_REG_ATTR_EXTERNAL (2)
8992
# If applicable set the LTDC / VIDEO_BUFFER SMH attribute to SMH_REG_ATTR_EXTERNAL (2)
9093
# in order to be able to allocate from the XSPI PSRAM

0 commit comments

Comments
 (0)