summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wl18xx/main.c
diff options
context:
space:
mode:
authorIdo Reis <idor@ti.com>2012-04-23 17:35:25 +0300
committerLuciano Coelho <coelho@ti.com>2012-06-07 18:11:01 +0300
commitf5755fe96cb010031a50458e6d1391377d94c275 (patch)
treeb33e6dc91f3a3d1c5e975a4553973d7cd2761eef /drivers/net/wireless/ti/wl18xx/main.c
parent16ea4733210d741eeb5413acd261e675a12f980e (diff)
wl18xx: PG2.0 HW Watch dog interrupt support
In PG2, the HW watchdog interrupt occupies bit0 of the event vector, and the SW watchdog is relocated to bit9. We perform the relocation globally, as there's only one watchdog bit on previous platforms (bit0). [Only mask in the new bit9 for platforms supporting it. This avoids spurious events on other platforms - Arik] Signed-off-by: Orit Brayer <orit@ti.com> Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx/main.c')
-rw-r--r--drivers/net/wireless/ti/wl18xx/main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index bdf4ee12914..84f8e27c29a 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -776,11 +776,21 @@ static void wl18xx_set_mac_and_phy(struct wl1271 *wl)
static void wl18xx_enable_interrupts(struct wl1271 *wl)
{
- wlcore_write_reg(wl, REG_INTERRUPT_MASK, WL1271_ACX_ALL_EVENTS_VECTOR);
+ u32 event_mask, intr_mask;
+
+ if (wl->chip.id == CHIP_ID_185x_PG10) {
+ event_mask = WL18XX_ACX_EVENTS_VECTOR_PG1;
+ intr_mask = WL18XX_INTR_MASK_PG1;
+ } else {
+ event_mask = WL18XX_ACX_EVENTS_VECTOR_PG2;
+ intr_mask = WL18XX_INTR_MASK_PG2;
+ }
+
+ wlcore_write_reg(wl, REG_INTERRUPT_MASK, event_mask);
wlcore_enable_interrupts(wl);
wlcore_write_reg(wl, REG_INTERRUPT_MASK,
- WL1271_ACX_INTR_ALL & ~(WL1271_INTR_MASK));
+ WL1271_ACX_INTR_ALL & ~intr_mask);
}
static int wl18xx_boot(struct wl1271 *wl)