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

Prafulla Wadaskar prafulla at marvell.com
Tue May 29 12:12:50 CEST 2012



> -----Original Message-----
> From: Valentin Longchamp [mailto:valentin.longchamp at keymile.com]
> Sent: 29 May 2012 14:15
> To: Prafulla Wadaskar
> Cc: holger.brunck at keymile.com; u-boot at lists.denx.de
> Subject: Re: [PATCH 1/3] kirkwood: add kirkwood_mpp_save/restore
> functions
> 
...snip...
> >
> >> +
> >> +void kirkwood_mpp_save(void)
> > This should be
> > void kirkwood_mpp_save(unsigned int *mpp_ctrl, int len)
> 
> Here we save _all_ mpp registers, with direct access to the registers.
> With your
> proposed solution, I would save it in a dynamically allocated table of
> size len.
> 
> That's fine for me, but I would then need to export MPP_NR_REGS,
> because that is
> what I would pass as len arg, is that OK ?

I think in your case you need configuration of 4 MPPs, i.e. from MPP6 to MPP11, so you may declare array of length 7 and backup and restore the same MPPs using len = 6.

No Need to backup and restore all MPPs.

Regards...
Prafulla . . .


More information about the U-Boot mailing list