aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/b53/b53_priv.h
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2016-08-26 12:18:31 -0700
committerDavid S. Miller <davem@davemloft.net>2016-08-26 13:15:48 -0700
commitbde5d132c3fc50515e59119794945b0bda5a32bd (patch)
treec8740c8fe098b5b8c23167ce7c84be157911ae54 /drivers/net/dsa/b53/b53_priv.h
parentnet: dsa: b53: Prepare to support 7445 switch (diff)
downloadlinux-dev-bde5d132c3fc50515e59119794945b0bda5a32bd.tar.xz
linux-dev-bde5d132c3fc50515e59119794945b0bda5a32bd.zip
net: dsa: b53: Define SF2 MIB layout
The 58xx and 7445 chips use the Starfighter2 code, define its MIB layout and introduce a helper function: is58xx() which checks for both of these IDs for now. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/dsa/b53/b53_priv.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h
index cf2ff2cbc8ab..76672dae412d 100644
--- a/drivers/net/dsa/b53/b53_priv.h
+++ b/drivers/net/dsa/b53/b53_priv.h
@@ -175,6 +175,12 @@ static inline int is5301x(struct b53_device *dev)
dev->chip_id == BCM53019_DEVICE_ID;
}
+static inline int is58xx(struct b53_device *dev)
+{
+ return dev->chip_id == BCM58XX_DEVICE_ID ||
+ dev->chip_id == BCM7445_DEVICE_ID;
+}
+
#define B53_CPU_PORT_25 5
#define B53_CPU_PORT 8