Re: [PATCH V4 3/3] cpufreq: Tegra: implement intermediate frequency callbacks

From: Stephen Warren
Date: Mon Jun 02 2014 - 12:50:29 EST


On 06/02/2014 04:06 AM, Viresh Kumar wrote:
> On 30 May 2014 21:56, Stephen Warren <swarren@xxxxxxxxxxxxx> wrote:
>> ... [This patch causes issues on Tegra20] ...
>> I believe the issue is this:
...
> Okay, that was very helpful..
>
> What about this ? (Attached for testing) :
>
> Author: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
> Date: Fri May 16 14:22:40 2014 +0530
>
> cpufreq: Tegra: implement intermediate frequency callbacks
>
> Tegra had always been switching to intermediate frequency (pll_p_clk) since
> ever. CPUFreq core has better support for handling notifications for these
> frequencies and so we can adapt Tegra's driver to it.
>
> Also do a WARN() if clk_set_parent() fails while moving back to pll_x as we
> should have atleast restored to earlier frequency on error.

Tested-by: Stephen Warren <swarren@xxxxxxxxxx>

I'd prefer a couple of changes though:

a) Rename "pll_p_clk_count" to better describe what it represents. It
represents the fact that pll_x has been prepare_enabled, so why not call
it "pll_x_prepared"?

b) I think it should be a Boolean not an integer; there should never be
a case where the value is not 0 or 1. The only way that could happen is
if the cpufreq core called tegra_target_intermediate() out of sequence
too many times.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/