OSDN Git Service

net: dsa: sja1105: cache the phy-mode port property
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 30 May 2021 22:59:35 +0000 (01:59 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 1 Jun 2021 05:40:25 +0000 (22:40 -0700)
commitbf4edf4afb87e67bed8678c09a01110148830483
tree4e4016dd703e2185774b939e42b396c26bc08dc9
parent4c7ee010cf75e5769037d4f152a8192dcf5eb49c
net: dsa: sja1105: cache the phy-mode port property

So far we've succeeded in operating without keeping a copy of the
phy-mode in the driver, since we already have the static config and we
can look at the xMII Mode Parameters Table which already holds that
information.

But with the SJA1110, we cannot make the distinction between sgmii and
2500base-x, because to the hardware's static config, it's all SGMII.
So add a phy_mode property per port inside struct sja1105_private.

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.h
drivers/net/dsa/sja1105/sja1105_main.c