diff options
author | Tom Rini <trini@konsulko.com> | 2022-10-22 11:19:31 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-10-22 11:19:31 -0400 |
commit | 1e892ef0b59a4a04971ac23619b95917020b3e18 (patch) | |
tree | bf93c61d6d3e0877206589ce8b423a6df0b1cfeb /drivers/net/phy/phy.c | |
parent | 7723828c97bc107d2fba976fc50403ac8747f1bc (diff) | |
parent | 4344c113c4fc1e48be58dbd55ac8922edb0d5c79 (diff) |
Merge branch '2022-10-21-assorted-fixes-and-updates'
- NC-SI handling support and enable on evb-ast2[56]00, gpio driver for
ADP5585, improve qfw support, print more sysresets info, gw_ventana
and gcc-12 bugfix, improve BCB support, fix a few typos and remove an
unused keymile CONFIG symbol.
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r-- | drivers/net/phy/phy.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 0350afdd1b..9087663053 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -1026,7 +1026,7 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr, #endif #ifdef CONFIG_PHY_NCSI - if (!phydev) + if (!phydev && interface == PHY_INTERFACE_MODE_NCSI) phydev = phy_device_create(bus, 0, PHY_NCSI_ID, false); #endif @@ -1275,3 +1275,10 @@ int phy_clear_bits_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val return 0; } + +bool phy_interface_is_ncsi(void) +{ + struct eth_pdata *pdata = dev_get_plat(eth_get_dev()); + + return pdata->phy_interface == PHY_INTERFACE_MODE_NCSI; +} |