aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/bcm-sf2-eth-gmac.c
diff options
context:
space:
mode:
authorJoe Hershberger2016-08-08 11:28:39 -0500
committerJoe Hershberger2016-08-15 15:29:03 -0500
commitdfcc496ed7e24d3eb9b506f000adefd916b5148f (patch)
treee9c6b45fa75bd4d55d3a7dc63c18988f5b9afb1f /drivers/net/bcm-sf2-eth-gmac.c
parent875e0bc68a53653aceae33cd92cbb29a8b82471c (diff)
net: mii: Changes not made by spatch
If the functions passed to the registration function are not in the same C file (extern) then spatch will not handle the dependent changes. Make those changes manually. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> For the 4xx related files: Acked-by: Stefan Roese <sr@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/net/bcm-sf2-eth-gmac.c')
-rw-r--r--drivers/net/bcm-sf2-eth-gmac.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/net/bcm-sf2-eth-gmac.c b/drivers/net/bcm-sf2-eth-gmac.c
index 977feec3511..f2853cfad25 100644
--- a/drivers/net/bcm-sf2-eth-gmac.c
+++ b/drivers/net/bcm-sf2-eth-gmac.c
@@ -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__);