From f07e572f6447465d8938679533d604e402b0f066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 18 Feb 2021 18:04:33 +0100 Subject: bcm27xx: import latest patches from the RPi foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G bcm2710: boot tested on RPi 3B v1.2 bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas --- ...-0419-hwrng-iproc-rng200-Correct-SoC-name.patch | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.4/950-0419-hwrng-iproc-rng200-Correct-SoC-name.patch (limited to 'target/linux/bcm27xx/patches-5.4/950-0419-hwrng-iproc-rng200-Correct-SoC-name.patch') 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 +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 +--- + 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); -- cgit v1.2.3