]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/rtl8139.c
sh: sh_eth: Remove garbage from printf
[u-boot] / drivers / net / rtl8139.c
index 014f3b4324b21b548d2fa32a875b680acbf0babe..db8a727c89987c93376bc1f5526c956726d0c56a 100644 (file)
 #include <common.h>
 #include <malloc.h>
 #include <net.h>
+#include <netdev.h>
 #include <asm/io.h>
 #include <pci.h>
 
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \
-       defined(CONFIG_RTL8139)
-
 #define RTL_TIMEOUT    100000
 
 #define ETH_FRAME_LEN          1514
@@ -289,7 +287,7 @@ static int rtl8139_probe(struct eth_device *dev, bd_t *bis)
 
 /*
        Delay between EEPROM clock transitions.
-       No extra delay is needed with 33Mhz PCI, but 66Mhz may change this.
+       No extra delay is needed with 33MHz PCI, but 66MHz may change this.
 */
 
 #define eeprom_delay() inl(ee_addr)
@@ -489,7 +487,7 @@ static int rtl_poll(struct eth_device *dev)
 
        ring_offs = cur_rx % RX_BUF_LEN;
        /* ring_offs is guaranteed being 4-byte aligned */
-       rx_status = *(unsigned int *)(rx_ring + ring_offs);
+       rx_status = le32_to_cpu(*(unsigned int *)(rx_ring + ring_offs));
        rx_size = rx_status >> 16;
        rx_status &= 0xffff;
 
@@ -545,4 +543,3 @@ static void rtl_disable(struct eth_device *dev)
                udelay (100); /* wait 100us */
        }
 }
-#endif