[U-Boot] [PATCH v2 1/2] TI: netdev: add driver for cpsw ethernet device
Mike Frysinger
vapier at gentoo.org
Thu Nov 10 18:06:55 CET 2011
On Thursday 10 November 2011 11:39:49 Tom Rini wrote:
> On Thu, Nov 10, 2011 at 9:26 AM, Mike Frysinger <vapier at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111110/afa2dcd4/attachment.pgp
More information about the U-Boot
mailing list