summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2011-10-12 02:31:39 +0000
committerWolfgang Denk <wd@denx.de>2011-10-22 01:16:08 +0200
commitc4c9fbebae6a62d538817d0ccee698adaafc5d66 (patch)
tree91e9e2b82568b32bf3135bdc25d0a852f6c31095 /drivers/net
parent712fbcf384b7fbe6118325f21dad98150b24f13b (diff)
downloadu-boot-imx-c4c9fbebae6a62d538817d0ccee698adaafc5d66.zip
u-boot-imx-c4c9fbebae6a62d538817d0ccee698adaafc5d66.tar.gz
u-boot-imx-c4c9fbebae6a62d538817d0ccee698adaafc5d66.tar.bz2
consolidate mdelay by providing a common function for all users
There are several mdelay() definitions in the driver and board code. Remove them all and provide a common mdelay() in lib/time.c. Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/e1000.c1
-rw-r--r--drivers/net/ftgmac100.c2
-rw-r--r--drivers/net/ne2000.c1
-rw-r--r--drivers/net/ne2000_base.c1
-rw-r--r--drivers/net/smc911x.c2
5 files changed, 0 insertions, 7 deletions
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 98145bc..01bdf81 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -50,7 +50,6 @@ tested on both gig copper and gig fiber boards
#define virt_to_bus(devno, v) pci_virt_to_mem(devno, (void *) (v))
#define bus_to_phys(devno, a) pci_mem_to_phys(devno, a)
-#define mdelay(n) udelay((n)*1000)
#define E1000_DEFAULT_PCI_PBA 0x00000030
#define E1000_DEFAULT_PCIE_PBA 0x000a0026
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 821840f..0af0c34 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -33,8 +33,6 @@
#define ETH_ZLEN 60
-#define mdelay(n) ({unsigned long msec = (n); while (msec--) udelay(1000); })
-
/* RBSR - hw default init value is also 0x640 */
#define RBSR_DEFAULT_VALUE 0x640
diff --git a/drivers/net/ne2000.c b/drivers/net/ne2000.c
index 7a85314..3939158 100644
--- a/drivers/net/ne2000.c
+++ b/drivers/net/ne2000.c
@@ -78,7 +78,6 @@ Add SNMP
/* NE2000 base header file */
#include "ne2000_base.h"
-#define mdelay(n) udelay((n)*1000)
/* find prom (taken from pc_net_cs.c from Linux) */
#include "8390.h"
diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c
index f93f932..f0cd2b6 100644
--- a/drivers/net/ne2000_base.c
+++ b/drivers/net/ne2000_base.c
@@ -77,7 +77,6 @@ Add SNMP
#include <net.h>
#include <malloc.h>
-#define mdelay(n) udelay((n)*1000)
/* forward definition of function used for the uboot interface */
void uboot_push_packet_len(int len);
void uboot_push_tx_done(int key, int val);
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index a677fd4..e34b487 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -35,8 +35,6 @@ u32 pkt_data_pull(struct eth_device *dev, u32 addr) \
void pkt_data_push(struct eth_device *dev, u32 addr, u32 val) \
__attribute__ ((weak, alias ("smc911x_reg_write")));
-#define mdelay(n) udelay((n)*1000)
-
static void smc911x_handle_mac_address(struct eth_device *dev)
{
unsigned long addrh, addrl;