Skip to content

RFC net: ethernet: bgmac: Add platform device support

Jon Mason lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7net: ethernet: bgmac: change bgmac_* prints to dev_* printsdrivers/net/ethernet/broadcom/bgmac.c drivers/net/ethernet/broadcom/bgmac.h+56 -632 replies
2/7net: ethernet: bgmac: add dma_dev pointerdrivers/net/ethernet/broadcom/bgmac.c drivers/net/ethernet/broadcom/bgmac.h+10 -80 replies
3/7net: ethernet: bgmac: move BCMA MDIO Phy code into a separate filedrivers/net/ethernet/broadcom/Makefile drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c drivers/net/ethernet/broadcom/bgmac.c +1 more+298 -2177 replies
4/7net: ethernet: bgmac: convert to feature flagsdrivers/net/ethernet/broadcom/bgmac.c drivers/net/ethernet/broadcom/bgmac.h+140 -480 replies
5/7net: ethernet: bgmac: Add platform device supportdrivers/net/ethernet/broadcom/Kconfig drivers/net/ethernet/broadcom/Makefile drivers/net/ethernet/broadcom/bgmac-bcma.c +3 more+666 -2843 replies
6/7dt-bindings: net: bgmac: add bindings documentation for bgmacDocumentation/devicetree/bindings/net/brcm,bgmac-enet.txt+21 -04 replies
7/7ARM: dts: NSP: Add bgmac entriesarch/arm/boot/dts/bcm-nsp.dtsi arch/arm/boot/dts/bcm958625k.dts+24 -00 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by.

PatchFlorian Fainelli
SeriesT-b
1/7
2/7
3/7
4/7
5/7
6/7
7/7

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

Read the v1 thread

Cover letter [RFC 0/7] net: ethernet: bgmac: Add platform device support

I'm sending out this RFC to see if this is the direction the maintainers would like to go to add support for other, non-bcma iProc SoC's to the bgmac driver. Specifically, we are interested in adding support for the NSP, Cygnus, and NS2 families (with more possible down the road).

To support non-bcma enabled SoCs, we need to add the standard device tree "platform device" support. Unfortunately, this driver is very tighly coupled with the bcma bus and much unwinding is needed. I tried to break this up into a number of patches to make it more obvious what was being done to add platform device support. I was able to verify that the bcma code still works using a 53012K board (NS SoC), and that the platform code works using a 58625K board (NSP SoC).

It is worth noting that the phy logic present in the driver needs to be moved to drivers/phy. However, I was not able to fully decouple that code from the bgmac driver. I was able to move it into a separate C file, with only 2 function calls needed to create and destroy the mii bus. Someone with more knowledge of this and HW to test it needs to do it properly. This would natually dovetail into creating an interface which the NSP bgmac can use for the external MDIO Phy to properly connect (instead of using the fixed phy).

Thanks,
Jon

Jon Mason (7):
net: ethernet: bgmac: change bgmac_* prints to dev_* prints
net: ethernet: bgmac: add dma_dev pointer
net: ethernet: bgmac: move BCMA MDIO Phy code into a separate file
net: ethernet: bgmac: convert to feature flags
net: ethernet: bgmac: Add platform device support
dt-bindings: net: bgmac: add bindings documentation for bgmac
ARM: dts: NSP: Add bgmac entries

 .../devicetree/bindings/net/brcm,bgmac-enet.txt    |  21 +
 arch/arm/boot/dts/bcm-nsp.dtsi                     |  16 +
 arch/arm/boot/dts/bcm958625k.dts                   |   8 +
 drivers/net/ethernet/broadcom/Kconfig              |  23 +-
 drivers/net/ethernet/broadcom/Makefile             |   2 +
 drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c    | 264 +++++++++
 drivers/net/ethernet/broadcom/bgmac-bcma.c         | 315 ++++++++++
 drivers/net/ethernet/broadcom/bgmac-platform.c     | 208 +++++++
 drivers/net/ethernet/broadcom/bgmac.c              | 658 +++++----------------
 drivers/net/ethernet/broadcom/bgmac.h              | 112 +++-
 10 files changed, 1111 insertions(+), 516 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/brcm,bgmac-enet.txt
 create mode 100644 drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c
 create mode 100644 drivers/net/ethernet/broadcom/bgmac-bcma.c
 create mode 100644 drivers/net/ethernet/broadcom/bgmac-platform.c
Signature · 1 line
1.9.1