aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1251_cmd.c
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2009-08-07 06:32:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:13:36 -0400
commit0764de64c8628f653c7e8493017d6bd8d43f4e3b (patch)
tree31a9f7ed97caf521e37166c79d3a39fbad920941 /drivers/net/wireless/wl12xx/wl1251_cmd.c
parentb8010790c480f495520fd458197f86d758f0c83a (diff)
wl1251: separate bus i/o code into io.c
In order to eventually support wl1251 spi and sdio interfaces, move the register and memory transfer functions to a common file. Also rename wl1251_spi_mem_{read,write} to indicate its common usage. We still use spi_read internally until SDIO interface is introduced so nothing functional should change here. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_cmd.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_cmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_cmd.c b/drivers/net/wireless/wl12xx/wl1251_cmd.c
index dc04d1fc2ee4..2c30c705908e 100644
--- a/drivers/net/wireless/wl12xx/wl1251_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1251_cmd.c
@@ -6,7 +6,7 @@
6 6
7#include "wl1251.h" 7#include "wl1251.h"
8#include "reg.h" 8#include "reg.h"
9#include "wl1251_spi.h" 9#include "wl1251_io.h"
10#include "wl1251_ps.h" 10#include "wl1251_ps.h"
11#include "wl1251_acx.h" 11#include "wl1251_acx.h"
12 12
@@ -31,7 +31,7 @@ int wl1251_cmd_send(struct wl1251 *wl, u16 id, void *buf, size_t len)
31 31
32 WARN_ON(len % 4 != 0); 32 WARN_ON(len % 4 != 0);
33 33
34 wl1251_spi_mem_write(wl, wl->cmd_box_addr, buf, len); 34 wl1251_mem_write(wl, wl->cmd_box_addr, buf, len);
35 35
36 wl1251_reg_write32(wl, ACX_REG_INTERRUPT_TRIG, INTR_TRIG_CMD); 36 wl1251_reg_write32(wl, ACX_REG_INTERRUPT_TRIG, INTR_TRIG_CMD);
37 37
@@ -86,7 +86,7 @@ int wl1251_cmd_test(struct wl1251 *wl, void *buf, size_t buf_len, u8 answer)
86 * The answer would be a wl1251_command, where the 86 * The answer would be a wl1251_command, where the
87 * parameter array contains the actual answer. 87 * parameter array contains the actual answer.
88 */ 88 */
89 wl1251_spi_mem_read(wl, wl->cmd_box_addr, buf, buf_len); 89 wl1251_mem_read(wl, wl->cmd_box_addr, buf, buf_len);
90 90
91 cmd_answer = buf; 91 cmd_answer = buf;
92 92
@@ -125,7 +125,7 @@ int wl1251_cmd_interrogate(struct wl1251 *wl, u16 id, void *buf, size_t len)
125 } 125 }
126 126
127 /* the interrogate command got in, we can read the answer */ 127 /* the interrogate command got in, we can read the answer */
128 wl1251_spi_mem_read(wl, wl->cmd_box_addr, buf, len); 128 wl1251_mem_read(wl, wl->cmd_box_addr, buf, len);
129 129
130 acx = buf; 130 acx = buf;
131 if (acx->cmd.status != CMD_STATUS_SUCCESS) 131 if (acx->cmd.status != CMD_STATUS_SUCCESS)
@@ -379,7 +379,7 @@ int wl1251_cmd_read_memory(struct wl1251 *wl, u32 addr, void *answer,
379 } 379 }
380 380
381 /* the read command got in, we can now read the answer */ 381 /* the read command got in, we can now read the answer */
382 wl1251_spi_mem_read(wl, wl->cmd_box_addr, cmd, sizeof(*cmd)); 382 wl1251_mem_read(wl, wl->cmd_box_addr, cmd, sizeof(*cmd));
383 383
384 if (cmd->header.status != CMD_STATUS_SUCCESS) 384 if (cmd->header.status != CMD_STATUS_SUCCESS)
385 wl1251_error("error in read command result: %d", 385 wl1251_error("error in read command result: %d",