diff options
Diffstat (limited to 'target/linux/ipq806x/patches-4.9/0046-cpufreq-qcom-independent-core-clocks.patch')
-rw-r--r-- | target/linux/ipq806x/patches-4.9/0046-cpufreq-qcom-independent-core-clocks.patch | 70 |
1 files changed, 40 insertions, 30 deletions
diff --git a/target/linux/ipq806x/patches-4.9/0046-cpufreq-qcom-independent-core-clocks.patch b/target/linux/ipq806x/patches-4.9/0046-cpufreq-qcom-independent-core-clocks.patch index 8d2861ce9e..d767dbf5f0 100644 --- a/target/linux/ipq806x/patches-4.9/0046-cpufreq-qcom-independent-core-clocks.patch +++ b/target/linux/ipq806x/patches-4.9/0046-cpufreq-qcom-independent-core-clocks.patch @@ -1,25 +1,31 @@ -ipq806x: support independent core clocks with kernel 4.9+ +From patchwork Fri Dec 8 09:42:30 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [v4,12/12] cpufreq: dt: Reintroduce independent_clocks platform data +From: Sricharan R <sricharan@codeaurora.org> +X-Patchwork-Id: 10102073 +Message-Id: <1512726150-7204-13-git-send-email-sricharan@codeaurora.org> +To: mturquette@baylibre.com, sboyd@codeaurora.org, + devicetree@vger.kernel.org, linux-pm@vger.kernel.org, + linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, + viresh.kumar@linaro.org, linux-arm-kernel@lists.infradead.org +Cc: sricharan@codeaurora.org +Date: Fri, 8 Dec 2017 15:12:30 +0530 -Add back support for the independent_clocks definition that has been -removed between kernel 4.4 and 4.9 by upstream commits -eb96924acddc709db58221c210ca05cd9effb1df and -e86eee6bc2aaa6b3637f6497b26beee09a91bde9 +The Platform data was removed earlier by, +'commit eb96924acddc ("cpufreq: dt: Kill platform-data")' +since there were no users at that time. +Now this is required when the each of the cpu clocks +can be scaled independently, which is the case +for krait cores. So reintroduce it. -* extend the new cpufreq_dt_platform_data definition in cpufreq-dt.h -* use new cpufreq-dt.h in qcom-cpufreq.c +Signed-off-by: Sricharan R <sricharan@codeaurora.org> +--- + drivers/cpufreq/cpufreq-dt.c | 7 ++++++- + drivers/cpufreq/cpufreq-dt.h | 6 ++++++ + 2 files changed, 12 insertions(+), 1 deletion(-) -Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> - ---- a/drivers/cpufreq/cpufreq-dt.h -+++ b/drivers/cpufreq/cpufreq-dt.h -@@ -14,6 +14,7 @@ - - struct cpufreq_dt_platform_data { - bool have_governor_per_policy; -+ bool independent_clocks; - }; - - #endif /* __CPUFREQ_DT_H__ */ --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -221,7 +221,10 @@ static int cpufreq_init(struct cpufreq_p @@ -38,19 +44,23 @@ Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> if (data && data->have_governor_per_policy) dt_cpufreq_driver.flags |= CPUFREQ_HAVE_GOVERNOR_PER_POLICY; -+ dt_cpufreq_driver.driver_data = dev_get_platdata(&pdev->dev); ++ dt_cpufreq_driver.driver_data = data; + ret = cpufreq_register_driver(&dt_cpufreq_driver); if (ret) dev_err(&pdev->dev, "failed register driver: %d\n", ret); ---- a/drivers/cpufreq/qcom-cpufreq.c -+++ b/drivers/cpufreq/qcom-cpufreq.c -@@ -20,7 +20,7 @@ - #include <linux/platform_device.h> - #include <linux/pm_opp.h> - #include <linux/slab.h> --#include <linux/cpufreq-dt.h> -+#include "cpufreq-dt.h" +--- a/drivers/cpufreq/cpufreq-dt.h ++++ b/drivers/cpufreq/cpufreq-dt.h +@@ -13,6 +13,12 @@ + #include <linux/types.h> + + struct cpufreq_dt_platform_data { ++ /* ++ * True when each CPU has its own clock to control its ++ * frequency, false when all CPUs are controlled by a single ++ * clock. ++ */ ++ bool independent_clocks; + bool have_governor_per_policy; + }; - static void __init get_krait_bin_format_a(int *speed, int *pvs, int *pvs_ver) - { |