Retrieving Ethernet PHY wireup from the OF device tree
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | drivers/base: Add bus_register_notifier_alldev() variantdrivers/ include/ | +49 | 0 replies | |
| 2/5 | phylib: rework to prepare for OF registration of PHYsdrivers/ drivers/ include/ | +43 | 0 replies | |
| 3/5 | phylib: add *_direct() variants of phy_connect and phy_attach functionsdrivers/ include/ | +90 | 0 replies | |
| 4/5 | openfirmware: Add OF phylib support codedrivers/ drivers/ drivers/ +1 more | +97 | 0 replies | |
| 5/5 | net: make mpc5200 fec driver use of_mdio infrastructuredrivers/ drivers/ drivers/ | +109 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/5] Retrieving Ethernet PHY wireup from the OF device tree
Hi all,
This series reworks some of the phylib code to allow PHY descriptions and connections to be extracted from the OF device tree. MDIO bus drivers gain a common helper function for parsing the PHY data and registering new phy_devices to match. Ethernet controller drivers gain the ability to resolve to a phy_device from a device tree phandle.
One notable aspect is that the Ethernet controller driver doesn't know if the phy_device is registered before or after the Ethernet driver. This series adds a function to the device model core code to make it simple for the driver to register a bus notifier (mdio_bus in this case), which gets called both for existing devices and for future device registrations. The advantage of this is that the driver doesn't need to know or care when the device actually shows up. It just knows that its callback will get called when the device is available. I think this is a good approach, but I'd appreciate some feedback on it.
Cheers,
g.
drivers/base/bus.c | 47 +++++++++
drivers/net/Kconfig | 2 +- drivers/net/fec_mpc52xx.c | 220 ++++++++++++++++++----------------------- drivers/net/fec_mpc52xx_phy.c | 30 +++--- drivers/net/phy/mdio_bus.c | 29 +----- drivers/net/phy/phy_device.c | 161 +++++++++++++++++++++++------- drivers/of/Kconfig | 6 + drivers/of/Makefile | 1 + drivers/of/of_mdio.c | 70 +++++++++++++ include/linux/device.h | 2 + include/linux/of_mdio.h | 20 ++++ include/linux/phy.h | 6 + 12 files changed, 388 insertions(+), 206 deletions(-)
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.