net: dsa: sja1105: allow SGMII PCS configuration to be per port
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 30 May 2021 22:59:33 +0000 (01:59 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 1 Jun 2021 05:40:25 +0000 (22:40 -0700)
commit84db00f2c04338da329e2cc9a055d5a0b82fa159
tree70655b9f44320248c47505635200937e40d7277d
parent15074a361fee151ee4207d20020a2de178cf490f
net: dsa: sja1105: allow SGMII PCS configuration to be per port

The SJA1105 R and S switches have 1 SGMII port (port 4). Because there
is only one such port, there is no "port" parameter in the configuration
code for the SGMII PCS.

However, the SJA1110 can have up to 4 SGMII ports, each with its own
SGMII register map. So we need to generalize the logic.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/sja1105/sja1105_main.c