kernel: b53: add soft reset for BCM539x switches
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37987 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
f219addf79
commit
1a3dd5a001
|
@ -477,6 +477,11 @@ static int b53_switch_reset(struct b53_device *dev)
|
||||||
|
|
||||||
b53_switch_reset_gpio(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);
|
b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, &mgmt);
|
||||||
|
|
||||||
if (!(mgmt & SM_SW_FWD_EN)) {
|
if (!(mgmt & SM_SW_FWD_EN)) {
|
||||||
|
|
|
@ -122,6 +122,13 @@ static inline int is5397_98(struct b53_device *dev)
|
||||||
dev->chip_id == BCM5398_DEVICE_ID;
|
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)
|
static inline int is531x5(struct b53_device *dev)
|
||||||
{
|
{
|
||||||
return dev->chip_id == BCM53115_DEVICE_ID ||
|
return dev->chip_id == BCM53115_DEVICE_ID ||
|
||||||
|
|
Loading…
Reference in New Issue