bcm27xx-gpu-fw: update to latest version
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0429-hwrng-iproc-rng200-Correct-SoC-name.patch
1 From 5eafa5065b2ea2c8d1634f045b85b982393d808a Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Fri, 31 Jan 2020 09:36:57 +0000
4 Subject: [PATCH] hwrng: iproc-rng200: Correct SoC name
5
6 The Pi 4 SoC is called BCM2711, not BCM2838.
7
8 Fixes: "hwrng: iproc-rng200: Add BCM2838 support"
9
10 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
11 ---
12 drivers/char/hw_random/Kconfig | 2 +-
13 drivers/char/hw_random/iproc-rng200.c | 11 +++++------
14 2 files changed, 6 insertions(+), 7 deletions(-)
15
16 --- a/drivers/char/hw_random/Kconfig
17 +++ b/drivers/char/hw_random/Kconfig
18 @@ -94,7 +94,7 @@ config HW_RANDOM_IPROC_RNG200
19 default HW_RANDOM
20 ---help---
21 This driver provides kernel-side support for the RNG200
22 - hardware found on the Broadcom iProc, BCM2838 and STB SoCs.
23 + hardware found on the Broadcom iProc, BCM2711 and STB SoCs.
24
25 To compile this driver as a module, choose M here: the
26 module will be called iproc-rng200
27 --- a/drivers/char/hw_random/iproc-rng200.c
28 +++ b/drivers/char/hw_random/iproc-rng200.c
29 @@ -174,7 +174,7 @@ static int iproc_rng200_init(struct hwrn
30 return 0;
31 }
32
33 -static int bcm2838_rng200_read(struct hwrng *rng, void *buf, size_t max,
34 +static int bcm2711_rng200_read(struct hwrng *rng, void *buf, size_t max,
35 bool wait)
36 {
37 struct iproc_rng200_dev *priv = to_rng_priv(rng);
38 @@ -211,7 +211,7 @@ static int bcm2838_rng200_read(struct hw
39 return num_words * sizeof(u32);
40 }
41
42 -static int bcm2838_rng200_init(struct hwrng *rng)
43 +static int bcm2711_rng200_init(struct hwrng *rng)
44 {
45 struct iproc_rng200_dev *priv = to_rng_priv(rng);
46 uint32_t val;
47 @@ -271,9 +271,9 @@ static int iproc_rng200_probe(struct pla
48 priv->rng.name = pdev->name;
49 priv->rng.cleanup = iproc_rng200_cleanup;
50
51 - if (of_device_is_compatible(dev->of_node, "brcm,bcm2838-rng200")) {
52 - priv->rng.init = bcm2838_rng200_init;
53 - priv->rng.read = bcm2838_rng200_read;
54 + if (of_device_is_compatible(dev->of_node, "brcm,bcm2711-rng200")) {
55 + priv->rng.init = bcm2711_rng200_init;
56 + priv->rng.read = bcm2711_rng200_read;
57 } else {
58 priv->rng.init = iproc_rng200_init;
59 priv->rng.read = iproc_rng200_read;
60 @@ -296,7 +296,6 @@ static const struct of_device_id iproc_r
61 { .compatible = "brcm,bcm7211-rng200", },
62 { .compatible = "brcm,bcm7278-rng200", },
63 { .compatible = "brcm,iproc-rng200", },
64 - { .compatible = "brcm,bcm2838-rng200"},
65 {},
66 };
67 MODULE_DEVICE_TABLE(of, iproc_rng200_of_match);