aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-07-05 04:42:09 -0400
committerShawn Guo <shawn.guo@linaro.org>2011-07-26 21:31:02 -0400
commit4157ef1b8779b34581ee8b9dc8f7f95188008eca (patch)
tree6be8331bc24c59d9fea27a256a681c570c3dfdee /drivers/of
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/of')
-rw-r--r--drivers/of/of_net.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
index cc117db05891..bb184717588f 100644
--- a/drivers/of/of_net.c
+++ b/drivers/of/of_net.c
@@ -16,6 +16,7 @@
16 * device driver can get phy interface from device tree. 16 * device driver can get phy interface from device tree.
17 */ 17 */
18static const char *phy_modes[] = { 18static const char *phy_modes[] = {
19 [PHY_INTERFACE_MODE_NA] = "",
19 [PHY_INTERFACE_MODE_MII] = "mii", 20 [PHY_INTERFACE_MODE_MII] = "mii",
20 [PHY_INTERFACE_MODE_GMII] = "gmii", 21 [PHY_INTERFACE_MODE_GMII] = "gmii",
21 [PHY_INTERFACE_MODE_SGMII] = "sgmii", 22 [PHY_INTERFACE_MODE_SGMII] = "sgmii",
@@ -26,6 +27,7 @@ static const char *phy_modes[] = {
26 [PHY_INTERFACE_MODE_RGMII_RXID] = "rgmii-rxid", 27 [PHY_INTERFACE_MODE_RGMII_RXID] = "rgmii-rxid",
27 [PHY_INTERFACE_MODE_RGMII_TXID] = "rgmii-txid", 28 [PHY_INTERFACE_MODE_RGMII_TXID] = "rgmii-txid",
28 [PHY_INTERFACE_MODE_RTBI] = "rtbi", 29 [PHY_INTERFACE_MODE_RTBI] = "rtbi",
30 [PHY_INTERFACE_MODE_SMII] = "smii",
29}; 31};
30 32
31/** 33/**