aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x
diff options
context:
space:
mode:
authorAnsuel Smith <ansuelsmth@gmail.com>2019-12-25 19:42:08 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2020-01-08 14:30:43 +0100
commit5ba02d10edc2e72c063c0419cded749cf55a3607 (patch)
tree9aebf67f045fc03fe84838633032c8e9b156f264 /target/linux/ipq806x
parent41c19dd542973dbc1336ecceaa32777506933cdf (diff)
downloadupstream-5ba02d10edc2e72c063c0419cded749cf55a3607.tar.gz
upstream-5ba02d10edc2e72c063c0419cded749cf55a3607.tar.bz2
upstream-5ba02d10edc2e72c063c0419cded749cf55a3607.zip
ipq806x: opp/core: fix broken patch Handle opp voltage adjust
The opp_notifier introduced with patch 0054-Handle-OPP-voltage adjust for some reason missed the actual registration in the opp struct, resulting in never being registred. This was present in kernel 4.9 patchset but dropped in the transition to 4.14. Reintroduce this and fix patch 0055 about L2 cache scaling. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Diffstat (limited to 'target/linux/ipq806x')
-rw-r--r--target/linux/ipq806x/patches-4.19/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch11
-rw-r--r--target/linux/ipq806x/patches-4.19/0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch4
2 files changed, 4 insertions, 11 deletions
diff --git a/target/linux/ipq806x/patches-4.19/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch b/target/linux/ipq806x/patches-4.19/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch
index f60fe3fe2f..e1dbb8791d 100644
--- a/target/linux/ipq806x/patches-4.19/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch
+++ b/target/linux/ipq806x/patches-4.19/0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch
@@ -91,19 +91,12 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
static int resources_available(void)
{
struct device *cpu_dev;
-@@ -161,6 +200,7 @@ static int cpufreq_init(struct cpufreq_p
- bool fallback = false;
- const char *name;
- int ret;
-+ struct srcu_notifier_head *opp_srcu_head;
-
- cpu_dev = get_cpu_device(policy->cpu);
- if (!cpu_dev) {
-@@ -251,10 +291,13 @@ static int cpufreq_init(struct cpufreq_p
+@@ -251,10 +291,14 @@ static int cpufreq_init(struct cpufreq_p
__func__, ret);
}
+ mutex_init(&priv->lock);
++ priv->opp_nb.notifier_call = opp_notifier;
+ dev_pm_opp_register_notifier(cpu_dev, &priv->opp_nb);
+
ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table);
diff --git a/target/linux/ipq806x/patches-4.19/0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch b/target/linux/ipq806x/patches-4.19/0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch
index f27f88f892..2805f246ee 100644
--- a/target/linux/ipq806x/patches-4.19/0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch
+++ b/target/linux/ipq806x/patches-4.19/0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch
@@ -53,9 +53,9 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
arch_set_freq_scale(policy->related_cpus, freq,
policy->cpuinfo.max_freq);
@@ -201,6 +230,8 @@ static int cpufreq_init(struct cpufreq_p
+ bool fallback = false;
const char *name;
int ret;
- struct srcu_notifier_head *opp_srcu_head;
+ struct device_node *l2_np;
+ struct clk *l2_clk = NULL;
@@ -82,7 +82,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
struct clk *clk;
+ struct clk *l2_clk; /* L2 clock */
-+ unsigned int l2_rate[3]; /* L2 bus clock rate thresholds */
++ unsigned int l2_rate[3]; /* L2 bus clock rate thresholds */
struct cpufreq_cpuinfo cpuinfo;/* see above */
unsigned int min; /* in kHz */