Commit 4a6c789b authored by Yoni Divinsky's avatar Yoni Divinsky Committed by Luciano Coelho

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: default avatarYoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 2e42c203
...@@ -995,7 +995,7 @@ static int wl12xx_pre_boot(struct wl1271 *wl) ...@@ -995,7 +995,7 @@ static int wl12xx_pre_boot(struct wl1271 *wl)
static void wl12xx_pre_upload(struct wl1271 *wl) static void wl12xx_pre_upload(struct wl1271 *wl)
{ {
u32 tmp; u32 tmp, polarity;
/* write firmware's last address (ie. it's length) to /* write firmware's last address (ie. it's length) to
* ACX_EEPROMLESS_IND_REG */ * ACX_EEPROMLESS_IND_REG */
...@@ -1015,18 +1015,18 @@ static void wl12xx_pre_upload(struct wl1271 *wl) ...@@ -1015,18 +1015,18 @@ static void wl12xx_pre_upload(struct wl1271 *wl)
if (wl->chip.id == CHIP_ID_1283_PG20) if (wl->chip.id == CHIP_ID_1283_PG20)
wl12xx_top_reg_write(wl, SDIO_IO_DS, HCI_IO_DS_6MA); 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); polarity = wl12xx_top_reg_read(wl, OCP_REG_POLARITY);
/* We use HIGH polarity, so unset the LOW bit */ /* We use HIGH polarity, so unset the LOW bit */
polarity &= ~POLARITY_LOW; polarity &= ~POLARITY_LOW;
wl12xx_top_reg_write(wl, OCP_REG_POLARITY, polarity); 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_write_reg(wl, REG_INTERRUPT_MASK, WL1271_ACX_ALL_EVENTS_VECTOR);
wlcore_enable_interrupts(wl); wlcore_enable_interrupts(wl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment