From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Thu, 10 Nov 2011 12:06:55 -0500 Subject: [U-Boot] [PATCH v2 1/2] TI: netdev: add driver for cpsw ethernet device In-Reply-To: References: <1320928830-16221-1-git-send-email-chandan.nath@ti.com> <201111101126.18553.vapier@gentoo.org> Message-ID: <201111101206.55842.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday 10 November 2011 11:39:49 Tom Rini wrote: > On Thu, Nov 10, 2011 at 9:26 AM, Mike Frysinger 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