• Claudiu Manoil's avatar
    enetc: Make MDIO accessors more generic and export to include/linux/fsl · 6517798d
    Claudiu Manoil authored
    Within the LS1028A SoC, the register map for the ENETC MDIO controller
    is instantiated a few times: for the central (external) MDIO controller,
    for the internal bus of each standalone ENETC port, and for the internal
    bus of the Felix switch.
    
    Refactoring is needed to support multiple MDIO buses from multiple
    drivers. The enetc_hw structure is made an opaque type and a smaller
    enetc_mdio_priv is created.
    
    'mdio_base' - MDIO registers base address - is being parameterized, to
    be able to work with different MDIO register bases.
    
    The ENETC MDIO bus operations are exported from the fsl-enetc-mdio
    kernel object, the same that registers the central MDIO controller (the
    dedicated PF). The ENETC main driver has been changed to select it, and
    use its exported helpers to further register its private MDIO bus. The
    DSA Felix driver will do the same.
    Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6517798d
enetc_pci_mdio.c 2.55 KB