[RFC] cpufreq-cpu0: allow OPP table supplied by platform

Sören Brinkmann soren.brinkmann at xilinx.com
Thu Mar 13 13:43:09 EDT 2014


On Thu, 2014-03-13 at 07:44PM +0800, Jisheng Zhang wrote:
> Fixing lakml :)
> 
> sorry
> 
> On Thu, 13 Mar 2014 03:56:46 -0700
> Viresh Kumar <viresh.kumar at linaro.org> wrote:
> 
> > Fixing Rafael's id.
> > 
> > On 13 March 2014 16:25, Viresh Kumar <viresh.kumar at linaro.org> wrote:
> > > On 13 March 2014 16:18, Jisheng Zhang <jszhang at marvell.com> wrote:
> > >> Hi all,
> > >>
> > >> cpufreq-cpu0 is suitable for Marvell Berlin SoC. But there's one issue
> > >> to address. The opp is different between chips even on the same step
> > >> SoC, BG2Q for example. we can calculate the OPP table from the value of
> > >> one OTP register. We have two solutions:
> > >>
> > >> 1. bootloader reads OTP register and calculate the OPP table then change
> > >> dtb danamically
> > >>
> > >> 2. supply one driver in mach-berlin to initialize the OPP table; and
> > >> modify cpufreq-cpu0 to allow platform supply OPP table, fall back to
> > >> of_init_opp_table() if there's no OPP table.
> > >>
> > >> Which solution is better?
> > >
> > > I think we can go ahead with second option here. We can just check if opp
> > > tables are already initialized or not. In case they are, don't probe from
> > > dt..
> > >
> > > But lets see with others have to say here..

This might become useful for Zynq as well. We essentially allow to boot
with all kind of different frequencies and depending on how the PLL, and clock
registers get setup by the bootloader, certain frequencies may or may
not become possible. Having a way to dynamically build an OPP table
would probably be a nicer way than having to tell everybody to adjust
the DT according to how the bootloader sets up the clocks.

	Sören





More information about the linux-arm-kernel mailing list