diff options
author | Andrew Lunn <andrew@lunn.ch> | 2017-01-24 14:53:50 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-24 21:33:51 +0100 |
commit | a3c53be55c955b7150cda17874c3fcb4eeb97a89 (patch) | |
tree | 5093c1039cf33ac238e5a31db2271a6e845bfdd9 /drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | |
parent | net: dsa: mv88e6xxx: Add mdio private structure (diff) | |
download | linux-a3c53be55c955b7150cda17874c3fcb4eeb97a89.tar.xz linux-a3c53be55c955b7150cda17874c3fcb4eeb97a89.zip |
net: dsa: mv88e6xxx: Support multiple MDIO busses
The mv88e6390 has multiple MDIO busses. Generalize the parsing of the
device tree to support multiple mdio nodes. The external mdio bus has
a compatible strings to indicate it is external.
Keep a linked list of busses, placing the external mdio bus at the
tail of the list. When within the driver an mdio bus is needed,
e.g. for EEE or SERDES, use the head of the list which should be the
internal bus.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/mv88e6xxx.h')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h index 6f7ddb594809..7d24add45e74 100644 --- a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h +++ b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h @@ -730,11 +730,8 @@ struct mv88e6xxx_chip { /* set to size of eeprom if supported by the switch */ int eeprom_len; - /* Device node for the MDIO bus */ - struct device_node *mdio_np; - - /* And the MDIO bus itself */ - struct mii_bus *mdio_bus; + /* List of mdio busses */ + struct list_head mdios; /* There can be two interrupt controllers, which are chained * off a GPIO as interrupt source @@ -751,7 +748,10 @@ struct mv88e6xxx_bus_ops { }; struct mv88e6xxx_mdio_bus { + struct mii_bus *bus; struct mv88e6xxx_chip *chip; + struct list_head list; + bool external; }; struct mv88e6xxx_ops { |