On Thursday 10 November 2011 11:39:49 Tom Rini wrote: > On Thu, Nov 10, 2011 at 9:26 AM, Mike Frysinger <vap...@gentoo.org> wrote: > > On Thursday 10 November 2011 07:40:28 Chandan Nath wrote: > >> +#define mac_hi(mac) (((mac)[0] << 0) | ((mac)[1] << 8) | \ > >> + ((mac)[2] << 16) | ((mac)[3] << 24)) > > > > looks like __get_unaligned_u32() > > > >> +#define mac_lo(mac) (((mac)[4] << 0) | ((mac)[5] << 8)) > > > > looks like __get_unaligned_u16() > > It's the regular MAC shifting around everyone does. Are you saying > there's a general cleanup to be done here?
other drivers probably could benefit from using the unaligned helpers. but it isn't something we could generally unify as it requires assumption on core/system endian, and the layout of the registers in the peripheral. -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot