From: Michal Simek Date: Mon, 11 Oct 2010 01:41:46 +0000 (+1000) Subject: net: Fix emaclite driver to support little-endian microblaze X-Git-Tag: v2010.12-rc1~135^2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3f91ec0fa1ceab413fa2e74b4ffd37ab505cc66c;p=u-boot net: Fix emaclite driver to support little-endian microblaze Support New emaclite AXI IP. Signed-off-by: Michal Simek Signed-off-by: Ben Warren --- diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 0820daa2bb..74a201259b 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -322,7 +322,7 @@ int eth_rx (void) #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 */ @@ -330,7 +330,7 @@ int eth_rx (void) 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;