[U-Boot] [PATCH 1/3] kirkwood: add kirkwood_mpp_save/restore functions

Prafulla Wadaskar prafulla at marvell.com
Tue May 29 14:42:08 CEST 2012



> -----Original Message-----
> From: Michael Walle [mailto:michael at walle.cc]
> Sent: 29 May 2012 03:38
> To: u-boot at lists.denx.de
> Cc: Prafulla Wadaskar; Valentin Longchamp; holger.brunck at keymile.com
> Subject: Re: [U-Boot] [PATCH 1/3] kirkwood: add
> kirkwood_mpp_save/restore functions
> 
> Am Donnerstag 24 Mai 2012, 10:26:44 schrieb Prafulla Wadaskar:
> > > +
> > > +void kirkwood_mpp_save(void)
> >
> > This should be
> > void kirkwood_mpp_save(unsigned int *mpp_ctrl, int len)
> >
> > > +{
> > > +	int i;
> > > +
> > > +	for (i = 0; i < MPP_NR_REGS; i++)
> > > +		mpp_regs[i] = readl(MPP_CTRL(i));
> > > +}
> > > +
> > > +void kirkwood_mpp_restore(void)
> >
> > Same here
> > void kirkwood_mpp_restore(unsigned int *mpp_ctrl, int len)
> or even better kirkwood_mpp_restore(const unsigned int *mpp_ctrl, int
> len)
> 
> btw. sometimes "unsigned int" is used and sometimes "u32", could we
> agree on
> one? Eg. kirkwood_mpp_conf() is declared with unsigned int but defined
> with
> u32.

Hi Michael

Thanks for your comments.

Yes, we should use u32.
And const will be a problem since mpp_ctrl will be array that will be dynamically modified.

Regards..
Prafulla . . .


More information about the U-Boot mailing list