2013-07-28 22:13:52 +00:00
|
|
|
bgmac: make bgmac work on systems without nvram
|
2013-07-28 21:20:15 +00:00
|
|
|
|
|
|
|
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
|
|
---
|
|
|
|
drivers/net/ethernet/broadcom/bgmac.c | 4 ++++
|
|
|
|
1 file changed, 4 insertions(+)
|
|
|
|
|
2013-11-11 00:15:00 +00:00
|
|
|
--- a/drivers/net/ethernet/broadcom/Kconfig
|
|
|
|
+++ b/drivers/net/ethernet/broadcom/Kconfig
|
|
|
|
@@ -132,7 +132,7 @@ config BNX2X_SRIOV
|
|
|
|
|
|
|
|
config BGMAC
|
|
|
|
tristate "BCMA bus GBit core support"
|
|
|
|
- depends on BCMA_HOST_SOC && HAS_DMA && BCM47XX
|
|
|
|
+ depends on BCMA_HOST_SOC && HAS_DMA
|
|
|
|
select PHYLIB
|
|
|
|
---help---
|
|
|
|
This driver supports GBit MAC and BCM4706 GBit MAC cores on BCMA bus.
|
2013-07-28 21:20:15 +00:00
|
|
|
--- a/drivers/net/ethernet/broadcom/bgmac.c
|
|
|
|
+++ b/drivers/net/ethernet/broadcom/bgmac.c
|
2013-10-02 22:25:26 +00:00
|
|
|
@@ -17,7 +17,11 @@
|
2013-07-28 21:20:15 +00:00
|
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <linux/dma-mapping.h>
|
2013-10-02 22:25:26 +00:00
|
|
|
#include <linux/platform_data/b53.h>
|
2013-07-28 21:20:15 +00:00
|
|
|
+#ifdef CONFIG_BCM47XX
|
|
|
|
#include <bcm47xx_nvram.h>
|
|
|
|
+#else
|
|
|
|
+#define bcm47xx_nvram_getenv(a, b, c) -1
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
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),
|
2014-01-04 18:25:05 +00:00
|
|
|
@@ -1445,7 +1449,7 @@ static int bgmac_probe(struct bcma_devic
|
2013-11-11 00:15:00 +00:00
|
|
|
int err;
|
|
|
|
|
|
|
|
/* We don't support 2nd, 3rd, ... units, SPROM has to be adjusted */
|
|
|
|
- if (core->core_unit > 1) {
|
|
|
|
+ if (core->core_unit > 0) {
|
|
|
|
pr_err("Unsupported core_unit %d\n", core->core_unit);
|
|
|
|
return -ENOTSUPP;
|
|
|
|
}
|
2014-01-04 18:25:05 +00:00
|
|
|
@@ -1541,8 +1545,7 @@ static int bgmac_probe(struct bcma_devic
|
2013-11-11 00:15:00 +00:00
|
|
|
/* TODO: reset the external phy. Specs are needed */
|
|
|
|
bgmac_phy_reset(bgmac);
|
|
|
|
|
|
|
|
- bgmac->has_robosw = !!(core->bus->sprom.boardflags_lo &
|
|
|
|
- BGMAC_BFL_ENETROBO);
|
|
|
|
+ bgmac->has_robosw = 1;
|
|
|
|
if (bgmac->has_robosw)
|
|
|
|
bgmac_warn(bgmac, "Support for Roboswitch not implemented\n");
|
|
|
|
|