net: dsa: mv88e6xxx: simplify SERDES code for Topaz and Peridot
authorMarek Behún <marek.behun@nic.cz>
Mon, 26 Aug 2019 21:31:53 +0000 (23:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Aug 2019 04:42:16 +0000 (21:42 -0700)
commitd3cf7d8f20b49331e198172e8c6b6ebadc72fa9c
tree6b986e53ea7ab346e998206282cb9f66b888c3e5
parent17deaf5cb37a365fd65aaa0e14d1a2e1a50418c7
net: dsa: mv88e6xxx: simplify SERDES code for Topaz and Peridot

By adding an additional serdes_get_lane implementation (for Topaz), we
can merge the implementations of other SERDES functions (powering and
IRQs). We can skip checking port numbers, since the serdes_get_lane()
methods inform if there is no lane on a port or if the lane cannot be
used for given cmode.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/port.c
drivers/net/dsa/mv88e6xxx/serdes.c
drivers/net/dsa/mv88e6xxx/serdes.h