summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti
diff options
context:
space:
mode:
authorYoni Divinsky <yoni.divinsky@ti.com>2012-05-08 11:02:12 (GMT)
committerLuciano Coelho <coelho@ti.com>2012-06-05 17:24:31 (GMT)
commit4a6c789b731a095da745d513f9ea0b5531acc9c7 (patch)
treeb76a936d46b59cceb5ac6650bd729904a35bae71 /drivers/net/wireless/ti
parent2e42c203a9a825d04da400bd45b601f94c0cf362 (diff)
downloadlinux-fsl-qoriq-4a6c789b731a095da745d513f9ea0b5531acc9c7.tar.xz
wl12xx: set the irq polarity before loading the fw
The polarity should be set before the firmware is loaded since the firmware touches the same register. Access of the firmware and driver to the same register will cause a collision since there is no exclusion scheme. Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r--drivers/net/wireless/ti/wl12xx/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index 774a1b7..a5af2b1 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -995,7 +995,7 @@ out:
static void wl12xx_pre_upload(struct wl1271 *wl)
{
- u32 tmp;
+ u32 tmp, polarity;
/* write firmware's last address (ie. it's length) to
* ACX_EEPROMLESS_IND_REG */
@@ -1015,18 +1015,18 @@ static void wl12xx_pre_upload(struct wl1271 *wl)
if (wl->chip.id == CHIP_ID_1283_PG20)
wl12xx_top_reg_write(wl, SDIO_IO_DS, HCI_IO_DS_6MA);
-}
-
-static void wl12xx_enable_interrupts(struct wl1271 *wl)
-{
- u32 polarity;
+ /* polarity must be set before the firmware is loaded */
polarity = wl12xx_top_reg_read(wl, OCP_REG_POLARITY);
/* We use HIGH polarity, so unset the LOW bit */
polarity &= ~POLARITY_LOW;
wl12xx_top_reg_write(wl, OCP_REG_POLARITY, polarity);
+}
+
+static void wl12xx_enable_interrupts(struct wl1271 *wl)
+{
wlcore_write_reg(wl, REG_INTERRUPT_MASK, WL1271_ACX_ALL_EVENTS_VECTOR);
wlcore_enable_interrupts(wl);