• Sean Anderson's avatar
    net: fman: memac: Use lynx pcs driver · a7c2a32e
    Sean Anderson authored
    Although not stated in the datasheet, as far as I can tell PCS for mEMACs
    is a "Lynx." By reusing the existing driver, we can remove the PCS
    management code from the memac driver. This requires calling some PCS
    functions manually which phylink would usually do for us, but we will let
    it do that soon.
    
    One problem is that we don't actually have a PCS for QSGMII. We pretend
    that each mEMAC's MDIO bus has four QSGMII PCSs, but this is not the case.
    Only the "base" mEMAC's MDIO bus has the four QSGMII PCSs. This is not an
    issue yet, because we never get the PCS state. However, it will be once the
    conversion to phylink is complete, since the links will appear to never
    come up. To get around this, we allow specifying multiple PCSs in pcsphy.
    This breaks backwards compatibility with old device trees, but only for
    QSGMII. IMO this is the only reasonable way to figure out what the actual
    QSGMII PCS is.
    
    Additionally, we now also support a separate XFI PCS. This can allow the
    SerDes driver to set different addresses for the SGMII and XFI PCSs so they
    can be accessed at the same time.
    Signed-off-by: default avatarSean Anderson <sean.anderson@seco.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a7c2a32e
fman_memac.c 31.9 KB