drivers/dma: stm32: Base Konfig symbols on dts compatible status

In order to simplify the handling of DMA_STM32_V1/V2 and DMAMUX_STM32
symbols, set them directly based on related compatible status.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2021-01-07 20:39:55 +01:00 committed by Anas Nashif
commit b226f1d446
12 changed files with 10 additions and 50 deletions

View file

@ -4,6 +4,10 @@
# Copyright (c) 2019 Song Qiang <songqiang1304521@gmail.com>
# SPDX-License-Identifier: Apache-2.0
DT_COMPAT_ST_STM32_DMA_V1 := st,stm32-dma-v1
DT_COMPAT_ST_STM32_DMA_V2 := st,stm32-dma-v2
DT_COMPAT_ST_STM32_DMAMUX := st,stm32-dmamux
config DMA_STM32
bool "Enable STM32 DMA driver"
select USE_STM32_LL_DMA
@ -15,22 +19,22 @@ if DMA_STM32
config DMA_STM32_V1
bool
depends on SOC_SERIES_STM32F2X || SOC_SERIES_STM32F4X || SOC_SERIES_STM32F7X
default y if $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_DMA_V1))
help
Enable DMA support on F2/F4/F7 series SoCs.
Enable DMA V1 support.
config DMA_STM32_V2
bool
depends on SOC_SERIES_STM32F0X || SOC_SERIES_STM32F1X || SOC_SERIES_STM32F3X || SOC_SERIES_STM32L0X || SOC_SERIES_STM32L4X || SOC_SERIES_STM32WBX
default y if $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_DMA_V2))
help
Enable DMA support on F0/F1/F3/L0/L4/WB series SoCs.
Enable DMA V2 support.
config DMAMUX_STM32
bool
depends on DMA_STM32_V2
depends on SOC_STM32L4R5XX || SOC_SERIES_STM32WBX
default $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_DMAMUX))
help
Enable DMAMUX support on L4R/WB series SoCs.
Enable DMAMUX support.
config DMA_STM32_SHARED_IRQS
bool

View file

@ -12,8 +12,4 @@ source "soc/arm/st_stm32/stm32f0/Kconfig.defconfig.stm32f0*"
config SOC_SERIES
default "stm32f0"
config DMA_STM32_V2
default y
depends on DMA_STM32
endif # SOC_SERIES_STM32F0X

View file

@ -12,8 +12,4 @@ source "soc/arm/st_stm32/stm32f1/Kconfig.defconfig.stm32f1*"
config SOC_SERIES
default "stm32f1"
config DMA_STM32_V2
default y
depends on DMA_STM32
endif # SOC_SERIES_STM32F1X

View file

@ -12,8 +12,4 @@ source "soc/arm/st_stm32/stm32f2/Kconfig.defconfig.stm32f2*"
config SOC_SERIES
default "stm32f2"
config DMA_STM32_V1
default y
depends on DMA_STM32
endif # SOC_SERIES_STM32F2X

View file

@ -12,8 +12,4 @@ source "soc/arm/st_stm32/stm32f3/Kconfig.defconfig.stm32f3*"
config SOC_SERIES
default "stm32f3"
config DMA_STM32_V2
default y
depends on DMA_STM32
endif # SOC_SERIES_STM32F3X

View file

@ -12,8 +12,4 @@ source "soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f4*"
config SOC_SERIES
default "stm32f4"
config DMA_STM32_V1
default y
depends on DMA_STM32
endif # SOC_SERIES_STM32F4X

View file

@ -12,8 +12,4 @@ source "soc/arm/st_stm32/stm32f7/Kconfig.defconfig.stm32f7*"
config SOC_SERIES
default "stm32f7"
config DMA_STM32_V1
default y
depends on DMA_STM32
endif # SOC_SERIES_STM32F7X

View file

@ -12,10 +12,6 @@ source "soc/arm/st_stm32/stm32h7/Kconfig.defconfig.stm32h7*"
config SOC_SERIES
default "stm32h7"
config DMA_STM32_V1
default y
depends on DMA_STM32
config ROM_START_OFFSET
default 0x400 if BOOTLOADER_MCUBOOT
default 0x0 if !BOOTLOADER_MCUBOOT

View file

@ -12,8 +12,4 @@ source "soc/arm/st_stm32/stm32l0/Kconfig.defconfig.stm32l0*"
config SOC_SERIES
default "stm32l0"
config DMA_STM32_V2
default y
depends on DMA_STM32
endif # SOC_SERIES_STM32L0X

View file

@ -18,8 +18,4 @@ config STM32_LPTIM_TIMER
default y
depends on PM
config DMA_STM32_V2
default y
depends on DMA_STM32
endif # SOC_SERIES_STM32L4X

View file

@ -15,8 +15,4 @@ config STM32_LPTIM_TIMER
default y
depends on PM
config DMA_STM32_V2
default y
depends on DMA_STM32
endif # SOC_SERIES_STM32WBX

View file

@ -11,8 +11,4 @@ config SOC
config NUM_IRQS
default 63
config DMAMUX_STM32
default y
depends on DMA_STM32
endif # SOC_STM32WB55XX