aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0419-hwrng-iproc-rng200-Correct-SoC-name.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0419-hwrng-iproc-rng200-Correct-SoC-name.patch')
-rw-r--r--target/linux/bcm27xx/patches-5.4/950-0419-hwrng-iproc-rng200-Correct-SoC-name.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0419-hwrng-iproc-rng200-Correct-SoC-name.patch b/target/linux/bcm27xx/patches-5.4/950-0419-hwrng-iproc-rng200-Correct-SoC-name.patch
new file mode 100644
index 0000000000..f4e93308b1
--- /dev/null
+++ b/target/linux/bcm27xx/patches-5.4/950-0419-hwrng-iproc-rng200-Correct-SoC-name.patch
@@ -0,0 +1,67 @@
+From 5eafa5065b2ea2c8d1634f045b85b982393d808a Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.com>
+Date: Fri, 31 Jan 2020 09:36:57 +0000
+Subject: [PATCH] hwrng: iproc-rng200: Correct SoC name
+
+The Pi 4 SoC is called BCM2711, not BCM2838.
+
+Fixes: "hwrng: iproc-rng200: Add BCM2838 support"
+
+Signed-off-by: Phil Elwell <phil@raspberrypi.com>
+---
+ drivers/char/hw_random/Kconfig | 2 +-
+ drivers/char/hw_random/iproc-rng200.c | 11 +++++------
+ 2 files changed, 6 insertions(+), 7 deletions(-)
+
+--- a/drivers/char/hw_random/Kconfig
++++ b/drivers/char/hw_random/Kconfig
+@@ -94,7 +94,7 @@ config HW_RANDOM_IPROC_RNG200
+ default HW_RANDOM
+ ---help---
+ This driver provides kernel-side support for the RNG200
+- hardware found on the Broadcom iProc, BCM2838 and STB SoCs.
++ hardware found on the Broadcom iProc, BCM2711 and STB SoCs.
+
+ To compile this driver as a module, choose M here: the
+ module will be called iproc-rng200
+--- a/drivers/char/hw_random/iproc-rng200.c
++++ b/drivers/char/hw_random/iproc-rng200.c
+@@ -174,7 +174,7 @@ static int iproc_rng200_init(struct hwrn
+ return 0;
+ }
+
+-static int bcm2838_rng200_read(struct hwrng *rng, void *buf, size_t max,
++static int bcm2711_rng200_read(struct hwrng *rng, void *buf, size_t max,
+ bool wait)
+ {
+ struct iproc_rng200_dev *priv = to_rng_priv(rng);
+@@ -211,7 +211,7 @@ static int bcm2838_rng200_read(struct hw
+ return num_words * sizeof(u32);
+ }
+
+-static int bcm2838_rng200_init(struct hwrng *rng)
++static int bcm2711_rng200_init(struct hwrng *rng)
+ {
+ struct iproc_rng200_dev *priv = to_rng_priv(rng);
+ uint32_t val;
+@@ -271,9 +271,9 @@ static int iproc_rng200_probe(struct pla
+ priv->rng.name = pdev->name;
+ priv->rng.cleanup = iproc_rng200_cleanup;
+
+- if (of_device_is_compatible(dev->of_node, "brcm,bcm2838-rng200")) {
+- priv->rng.init = bcm2838_rng200_init;
+- priv->rng.read = bcm2838_rng200_read;
++ if (of_device_is_compatible(dev->of_node, "brcm,bcm2711-rng200")) {
++ priv->rng.init = bcm2711_rng200_init;
++ priv->rng.read = bcm2711_rng200_read;
+ } else {
+ priv->rng.init = iproc_rng200_init;
+ priv->rng.read = iproc_rng200_read;
+@@ -296,7 +296,6 @@ static const struct of_device_id iproc_r
+ { .compatible = "brcm,bcm7211-rng200", },
+ { .compatible = "brcm,bcm7278-rng200", },
+ { .compatible = "brcm,iproc-rng200", },
+- { .compatible = "brcm,bcm2838-rng200"},
+ {},
+ };
+ MODULE_DEVICE_TABLE(of, iproc_rng200_of_match);