diff mbox series

[v3,2/4] hwrng: iproc-rng200: Add support for BCM2711

Message ID 20191120031622.88949-3-stephen@brennan.io (mailing list archive)
State New, archived
Headers show
Series Raspberry Pi 4 HWRNG Support | expand

Commit Message

Stephen Brennan Nov. 20, 2019, 3:16 a.m. UTC
From: Stefan Wahren <wahrenst@gmx.net>

BCM2711 features a RNG200 hardware random number generator block.
So make the driver available.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Signed-off-by: Stephen Brennan <stephen@brennan.io>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
---
 drivers/char/hw_random/Kconfig        | 2 +-
 drivers/char/hw_random/iproc-rng200.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Baruch Siach Nov. 20, 2019, 4:52 a.m. UTC | #1
Hi Stephen, Stefan,

On Wed, Nov 20 2019, Stephen Brennan wrote:
> From: Stefan Wahren <wahrenst@gmx.net>
>
> BCM2711 features a RNG200 hardware random number generator block.
> So make the driver available.
>
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
> Signed-off-by: Stephen Brennan <stephen@brennan.io>
> Reviewed-by: Matthias Brugger <mbrugger@suse.com>
> ---
>  drivers/char/hw_random/Kconfig        | 2 +-
>  drivers/char/hw_random/iproc-rng200.c | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
> index 7c7fecfa2fb2..77e848fca531 100644
> --- a/drivers/char/hw_random/Kconfig
> +++ b/drivers/char/hw_random/Kconfig
> @@ -90,7 +90,7 @@ config HW_RANDOM_BCM2835
>  
>  config HW_RANDOM_IPROC_RNG200
>  	tristate "Broadcom iProc/STB RNG200 support"
> -	depends on ARCH_BCM_IPROC || ARCH_BRCMSTB
> +	depends on ARCH_BCM_IPROC || ARCH_BCM2835 || ARCH_BRCMSTB
>  	default HW_RANDOM
>  	---help---
>  	  This driver provides kernel-side support for the RNG200
> diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_random/iproc-rng200.c
> index 899ff25f4f28..32d9fe61a225 100644
> --- a/drivers/char/hw_random/iproc-rng200.c
> +++ b/drivers/char/hw_random/iproc-rng200.c
> @@ -213,6 +213,7 @@ static int iproc_rng200_probe(struct platform_device *pdev)
>  }
>  
>  static const struct of_device_id iproc_rng200_of_match[] = {
> +	{ .compatible = "brcm,bcm2711-rng200", },
>  	{ .compatible = "brcm,bcm7211-rng200", },

Again, duplicate of commit 1fa6d053b2a5.

>  	{ .compatible = "brcm,bcm7278-rng200", },
>  	{ .compatible = "brcm,iproc-rng200", },

baruch
Matthias Brugger Nov. 20, 2019, 5:33 p.m. UTC | #2
On 20/11/2019 05:52, Baruch Siach wrote:
> Hi Stephen, Stefan,
> 
> On Wed, Nov 20 2019, Stephen Brennan wrote:
>> From: Stefan Wahren <wahrenst@gmx.net>
>>
>> BCM2711 features a RNG200 hardware random number generator block.
>> So make the driver available.
>>
>> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
>> Signed-off-by: Stephen Brennan <stephen@brennan.io>
>> Reviewed-by: Matthias Brugger <mbrugger@suse.com>
>> ---
>>  drivers/char/hw_random/Kconfig        | 2 +-
>>  drivers/char/hw_random/iproc-rng200.c | 1 +
>>  2 files changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
>> index 7c7fecfa2fb2..77e848fca531 100644
>> --- a/drivers/char/hw_random/Kconfig
>> +++ b/drivers/char/hw_random/Kconfig
>> @@ -90,7 +90,7 @@ config HW_RANDOM_BCM2835
>>  
>>  config HW_RANDOM_IPROC_RNG200
>>  	tristate "Broadcom iProc/STB RNG200 support"
>> -	depends on ARCH_BCM_IPROC || ARCH_BRCMSTB
>> +	depends on ARCH_BCM_IPROC || ARCH_BCM2835 || ARCH_BRCMSTB
>>  	default HW_RANDOM
>>  	---help---
>>  	  This driver provides kernel-side support for the RNG200
>> diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_random/iproc-rng200.c
>> index 899ff25f4f28..32d9fe61a225 100644
>> --- a/drivers/char/hw_random/iproc-rng200.c
>> +++ b/drivers/char/hw_random/iproc-rng200.c
>> @@ -213,6 +213,7 @@ static int iproc_rng200_probe(struct platform_device *pdev)
>>  }
>>  
>>  static const struct of_device_id iproc_rng200_of_match[] = {
>> +	{ .compatible = "brcm,bcm2711-rng200", },
>>  	{ .compatible = "brcm,bcm7211-rng200", },
> 
> Again, duplicate of commit 1fa6d053b2a5.
> 

That commit adds 7211 compatible while this patch adds one for 2711.

Regards,
Matthias
Florian Fainelli Nov. 20, 2019, 7:55 p.m. UTC | #3
On 11/19/19 7:16 PM, Stephen Brennan wrote:
> From: Stefan Wahren <wahrenst@gmx.net>
> 
> BCM2711 features a RNG200 hardware random number generator block.
> So make the driver available.
> 
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
> Signed-off-by: Stephen Brennan <stephen@brennan.io>
> Reviewed-by: Matthias Brugger <mbrugger@suse.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
diff mbox series

Patch

diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
index 7c7fecfa2fb2..77e848fca531 100644
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@ -90,7 +90,7 @@  config HW_RANDOM_BCM2835
 
 config HW_RANDOM_IPROC_RNG200
 	tristate "Broadcom iProc/STB RNG200 support"
-	depends on ARCH_BCM_IPROC || ARCH_BRCMSTB
+	depends on ARCH_BCM_IPROC || ARCH_BCM2835 || ARCH_BRCMSTB
 	default HW_RANDOM
 	---help---
 	  This driver provides kernel-side support for the RNG200
diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_random/iproc-rng200.c
index 899ff25f4f28..32d9fe61a225 100644
--- a/drivers/char/hw_random/iproc-rng200.c
+++ b/drivers/char/hw_random/iproc-rng200.c
@@ -213,6 +213,7 @@  static int iproc_rng200_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id iproc_rng200_of_match[] = {
+	{ .compatible = "brcm,bcm2711-rng200", },
 	{ .compatible = "brcm,bcm7211-rng200", },
 	{ .compatible = "brcm,bcm7278-rng200", },
 	{ .compatible = "brcm,iproc-rng200", },