Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>2019-08-02 15:54:33 +0200
committerNicolas Saenz Julienne <nsaenzjulienne@suse.de>2019-08-08 11:39:12 +0200
commitf29dc8850f3de8946a614647dbd71c382170ebc4 (patch)
tree44f6c4d29ce5754c194e81de66b441e12bc1acbf
parent302f762beb69749c4b3510cc44ab3994a4d13829 (diff)
firmware: raspberrypi: register clk device (jsc#SLE-7294).
-rw-r--r--patches.drivers/firmware-raspberrypi-register-clk-device.patch60
-rw-r--r--series.conf1
2 files changed, 61 insertions, 0 deletions
diff --git a/patches.drivers/firmware-raspberrypi-register-clk-device.patch b/patches.drivers/firmware-raspberrypi-register-clk-device.patch
new file mode 100644
index 0000000000..e4b5abd19c
--- /dev/null
+++ b/patches.drivers/firmware-raspberrypi-register-clk-device.patch
@@ -0,0 +1,60 @@
+From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+Date: Wed, 12 Jun 2019 20:24:55 +0200
+Subject: firmware: raspberrypi: register clk device
+Git-commit: 91f2cf4a6b2131016b1ae9c9500245f0572112c7
+Patch-mainline: v5.3-rc1
+References: jsc#SLE-7294
+
+Since clk-raspberrypi is tied to the VC4 firmware instead of particular
+hardware it's registration should be performed by the firmware driver.
+
+Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+Acked-by: Eric Anholt <eric@anholt.net>
+Signed-off-by: Stephen Boyd <sboyd@kernel.org>
+---
+ drivers/firmware/raspberrypi.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c
+index 61be15d9df7d..da26a584dca0 100644
+--- a/drivers/firmware/raspberrypi.c
++++ b/drivers/firmware/raspberrypi.c
+@@ -20,6 +20,7 @@
+ #define MBOX_CHAN_PROPERTY 8
+
+ static struct platform_device *rpi_hwmon;
++static struct platform_device *rpi_clk;
+
+ struct rpi_firmware {
+ struct mbox_client cl;
+@@ -207,6 +208,12 @@ rpi_register_hwmon_driver(struct device *dev, struct rpi_firmware *fw)
+ -1, NULL, 0);
+ }
+
++static void rpi_register_clk_driver(struct device *dev)
++{
++ rpi_clk = platform_device_register_data(dev, "raspberrypi-clk",
++ -1, NULL, 0);
++}
++
+ static int rpi_firmware_probe(struct platform_device *pdev)
+ {
+ struct device *dev = &pdev->dev;
+@@ -234,6 +241,7 @@ static int rpi_firmware_probe(struct platform_device *pdev)
+
+ rpi_firmware_print_firmware_revision(fw);
+ rpi_register_hwmon_driver(dev, fw);
++ rpi_register_clk_driver(dev);
+
+ return 0;
+ }
+@@ -254,6 +262,8 @@ static int rpi_firmware_remove(struct platform_device *pdev)
+
+ platform_device_unregister(rpi_hwmon);
+ rpi_hwmon = NULL;
++ platform_device_unregister(rpi_clk);
++ rpi_clk = NULL;
+ mbox_free_channel(fw->chan);
+
+ return 0;
+
diff --git a/series.conf b/series.conf
index 7aee5e01a7..ab5d6aa420 100644
--- a/series.conf
+++ b/series.conf
@@ -23161,6 +23161,7 @@
patches.drivers/clk-qcom-Fix-Wunused-const-variable.patch
patches.drivers/clk-bcm2835-remove-pllb.patch
patches.drivers/clk-bcm283x-add-driver-interfacing-with-raspberry-pi-s-firmware.patch
+ patches.drivers/firmware-raspberrypi-register-clk-device.patch
patches.drivers/clk-tegra210-fix-PLLU-and-PLLU_OUT1.patch
patches.drivers/clk-rockchip-Don-t-yell-about-bad-mmc-phases-when-ge.patch
patches.fixes/floppy-fix-div-by-zero-in-setup_format_params.patch