aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@mailbox.org>2023-03-21 18:25:54 +0100
committerMarek Vasut <marek.vasut+renesas@mailbox.org>2023-04-07 14:20:53 +0200
commit75d28899e3e93b8fed241744c6687f9606310f72 (patch)
tree085a6d785ddc63cbd967d22cdc5be1f6c82f00e3 /drivers/net/phy
parent166ea497505b0612be9f714b403be8461e23c242 (diff)
downloadu-boot-75d28899e3e93b8fed241744c6687f9606310f72.zip
u-boot-75d28899e3e93b8fed241744c6687f9606310f72.tar.gz
u-boot-75d28899e3e93b8fed241744c6687f9606310f72.tar.bz2
net: phy: Synchronize PHY interface modes with Linux
Synchronize PHY interface modes with Linux next 6.2.y commit: 0194b64578e90 ("net: phy: improve phy_read_poll_timeout") Retain LX2160A/LX2162A PHY modes as those are not yet supported by the Linux kernel, but isolate those with ifdeffery. Isolate NCSI which are also not supported by Linux kernel. Note that the ifdeffery cannot be avoided with IS_ENABLED() here due to compilation of the entire conditional, which would fail in case NCSI symbols are not available. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/phy.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 9b0e497..f720d0a 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1160,7 +1160,11 @@ int phy_clear_bits_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val
bool phy_interface_is_ncsi(void)
{
+#ifdef CONFIG_PHY_NCSI
struct eth_pdata *pdata = dev_get_plat(eth_get_dev());
return pdata->phy_interface == PHY_INTERFACE_MODE_NCSI;
+#else
+ return 0;
+#endif
}