summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm/emac/core.h
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@googlemail.com>2017-02-20 20:10:58 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-22 15:36:47 -0500
commita577ca6badb5261d3fa1bcbb3332ae7874f1a3a2 (patch)
tree5b5843c6b0a47ccd092e37c2b3bcd21884678bf5 /drivers/net/ethernet/ibm/emac/core.h
parentca78d3173cff3503bcd15723b049757f75762d15 (diff)
net: emac: add support for device-tree based PHY discovery and setup
This patch adds glue-code that allows the EMAC driver to interface with the existing dt-supported PHYs in drivers/net/phy. Because currently, the emac driver maintains a small library of supported phys for in a private phy.c file located in the drivers directory. The support is limited to mostly single ethernet transceiver like the: CIS8201, BCM5248, ET1011C, Marvell 88E1111 and 88E1112, AR8035. However, routers like the Netgear WNDR4700 and Cisco Meraki MX60(W) have a 5-port switch (AR8327N) attached to the EMAC. The switch chip is supported by the qca8k mdio driver, which uses the generic phy library. Another reason is that PHYLIB also supports the BCM54610, which was used for the Western Digital My Book Live. This will now also make EMAC select PHYLIB. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm/emac/core.h')
-rw-r--r--drivers/net/ethernet/ibm/emac/core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/emac/core.h b/drivers/net/ethernet/ibm/emac/core.h
index 93ae11494810..0710a6685489 100644
--- a/drivers/net/ethernet/ibm/emac/core.h
+++ b/drivers/net/ethernet/ibm/emac/core.h
@@ -199,6 +199,10 @@ struct emac_instance {
struct emac_instance *mdio_instance;
struct mutex mdio_lock;
+ /* Device-tree based phy configuration */
+ struct mii_bus *mii_bus;
+ struct phy_device *phy_dev;
+
/* ZMII infos if any */
u32 zmii_ph;
u32 zmii_port;