1d6b66c199d78faa2a56ff05eaf448b488e73708
[openwrt/openwrt.git] / target / linux / generic / patches-3.14 / 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 --- a/drivers/net/ethernet/broadcom/bgmac.c
22 +++ b/drivers/net/ethernet/broadcom/bgmac.c
23 @@ -1412,6 +1412,7 @@ static void bgmac_mii_unregister(struct
24 /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipattach */
25 static int bgmac_probe(struct bcma_device *core)
26 {
27 + struct bcma_chipinfo *ci = &core->bus->chipinfo;
28 struct net_device *net_dev;
29 struct bgmac *bgmac;
30 struct ssb_sprom *sprom = &core->bus->sprom;
31 @@ -1474,8 +1475,8 @@ static int bgmac_probe(struct bcma_devic
32 bgmac_chip_reset(bgmac);
33
34 /* For Northstar, we have to take all GMAC core out of reset */
35 - if (core->id.id == BCMA_CHIP_ID_BCM4707 ||
36 - core->id.id == BCMA_CHIP_ID_BCM53018) {
37 + if (ci->id == BCMA_CHIP_ID_BCM4707 ||
38 + ci->id == BCMA_CHIP_ID_BCM53018) {
39 struct bcma_device *ns_core;
40 int ns_gmac;
41