]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/bcm-sf2-eth-gmac.c
Merge git://www.denx.de/git/u-boot-marvell
[u-boot] / drivers / net / bcm-sf2-eth-gmac.c
index 977feec3511cc0f80d8194a38c4e9d86611dd303..f2853cfad250715eeb21022eb55723bc55016ef5 100644 (file)
@@ -596,12 +596,10 @@ bool gmac_mii_busywait(unsigned int timeout)
        return tmp & (1 << GMAC_MII_BUSY_SHIFT);
 }
 
-int gmac_miiphy_read(const char *devname, unsigned char phyaddr,
-                       unsigned char reg, unsigned short *value)
+int gmac_miiphy_read(struct mii_dev *bus, int phyaddr, int devad, int reg)
 {
        uint32_t tmp = 0;
-
-       (void)devname;
+       u16 value = 0;
 
        /* Busy wait timeout is 1ms */
        if (gmac_mii_busywait(1000)) {
@@ -621,18 +619,16 @@ int gmac_miiphy_read(const char *devname, unsigned char phyaddr,
                return -1;
        }
 
-       *value = readl(GMAC_MII_DATA_ADDR) & 0xffff;
-       debug("MII read data 0x%x\n", *value);
-       return 0;
+       value = readl(GMAC_MII_DATA_ADDR) & 0xffff;
+       debug("MII read data 0x%x\n", value);
+       return value;
 }
 
-int gmac_miiphy_write(const char *devname, unsigned char phyaddr,
-                        unsigned char reg, unsigned short value)
+int gmac_miiphy_write(struct mii_dev *bus, int phyaddr, int devad, int reg,
+                     u16 value)
 {
        uint32_t tmp = 0;
 
-       (void)devname;
-
        /* Busy wait timeout is 1ms */
        if (gmac_mii_busywait(1000)) {
                error("%s: Prepare MII write: MII/MDIO busy\n", __func__);