aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYoni Divinsky <yoni.divinsky@ti.com>2012-05-08 07:02:12 -0400
committerLuciano Coelho <coelho@ti.com>2012-06-05 13:24:31 -0400
commit4a6c789b731a095da745d513f9ea0b5531acc9c7 (patch)
treeb76a936d46b59cceb5ac6650bd729904a35bae71 /drivers
parent2e42c203a9a825d04da400bd45b601f94c0cf362 (diff)
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')
-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 774a1b71e84e..a5af2b1ec863 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -995,7 +995,7 @@ out:
995 995
996static void wl12xx_pre_upload(struct wl1271 *wl) 996static void wl12xx_pre_upload(struct wl1271 *wl)
997{ 997{
998 u32 tmp; 998 u32 tmp, polarity;
999 999
1000 /* write firmware's last address (ie. it's length) to 1000 /* write firmware's last address (ie. it's length) to
1001 * ACX_EEPROMLESS_IND_REG */ 1001 * ACX_EEPROMLESS_IND_REG */
@@ -1015,18 +1015,18 @@ static void wl12xx_pre_upload(struct wl1271 *wl)
1015 1015
1016 if (wl->chip.id == CHIP_ID_1283_PG20) 1016 if (wl->chip.id == CHIP_ID_1283_PG20)
1017 wl12xx_top_reg_write(wl, SDIO_IO_DS, HCI_IO_DS_6MA); 1017 wl12xx_top_reg_write(wl, SDIO_IO_DS, HCI_IO_DS_6MA);
1018}
1019
1020static void wl12xx_enable_interrupts(struct wl1271 *wl)
1021{
1022 u32 polarity;
1023 1018
1019 /* polarity must be set before the firmware is loaded */
1024 polarity = wl12xx_top_reg_read(wl, OCP_REG_POLARITY); 1020 polarity = wl12xx_top_reg_read(wl, OCP_REG_POLARITY);
1025 1021
1026 /* We use HIGH polarity, so unset the LOW bit */ 1022 /* We use HIGH polarity, so unset the LOW bit */
1027 polarity &= ~POLARITY_LOW; 1023 polarity &= ~POLARITY_LOW;
1028 wl12xx_top_reg_write(wl, OCP_REG_POLARITY, polarity); 1024 wl12xx_top_reg_write(wl, OCP_REG_POLARITY, polarity);
1029 1025
1026}
1027
1028static void wl12xx_enable_interrupts(struct wl1271 *wl)
1029{
1030 wlcore_write_reg(wl, REG_INTERRUPT_MASK, WL1271_ACX_ALL_EVENTS_VECTOR); 1030 wlcore_write_reg(wl, REG_INTERRUPT_MASK, WL1271_ACX_ALL_EVENTS_VECTOR);
1031 1031
1032 wlcore_enable_interrupts(wl); 1032 wlcore_enable_interrupts(wl);