summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2010-10-11 11:41:46 +1000
committerBen Warren <biggerbadderben@gmail.com>2010-10-11 23:00:29 -0700
commit3f91ec0fa1ceab413fa2e74b4ffd37ab505cc66c (patch)
tree4d98177f05b5288531cc2566e41994af1f9595b1
parentf87a6f27e61ead22fd87bd4f38eadad82dc94b66 (diff)
downloadu-boot-imx-3f91ec0fa1ceab413fa2e74b4ffd37ab505cc66c.zip
u-boot-imx-3f91ec0fa1ceab413fa2e74b4ffd37ab505cc66c.tar.gz
u-boot-imx-3f91ec0fa1ceab413fa2e74b4ffd37ab505cc66c.tar.bz2
net: Fix emaclite driver to support little-endian microblaze
Support New emaclite AXI IP. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
-rw-r--r--drivers/net/xilinx_emaclite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 0820daa..74a2012 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;