OSDN Git Service

net: mdio: xgmac_mdio: Separate C22 and C45 transactions
authorAndrew Lunn <andrew@lunn.ch>
Mon, 9 Jan 2023 15:30:48 +0000 (16:30 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 10 Jan 2023 23:53:37 +0000 (15:53 -0800)
commitc0fc8e6dcee40cf442ee0d6f7305b957fb902ea1
treec7ecc8c3602bcf8a146286e6275199236ea922da
parentb3c84ae5ff99d8a05aac8bc04b487598198d89e2
net: mdio: xgmac_mdio: Separate C22 and C45 transactions

The xgmac MDIO bus driver can perform both C22 and C45 transfers.
Create separate functions for each and register the C45 versions using
the new API calls where appropriate.

While at it, remove the misleading comment. According to Vladimir
Oltean:
 - miimcom is a register accessed by fsl_pq_mdio.c, not by xgmac_mdio.c
 - "device dev" doesn't really refer to anything (maybe "dev_addr").
 - I don't understand what is meant by the comment "All PHY
   configuration has to be done through the TSEC1 MIIM regs". Or rather
   said, I think I understand, but it is irrelevant to the driver for 2
   reasons:
    * TSEC devices use the fsl_pq_mdio.c driver, not this one
    * It doesn't matter to this driver whose TSEC registers are used for
      MDIO access. The driver just works with the registers it's given,
      which is a concern for the device tree.
 - barring the above, the rest just describes the MDIO bus API, which is
   superfluous

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Michael Walle <michael@walle.cc>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/xgmac_mdio.c