aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-09-14 16:14:02 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2013-09-14 16:14:02 +0000
commit2da56b4ebc89c145fd97aefcce7ac5d9616739f1 (patch)
tree6ce8872b8ecffb613054927cd2836c4b69695ca6 /target/linux/generic/files
parent3b3d4b6208319134701973812c17da2d30c5ea2b (diff)
downloadupstream-2da56b4ebc89c145fd97aefcce7ac5d9616739f1.tar.gz
upstream-2da56b4ebc89c145fd97aefcce7ac5d9616739f1.tar.bz2
upstream-2da56b4ebc89c145fd97aefcce7ac5d9616739f1.zip
kernel: b53: add soft reset for BCM539x switches
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 37987
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_common.c5
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_priv.h7
2 files changed, 12 insertions, 0 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 25ab412f80..d1fc930f27 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
@@ -477,6 +477,11 @@ static int b53_switch_reset(struct b53_device *dev)
b53_switch_reset_gpio(dev);
+ if (is539x(dev)) {
+ b53_write8(dev, B53_CTRL_PAGE, B53_SOFTRESET, 0x83);
+ b53_write8(dev, B53_CTRL_PAGE, B53_SOFTRESET, 0x00);
+ }
+
b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, &mgmt);
if (!(mgmt & SM_SW_FWD_EN)) {
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_priv.h b/target/linux/generic/files/drivers/net/phy/b53/b53_priv.h
index 53da406407..308a729a3c 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_priv.h
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_priv.h
@@ -122,6 +122,13 @@ static inline int is5397_98(struct b53_device *dev)
dev->chip_id == BCM5398_DEVICE_ID;
}
+static inline int is539x(struct b53_device *dev)
+{
+ return dev->chip_id == BCM5395_DEVICE_ID ||
+ dev->chip_id == BCM5397_DEVICE_ID ||
+ dev->chip_id == BCM5398_DEVICE_ID;
+}
+
static inline int is531x5(struct b53_device *dev)
{
return dev->chip_id == BCM53115_DEVICE_ID ||