diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-07-25 17:08:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-26 15:46:54 -0400 |
commit | 1f03bf06e4e3b8ed9a69e7fc4cdb1be4c6c6c819 (patch) | |
tree | ec28dd77c22c394e445e407202f1117f5a2a1c07 | |
parent | b84382f5141875230b7c55eb29443596fd2d8d53 (diff) |
bcma: fix invalid PMU chip control masks
Commit b9562545ef0b ("bcma: complete workaround for BCMA43224 and
BCM4313") introduced the wrong masks for setting the chip control
registers - the "mask" parameter is inverse.
It should be the mask of bits *not* changed, which is admittedly a bit
non-intuitive.
The incorrect mask not only causes the driver to not work correctly on
the chips affected (eg the BCM43224 on the Macbook Air 4,2) but the
state persists over a soft reset, causing the next boot to not
necessarily see the device correctly.
Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Seth Forshee <seth.forshee@canonical.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Arend Van Spriel <arend@broadcom.com>
Cc: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Cc: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/bcma/driver_chipcommon_pmu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/bcma/driver_chipcommon_pmu.c b/drivers/bcma/driver_chipcommon_pmu.c index 44326178db29..c9a4f46c5143 100644 --- a/drivers/bcma/driver_chipcommon_pmu.c +++ b/drivers/bcma/driver_chipcommon_pmu.c | |||
@@ -110,7 +110,7 @@ void bcma_pmu_workarounds(struct bcma_drv_cc *cc) | |||
110 | /* enable 12 mA drive strenth for 4313 and set chipControl | 110 | /* enable 12 mA drive strenth for 4313 and set chipControl |
111 | register bit 1 */ | 111 | register bit 1 */ |
112 | bcma_chipco_chipctl_maskset(cc, 0, | 112 | bcma_chipco_chipctl_maskset(cc, 0, |
113 | BCMA_CCTRL_4313_12MA_LED_DRIVE, | 113 | ~BCMA_CCTRL_4313_12MA_LED_DRIVE, |
114 | BCMA_CCTRL_4313_12MA_LED_DRIVE); | 114 | BCMA_CCTRL_4313_12MA_LED_DRIVE); |
115 | break; | 115 | break; |
116 | case BCMA_CHIP_ID_BCM4331: | 116 | case BCMA_CHIP_ID_BCM4331: |
@@ -124,14 +124,14 @@ void bcma_pmu_workarounds(struct bcma_drv_cc *cc) | |||
124 | register bit 15 */ | 124 | register bit 15 */ |
125 | if (bus->chipinfo.rev == 0) { | 125 | if (bus->chipinfo.rev == 0) { |
126 | bcma_cc_maskset32(cc, BCMA_CC_CHIPCTL, | 126 | bcma_cc_maskset32(cc, BCMA_CC_CHIPCTL, |
127 | BCMA_CCTRL_43224_GPIO_TOGGLE, | 127 | ~BCMA_CCTRL_43224_GPIO_TOGGLE, |
128 | BCMA_CCTRL_43224_GPIO_TOGGLE); | 128 | BCMA_CCTRL_43224_GPIO_TOGGLE); |
129 | bcma_chipco_chipctl_maskset(cc, 0, | 129 | bcma_chipco_chipctl_maskset(cc, 0, |
130 | BCMA_CCTRL_43224A0_12MA_LED_DRIVE, | 130 | ~BCMA_CCTRL_43224A0_12MA_LED_DRIVE, |
131 | BCMA_CCTRL_43224A0_12MA_LED_DRIVE); | 131 | BCMA_CCTRL_43224A0_12MA_LED_DRIVE); |
132 | } else { | 132 | } else { |
133 | bcma_chipco_chipctl_maskset(cc, 0, | 133 | bcma_chipco_chipctl_maskset(cc, 0, |
134 | BCMA_CCTRL_43224B0_12MA_LED_DRIVE, | 134 | ~BCMA_CCTRL_43224B0_12MA_LED_DRIVE, |
135 | BCMA_CCTRL_43224B0_12MA_LED_DRIVE); | 135 | BCMA_CCTRL_43224B0_12MA_LED_DRIVE); |
136 | } | 136 | } |
137 | break; | 137 | break; |