From 9b9c33c833fd86a27c89737143aa9c897aea9195 Mon Sep 17 00:00:00 2001 From: Georgij Cernysiov Date: Thu, 6 Jun 2024 13:43:33 +0200 Subject: [PATCH] drivers: flash: stm32: move memmap config Move STM32_MEMMAP outside of SOC_FLASH_STM32. That allows memory-mapped application to be built without internal flash controller. Signed-off-by: Georgij Cernysiov --- drivers/flash/Kconfig.stm32 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/flash/Kconfig.stm32 b/drivers/flash/Kconfig.stm32 index 9caf7a04de8502..0c820da97c1c9d 100644 --- a/drivers/flash/Kconfig.stm32 +++ b/drivers/flash/Kconfig.stm32 @@ -6,6 +6,15 @@ # Copyright (c) 2023 Google Inc # SPDX-License-Identifier: Apache-2.0 +config STM32_MEMMAP + bool "NOR Flash in MemoryMapped for XiP" + depends on XIP && \ + (DT_HAS_ST_STM32_OSPI_NOR_ENABLED || \ + DT_HAS_ST_STM32_QSPI_NOR_ENABLED) + help + This option enables the XIP mode for the external NOR flash + mounted on STM32 boards. + config SOC_FLASH_STM32 bool "STM32 flash driver" depends on DT_HAS_ST_STM32_FLASH_CONTROLLER_ENABLED @@ -73,11 +82,4 @@ config FLASH_STM32_BLOCK_REGISTERS registers improves system security, because flash content (or protection settings) can't be changed even when exploit was found. -config STM32_MEMMAP - bool "NOR Flash in MemoryMapped for XiP" - depends on XIP - help - This option enables the XIP mode for the external NOR flash - mounted on STM32 boards. - endif # SOC_FLASH_STM32