public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net: Fix emaclite driver to support little-endian microblaze
@ 2010-10-11  1:41 Michal Simek
  2010-10-11  1:41 ` [U-Boot] [PATCH v2] net: Move Emaclite to NET_MULTI Michal Simek
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michal Simek @ 2010-10-11  1:41 UTC (permalink / raw)
  To: u-boot

Support New emaclite AXI IP.

Signed-off-by: Michal Simek <monstr@monstr.eu>
CC: Ben Warren <biggerbadderben@gmail.com>
---
 drivers/net/xilinx_emaclite.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 455ce0c..76af939 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -309,7 +309,7 @@ static int emaclite_recv(struct eth_device *dev)
 #endif
 	}
 	/* Get the length of the frame that arrived */
-	switch(((in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0xC)) &
+	switch(((ntohl(in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0xC))) &
 			0xFFFF0000 ) >> 16) {
 		case 0x806:
 			length = 42 + 20; /* FIXME size of ARP */
@@ -317,7 +317,7 @@ static int emaclite_recv(struct eth_device *dev)
 			break;
 		case 0x800:
 			length = 14 + 14 +
-			(((in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0x10)) &
+			(((ntohl(in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0x10))) &
 			0xFFFF0000) >> 16); /* FIXME size of IP packet */
 			debug ("IP Packet\n");
 			break;
-- 
1.5.5.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-14 19:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-11  1:41 [U-Boot] [PATCH] net: Fix emaclite driver to support little-endian microblaze Michal Simek
2010-10-11  1:41 ` [U-Boot] [PATCH v2] net: Move Emaclite to NET_MULTI Michal Simek
2010-10-12  6:34   ` Ben Warren
2010-10-12  6:34 ` [U-Boot] [PATCH] net: Fix emaclite driver to support little-endian microblaze Ben Warren
2010-10-14 19:26 ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox