diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-04-13 02:40:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-14 00:15:23 +0200 |
commit | a77d43f1e9d59791b138b9903c58b89fffb0df97 (patch) | |
tree | d878967d148d62ceb9739bc4e5a9fdd63b363559 /drivers/net/dsa/mv88e6060.h | |
parent | net: dsa: Remove allocation of driver private memory (diff) | |
download | linux-a77d43f1e9d59791b138b9903c58b89fffb0df97.tar.xz linux-a77d43f1e9d59791b138b9903c58b89fffb0df97.zip |
net: dsa: Keep the mii bus and address in the private structure
Rather than looking up the mii bus and address every time, do it once
at probe, and keep it in the private structure. Centralise this probe
code in mv88e6xxx.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6060.h')
-rw-r--r-- | drivers/net/dsa/mv88e6060.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6060.h b/drivers/net/dsa/mv88e6060.h index cc9b2ed4aff4..10249bd16292 100644 --- a/drivers/net/dsa/mv88e6060.h +++ b/drivers/net/dsa/mv88e6060.h @@ -108,4 +108,15 @@ #define GLOBAL_ATU_MAC_23 0x0e #define GLOBAL_ATU_MAC_45 0x0f +struct mv88e6060_priv { + /* MDIO bus and address on bus to use. When in single chip + * mode, address is 0, and the switch uses multiple addresses + * on the bus. When in multi-chip mode, the switch uses a + * single address which contains two registers used for + * indirect access to more registers. + */ + struct mii_bus *bus; + int sw_addr; +}; + #endif |