aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy/ar8216.h
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2019-01-10 19:30:35 +0800
committerPetr Štetiar <ynezz@true.cz>2019-03-24 01:44:26 +0100
commitcc817392f4ec9c3c3cc04bd95952cf9222fd8ad1 (patch)
tree047d87427d02c2c51c5c05b5104420502a07cae6 /target/linux/generic/files/drivers/net/phy/ar8216.h
parentcb7d96499cfef4b6816a2e617ff858a556d64b5a (diff)
downloadupstream-cc817392f4ec9c3c3cc04bd95952cf9222fd8ad1.tar.gz
upstream-cc817392f4ec9c3c3cc04bd95952cf9222fd8ad1.tar.bz2
upstream-cc817392f4ec9c3c3cc04bd95952cf9222fd8ad1.zip
generic: ar8216: add support for separated mdio bus for phy access
Atheros FE switches have a builtin mdio master available for PHY accessing and on ar724x/ar933x builtin switches this mdio master is the only way of accessing PHYs. After this patch if there is phy_read/phy_write method available in ar8xxx_chip we register a separated mdio bus for accessing PHYs. Still adds support for mdio device probing only since this isn't needed for those switches registered using PHY probing. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/ar8216.h')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 4d2d8b5dbd..0444bf7f22 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -433,6 +433,8 @@ struct ar8xxx_chip {
u32 *status, enum arl_op op);
int (*sw_hw_apply)(struct switch_dev *dev);
void (*phy_rgmii_set)(struct ar8xxx_priv *priv, struct phy_device *phydev);
+ int (*phy_read)(struct ar8xxx_priv *priv, int addr, int regnum);
+ int (*phy_write)(struct ar8xxx_priv *priv, int addr, int regnum, u16 val);
const struct ar8xxx_mib_desc *mib_decs;
unsigned num_mibs;
@@ -442,6 +444,7 @@ struct ar8xxx_chip {
struct ar8xxx_priv {
struct switch_dev dev;
struct mii_bus *mii_bus;
+ struct mii_bus *sw_mii_bus;
struct phy_device *phy;
struct device *pdev;