ee49e1cc004400b5f2ef42990f3c97946f629a61
[openwrt/openwrt.git] / target / linux / generic / patches-3.19 / 070-bgmac-fix-device-initialization-on-Northstar-SoCs-co.patch
1 From 21697336d46b71dd031f29e426dda0b1e7f06cc0 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3 Date: Wed, 11 Feb 2015 18:06:34 +0100
4 Subject: [PATCH] bgmac: fix device initialization on Northstar SoCs (condition
5 typo)
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 On Northstar (Broadcom's ARM architecture) we need to manually enable
11 all cores. Code for that is already in place, but the condition for it
12 was wrong.
13
14 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
15 Signed-off-by: David S. Miller <davem@davemloft.net>
16 ---
17 drivers/net/ethernet/broadcom/bgmac.c | 5 +++--
18 1 file changed, 3 insertions(+), 2 deletions(-)
19
20 diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
21 index ea63cb0..676ffe0 100644
22 --- a/drivers/net/ethernet/broadcom/bgmac.c
23 +++ b/drivers/net/ethernet/broadcom/bgmac.c
24 @@ -1412,6 +1412,7 @@ static void bgmac_mii_unregister(struct bgmac *bgmac)
25 /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipattach */
26 static int bgmac_probe(struct bcma_device *core)
27 {
28 + struct bcma_chipinfo *ci = &core->bus->chipinfo;
29 struct net_device *net_dev;
30 struct bgmac *bgmac;
31 struct ssb_sprom *sprom = &core->bus->sprom;
32 @@ -1474,8 +1475,8 @@ static int bgmac_probe(struct bcma_device *core)
33 bgmac_chip_reset(bgmac);
34
35 /* For Northstar, we have to take all GMAC core out of reset */
36 - if (core->id.id == BCMA_CHIP_ID_BCM4707 ||
37 - core->id.id == BCMA_CHIP_ID_BCM53018) {
38 + if (ci->id == BCMA_CHIP_ID_BCM4707 ||
39 + ci->id == BCMA_CHIP_ID_BCM53018) {
40 struct bcma_device *ns_core;
41 int ns_gmac;
42
43 --
44 1.8.4.5
45