diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-02-04 19:02:53 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-02-04 19:14:13 +0100 |
commit | 84d555aa74434392b682fd9eb0fa701c89a046d6 (patch) | |
tree | bcc0a9bf058757da14054bce61a8cb8b8c9cd873 /target/linux/brcm2708/patches-4.19/950-0761-clk-raspberrypi-register-platform-device-for-raspber.patch | |
parent | 953973c2991e8640549a55df7a0574a1abac8644 (diff) | |
download | upstream-84d555aa74434392b682fd9eb0fa701c89a046d6.tar.gz upstream-84d555aa74434392b682fd9eb0fa701c89a046d6.tar.bz2 upstream-84d555aa74434392b682fd9eb0fa701c89a046d6.zip |
brcm2708: update to latest patches from RPi foundation
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0761-clk-raspberrypi-register-platform-device-for-raspber.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.19/950-0761-clk-raspberrypi-register-platform-device-for-raspber.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0761-clk-raspberrypi-register-platform-device-for-raspber.patch b/target/linux/brcm2708/patches-4.19/950-0761-clk-raspberrypi-register-platform-device-for-raspber.patch new file mode 100644 index 0000000000..be4d83485f --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0761-clk-raspberrypi-register-platform-device-for-raspber.patch @@ -0,0 +1,65 @@ +From b39d5caa499559be6c309b9fd8f8b2f992504e18 Mon Sep 17 00:00:00 2001 +From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> +Date: Wed, 12 Jun 2019 20:24:57 +0200 +Subject: [PATCH] clk: raspberrypi: register platform device for + raspberrypi-cpufreq + +Commit e2bb18347c8e5c4187831f3700c380e3c759601a upstream. + +As 'clk-raspberrypi' depends on RPi's firmware interface, which might be +configured as a module, the cpu clock might not be available for the +cpufreq driver during it's init process. So we register the +'raspberrypi-cpufreq' platform device after the probe sequence succeeds. + +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/clk/bcm/clk-raspberrypi.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +--- a/drivers/clk/bcm/clk-raspberrypi.c ++++ b/drivers/clk/bcm/clk-raspberrypi.c +@@ -34,6 +34,7 @@ + struct raspberrypi_clk { + struct device *dev; + struct rpi_firmware *firmware; ++ struct platform_device *cpufreq; + + unsigned long min_rate; + unsigned long max_rate; +@@ -272,6 +273,7 @@ static int raspberrypi_clk_probe(struct + + rpi->dev = dev; + rpi->firmware = firmware; ++ platform_set_drvdata(pdev, rpi); + + ret = raspberrypi_register_pllb(rpi); + if (ret) { +@@ -283,6 +285,18 @@ static int raspberrypi_clk_probe(struct + if (ret) + return ret; + ++ rpi->cpufreq = platform_device_register_data(dev, "raspberrypi-cpufreq", ++ -1, NULL, 0); ++ ++ return 0; ++} ++ ++static int raspberrypi_clk_remove(struct platform_device *pdev) ++{ ++ struct raspberrypi_clk *rpi = platform_get_drvdata(pdev); ++ ++ platform_device_unregister(rpi->cpufreq); ++ + return 0; + } + +@@ -291,6 +305,7 @@ static struct platform_driver raspberryp + .name = "raspberrypi-clk", + }, + .probe = raspberrypi_clk_probe, ++ .remove = raspberrypi_clk_remove, + }; + module_platform_driver(raspberrypi_clk_driver); + |