• Vladimir Oltean's avatar
    net: dsa: sja1105: migrate to xpcs for SGMII · 3ad1d171
    Vladimir Oltean authored
    There is a desire to use the generic driver for the Synopsys XPCS
    located in drivers/net/pcs, and to achieve that, the sja1105 driver must
    expose an MDIO bus for the SGMII PCS, because the XPCS probes as an
    mdio_device.
    
    In preparation of the SJA1110 which in fact has a different access
    procedure for the SJA1105, we register this PCS MDIO bus once in the
    common code, but we implement function pointers for the read and write
    methods. In this patch there is a single implementation for them.
    
    There is exactly one MDIO bus for the PCS, this will contain all PCSes
    at MDIO addresses equal to the port number.
    
    We delete a bunch of hardware support code because the xpcs driver
    already does what we need.
    
    We need to hack up the MDIO reads for the PHY ID, since our XPCS
    instantiation returns zeroes and there are some specific fixups which
    need to be applied by the xpcs driver.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    3ad1d171
Kconfig 1.72 KB