mbox series

[v1,net-next,0/3] update seville to use shared mdio driver

Message ID 20211119213918.2707530-1-colin.foster@in-advantage.com (mailing list archive)
Headers show
Series update seville to use shared mdio driver | expand

Message

Colin Foster Nov. 19, 2021, 9:39 p.m. UTC
The Seville driver uses indirect MDIO access by way of
MSCC_MIIM_CMD_* macros. This is duplicate behavior of
drivers/net/mdio/mdio-mscc-miim.c, which achieves the same thing. The
main difference being that Seville uses regmap by way of the ocelot
driver, whereas mdio-mscc-miim uses __iomem. 

This patch set converts mdio-mscc-miim to regmap, exposes an API, and
hooks Seville into this common driver by way of mscc_miim_setup.

Colin Foster (3):
  net: mdio: mscc-miim: convert to a regmap implementation
  net: dsa: ocelot: seville: utilize of_mdiobus_register
  net: dsa: ocelot: felix: switch to mdio-mscc-miim driver for indirect
    mdio access

 drivers/net/dsa/ocelot/Kconfig           |   1 +
 drivers/net/dsa/ocelot/Makefile          |   1 +
 drivers/net/dsa/ocelot/felix_mdio.c      |  54 ++++++++
 drivers/net/dsa/ocelot/felix_mdio.h      |  13 ++
 drivers/net/dsa/ocelot/seville_vsc9953.c | 107 ++-------------
 drivers/net/mdio/mdio-mscc-miim.c        | 167 +++++++++++++++++------
 include/linux/mdio/mdio-mscc-miim.h      |  19 +++
 include/soc/mscc/ocelot.h                |   1 +
 8 files changed, 220 insertions(+), 143 deletions(-)
 create mode 100644 drivers/net/dsa/ocelot/felix_mdio.c
 create mode 100644 drivers/net/dsa/ocelot/felix_mdio.h
 create mode 100644 include/linux/mdio/mdio-mscc-miim.h