bcm53xx: update the ethernet core hacks

The PHY always says there is no link
Instead of doing this dma sync a mdelay does the same trick and it is as unreliable.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 39202
This commit is contained in:
Hauke Mehrtens
2014-01-04 18:27:09 +00:00
parent 5a55ace3b8
commit 2bc9700c0d
2 changed files with 30 additions and 53 deletions

View File

@@ -1,9 +1,10 @@
bgmac: make bgmac work on systems without nvram
These are some hackish patches to make the Ethernet driver work somehow
on this arm core.
The flash driver is not working, so we removed the nvram reading, this
should be changed after we have a flash driver.
The mdelay(1) is a ugly workaround for this arm chip, this seams to be a dma problem.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
drivers/net/ethernet/broadcom/bgmac.c | 4 ++++
1 file changed, 4 insertions(+)
The PHY says it is not connected by default, just ignore it.
--- a/drivers/net/ethernet/broadcom/Kconfig
+++ b/drivers/net/ethernet/broadcom/Kconfig
@@ -30,7 +31,18 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
static const struct bcma_device_id bgmac_bcma_tbl[] = {
BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_4706_MAC_GBIT, BCMA_ANY_REV, BCMA_ANY_CLASS),
@@ -1445,7 +1449,7 @@ static int bgmac_probe(struct bcma_devic
@@ -165,6 +169,10 @@ static netdev_tx_t bgmac_dma_tx_add(stru
netdev_sent_queue(net_dev, skb->len);
+ if (bgmac->core->bus->chipinfo.id == BCMA_CHIP_ID_BCM4707 ||
+ bgmac->core->bus->chipinfo.id == BCMA_CHIP_ID_BCM53018)
+ mdelay(1);
+
wmb();
/* Increase ring->end to point empty slot. We tell hardware the first
@@ -1438,7 +1446,7 @@ static int bgmac_probe(struct bcma_devic
int err;
/* We don't support 2nd, 3rd, ... units, SPROM has to be adjusted */
@@ -39,7 +51,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
pr_err("Unsupported core_unit %d\n", core->core_unit);
return -ENOTSUPP;
}
@@ -1541,8 +1545,7 @@ static int bgmac_probe(struct bcma_devic
@@ -1534,8 +1542,7 @@ static int bgmac_probe(struct bcma_devic
/* TODO: reset the external phy. Specs are needed */
bgmac_phy_reset(bgmac);
@@ -49,3 +61,14 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
if (bgmac->has_robosw)
bgmac_warn(bgmac, "Support for Roboswitch not implemented\n");
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -814,7 +814,7 @@ int genphy_update_link(struct phy_device
return status;
if ((status & BMSR_LSTATUS) == 0)
- phydev->link = 0;
+ phydev->link = 1;
else
phydev->link = 1;