From f55a776cd03243aa575d3126996f11986e61a16b Mon Sep 17 00:00:00 2001 From: Shaohui Xie Date: Thu, 14 Nov 2013 19:00:31 +0800 Subject: phy: introduce structure fixed-link fixed-link is used in kernel for PHY-less MAC, so introduce this structure that U-boot can use it to fixup dtb dynamically. Signed-off-by: Shaohui Xie --- include/phy.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/phy.h') diff --git a/include/phy.h b/include/phy.h index f0f522a9c2f..f86ffb92072 100644 --- a/include/phy.h +++ b/include/phy.h @@ -160,6 +160,14 @@ struct phy_device { u32 flags; }; +struct fixed_link { + int phy_id; + int duplex; + int link_speed; + int pause; + int asym_pause; +}; + static inline int phy_read(struct phy_device *phydev, int devad, int regnum) { struct mii_dev *bus = phydev->bus; -- cgit v1.2.3 From b71841b978fc33f961383b255693a70a1dd64031 Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Mon, 2 Sep 2013 15:42:30 +0200 Subject: net: add extended function to phy API Some phys (Micrel) has extended registers that must be accessed in a special way. Add pointers to the phy driver structure to allow to use these functions with mdio command. Signed-off-by: Stefano Babic --- include/phy.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/phy.h') diff --git a/include/phy.h b/include/phy.h index f0f522a9c2f..d3001f1381f 100644 --- a/include/phy.h +++ b/include/phy.h @@ -125,6 +125,9 @@ struct phy_driver { /* Called when bringing down the controller */ int (*shutdown)(struct phy_device *phydev); + int (*readext)(struct phy_device *phydev, int addr, int devad, int reg); + int (*writeext)(struct phy_device *phydev, int addr, int devad, int reg, + u16 val); struct list_head list; }; -- cgit v1.2.3