[U-Boot] [PATCH 2/3] ARM1176: TI: TNETV107X soc initial support

Chemparathy, Cyril cyril at ti.com
Tue Mar 30 22:59:39 CEST 2010


Hi Wolfgang,

> You might want to define a macro to reduce the amount of repeated
> code here.

Will do in v2.

> > +void lpsc_control(unsigned int id, int state)
> > +{
> > +	__lpsc_control(1, -1, id, state);
> > +}
> > +
> > +int lpsc_status(unsigned int id)
> > +{
> > +	return psc_reg_read(PSC_MDSTAT(id)) & 0x1f;
> > +}
> > +
> > +void clk_enable(unsigned int id)
> > +{
> > +	lpsc_control(id, PSC_MDCTL_NEXT_ENABLE);
> > +}
> > +
> > +void clk_disable(unsigned int id)
> > +{
> > +	lpsc_control(id, PSC_MDCTL_NEXT_DISABLE);
> > +}
> 
> These should probably be inlined ?

Are you referring to lpsc_control(), or to clk_enable/clk_disable?
The former can be eliminated, I think.
The latter are used elsewhere.  Are you recommending that I inline and move to a header?

Regards
Cyril.


More information about the U-Boot mailing list