summaryrefslogtreecommitdiff
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2016-08-08 11:28:39 -0500
committerJoe Hershberger <joe.hershberger@ni.com>2016-08-15 15:29:03 -0500
commitdfcc496ed7e24d3eb9b506f000adefd916b5148f (patch)
treee9c6b45fa75bd4d55d3a7dc63c18988f5b9afb1f /drivers/net/phy
parent875e0bc68a53653aceae33cd92cbb29a8b82471c (diff)
downloadu-boot-imx-dfcc496ed7e24d3eb9b506f000adefd916b5148f.zip
u-boot-imx-dfcc496ed7e24d3eb9b506f000adefd916b5148f.tar.gz
u-boot-imx-dfcc496ed7e24d3eb9b506f000adefd916b5148f.tar.bz2
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/phy')
-rw-r--r--drivers/net/phy/miiphybb.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/net/phy/miiphybb.c b/drivers/net/phy/miiphybb.c
index 5cda0b8..af676b9 100644
--- a/drivers/net/phy/miiphybb.c
+++ b/drivers/net/phy/miiphybb.c
@@ -230,24 +230,18 @@ static void miiphy_pre(struct bb_miiphy_bus *bus, char read,
* Returns:
* 0 on success
*/
-int bb_miiphy_read(const char *devname, unsigned char addr,
- unsigned char reg, unsigned short *value)
+int bb_miiphy_read(struct mii_dev *miidev, int addr, int devad, int reg)
{
short rdreg; /* register working value */
int v;
int j; /* counter */
struct bb_miiphy_bus *bus;
- bus = bb_miiphy_getbus(devname);
+ bus = bb_miiphy_getbus(miidev->name);
if (bus == NULL) {
return -1;
}
- if (value == NULL) {
- puts("NULL value pointer\n");
- return -1;
- }
-
miiphy_pre (bus, 1, addr, reg);
/* tri-state our MDIO I/O pin so we can read */
@@ -267,8 +261,7 @@ int bb_miiphy_read(const char *devname, unsigned char addr,
bus->set_mdc(bus, 1);
bus->delay(bus);
}
- /* There is no PHY, set value to 0xFFFF and return */
- *value = 0xFFFF;
+ /* There is no PHY, return */
return -1;
}
@@ -294,13 +287,11 @@ int bb_miiphy_read(const char *devname, unsigned char addr,
bus->set_mdc(bus, 1);
bus->delay(bus);
- *value = rdreg;
-
#ifdef DEBUG
- printf ("miiphy_read(0x%x) @ 0x%x = 0x%04x\n", reg, addr, *value);
+ printf("miiphy_read(0x%x) @ 0x%x = 0x%04x\n", reg, addr, rdreg);
#endif
- return 0;
+ return rdreg;
}
@@ -311,13 +302,13 @@ int bb_miiphy_read(const char *devname, unsigned char addr,
* Returns:
* 0 on success
*/
-int bb_miiphy_write (const char *devname, unsigned char addr,
- unsigned char reg, unsigned short value)
+int bb_miiphy_write(struct mii_dev *miidev, int addr, int devad, int reg,
+ u16 value)
{
struct bb_miiphy_bus *bus;
int j; /* counter */
- bus = bb_miiphy_getbus(devname);
+ bus = bb_miiphy_getbus(miidev->name);
if (bus == NULL) {
/* Bus not found! */
return -1;