ipq806x: fix bug in L2 cache scaling
[openwrt/openwrt.git] / target / linux / ipq806x / patches-4.19 / 0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch
index bf4935a7c9de5be8ea790a7f1b1ae9958e46af76..fa9aa3fff00183dc119d69be645904bc276b81dd 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
 
 --- a/drivers/cpufreq/cpufreq-dt.c
 +++ b/drivers/cpufreq/cpufreq-dt.c
-@@ -49,11 +49,39 @@ static int set_target(struct cpufreq_pol
+@@ -49,11 +49,40 @@ static int set_target(struct cpufreq_pol
        struct private_data *priv = policy->driver_data;
        unsigned long freq = policy->freq_table[index].frequency;
        int ret;
@@ -43,6 +43,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
 +                      l2_freq = clk_get_rate(l2_clk);
 +
 +                      if (l2_freq != new_l2_freq) {
++                              ret = clk_set_rate(l2_clk, policy->l2_rate[0]);
 +                              /* scale l2 with the core */
 +                              ret = clk_set_rate(l2_clk, new_l2_freq);
 +                      }