aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.10/950-0053-firmware-bcm2835-Support-ARCH_BCM270x.patch
diff options
context:
space:
mode:
authorRui Salvaterra <rsalvaterra@gmail.com>2021-09-15 10:31:37 +0100
committerDaniel Golle <daniel@makrotopia.org>2021-09-30 22:29:33 +0100
commit3a2c16d1d23a4a178089db73748e4f7c0c384887 (patch)
tree3e225e519131679a818a26f7b1cd1a6d3c74a7d9 /target/linux/bcm27xx/patches-5.10/950-0053-firmware-bcm2835-Support-ARCH_BCM270x.patch
parentfa13dd658f59df41b9184d4dc15a5b29530e7c2c (diff)
downloadupstream-3a2c16d1d23a4a178089db73748e4f7c0c384887.tar.gz
upstream-3a2c16d1d23a4a178089db73748e4f7c0c384887.tar.bz2
upstream-3a2c16d1d23a4a178089db73748e4f7c0c384887.zip
kernel: bump 5.10 to 5.10.65
Manually refreshed: generic/pending-5.10/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch bcm27xx/patches-5.10/950-0053-firmware-bcm2835-Support-ARCH_BCM270x.patch bcm27xx/patches-5.10/950-0087-firmware-raspberrypi-Add-backward-compatible-get_thr.patch Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.10/950-0053-firmware-bcm2835-Support-ARCH_BCM270x.patch')
-rw-r--r--target/linux/bcm27xx/patches-5.10/950-0053-firmware-bcm2835-Support-ARCH_BCM270x.patch38
1 files changed, 26 insertions, 12 deletions
diff --git a/target/linux/bcm27xx/patches-5.10/950-0053-firmware-bcm2835-Support-ARCH_BCM270x.patch b/target/linux/bcm27xx/patches-5.10/950-0053-firmware-bcm2835-Support-ARCH_BCM270x.patch
index 08d1e2af2d..d5ffe71018 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0053-firmware-bcm2835-Support-ARCH_BCM270x.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0053-firmware-bcm2835-Support-ARCH_BCM270x.patch
@@ -27,8 +27,8 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
--- a/drivers/firmware/raspberrypi.c
+++ b/drivers/firmware/raspberrypi.c
-@@ -29,6 +29,8 @@ struct rpi_firmware {
- u32 enabled;
+@@ -32,6 +32,8 @@ struct rpi_firmware {
+ struct kref consumers;
};
+static struct platform_device *g_pdev;
@@ -36,32 +36,46 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
static DEFINE_MUTEX(transaction_lock);
static void response_callback(struct mbox_client *cl, void *msg)
-@@ -249,6 +251,7 @@ static int rpi_firmware_probe(struct pla
- init_completion(&fw->c);
+@@ -272,6 +274,7 @@ static int rpi_firmware_probe(struct pla
+ kref_init(&fw->consumers);
platform_set_drvdata(pdev, fw);
+ g_pdev = pdev;
rpi_firmware_print_firmware_revision(fw);
rpi_register_hwmon_driver(dev, fw);
-@@ -276,6 +279,7 @@ static int rpi_firmware_remove(struct pl
- platform_device_unregister(rpi_clk);
- rpi_clk = NULL;
- mbox_free_channel(fw->chan);
-+ g_pdev = NULL;
+@@ -301,6 +304,8 @@ static int rpi_firmware_remove(struct pl
+
+ rpi_firmware_put(fw);
++ g_pdev = NULL;
++
return 0;
}
-@@ -288,7 +292,7 @@ static int rpi_firmware_remove(struct pl
+
+@@ -314,7 +319,7 @@ static int rpi_firmware_remove(struct pl
*/
struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node)
{
- struct platform_device *pdev = of_find_device_by_node(firmware_node);
+ struct platform_device *pdev = g_pdev;
+ struct rpi_firmware *fw;
if (!pdev)
- return NULL;
-@@ -312,7 +316,18 @@ static struct platform_driver rpi_firmwa
+@@ -327,12 +332,9 @@ struct rpi_firmware *rpi_firmware_get(st
+ if (!kref_get_unless_zero(&fw->consumers))
+ goto err_put_device;
+
+- put_device(&pdev->dev);
+-
+ return fw;
+
+ err_put_device:
+- put_device(&pdev->dev);
+ return NULL;
+ }
+ EXPORT_SYMBOL_GPL(rpi_firmware_get);
+@@ -352,7 +354,18 @@ static struct platform_driver rpi_firmwa
.shutdown = rpi_firmware_shutdown,
.remove = rpi_firmware_remove,
};