aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_cmd.c
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2009-10-12 08:08:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:48:05 -0400
commit746214178774bc7f9adbeaef7d43a634570eb870 (patch)
tree7a1b6e9875351b89b9abbe9a836ec8c5c805a8ee /drivers/net/wireless/wl12xx/wl1271_cmd.c
parent207347e498cbe25fa2a8369edd49df43e56000be (diff)
wl1271: Remove outdated SPI functions
With the change to the new firmware, there was a change to firmware memory partitioning. Along with that change, the translation of all partitions was unified, and separate functions for reg and mem access became unnecessary. Cleanup the unnecessary functions. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_cmd.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index ef92834e0e8f..f727744dcff7 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -55,13 +55,13 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len)
55 55
56 WARN_ON(len % 4 != 0); 56 WARN_ON(len % 4 != 0);
57 57
58 wl1271_spi_mem_write(wl, wl->cmd_box_addr, buf, len); 58 wl1271_spi_write(wl, wl->cmd_box_addr, buf, len, false);
59 59
60 wl1271_reg_write32(wl, ACX_REG_INTERRUPT_TRIG, INTR_TRIG_CMD); 60 wl1271_spi_write32(wl, ACX_REG_INTERRUPT_TRIG, INTR_TRIG_CMD);
61 61
62 timeout = jiffies + msecs_to_jiffies(WL1271_COMMAND_TIMEOUT); 62 timeout = jiffies + msecs_to_jiffies(WL1271_COMMAND_TIMEOUT);
63 63
64 intr = wl1271_reg_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR); 64 intr = wl1271_spi_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR);
65 while (!(intr & WL1271_ACX_INTR_CMD_COMPLETE)) { 65 while (!(intr & WL1271_ACX_INTR_CMD_COMPLETE)) {
66 if (time_after(jiffies, timeout)) { 66 if (time_after(jiffies, timeout)) {
67 wl1271_error("command complete timeout"); 67 wl1271_error("command complete timeout");
@@ -71,10 +71,10 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len)
71 71
72 msleep(1); 72 msleep(1);
73 73
74 intr = wl1271_reg_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR); 74 intr = wl1271_spi_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR);
75 } 75 }
76 76
77 wl1271_reg_write32(wl, ACX_REG_INTERRUPT_ACK, 77 wl1271_spi_write32(wl, ACX_REG_INTERRUPT_ACK,
78 WL1271_ACX_INTR_CMD_COMPLETE); 78 WL1271_ACX_INTR_CMD_COMPLETE);
79 79
80out: 80out:
@@ -302,7 +302,7 @@ int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer)
302 * The answer would be a wl1271_command, where the 302 * The answer would be a wl1271_command, where the
303 * parameter array contains the actual answer. 303 * parameter array contains the actual answer.
304 */ 304 */
305 wl1271_spi_mem_read(wl, wl->cmd_box_addr, buf, buf_len); 305 wl1271_spi_read(wl, wl->cmd_box_addr, buf, buf_len, false);
306 306
307 cmd_answer = buf; 307 cmd_answer = buf;
308 308
@@ -341,7 +341,7 @@ int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len)
341 } 341 }
342 342
343 /* the interrogate command got in, we can read the answer */ 343 /* the interrogate command got in, we can read the answer */
344 wl1271_spi_mem_read(wl, wl->cmd_box_addr, buf, len); 344 wl1271_spi_read(wl, wl->cmd_box_addr, buf, len, false);
345 345
346 acx = buf; 346 acx = buf;
347 if (acx->cmd.status != CMD_STATUS_SUCCESS) 347 if (acx->cmd.status != CMD_STATUS_SUCCESS)
@@ -496,7 +496,7 @@ int wl1271_cmd_read_memory(struct wl1271 *wl, u32 addr, void *answer,
496 } 496 }
497 497
498 /* the read command got in, we can now read the answer */ 498 /* the read command got in, we can now read the answer */
499 wl1271_spi_mem_read(wl, wl->cmd_box_addr, cmd, sizeof(*cmd)); 499 wl1271_spi_read(wl, wl->cmd_box_addr, cmd, sizeof(*cmd), false);
500 500
501 if (cmd->header.status != CMD_STATUS_SUCCESS) 501 if (cmd->header.status != CMD_STATUS_SUCCESS)
502 wl1271_error("error in read command result: %d", 502 wl1271_error("error in read command result: %d",
@@ -591,7 +591,8 @@ int wl1271_cmd_scan(struct wl1271 *wl, u8 *ssid, size_t len,
591 goto out; 591 goto out;
592 } 592 }
593 593
594 wl1271_spi_mem_read(wl, wl->cmd_box_addr, params, sizeof(*params)); 594 wl1271_spi_read(wl, wl->cmd_box_addr, params, sizeof(*params),
595 false);
595 596
596 if (params->header.status != CMD_STATUS_SUCCESS) { 597 if (params->header.status != CMD_STATUS_SUCCESS) {
597 wl1271_error("Scan command error: %d", 598 wl1271_error("Scan command error: %d",