net: dsa: sja1105: add a translation table for port speeds
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 30 May 2021 22:59:37 +0000 (01:59 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 1 Jun 2021 05:40:26 +0000 (22:40 -0700)
commit41fed17fdbe5311b141d39c40f028a594b0a0c72
tree1dde2a3241fe3b38d30725a8d9efbe3a678a1bd7
parent91a050782cbfc8f81c7c6aa0c5ce396bea51df3b
net: dsa: sja1105: add a translation table for port speeds

In order to support the new speed of 2500Mbps, the SJA1110 has achieved
the great performance of changing the encoding in the MAC Configuration
Table for the port speeds of 10, 100, 1000 compared to SJA1105.

Because this is a common driver, we need a layer of indirection in order
to program the hardware with the right values irrespective of switch
generation.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/sja1105/sja1105.h
drivers/net/dsa/sja1105/sja1105_clocking.c
drivers/net/dsa/sja1105/sja1105_main.c
drivers/net/dsa/sja1105/sja1105_spi.c