summaryrefslogtreecommitdiffstats
path: root/drivers/bcma/sprom.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-08-11 17:46:44 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-22 14:45:59 -0400
commit984e5befbafe2799be28c2209226a82fb3a3be7a (patch)
treea43f9648318a32724e5f5ed3204954f77bbdf024 /drivers/bcma/sprom.c
parent17030f48e31adde5b043741c91ba143f5f7db0fd (diff)
bcma: implement BCM4331 workaround for external PA lines
We need to disable ext. PA lines for reading SPROM. It's disabled by default, but this patch allows using bcma after loading wl, which leaves workaround enabled. Cc: Arend van Spriel <arend@broadcom.com> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/sprom.c')
-rw-r--r--drivers/bcma/sprom.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/bcma/sprom.c b/drivers/bcma/sprom.c
index 8b5b7856abe3..166ed13ec066 100644
--- a/drivers/bcma/sprom.c
+++ b/drivers/bcma/sprom.c
@@ -152,6 +152,9 @@ int bcma_sprom_get(struct bcma_bus *bus)
152 if (!sprom) 152 if (!sprom)
153 return -ENOMEM; 153 return -ENOMEM;
154 154
155 if (bus->chipinfo.id == 0x4331)
156 bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, false);
157
155 /* Most cards have SPROM moved by additional offset 0x30 (48 dwords). 158 /* Most cards have SPROM moved by additional offset 0x30 (48 dwords).
156 * According to brcm80211 this applies to cards with PCIe rev >= 6 159 * According to brcm80211 this applies to cards with PCIe rev >= 6
157 * TODO: understand this condition and use it */ 160 * TODO: understand this condition and use it */
@@ -159,6 +162,9 @@ int bcma_sprom_get(struct bcma_bus *bus)
159 BCMA_CC_SPROM_PCIE6; 162 BCMA_CC_SPROM_PCIE6;
160 bcma_sprom_read(bus, offset, sprom); 163 bcma_sprom_read(bus, offset, sprom);
161 164
165 if (bus->chipinfo.id == 0x4331)
166 bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, true);
167
162 err = bcma_sprom_valid(sprom); 168 err = bcma_sprom_valid(sprom);
163 if (err) 169 if (err)
164 goto out; 170 goto out;