drivers/rng: add Amlogic hardware RNG driver
cover drivers/rng: add Amlogic hardware RNG driver
The first patch simplifies the Kconfig for hardware RNG drivers and enables the Sandbox RNG driver for all Sandbox instances.
The second introduces a hardware random number generator driver for Amlogic SOCs. This second patch had been sent before but the preceding patch was missing.
Heinrich Schuchardt (2):
drivers/rng: simplify Kconfig
drivers/rng: add Amlogic hardware RNG driver
configs/sandbox64_defconfig | 1 - configs/sandbox_defconfig | 1 - drivers/rng/Kconfig | 17 ++++- drivers/rng/Makefile | 1 + drivers/rng/meson-rng.c | 120 ++++++++++++++++++++++++++++++++++++ 5 files changed, 136 insertions(+), 4 deletions(-) create mode 100644 drivers/rng/meson-rng.c
--
2.25.1
PATCH 1/2 drivers/rng: simplify Kconfig
For all sandbox systems with DM_RNG we enable RNG_SANDBOX. So we can simply set the default to yes.
All rng drivers depend on DM_RNG. Use a single 'if' instead of individual dependencies. Now 'make menuconfig' shows the individual drivers neatly indented under the DM_RNG entry.
--- configs/sandbox64_defconfig | 1 - configs/sandbox_defconfig | 1 - drivers/rng/Kconfig | 9 +++++++-- 3 files changed, 7 insertions(+), 4 deletions(-)
configs/sandbox64_defconfig +0 -1
@@ -169,7 +169,6 @@ CONFIG_REMOTEPROC_SANDBOX=y CONFIG_DM_RESET=y CONFIG_SANDBOX_RESET=y CONFIG_DM_RNG=y -CONFIG_RNG_SANDBOX=y CONFIG_DM_RTC=y CONFIG_RTC_RV8803=y CONFIG_SANDBOX_SERIAL=y
configs/sandbox_defconfig +0 -1
@@ -189,7 +189,6 @@ CONFIG_REMOTEPROC_SANDBOX=y CONFIG_DM_RESET=y CONFIG_SANDBOX_RESET=y CONFIG_DM_RNG=y -CONFIG_RNG_SANDBOX=y CONFIG_DM_RTC=y CONFIG_RTC_RV8803=y CONFIG_DEBUG_UART_SANDBOX=y
drivers/rng/Kconfig +7 -2
@@ -6,16 +6,21 @@ config DM_RNG This interface is used to initialise the rng device and to read the random seed from the device. +if DM_RNG + config RNG_SANDBOX bool "Sandbox random number generator" - depends on SANDBOX && DM_RNG + depends on SANDBOX + default y help Enable random number generator for sandbox. This is an emulation of a rng device. config RNG_STM32MP1 bool "Enable random number generator for STM32MP1" - depends on ARCH_STM32MP && DM_RNG + depends on ARCH_STM32MP default n help Enable STM32MP1 rng driver. + +endif
--
2.25.1
PATCH 1/2 drivers/rng: simplify Kconfig
Hi Heinrich,
Quoted 6 lines
From: U-Boot <[email protected]> On Behalf Of Heinrich Schuchardt
Sent: mercredi 4 mars 2020 02:18For all sandbox systems with
DM_RNGwe enableRNG_SANDBOX. So we can simply set the default to yes.
Quoted 6 lines
All rng drivers depend on
DM_RNG. Use a single 'if' instead of individual dependencies. Now 'make menuconfig' shows the individual drivers neatly indented under theDM_RNGentry.Signed-off-by Heinrich Schuchardt <[email protected]>---
Regards
Patrick
Quoted 49 lines
configs/sandbox64_defconfig | 1 - configs/sandbox_defconfig | 1 - drivers/rng/Kconfig | 9 +++++++-- 3 files changed, 7 insertions(+), 4 deletions(-)configs/sandbox64_defconfig index renamed from configs/sandbox64_defconfig +0
-0
d1c94b65a1..71a4d7fccb100644configs/sandbox64_defconfig +0
-0@@ -169,7 +169,6 @@ CONFIG_REMOTEPROC_SANDBOX=y
CONFIG_DM_RESET=yCONFIG_SANDBOX_RESET=yCONFIG_DM_RNG=y-CONFIG_RNG_SANDBOX=yCONFIG_DM_RTC=yCONFIG_RTC_RV8803=yCONFIG_SANDBOX_SERIAL=ydiff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index45b5475b79..f96891ecae100644configs/sandbox_defconfig +0
-0@@ -189,7 +189,6 @@ CONFIG_REMOTEPROC_SANDBOX=y
CONFIG_DM_RESET=yCONFIG_SANDBOX_RESET=yCONFIG_DM_RNG=y-CONFIG_RNG_SANDBOX=yCONFIG_DM_RTC=yCONFIG_RTC_RV8803=yCONFIG_DEBUG_UART_SANDBOX=ydiff --git a/drivers/rng/Kconfig b/drivers/rng/Kconfig index893b89d49b..c1aa43b823100644drivers/rng/Kconfig +7
-3@@ -6,16 +6,21 @@ config DM_RNG This interface is used to initialise the rng device and to read the random seed from the device. +if DM_RNG + config RNG_SANDBOX bool "Sandbox random number generator" - depends on SANDBOX && DM_RNG + depends on SANDBOX + default y help Enable random number generator for sandbox. This is an emulation of a rng device. config RNG_STM32MP1 bool "Enable random number generator for STM32MP1" - depends on ARCH_STM32MP && DM_RNG + depends on ARCH_STM32MP default n help Enable STM32MP1 rng driver. + +endif --2.25.1
PATCH 1/2 drivers/rng: simplify Kconfig
In reply to Heinrich SchuchardtQuoted 10 lines · Heinrich Schuchardt
For all sandbox systems with
DM_RNGwe enableRNG_SANDBOX. So we can simply set the default to yes.All rng drivers depend on
DM_RNG. Use a single 'if' instead of individual dependencies. Now 'make menuconfig' shows the individual drivers neatly indented under theDM_RNGentry.Signed-off-by Heinrich Schuchardt <[email protected]>---
-sughosh
configs/sandbox64_defconfig | 1 -
Quoted 60 lines
configs/sandbox_defconfig | 1 - drivers/rng/Kconfig | 9 +++++++-- 3 files changed, 7 insertions(+), 4 deletions(-)configs/sandbox64_defconfig +0
-1@@ -169,7 +169,6 @@ CONFIG_REMOTEPROC_SANDBOX=y CONFIG_DM_RESET=y CONFIG_SANDBOX_RESET=y CONFIG_DM_RNG=y -CONFIG_RNG_SANDBOX=y CONFIG_DM_RTC=y CONFIG_RTC_RV8803=y CONFIG_SANDBOX_SERIAL=yconfigs/sandbox_defconfig +0
-1@@ -189,7 +189,6 @@ CONFIG_REMOTEPROC_SANDBOX=y CONFIG_DM_RESET=y CONFIG_SANDBOX_RESET=y CONFIG_DM_RNG=y -CONFIG_RNG_SANDBOX=y CONFIG_DM_RTC=y CONFIG_RTC_RV8803=y CONFIG_DEBUG_UART_SANDBOX=ydrivers/rng/Kconfig +7
-3@@ -6,16 +6,21 @@ config DM_RNG This interface is used to initialise the rng device and to read the random seed from the device. +if DM_RNG + config RNG_SANDBOX bool "Sandbox random number generator" - depends on SANDBOX && DM_RNG + depends on SANDBOX + default y help Enable random number generator for sandbox. This is an emulation of a rng device. config RNG_STM32MP1 bool "Enable random number generator for STM32MP1" - depends on ARCH_STM32MP && DM_RNG + depends on ARCH_STM32MP default n help Enable STM32MP1 rng driver. + +endif --2.25.1
PATCH 1/2 drivers/rng: simplify Kconfig
In reply to Heinrich Schuchardthi Tom,
Quoted 8 lines · Heinrich Schuchardt
For all sandbox systems with
DM_RNGwe enableRNG_SANDBOX. So we can simply set the default to yes.All rng drivers depend on
DM_RNG. Use a single 'if' instead of individual dependencies. Now 'make menuconfig' shows the individual drivers neatly indented under theDM_RNGentry.Signed-off-by Heinrich Schuchardt <[email protected]>
---
Quoted 1 line
Can you please pick up the two patches of the series directly. Thanks.
-sughosh
PATCH 1/2 drivers/rng: simplify Kconfig
Quoted 15 lines · Sughosh Ganu
hi Tom,
On Wed, 4 Mar 2020 at 06:47, Heinrich Schuchardt <[email protected] <mailto:[email protected]>> wrote:
For all sandbox systems with
DM_RNGwe enableRNG_SANDBOX. So we can simply
set the default to yes.All rng drivers depend on
DM_RNG. Use a single 'if' instead of individual
dependencies. Now 'make menuconfig' shows the individual drivers neatly indented under theDM_RNGentry.Signed-off-by Heinrich Schuchardt <[email protected]
Quoted 8 lines
<mailto:[email protected]>>
---
Can you please pick up the two patches of the series directly. Thanks.
-sughosh
This series has been applied to origin/master (bc40eb278b0c14b990556ea).
Best regards
Heinrich
PATCH 2/2 drivers/rng: add Amlogic hardware RNG driver
In reply to Heinrich SchuchardtAdd support for the hardware random number generator of Amlogic SOCs.
---
Resent
--- drivers/rng/Kconfig | 8 +++ drivers/rng/Makefile | 1 + drivers/rng/meson-rng.c | 120 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+) create mode 100644 drivers/rng/meson-rng.c
drivers/rng/Kconfig +8 -0
@@ -8,6 +8,14 @@ config DM_RNG if DM_RNG +config RNG_MESON + bool "Amlogic Meson Random Number Generator support" + depends on ARCH_MESON + default y + help + Enable support for hardware random number generator + of Amlogic Meson SoCs. + config RNG_SANDBOX bool "Sandbox random number generator" depends on SANDBOX
drivers/rng/Makefile +1 -0
@@ -4,5 +4,6 @@ # obj-$(CONFIG_DM_RNG) += rng-uclass.o +obj-$(CONFIG_RNG_MESON) += meson-rng.o obj-$(CONFIG_RNG_SANDBOX) += sandbox_rng.o obj-$(CONFIG_RNG_STM32MP1) += stm32mp1_rng.o
drivers/rng/meson-rng.c new file +120 -0
120 lines not on this page · raw message
--
2.25.1
cover drivers/rng: add Amlogic hardware RNG driver
In reply to Heinrich SchuchardtQuoted 19 lines · Heinrich Schuchardt
The first patch simplifies the
Kconfigfor hardware RNG drivers and enables the Sandbox RNG driver for all Sandbox instances.The second introduces a hardware random number generator driver for Amlogic SOCs. This second patch had been sent before but the preceding patch was missing.
Heinrich Schuchardt (2):
drivers/rng: simplifyKconfig
drivers/rng: add Amlogic hardware RNG driverconfigs/sandbox64_defconfig | 1 - configs/sandbox_defconfig | 1 - drivers/rng/Kconfig | 17 ++++- drivers/rng/Makefile | 1 + drivers/rng/meson-rng.c | 120 ++++++++++++++++++++++++++++++++++++ 5 files changed, 136 insertions(+), 4 deletions(-) create mode 100644 drivers/rng/meson-rng.c
Quoted 3 lines
--
2.25.1
Hi Sughosh,
Should I take this serie in my tree ?
Neil
cover drivers/rng: add Amlogic hardware RNG driver
Quoted 24 lines · Neil Armstrong
Quoted 17 lines · Heinrich Schuchardt
The first patch simplifies the
Kconfigfor hardware RNG drivers and enables the Sandbox RNG driver for all Sandbox instances.The second introduces a hardware random number generator driver for Amlogic SOCs. This second patch had been sent before but the preceding patch was missing.
Heinrich Schuchardt (2):
drivers/rng: simplifyKconfig
drivers/rng: add Amlogic hardware RNG driverconfigs/sandbox64_defconfig | 1 - configs/sandbox_defconfig | 1 - drivers/rng/Kconfig | 17 ++++- drivers/rng/Makefile | 1 + drivers/rng/meson-rng.c | 120 ++++++++++++++++++++++++++++++++++++ 5 files changed, 136 insertions(+), 4 deletions(-)Quoted 5 lines
create mode 100644
drivers/rng/meson-rng.c--
2.25.1
Quoted 6 lines
Hi Sughosh,
Should I take this series in my tree ?
Neil
Hello Neil,
the two patches have been merged with bc40eb278b0c14b99055 with the efi-2020-04-rc4-3 pull request.
Best regards
Heinrich