Commit 54f7e503 authored by Teemu Paasikivi's avatar Teemu Paasikivi Committed by John W. Linville

wl1271: Added functions to enable/disable interrupt handling

Added/moved enable and disable interrupt handling functions.
Signed-off-by: default avatarTeemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2d5e82b8
...@@ -299,7 +299,7 @@ static int wl1271_boot_upload_nvs(struct wl1271 *wl) ...@@ -299,7 +299,7 @@ static int wl1271_boot_upload_nvs(struct wl1271 *wl)
static void wl1271_boot_enable_interrupts(struct wl1271 *wl) static void wl1271_boot_enable_interrupts(struct wl1271 *wl)
{ {
enable_irq(wl->irq); wl1271_enable_interrupts(wl);
wl1271_write32(wl, ACX_REG_INTERRUPT_MASK, wl1271_write32(wl, ACX_REG_INTERRUPT_MASK,
WL1271_ACX_INTR_ALL & ~(WL1271_INTR_MASK)); WL1271_ACX_INTR_ALL & ~(WL1271_INTR_MASK));
wl1271_write32(wl, HI_CFG, HI_CFG_DEF_VAL); wl1271_write32(wl, HI_CFG, HI_CFG_DEF_VAL);
......
...@@ -31,6 +31,16 @@ ...@@ -31,6 +31,16 @@
#include "wl1271_spi.h" #include "wl1271_spi.h"
#include "wl1271_io.h" #include "wl1271_io.h"
void wl1271_disable_interrupts(struct wl1271 *wl)
{
wl1271_spi_disable_interrupts(wl);
}
void wl1271_enable_interrupts(struct wl1271 *wl)
{
wl1271_spi_enable_interrupts(wl);
}
static int wl1271_translate_addr(struct wl1271 *wl, int addr) static int wl1271_translate_addr(struct wl1271 *wl, int addr)
{ {
/* /*
......
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
struct wl1271; struct wl1271;
void wl1271_disable_interrupts(struct wl1271 *wl);
void wl1271_enable_interrupts(struct wl1271 *wl);
void wl1271_io_reset(struct wl1271 *wl); void wl1271_io_reset(struct wl1271 *wl);
void wl1271_io_init(struct wl1271 *wl); void wl1271_io_init(struct wl1271 *wl);
......
...@@ -360,11 +360,6 @@ static int wl1271_plt_init(struct wl1271 *wl) ...@@ -360,11 +360,6 @@ static int wl1271_plt_init(struct wl1271 *wl)
return ret; return ret;
} }
static void wl1271_disable_interrupts(struct wl1271 *wl)
{
disable_irq(wl->irq);
}
static void wl1271_power_off(struct wl1271 *wl) static void wl1271_power_off(struct wl1271 *wl)
{ {
wl->set_power(false); wl->set_power(false);
......
...@@ -34,6 +34,16 @@ ...@@ -34,6 +34,16 @@
#include "wl1271_io.h" #include "wl1271_io.h"
void wl1271_spi_disable_interrupts(struct wl1271 *wl)
{
disable_irq(wl->irq);
}
void wl1271_spi_enable_interrupts(struct wl1271 *wl)
{
enable_irq(wl->irq);
}
void wl1271_spi_reset(struct wl1271 *wl) void wl1271_spi_reset(struct wl1271 *wl)
{ {
u8 *cmd; u8 *cmd;
......
...@@ -84,6 +84,9 @@ ...@@ -84,6 +84,9 @@
#define OCP_STATUS_REQ_FAILED 0x20000 #define OCP_STATUS_REQ_FAILED 0x20000
#define OCP_STATUS_RESP_ERROR 0x30000 #define OCP_STATUS_RESP_ERROR 0x30000
void wl1271_spi_disable_interrupts(struct wl1271 *wl);
void wl1271_spi_enable_interrupts(struct wl1271 *wl);
/* Raw target IO, address is not translated */ /* Raw target IO, address is not translated */
void wl1271_spi_raw_write(struct wl1271 *wl, int addr, void *buf, void wl1271_spi_raw_write(struct wl1271 *wl, int addr, void *buf,
size_t len, bool fixed); size_t len, bool fixed);
......
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