summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/microchip/lan743x_main.h
diff options
context:
space:
mode:
authorSven Van Asbroeck <thesven73@gmail.com>2020-11-16 12:01:55 -0500
committerJakub Kicinski <kuba@kernel.org>2020-11-17 10:46:20 -0800
commit7c3e2b771d79327e434ac7d873f9949a7c5d7b3b (patch)
treecb96196c7a786a90df1e28b346d46a0d8ecf5f36 /drivers/net/ethernet/microchip/lan743x_main.h
parenta98cabdb8cb8941965721ee8d4edfaa3c7d427d4 (diff)
lan743x: replace devicetree phy parse code with library function
The code in this driver which parses the devicetree to determine the phy/fixed link setup, can be replaced by a single library function: of_phy_get_and_connect(). Behaviour is identical, except that the library function will complain when 'phy-connection-type' is omitted, instead of blindly using PHY_INTERFACE_MODE_NA, which would result in an invalid phy configuration. The library function no longer brings out the exact phy_mode, but the driver doesn't need this, because phy_interface_is_rgmii() queries the phydev directly. Remove 'phy_mode' from the private adapter struct. While we're here, log info about the attached phy on connect, this is useful because the phy type and connection method is now fully configurable via the devicetree. Tested on a lan7430 chip with built-in phy. Verified that adding fixed-link/phy-connection-type in the devicetree results in a fixed-link setup. Used ethtool to verify that the devicetree settings are used. Tested-by: Sven Van Asbroeck <thesven73@gmail.com> # lan7430 Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20201116170155.26967-1-TheSven73@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/microchip/lan743x_main.h')
-rw-r--r--drivers/net/ethernet/microchip/lan743x_main.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/microchip/lan743x_main.h b/drivers/net/ethernet/microchip/lan743x_main.h
index a536f4a4994d..3a0e70daa88f 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.h
+++ b/drivers/net/ethernet/microchip/lan743x_main.h
@@ -703,7 +703,6 @@ struct lan743x_rx {
struct lan743x_adapter {
struct net_device *netdev;
struct mii_bus *mdiobus;
- phy_interface_t phy_mode;
int msg_enable;
#ifdef CONFIG_PM
u32 wolopts;