net: mvpp2: add port support helpers
authorRussell King <rmk+kernel@armlinux.org.uk>
Sat, 20 Jun 2020 09:21:26 +0000 (10:21 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Jun 2020 04:38:26 +0000 (21:38 -0700)
commita9a3320227f649435885d95d24e21912dc539928
tree008fcba9cd3afebb12b398e7b9c7745da5b1f3e9
parent8bf1539515920810b86cf1783dc433b1a25d31df
net: mvpp2: add port support helpers

The mvpp2 code has tests scattered amongst the code to determine
whether the port supports the XLG, and whether the port supports
RGMII mode.

Rather than having these tests scattered, provide a couple of helper
functions, so that future additions can ensure that they get these
tests correct.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c