2020-11-01 20:48:15 +01:00
|
|
|
# Copyright (c) 2020 Teslabs Engineering S.L.
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
config MEMC_STM32
|
2022-03-09 12:05:12 +01:00
|
|
|
bool "STM32 Flexible Memory Controller (FMC)"
|
2022-07-22 08:06:05 -05:00
|
|
|
default y
|
drivers: memc: fix Kconfig option MEMC_STM32
This commit fixes a bug with the declaration of the Kconfig option
MEMC_STM32.
The option is defined in two files:
- `drivers/memc/Kconfig.stm32`, wich depends on
- `MEMC`
- `DT_HAS_ST_STM32_FMC_ENABLED`
-`soc/st/stm32/Kconfig.defconfig`, wich depends on
- `MEMC`
- `SOC_FAMILY_STM32`
So, if you have `CONFIG_MEMC=y` in your Kconfig options and you are on a
STM32 SoC, `CONFIG_MEMC_STM32` will be enabled, even if there is no
STM32 FMC enabled.
This Kconfig option causes the driver for the STM32 FMC to be compiled,
regardless of the presence of an enabled node for the FMC.
However, the driver fails to compile if there is no FMC node in the
devicetree. So, if you compile a project with `CONFIG_MEMC=y` on a board
with an STM32 SoC and no enabled FMC, the build will fail.
This commit deletes the Kconfig declaration in the `Kconfig.defconfig`,
as it isn't useful and is the one provoking the bug.
It also add in the `Kconfig.stm32` the compatible `st,stm32h7-fmc`, wich
use the same driver and so need to be enabled by the same Kconfig
option.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-07-03 14:25:20 +02:00
|
|
|
depends on DT_HAS_ST_STM32_FMC_ENABLED || DT_HAS_ST_STM32H7_FMC_ENABLED
|
2024-08-29 16:04:49 +02:00
|
|
|
select PINCTRL
|
2020-11-01 20:48:15 +01:00
|
|
|
help
|
|
|
|
Enable STM32 Flexible Memory Controller.
|
|
|
|
|
2022-07-22 08:06:05 -05:00
|
|
|
if MEMC_STM32
|
2020-11-01 20:48:15 +01:00
|
|
|
|
|
|
|
config MEMC_STM32_SDRAM
|
2022-03-09 12:05:12 +01:00
|
|
|
bool "STM32 FMC SDRAM controller"
|
2022-07-22 08:06:05 -05:00
|
|
|
default y
|
|
|
|
depends on DT_HAS_ST_STM32_FMC_SDRAM_ENABLED
|
2020-11-01 20:48:15 +01:00
|
|
|
select USE_STM32_LL_FMC
|
|
|
|
select USE_STM32_HAL_SDRAM
|
|
|
|
help
|
|
|
|
Enable STM32 FMC SDRAM controller.
|
2022-04-01 10:29:34 +02:00
|
|
|
|
|
|
|
config MEMC_STM32_NOR_PSRAM
|
|
|
|
bool "STM32 FMC NOR/PSRAM controller"
|
2022-07-22 08:06:05 -05:00
|
|
|
default y
|
|
|
|
depends on DT_HAS_ST_STM32_FMC_NOR_PSRAM_ENABLED
|
2022-04-01 10:29:34 +02:00
|
|
|
select USE_STM32_LL_FMC
|
|
|
|
select USE_STM32_HAL_NOR
|
|
|
|
select USE_STM32_HAL_SRAM
|
|
|
|
help
|
|
|
|
Enable STM32 FMC NOR/PSRAM controller.
|
2022-07-22 08:06:05 -05:00
|
|
|
|
|
|
|
endif
|
2024-05-03 14:25:00 +02:00
|
|
|
|
|
|
|
config MEMC_STM32_XSPI_PSRAM
|
|
|
|
bool "STM32 XSPI PSRAM"
|
|
|
|
default y
|
|
|
|
depends on DT_HAS_ST_STM32_XSPI_PSRAM_ENABLED
|
|
|
|
select USE_STM32_HAL_XSPI
|
|
|
|
select PINCTRL
|
|
|
|
help
|
|
|
|
Enable STM32 XSPI Memory Controller.
|