diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2016-01-31 19:10:13 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-02-04 08:10:39 +0100 |
commit | ae2fb9b9184f9b9b70caf01ecbd0dcc64d7c1cc0 (patch) | |
tree | 6a4ae2fa332ff49e2d78c65ab86df6baebed7cf2 /drivers | |
parent | 993a28aa48f26da8d7e06ee4c3011c66c47df8c9 (diff) | |
download | barebox-ae2fb9b9184f9b9b70caf01ecbd0dcc64d7c1cc0.tar.gz barebox-ae2fb9b9184f9b9b70caf01ecbd0dcc64d7c1cc0.tar.xz |
miitool: Add code to register a PHY
This commit changes the behaviour of the 'miitool'. Now in order to show
PHY's link information 'miitool' should be invoked as such:
miitool -s [PHY]
Also, implment code to allow to register a dummy PHY device in order to
be able to perform raw MDIO bus access.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/phy.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index d128a5e8d5..be2c68bf68 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -147,8 +147,13 @@ int phy_scan_fixups(struct phy_device *phydev) return 0; } - -static struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id) +/** + * phy_device_create - creates a struct phy_device. + * @bus: the target MII bus + * @addr: PHY address on the MII bus + * @phy_id: PHY ID. + */ +struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id) { struct phy_device *phydev; |