summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/bcm-phy-lib.h
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2020-05-13 18:35:21 +0200
committerDavid S. Miller <davem@davemloft.net>2020-05-13 12:52:38 -0700
commit7d7e7bce768b9e21eb1b741a901c19c2bef1cccc (patch)
treeef950302dcf999699e9814aef661dd771b648df3 /drivers/net/phy/bcm-phy-lib.h
parentea13d71887bd589d2f08ca74a3e1961dd68b678d (diff)
downloadlinux-stable-7d7e7bce768b9e21eb1b741a901c19c2bef1cccc.tar.gz
linux-stable-7d7e7bce768b9e21eb1b741a901c19c2bef1cccc.tar.bz2
linux-stable-7d7e7bce768b9e21eb1b741a901c19c2bef1cccc.zip
net: phy: broadcom: add exp register access methods without buslock
Add helper to read and write expansion registers without taking the mdio lock. Please note, that this changes the semantics of the read and write. Before there was no lock between selecting the expansion register and the actual read/write. This may lead to access failures if there are parallel accesses. Instead take the bus lock during the whole access cycle. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/bcm-phy-lib.h')
-rw-r--r--drivers/net/phy/bcm-phy-lib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/phy/bcm-phy-lib.h b/drivers/net/phy/bcm-phy-lib.h
index 4d3de91cda6c..0eb5333cda39 100644
--- a/drivers/net/phy/bcm-phy-lib.h
+++ b/drivers/net/phy/bcm-phy-lib.h
@@ -27,6 +27,8 @@
#define AFE_HPF_TRIM_OTHERS MISC_ADDR(0x3a, 0)
+int __bcm_phy_write_exp(struct phy_device *phydev, u16 reg, u16 val);
+int __bcm_phy_read_exp(struct phy_device *phydev, u16 reg);
int bcm_phy_write_exp(struct phy_device *phydev, u16 reg, u16 val);
int bcm_phy_read_exp(struct phy_device *phydev, u16 reg);