0043b4c84fad87b343439e872f56cad7afc124f4
[openwrt/openwrt.git] / target / linux / generic / patches-3.19 / 770-bgmac-fix-device-initialization-on-Northstar-SoCs-co.patch
1 From b053c5ad4d99d8f025efadd5c8b4bd84ea06eb6f 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 17:55:32 +0100
4 Subject: [PATCH FIX] bgmac: fix device initialization on Northstar SoCs
5 (condition 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 ---
16 Can we have it for 3.20, please?
17 ---
18 drivers/net/ethernet/broadcom/bgmac.c | 5 +++--
19 1 file changed, 3 insertions(+), 2 deletions(-)
20
21 diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
22 index 3007d95..728373b 100644
23 --- a/drivers/net/ethernet/broadcom/bgmac.c
24 +++ b/drivers/net/ethernet/broadcom/bgmac.c
25 @@ -1412,6 +1412,7 @@ static void bgmac_mii_unregister(struct bgmac *bgmac)
26 /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipattach */
27 static int bgmac_probe(struct bcma_device *core)
28 {
29 + struct bcma_chipinfo *ci = &core->bus->chipinfo;
30 struct net_device *net_dev;
31 struct bgmac *bgmac;
32 struct ssb_sprom *sprom = &core->bus->sprom;
33 @@ -1474,8 +1475,8 @@ static int bgmac_probe(struct bcma_device *core)
34 bgmac_chip_reset(bgmac);
35
36 /* For Northstar, we have to take all GMAC core out of reset */
37 - if (core->id.id == BCMA_CHIP_ID_BCM4707 ||
38 - core->id.id == BCMA_CHIP_ID_BCM53018) {
39 + if (ci->id == BCMA_CHIP_ID_BCM4707 ||
40 + ci->id == BCMA_CHIP_ID_BCM53018) {
41 struct bcma_device *ns_core;
42 int ns_gmac;
43
44 --
45 1.8.4.5
46