net: pcs: lynx: consolidate sgmii and 1000base-x config code
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 23 Jun 2022 12:25:30 +0000 (13:25 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 24 Jun 2022 18:27:24 +0000 (11:27 -0700)
commit06f9a6148e28105213961a738f4c317ca6562cf4
tree66e543d6a6849c14dd6cc8bfb8e98ded0268a931
parentf56866c486fa8e092d9cc52d45f65b8f07a2f96a
net: pcs: lynx: consolidate sgmii and 1000base-x config code

Consolidate lynx_pcs_config_1000basex() and lynx_pcs_config_sgmii() into
a single function. The differences between these two are:

- The value that the link timer is set to.
- The value of the IF_MODE register.

Everything else is identical.

This patch depends on "net: phylink: add QSGMII support to
phylink_mii_c22_pcs_encode_advertisement()".

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/pcs/pcs-lynx.c