[PATCH 2/2] clk: ppc-corenet: don't use platform_driver to init the clock device

Scott Wood scottwood at freescale.com
Fri Oct 17 16:58:55 AEDT 2014


On Fri, 2014-10-17 at 06:55 +0800, Kevin Hao wrote:
> On Thu, Oct 16, 2014 at 11:55:23PM +0200, Scott Wood wrote:
> > On Thu, 2014-10-16 at 19:18 +0800, Kevin Hao wrote:
> > > diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c b/arch/powerpc/platforms/85xx/corenet_generic.c
> > > index e56b89a792ed..7677cfecb787 100644
> > > --- a/arch/powerpc/platforms/85xx/corenet_generic.c
> > > +++ b/arch/powerpc/platforms/85xx/corenet_generic.c
> > > @@ -16,6 +16,7 @@
> > >  #include <linux/kdev_t.h>
> > >  #include <linux/delay.h>
> > >  #include <linux/interrupt.h>
> > > +#include <linux/clk-provider.h>
> > >  
> > >  #include <asm/time.h>
> > >  #include <asm/machdep.h>
> > > @@ -188,11 +189,17 @@ static int __init corenet_generic_probe(void)
> > >  	return 0;
> > >  }
> > >  
> > > +static void __init corenet_gen_init(void)
> > > +{
> > > +	of_clk_init(NULL);
> > > +}
> > 
> > Why is this board-specific?
> 
> I have thought about to put it in a more common place such as time_init(),
> but this will be in conflict with mpc512x board. How about add an
> arch_initcall(mpc85xx_clk_init) in arch/powerpc/platforms/85xx/common.c?

Gerhard, does 512x really require of_clk_init() to be called at that
specific time, or can it be replaced by a common of_clk_init()?

-Scott




More information about the Linuxppc-dev mailing list