diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2013-09-15 13:30:49 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2013-09-15 13:30:49 +0000 |
commit | ac3e4a120024ffb36b93ea48505b8670ea46fd05 (patch) | |
tree | b865a6029022210ad53f6b324294e9eedc8a4a68 /target/linux/generic/files/drivers/net/phy/b53/b53_common.c | |
parent | 593a7b7c77e8f115e7aa19a99ad850d48fad6fe3 (diff) | |
download | upstream-ac3e4a120024ffb36b93ea48505b8670ea46fd05.tar.gz upstream-ac3e4a120024ffb36b93ea48505b8670ea46fd05.tar.bz2 upstream-ac3e4a120024ffb36b93ea48505b8670ea46fd05.zip |
kernel: b53: detect revision of BCM5325
The revision is stored in a different register than it is in other
Broadcom switches.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37995 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/b53/b53_common.c')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/b53/b53_common.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c index 4d1e0ee4ba..d911ab7fb5 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c @@ -1305,7 +1305,12 @@ int b53_switch_detect(struct b53_device *dev) } } - return b53_read8(dev, B53_MGMT_PAGE, B53_REV_ID, &dev->core_rev); + if (dev->chip_id == BCM5325_DEVICE_ID) + return b53_read8(dev, B53_STAT_PAGE, B53_REV_ID_25, + &dev->core_rev); + else + return b53_read8(dev, B53_MGMT_PAGE, B53_REV_ID, + &dev->core_rev); } EXPORT_SYMBOL(b53_switch_detect); |