Commit 0a1e879d353f6f6e661d14c6a0e42dd19efbc504
Committed by
Rafael J. Wysocki
1 parent
a0a22cf144
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
cpufreq: cpufreq-dt: Improve debug about matching OPP
During test of new DT OPPs it's very helpful to print the matching OPP in case of frequency change. So it will be easier to find frequency rounding issues in the dts file. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff
drivers/cpufreq/cpufreq-dt.c
... | ... | @@ -58,6 +58,8 @@ |
58 | 58 | old_freq = clk_get_rate(cpu_clk) / 1000; |
59 | 59 | |
60 | 60 | if (!IS_ERR(cpu_reg)) { |
61 | + unsigned long opp_freq; | |
62 | + | |
61 | 63 | rcu_read_lock(); |
62 | 64 | opp = dev_pm_opp_find_freq_ceil(cpu_dev, &freq_Hz); |
63 | 65 | if (IS_ERR(opp)) { |
64 | 66 | |
... | ... | @@ -67,9 +69,12 @@ |
67 | 69 | return PTR_ERR(opp); |
68 | 70 | } |
69 | 71 | volt = dev_pm_opp_get_voltage(opp); |
72 | + opp_freq = dev_pm_opp_get_freq(opp); | |
70 | 73 | rcu_read_unlock(); |
71 | 74 | tol = volt * priv->voltage_tolerance / 100; |
72 | 75 | volt_old = regulator_get_voltage(cpu_reg); |
76 | + dev_dbg(cpu_dev, "Found OPP: %ld kHz, %ld uV\n", | |
77 | + opp_freq / 1000, volt); | |
73 | 78 | } |
74 | 79 | |
75 | 80 | dev_dbg(cpu_dev, "%u MHz, %ld mV --> %u MHz, %ld mV\n", |