Skip to content

Rework network drivers to use of_mdio common code

Grant Likely linuxppc-dev netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest13 patches 4 repliesIn review

Changes in v2 from the cover letter

- Add ll_temac driver
- Clean up of_node_put() calls
- removal of dead code from ucc_geth driver
- Fix changes to gianfar driver to not try to connect to tbi phy.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13net: fix fec_mpc52xx driver to use net_device_opsdrivers/net/fec_mpc52xx.c+36 -110 replies
2/13of: add of_parse_phandle() helper for parsing phandle propertiesdrivers/of/base.c include/linux/of.h+27 -00 replies
3/13phylib: rework to prepare for OF registration of PHYsdrivers/net/phy/mdio_bus.c drivers/net/phy/phy_device.c include/linux/phy.h+45 -301 reply
4/13phylib: add *_direct() variants of phy_connect and phy_attach functionsdrivers/net/phy/phy_device.c include/linux/phy.h+90 -330 replies
5/13openfirmware: Add OF phylib support codedrivers/of/Kconfig drivers/of/Makefile drivers/of/of_mdio.c +1 more+168 -00 replies
6/13net: Rework mpc5200 fec driver to use of_mdio infrastructure.drivers/net/fec_mpc52xx.c drivers/net/fec_mpc52xx_phy.c+60 -1490 replies
7/13net: Rework gianfar driver to use of_mdio infrastructure.drivers/net/gianfar.c drivers/net/gianfar.h drivers/net/gianfar_mii.c+43 -1150 replies
8/13net: Rework ucc_geth driver to use of_mdio infrastructuredrivers/net/ucc_geth.c drivers/net/ucc_geth.h drivers/net/ucc_geth_mii.c+11 -730 replies
9/13net: Rework pasemi_mac driver to use of_mdio infrastructurearch/powerpc/platforms/pasemi/gpio_mdio.c drivers/net/pasemi_mac.c drivers/net/pasemi_mac.h+7 -423 replies
10/13powerpc/82xx: Rework Embedded Planet ep8248e platform to use of_mdioarch/powerpc/platforms/82xx/ep8248e.c+2 -50 replies
11/13net: Rework fs_enet driver to use of_mdio infrastructuredrivers/net/fs_enet/fs_enet-main.c drivers/net/fs_enet/mii-bitbang.c drivers/net/fs_enet/mii-fec.c +1 more+16 -1140 replies
12/13powerpc/440: Hacks to ml507 .dts and Marvell PHY driver to test ll_temacarch/powerpc/boot/dts/virtex440-ml507.dts drivers/net/phy/marvell.c+12 -40 replies
13/13net: add Xilinx ll_temac device driverdrivers/net/Kconfig drivers/net/Makefile drivers/net/xilinx_temac.c +2 more+1473 -00 replies

Reviews trailers per patch

1 of 13 patches has a Reviewed-by or Acked-by.

PatchOlof Johansson
1/13
2/13
3/13
4/13
5/13
6/13
7/13
8/13
9/13T-b A-b
10/13
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/13] Rework network drivers to use of_mdio common code

This series reworks some of the phylib code and adds of_mdio helper functions to make it easier for device drivers to retrieve the PHY configuration by reading the OF device tree.

Most of these changes have been only compile tested, but not booted on real hardware. Exceptions are mpc52xx and ll_temac which have been tested, and pasemi which hasn't even been compile tested because my 64bit environment is broken at the moment.

For those with access to hardware, please test and provide me with feedback.

This series also adds a new network driver for the Xilinx ll_temac 10/100/1000 MAC.

For those who are interested, this series is available on my git server at:

git://git.secretlab.ca/git/linux-2.6-mpc52xx test

Right now it is based on current mainline plus a bunch of patches that I've already got in Benh's -next tree (but is not actually based on Benh's tree). I'll probably rebase before I post v3

Changes since v1:
- Add ll_temac driver
- Clean up of_node_put() calls
- removal of dead code from ucc_geth driver
- Fix changes to gianfar driver to not try to connect to tbi phy.

diffstat:

 arch/powerpc/boot/dts/virtex440-ml507.dts |   14 +-
 arch/powerpc/platforms/82xx/ep8248e.c     |    7 +-
 arch/powerpc/platforms/pasemi/gpio_mdio.c |   29 +-
 drivers/net/Kconfig                       |    8 +
 drivers/net/Makefile                      |    2 +
 drivers/net/fec_mpc52xx.c                 |  228 +++----
 drivers/net/fec_mpc52xx_phy.c             |   26 +-
 drivers/net/fs_enet/fs_enet-main.c        |   69 +--
 drivers/net/fs_enet/mii-bitbang.c         |   29 +-
 drivers/net/fs_enet/mii-fec.c             |   26 +-
 drivers/net/gianfar.c                     |  103 ++--
 drivers/net/gianfar.h                     |    3 +-
 drivers/net/gianfar_mii.c                 |   52 +--
 drivers/net/pasemi_mac.c                  |   19 +-
 drivers/net/pasemi_mac.h                  |    1 -
 drivers/net/phy/marvell.c                 |    2 +
 drivers/net/phy/mdio_bus.c                |   29 +-
 drivers/net/phy/phy_device.c              |  163 ++++--
 drivers/net/ucc_geth.c                    |   65 +--
 drivers/net/ucc_geth.h                    |    2 -
 drivers/net/ucc_geth_mii.c                |   17 +-
 drivers/net/xilinx_temac.c                |  970 +++++++++++++++++++++++++++++
 drivers/net/xilinx_temac.h                |  374 +++++++++++
 drivers/net/xilinx_temac_mdio.c           |  119 ++++
 drivers/of/Kconfig                        |    6 +
 drivers/of/Makefile                       |    1 +
 drivers/of/base.c                         |   24 +
 drivers/of/of_mdio.c                      |  139 ++++
 include/linux/fs_enet_pd.h                |    6 +-
 include/linux/of.h                        |    3 +
 include/linux/of_mdio.h                   |   22 +
 include/linux/phy.h                       |    6 +
 32 files changed, 1989 insertions(+), 575 deletions(-)
 create mode 100644 drivers/net/xilinx_temac.c
 create mode 100644 drivers/net/xilinx_temac.h
 create mode 100644 drivers/net/xilinx_temac_mdio.c
 create mode 100644 drivers/of/of_mdio.c
 create mode 100644 include/linux/of_mdio.h

--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.