• Arun Ramadoss's avatar
    net: dsa: microchip: add common gigabit set and get function · 46f80fa8
    Arun Ramadoss authored
    This patch add helper function for setting and getting the gigabit
    enable for the ksz series switch. KSZ8795 switch has different register
    address compared to all other ksz switches. KSZ8795 series uses the Port
    5 Interface control 6 Bit 6 for configuring the 1Gbps or 100/10Mbps
    speed selection. All other switches uses the xMII control 1 0xN301
    register Bit6 for gigabit.
    Further, for KSZ8795 & KSZ9893 switches if bit 1 then 1Gbps is chosen
    and if bit 0 then 100/10Mbps is chosen. It is other way around for
    other switches bit 0 is for 1Gbps. So, this patch implements the common
    function for configuring the gigabit set and get capability.
    Signed-off-by: default avatarArun Ramadoss <arun.ramadoss@microchip.com>
    Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    46f80fa8
ksz9477.c 33.2 KB