[PATCH v2 2/2] ARM: i.MX25 clk: Use of_clk_init() for DT case

Lothar Waßmann LW at KARO-electronics.de
Wed Jun 25 00:06:39 PDT 2014


Hi,

Sascha Hauer wrote:
> On Mon, Jun 23, 2014 at 03:25:27PM +0200, Denis Carikli wrote:
[...]
> > @@ -93,134 +91,136 @@ static struct clk *clk[clk_max];
> >  
> >  static int __init __mx25_clocks_init(unsigned long osc_rate)
> >  {
> > +	BUG_ON(!ccm);
> > +
> >  	clk[dummy] = imx_clk_fixed("dummy", 0);
> >  	clk[osc] = imx_clk_fixed("osc", osc_rate);
> > -	clk[mpll] = imx_clk_pllv1("mpll", "osc", ccm(CCM_MPCTL));
> > -	clk[upll] = imx_clk_pllv1("upll", "osc", ccm(CCM_UPCTL));
> > +	clk[mpll] = imx_clk_pllv1("mpll", "osc", CCM_MPCTL);
> > +	clk[upll] = imx_clk_pllv1("upll", "osc", CCM_UPCTL);
> 
> This huge diffstat could be avoided by doing:
> 
> #define ccm(x)	((ccm_base) + (x))
> 
> And passing ccm_base as argument to __mx25_clocks_init.
> 
<nit>the parens around ccm_base are useless</nit>


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________



More information about the linux-arm-kernel mailing list