]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - arch/powerpc/cpu/mpc8220/fec.c
doc/README.scrapyard: add missing commit IDs
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc8220 / fec.c
index 00879dff5c95058462eeef50231c689582943097..43fa802ca96db0a5a4e6f0542fb5873877d3ecd5 100644 (file)
@@ -15,8 +15,7 @@
 #include "fec.h"
 
 #undef  DEBUG
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \
-    defined(CONFIG_MPC8220_FEC)
+#if defined(CONFIG_CMD_NET) && defined(CONFIG_MPC8220_FEC)
 
 #if !(defined(CONFIG_MII) || defined(CONFIG_CMD_MII))
 #error "CONFIG_MII has to be defined!"
@@ -289,9 +288,11 @@ static int mpc8220_fec_init (struct eth_device *dev, bd_t * bis)
                 * Set MII_SPEED = (1/(mii_speed * 2)) * System Clock
                 * and do not drop the Preamble.
                 */
-               /* tbd - rtm */
-               /*fec->eth->mii_speed = (((gd->ipb_clk >> 20) / 5) << 1); */
-               /* No MII for 7-wire mode */
+               /*
+                * tbd - rtm
+                * fec->eth->mii_speed = (((gd->arch.ipb_clk >> 20) / 5) << 1);
+                * No MII for 7-wire mode
+                */
                fec->eth->mii_speed = 0x00000030;
        }
 
@@ -625,7 +626,7 @@ static void rfifo_print (char *devname, mpc8220_fec_priv * fec)
 
 /********************************************************************/
 
-static int mpc8220_fec_send (struct eth_device *dev, volatile void *eth_data,
+static int mpc8220_fec_send(struct eth_device *dev, void *eth_data,
                             int data_length)
 {
        /*
@@ -773,8 +774,8 @@ static int mpc8220_fec_recv (struct eth_device *dev)
                        frame = (NBUF *) pRbd->dataPointer;
                        frame_length = pRbd->dataLength - 4;
 
-#if (0)
-                       {
+                       /* DEBUG code */
+                       if (_DEBUG) {
                                int i;
 
                                printf ("recv data hdr:");
@@ -782,14 +783,13 @@ static int mpc8220_fec_recv (struct eth_device *dev)
                                        printf ("%x ", *(frame->head + i));
                                printf ("\n");
                        }
-#endif
+
                        /*
                         *  Fill the buffer and pass it to upper layers
                         */
 /*                     memcpy(buff, frame->head, 14);
                        memcpy(buff + 14, frame->data, frame_length);*/
-                       NetReceive ((volatile uchar *) pRbd->dataPointer,
-                                   frame_length);
+                       NetReceive((uchar *)pRbd->dataPointer, frame_length);
                        len = frame_length;
                }
                /*