ARM clock API to PowerPC

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Aug 13 07:29:59 EST 2009


On Wed, 2009-08-12 at 08:40 -0500, Kumar Gala wrote:

> I'm in the same boat as you Josh.  I think there is value and utility  
> here but not sure what problem Ben's trying to solve.

Well, there's several things here. 

First, it would be nice to improve clock management on some existing
SoCs. I'm not going to rewrite the powermac clock handling though :-)
But it might allow to cleanup some hacks we have there or add dynamic
clock handling in areas where we could improve power consumption etc...
by doing it but aren't today. Not critical but it's nice to have the
base layout there.

Don't you have parts where you'd like some more dynamic clock
management ? This API is a reasonably simple and nice way to get there.

Now, I know there is at least one person on earth contemplating sharing
some drivers between PPC and ARM. I won't tell much more at this stage,
but it makes sense in the grand scheme of things to see SoC vendors put
similar IO cores into either PPC or ARM and providing that clock API is
a good way to also allow these drivers to work since the drivers in
questions make use of it.

Also, note that the clk API is in include/linux/clk.h, ie, it's not
really ARM specific anymore in that sense, it's also very simple (it
leaves a lot to the implementation which is good) and thus my proposal
resolves in very little support code for us (mostly the clk_get()
implementation that hooks into ppc_md, the wrappers to call the
"methods" of struct clk, and the helper to parse the OF bits).

Cheers,
Ben.




More information about the Linuxppc-dev mailing list