summaryrefslogtreecommitdiffstats
path: root/drivers/net/ibm_newemac/phy.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-07-05 16:42:09 +0800
committerShawn Guo <shawn.guo@linaro.org>2011-07-27 09:31:02 +0800
commit4157ef1b8779b34581ee8b9dc8f7f95188008eca (patch)
tree6be8331bc24c59d9fea27a256a681c570c3dfdee /drivers/net/ibm_newemac/phy.c
parent6ca1a113791eb09dac8c48b2b264c4d72aab410f (diff)
net: ibm_newemac: convert it to use of_get_phy_mode
The patch extends 'enum phy_interface_t' and of_get_phy_mode a little bit with PHY_INTERFACE_MODE_NA and PHY_INTERFACE_MODE_SMII added, and then converts ibm_newemac net driver to use of_get_phy_mode getting phy mode from device tree. It also resolves the namespace conflict on phy_read/write between common mdiobus interface and ibm_newemac private one. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: David S. Miller <davem@davemloft.net> Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ibm_newemac/phy.c')
-rw-r--r--drivers/net/ibm_newemac/phy.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ibm_newemac/phy.c b/drivers/net/ibm_newemac/phy.c
index ac9d964e59e..ab4e5969fe6 100644
--- a/drivers/net/ibm_newemac/phy.c
+++ b/drivers/net/ibm_newemac/phy.c
@@ -28,12 +28,15 @@
#include "emac.h"
#include "phy.h"
-static inline int phy_read(struct mii_phy *phy, int reg)
+#define phy_read _phy_read
+#define phy_write _phy_write
+
+static inline int _phy_read(struct mii_phy *phy, int reg)
{
return phy->mdio_read(phy->dev, phy->address, reg);
}
-static inline void phy_write(struct mii_phy *phy, int reg, int val)
+static inline void _phy_write(struct mii_phy *phy, int reg, int val)
{
phy->mdio_write(phy->dev, phy->address, reg, val);
}