Re: [PATCH V2] cpufreq: tegra186: Fix initial frequency

From: Viresh Kumar
Date: Wed Oct 28 2020 - 19:15:35 EST


On 26-10-20, 12:57, Jon Hunter wrote:
> Thinking about this some more, what are your thoughts on making the
> following change?
>
> Basically, if the driver sets the CPUFREQ_NEED_INITIAL_FREQ_CHECK,

This flag only means that the platform would like the core to check
the currently programmed frequency and get it in sync with the table.

> then I wonder if we should not fail if the frequency return by
> >get() is not known.

When do we fail if the frequency isn't known ? That's the case where
we try to set it to one from the table.

But (looking at your change), ->get() can't really return 0. We depend
on it to get us the exact frequency the hardware is programmed at
instead of reading a cached value in the software.

> >This would fix the problem I see on Tegra186
> where the initial boot frequency may not be in the frequency table.

With current mainline, what's the problem you see now ? Sorry I missed
track of it a bit :)

--
viresh