summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPrabhakar Kushwaha <prabhakar@freescale.com>2015-11-04 12:25:56 +0530
committerYork Sun <yorksun@freescale.com>2015-11-30 08:53:02 -0800
commitf9127a046da34a7bf20557b1ece59fdfb5c36881 (patch)
tree8e6e9a025af5b12c47470b5cd27b973fb9e43269 /drivers
parent25af41374096ffcbb3f7c792f0fcb34a50d8d2c4 (diff)
downloadtalos-obmc-uboot-f9127a046da34a7bf20557b1ece59fdfb5c36881.tar.gz
talos-obmc-uboot-f9127a046da34a7bf20557b1ece59fdfb5c36881.zip
driver: ldpaa: Add api to return linked PHY ID of DPMAC
DPMAC represents physical line on the board. This physical line eventually asscociate with on-board PHY. So Add an api to return linked PHY ID of DPMAC object. Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ldpaa_eth/ldpaa_wriop.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ldpaa_eth/ldpaa_wriop.c b/drivers/net/ldpaa_eth/ldpaa_wriop.c
index c38243a9ef..f7f26c275d 100644
--- a/drivers/net/ldpaa_eth/ldpaa_wriop.c
+++ b/drivers/net/ldpaa_eth/ldpaa_wriop.c
@@ -26,6 +26,7 @@ void wriop_init_dpmac(int sd, int dpmac_id, int lane_prtcl)
dpmac_info[dpmac_id].enabled = 0;
dpmac_info[dpmac_id].id = 0;
+ dpmac_info[dpmac_id].phy_addr = -1;
dpmac_info[dpmac_id].enet_if = PHY_INTERFACE_MODE_NONE;
enet_if = wriop_dpmac_enet_if(dpmac_id, lane_prtcl);
@@ -71,6 +72,17 @@ void wriop_enable_dpmac(int dpmac_id)
wriop_dpmac_enable(dpmac_id);
}
+u8 wriop_is_enabled_dpmac(int dpmac_id)
+{
+ int i = wriop_dpmac_to_index(dpmac_id);
+
+ if (i == -1)
+ return -1;
+
+ return dpmac_info[i].enabled;
+}
+
+
void wriop_set_mdio(int dpmac_id, struct mii_dev *bus)
{
int i = wriop_dpmac_to_index(dpmac_id);
OpenPOWER on IntegriCloud