Skip to content

Commit

Permalink
drivers/entropy: stm32: Enable driver based on compatible
Browse files Browse the repository at this point in the history
To ease driver configuration, enable ENTROPY_STM32_RNG
only if device node  matching driver compatible is enabled.
No more need to enable config symbol under soc/


Signed-off-by: Erwan Gouriou <[email protected]>
  • Loading branch information
erwango authored and galak committed Apr 6, 2020
1 parent 012b651 commit 7e1b121
Show file tree
Hide file tree
Showing 13 changed files with 3 additions and 52 deletions.
3 changes: 3 additions & 0 deletions drivers/entropy/Kconfig.stm32
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
# Copyright (c) 2017 Erwin Rol <[email protected]>
# SPDX-License-Identifier: Apache-2.0

DT_COMPAT_ST_STM32_RNG := st,stm32-rng

config ENTROPY_STM32_RNG
bool "STM32 RNG driver"
depends on SOC_FAMILY_STM32
select ENTROPY_HAS_DRIVER
select USE_STM32_LL_RNG
select HAS_DTS_ENTROPY
default $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_RNG))
help
This option enables the RNG processor, which is a entropy number
generator, based on a continuous analog noise, that provides
Expand Down
4 changes: 0 additions & 4 deletions soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f405xx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ config SOC
config NUM_IRQS
default 82

config ENTROPY_STM32_RNG
default y
depends on ENTROPY_GENERATOR

endif # SOC_STM32F405XG
8 changes: 0 additions & 8 deletions soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f407xx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ config SOC
config NUM_IRQS
default 82

config ENTROPY_STM32_RNG
default y
depends on ENTROPY_GENERATOR

endif # SOC_STM32F407XE

if SOC_STM32F407XG
Expand All @@ -25,8 +21,4 @@ config SOC
config NUM_IRQS
default 82

config ENTROPY_STM32_RNG
default y
depends on ENTROPY_GENERATOR

endif # SOC_STM32F407XG
4 changes: 0 additions & 4 deletions soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f412cg
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ config SOC
config NUM_IRQS
default 97

config ENTROPY_STM32_RNG
default y
depends on ENTROPY_GENERATOR

endif # SOC_STM32F412CG
4 changes: 0 additions & 4 deletions soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f412zg
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ config SOC
config NUM_IRQS
default 97

config ENTROPY_STM32_RNG
default y
depends on ENTROPY_GENERATOR

endif # SOC_STM32F412ZG
4 changes: 0 additions & 4 deletions soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f413xx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ config SOC
config NUM_IRQS
default 102

config ENTROPY_STM32_RNG
default y
depends on ENTROPY_GENERATOR

endif # SOC_STM32F413XX
4 changes: 0 additions & 4 deletions soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f417xx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ config SOC
config NUM_IRQS
default 82

config ENTROPY_STM32_RNG
default y
depends on ENTROPY_GENERATOR

config CRYPTO_STM32
default y
depends on CRYPTO
Expand Down
4 changes: 0 additions & 4 deletions soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f429xx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ config SOC
config NUM_IRQS
default 91

config ENTROPY_STM32_RNG
default y
depends on ENTROPY_GENERATOR

endif # SOC_STM32F429XX
4 changes: 0 additions & 4 deletions soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f437xx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ config SOC
config NUM_IRQS
default 91

config ENTROPY_STM32_RNG
default y
depends on ENTROPY_GENERATOR

config CRYPTO_STM32
default y
depends on CRYPTO
Expand Down
4 changes: 0 additions & 4 deletions soc/arm/st_stm32/stm32f4/Kconfig.defconfig.stm32f469xx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ config SOC
config NUM_IRQS
default 93

config ENTROPY_STM32_RNG
default y
depends on ENTROPY_GENERATOR

endif # SOC_STM32F469XX
4 changes: 0 additions & 4 deletions soc/arm/st_stm32/stm32f7/Kconfig.defconfig.series
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ config I2C_STM32_V2
default y
depends on I2C_STM32

config ENTROPY_STM32_RNG
default y
depends on ENTROPY_GENERATOR

config DMA_STM32_V1
default y
depends on DMA_STM32
Expand Down
4 changes: 0 additions & 4 deletions soc/arm/st_stm32/stm32g4/Kconfig.defconfig.series
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ config I2C_STM32_V2
default y
depends on I2C_STM32

config ENTROPY_STM32_RNG
default y
depends on ENTROPY_GENERATOR

endif # SOC_SERIES_STM32G4X
4 changes: 0 additions & 4 deletions soc/arm/st_stm32/stm32l4/Kconfig.defconfig.series
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ config I2C_STM32_V2
default y
depends on I2C_STM32

config ENTROPY_STM32_RNG
default y
depends on ENTROPY_GENERATOR

config DMA_STM32_V2
default y
depends on DMA_STM32
Expand Down

0 comments on commit 7e1b121

Please sign in to comment.