• Quentin Schulz's avatar
    net: phy: mscc: 1588 block initialization · ab2bf933
    Quentin Schulz authored
    This patch adds the first parts of the 1588 support in the MSCC PHY,
    with registers definition and the 1588 block initialization.
    
    Those PHYs are distributed in hardware packages containing multiple
    times the PHY. The VSC8584 for example is composed of 4 PHYs. With
    hardware packages, parts of the logic is usually common and one of the
    PHY has to be used for some parts of the initialization. Following this
    logic, the 1588 blocks of those PHYs are shared between two PHYs and
    accessing the registers has to be done using the "base" PHY of the
    group. This is handled thanks to helpers in the PTP code (and locks).
    We also need the MDIO bus lock while performing a single read or write
    to the 1588 registers as the read/write are composed of multiple MDIO
    transactions (and we don't want other threads updating the page).
    Co-developed-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
    Signed-off-by: default avatarQuentin Schulz <quentin.schulz@bootlin.com>
    Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ab2bf933
mscc_main.c 66.8 KB