diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-05-27 15:12:04 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-05-28 10:36:27 +0200 |
commit | 584d4bf1d3c2265a810e1494eb5c8ef0a72ee934 (patch) | |
tree | 20b3364aee884d3f65f246c16ee7f8bd4a465ea2 /target/linux/bcm27xx/patches-5.4/950-0527-clk-bcm-rpi-Add-clock-id-to-data.patch | |
parent | 9e467a764b4e30a04dd0431ea277f6acd26babe0 (diff) | |
download | upstream-584d4bf1d3c2265a810e1494eb5c8ef0a72ee934.tar.gz upstream-584d4bf1d3c2265a810e1494eb5c8ef0a72ee934.tar.bz2 upstream-584d4bf1d3c2265a810e1494eb5c8ef0a72ee934.zip |
bcm27xx: update patches from RPi foundation
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0527-clk-bcm-rpi-Add-clock-id-to-data.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.4/950-0527-clk-bcm-rpi-Add-clock-id-to-data.patch | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0527-clk-bcm-rpi-Add-clock-id-to-data.patch b/target/linux/bcm27xx/patches-5.4/950-0527-clk-bcm-rpi-Add-clock-id-to-data.patch new file mode 100644 index 0000000000..09f023e09c --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0527-clk-bcm-rpi-Add-clock-id-to-data.patch @@ -0,0 +1,86 @@ +From 98d529ffea66937e8a9ba8b69172bb9c599cfa39 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard <maxime@cerno.tech> +Date: Fri, 7 Feb 2020 16:04:16 +0100 +Subject: [PATCH] clk: bcm: rpi: Add clock id to data + +The driver has really only supported one clock so far and has hardcoded the +ID used in communications with the firmware in all the functions +implementing the clock framework hooks. Let's store that in the clock data +structure so that we can support more clocks later on. + +Cc: Michael Turquette <mturquette@baylibre.com> +Cc: linux-clk@vger.kernel.org +Acked-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> +Reviewed-by: Stephen Boyd <sboyd@kernel.org> +Signed-off-by: Maxime Ripard <maxime@cerno.tech> +--- + drivers/clk/bcm/clk-raspberrypi.c | 16 +++++++--------- + 1 file changed, 7 insertions(+), 9 deletions(-) + +--- a/drivers/clk/bcm/clk-raspberrypi.c ++++ b/drivers/clk/bcm/clk-raspberrypi.c +@@ -39,6 +39,7 @@ struct raspberrypi_clk { + + struct raspberrypi_clk_data { + struct clk_hw hw; ++ unsigned id; + + unsigned long min_rate; + unsigned long max_rate; +@@ -95,7 +96,7 @@ static int raspberrypi_fw_pll_is_on(stru + + ret = raspberrypi_clock_property(rpi->firmware, + RPI_FIRMWARE_GET_CLOCK_STATE, +- RPI_FIRMWARE_ARM_CLK_ID, &val); ++ data->id, &val); + if (ret) + return 0; + +@@ -114,8 +115,7 @@ static unsigned long raspberrypi_fw_pll_ + + ret = raspberrypi_clock_property(rpi->firmware, + RPI_FIRMWARE_GET_CLOCK_RATE, +- RPI_FIRMWARE_ARM_CLK_ID, +- &val); ++ data->id, &val); + if (ret) + return ret; + +@@ -133,8 +133,7 @@ static int raspberrypi_fw_pll_set_rate(s + + ret = raspberrypi_clock_property(rpi->firmware, + RPI_FIRMWARE_SET_CLOCK_RATE, +- RPI_FIRMWARE_ARM_CLK_ID, +- &new_rate); ++ data->id, &new_rate); + if (ret) + dev_err_ratelimited(rpi->dev, "Failed to change %s frequency: %d", + clk_hw_get_name(hw), ret); +@@ -189,6 +188,7 @@ static int raspberrypi_register_pllb(str + if (!data) + return -ENOMEM; + data->rpi = rpi; ++ data->id = RPI_FIRMWARE_ARM_CLK_ID; + + /* All of the PLLs derive from the external oscillator. */ + init.parent_names = (const char *[]){ "osc" }; +@@ -200,8 +200,7 @@ static int raspberrypi_register_pllb(str + /* Get min & max rates set by the firmware */ + ret = raspberrypi_clock_property(rpi->firmware, + RPI_FIRMWARE_GET_MIN_CLOCK_RATE, +- RPI_FIRMWARE_ARM_CLK_ID, +- &min_rate); ++ data->id, &min_rate); + if (ret) { + dev_err(rpi->dev, "Failed to get %s min freq: %d\n", + init.name, ret); +@@ -210,8 +209,7 @@ static int raspberrypi_register_pllb(str + + ret = raspberrypi_clock_property(rpi->firmware, + RPI_FIRMWARE_GET_MAX_CLOCK_RATE, +- RPI_FIRMWARE_ARM_CLK_ID, +- &max_rate); ++ data->id, &max_rate); + if (ret) { + dev_err(rpi->dev, "Failed to get %s max freq: %d\n", + init.name, ret); |