]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/net/mpc5xxx_fec.c
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / drivers / net / mpc5xxx_fec.c
index c88e596c01fa222dd5b0cfc2034791c898316c5b..1093ba59dac1e4d4ffd7228573315e88814224a7 100644 (file)
@@ -249,6 +249,13 @@ static int mpc5xxx_fec_init(struct eth_device *dev, bd_t * bis)
 
        mpc5xxx_fec_init_phy(dev, bis);
 
+       /*
+        * Call board-specific PHY fixups (if any)
+        */
+#ifdef CONFIG_RESET_PHY_R
+       reset_phy();
+#endif
+
        /*
         * Initialize RxBD/TxBD rings
         */
@@ -433,8 +440,9 @@ static int mpc5xxx_fec_init_phy(struct eth_device *dev, bd_t * bis)
                /*
                 * Set MII_SPEED = (1/(mii_speed * 2)) * System Clock
                 * and do not drop the Preamble.
+                * No MII for 7-wire mode
                 */
-               fec->eth->mii_speed = (((gd->ipb_clk >> 20) / 5) << 1); /* No MII for 7-wire mode */
+               fec->eth->mii_speed = (((gd->arch.ipb_clk >> 20) / 5) << 1);
        }
 
        if (fec->xcv_type != SEVENWIRE) {
@@ -637,8 +645,9 @@ static void mpc5xxx_fec_halt(struct eth_device *dev)
                /*
                 * Set MII_SPEED = (1/(mii_speed * 2)) * System Clock
                 * and do not drop the Preamble.
+                * No MII for 7-wire mode
                 */
-               fec->eth->mii_speed = (((gd->ipb_clk >> 20) / 5) << 1); /* No MII for 7-wire mode */
+               fec->eth->mii_speed = (((gd->arch.ipb_clk >> 20) / 5) << 1);
        }
 
 #if (DEBUG & 0x3)
@@ -700,7 +709,7 @@ static void rfifo_print(char *devname, mpc5xxx_fec_priv *fec)
 
 /********************************************************************/
 
-static int mpc5xxx_fec_send(struct eth_device *dev, volatile void *eth_data,
+static int mpc5xxx_fec_send(struct eth_device *dev, void *eth_data,
                int data_length)
 {
        /*
@@ -902,8 +911,9 @@ int mpc5xxx_fec_initialize(bd_t * bis)
                /*
                 * Set MII_SPEED = (1/(mii_speed * 2)) * System Clock
                 * and do not drop the Preamble.
+                * No MII for 7-wire mode
                 */
-               fec->eth->mii_speed = (((gd->ipb_clk >> 20) / 5) << 1); /* No MII for 7-wire mode */
+               fec->eth->mii_speed = (((gd->arch.ipb_clk >> 20) / 5) << 1);
        }
 
        dev->priv = (void *)fec;