]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/net/fec_mxc.c
net: fec_mxc: don't try to clear read-only registers
[karo-tx-uboot.git] / drivers / net / fec_mxc.c
index 343646c939b51f0389d69235f2374ad5ca074638..61f2db834c3db2d55d0804b96332e8112b7881f9 100644 (file)
@@ -531,8 +531,6 @@ static int fec_open(struct eth_device *edev)
 static int fec_init(struct eth_device *dev, bd_t* bd)
 {
        struct fec_priv *fec = dev->priv;
-       uint32_t *mib_ptr = (uint32_t *)&fec->eth->rmon_t_drop;
-       int i;
 
        /* Initialize MAC address */
        fec_set_hwaddr(dev);
@@ -561,11 +559,6 @@ static int fec_init(struct eth_device *dev, bd_t* bd)
        writel(0x00000000, &fec->eth->gaddr1);
        writel(0x00000000, &fec->eth->gaddr2);
 
-
-       /* clear MIB RAM */
-       for (i = 0; i <= 0xfc >> 2; i++)
-               writel(0, &mib_ptr[i]);
-
        /* FIFO receive start register */
        writel(0x520, &fec->eth->r_fstart);
 
@@ -724,6 +717,7 @@ static int fec_send(struct eth_device *dev, void *packet, int length)
        while (--timeout) {
                if (!(readl(&fec->eth->x_des_active) & FEC_X_DES_ACTIVE_TDAR))
                        break;
+               udelay(1);
        }
 
        if (!timeout) {
@@ -751,6 +745,7 @@ static int fec_send(struct eth_device *dev, void *packet, int length)
                if (!(readw(&fec->tbd_base[fec->tbd_index].status) &
                    FEC_TBD_READY))
                        break;
+               udelay(1);
        }
 
        if (!timeout)