Skip to content

Commit a2ff387

Browse files
FRASTMaescolar
authored andcommitted
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 c49ec80 commit a2ff387

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
@@ -89,6 +89,9 @@ config FLASH_BASE_ADDRESS
8989
if $(DT_FLASH_PARENT_IS_XSPI) || $(DT_FLASH_PARENT_IS_OSPI) || $(DT_FLASH_PARENT_IS_QSPI)
9090
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH))
9191

92+
config STM32_APP_IN_EXT_FLASH
93+
default $(DT_FLASH_PARENT_IS_XSPI)
94+
9295
# The XSPI PSRAM driver creates a SMH region with attribute SMH_REG_ATTR_EXTERNAL (2)
9396
# If applicable set the LTDC / VIDEO_BUFFER SMH attribute to SMH_REG_ATTR_EXTERNAL (2)
9497
# in order to be able to allocate from the XSPI PSRAM

0 commit comments

Comments
 (0)