aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/main.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-08-07 01:45:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-08-25 16:00:42 -0400
commit25c15566635fef86e87f762f73a19f24598e45fa (patch)
tree553e99060b077c95aa0096b1351e480219ccbfa5 /drivers/net/wireless/b43/main.c
parentd342b95dd735014a590f9051b1ba227eb54ca8f6 (diff)
b43: flush some writes on Broadcom MIPS SoCs
Access to PHY and radio registers is indirect on Broadcom hardware and it seems that addressing on some MIPS SoCs may require flushing. So far this problem was noticed on 0x4716 SoC only (marketing names: BCM4717, BCM4718). Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r--drivers/net/wireless/b43/main.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 2af1ac396eb4..66ff718cc412 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4466,10 +4466,10 @@ static int b43_phy_versioning(struct b43_wldev *dev)
4466 if (core_rev == 40 || core_rev == 42) { 4466 if (core_rev == 40 || core_rev == 42) {
4467 radio_manuf = 0x17F; 4467 radio_manuf = 0x17F;
4468 4468
4469 b43_write16(dev, B43_MMIO_RADIO24_CONTROL, 0); 4469 b43_write16f(dev, B43_MMIO_RADIO24_CONTROL, 0);
4470 radio_rev = b43_read16(dev, B43_MMIO_RADIO24_DATA); 4470 radio_rev = b43_read16(dev, B43_MMIO_RADIO24_DATA);
4471 4471
4472 b43_write16(dev, B43_MMIO_RADIO24_CONTROL, 1); 4472 b43_write16f(dev, B43_MMIO_RADIO24_CONTROL, 1);
4473 radio_id = b43_read16(dev, B43_MMIO_RADIO24_DATA); 4473 radio_id = b43_read16(dev, B43_MMIO_RADIO24_DATA);
4474 4474
4475 radio_ver = 0; /* Is there version somewhere? */ 4475 radio_ver = 0; /* Is there version somewhere? */
@@ -4477,7 +4477,7 @@ static int b43_phy_versioning(struct b43_wldev *dev)
4477 u16 radio24[3]; 4477 u16 radio24[3];
4478 4478
4479 for (tmp = 0; tmp < 3; tmp++) { 4479 for (tmp = 0; tmp < 3; tmp++) {
4480 b43_write16(dev, B43_MMIO_RADIO24_CONTROL, tmp); 4480 b43_write16f(dev, B43_MMIO_RADIO24_CONTROL, tmp);
4481 radio24[tmp] = b43_read16(dev, B43_MMIO_RADIO24_DATA); 4481 radio24[tmp] = b43_read16(dev, B43_MMIO_RADIO24_DATA);
4482 } 4482 }
4483 4483
@@ -4494,13 +4494,12 @@ static int b43_phy_versioning(struct b43_wldev *dev)
4494 else 4494 else
4495 tmp = 0x5205017F; 4495 tmp = 0x5205017F;
4496 } else { 4496 } else {
4497 b43_write16(dev, B43_MMIO_RADIO_CONTROL, 4497 b43_write16f(dev, B43_MMIO_RADIO_CONTROL,
4498 B43_RADIOCTL_ID); 4498 B43_RADIOCTL_ID);
4499 tmp = b43_read16(dev, B43_MMIO_RADIO_DATA_LOW); 4499 tmp = b43_read16(dev, B43_MMIO_RADIO_DATA_LOW);
4500 b43_write16(dev, B43_MMIO_RADIO_CONTROL, 4500 b43_write16f(dev, B43_MMIO_RADIO_CONTROL,
4501 B43_RADIOCTL_ID); 4501 B43_RADIOCTL_ID);
4502 tmp |= (u32)b43_read16(dev, B43_MMIO_RADIO_DATA_HIGH) 4502 tmp |= b43_read16(dev, B43_MMIO_RADIO_DATA_HIGH) << 16;
4503 << 16;
4504 } 4503 }
4505 radio_manuf = (tmp & 0x00000FFF); 4504 radio_manuf = (tmp & 0x00000FFF);
4506 radio_id = (tmp & 0x0FFFF000) >> 12; 4505 radio_id = (tmp & 0x0FFFF000) >> 12;