
-----Original Message----- From: Valentin Longchamp [mailto:valentin.longchamp@keymile.com] Sent: 29 May 2012 14:15 To: Prafulla Wadaskar Cc: holger.brunck@keymile.com; u-boot@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 . . .