kernel: bump 4.14 to 4.14.48 for 18.06
[openwrt/openwrt.git] / target / linux / ipq806x / patches-4.14 / 0046-cpufreq-qcom-independent-core-clocks.patch
index d7211e1559594f50bbf0a01fa59fe56c7cb5c297..1d2fbf9db5233c721f4adcd89326e90e6d6344ff 100644 (file)
@@ -29,31 +29,31 @@ Signed-off-by: Sricharan R <sricharan@codeaurora.org>
 --- a/drivers/cpufreq/cpufreq-dt.c
 +++ b/drivers/cpufreq/cpufreq-dt.c
 @@ -220,7 +220,10 @@ static int cpufreq_init(struct cpufreq_p
-       }
-
-       if (fallback) {
+       }
+       if (fallback) {
 -              cpumask_setall(policy->cpus);
 +              struct cpufreq_dt_platform_data *pd = cpufreq_get_driver_data();
 +
 +              if (!pd || !pd->independent_clocks)
 +                      cpumask_setall(policy->cpus);
-
-               /*
-                * OPP tables are initialized only for policy->cpu, do it for
+               /*
+                * OPP tables are initialized only for policy->cpu, do it for
 @@ -372,6 +375,8 @@ static int dt_cpufreq_probe(struct platf
-       if (data && data->have_governor_per_policy)
-               dt_cpufreq_driver.flags |= CPUFREQ_HAVE_GOVERNOR_PER_POLICY;
-
+       if (data && data->have_governor_per_policy)
+               dt_cpufreq_driver.flags |= CPUFREQ_HAVE_GOVERNOR_PER_POLICY;
 +      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);
+       ret = cpufreq_register_driver(&dt_cpufreq_driver);
+       if (ret)
+               dev_err(&pdev->dev, "failed register driver: %d\n", ret);
 --- 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
@@ -61,5 +61,6 @@ Signed-off-by: Sricharan R <sricharan@codeaurora.org>
 +       * clock.
 +       */
 +      bool independent_clocks;
-       bool have_governor_per_policy;
+       bool have_governor_per_policy;
  };