summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wlcore/boot.c
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2011-11-30 15:02:47 +0200
committerLuciano Coelho <coelho@ti.com>2012-04-12 08:43:58 +0300
commit4263c5f27c0403ad750c4f2509e5396e630b6e6e (patch)
tree339e2bb42b5b90f0490466d68409070ce59d2526 /drivers/net/wireless/ti/wlcore/boot.c
parentd203e59c4b56d56916a804ebeb04b0e6d92adf4c (diff)
wlcore: remove some unnecessary event mailbox address reads
We were reading the even mailbox address three times, which was completely unnecessary and complicated things regarding partition selection. Remove the unnecessry reads and set the address for mailbox 1 and 2 after the first read. Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/boot.c')
-rw-r--r--drivers/net/wireless/ti/wlcore/boot.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/net/wireless/ti/wlcore/boot.c b/drivers/net/wireless/ti/wlcore/boot.c
index 9520073cab55..3cb75db39b9e 100644
--- a/drivers/net/wireless/ti/wlcore/boot.c
+++ b/drivers/net/wireless/ti/wlcore/boot.c
@@ -399,14 +399,19 @@ int wlcore_boot_run_firmware(struct wl1271 *wl)
/* get hardware config command mail box */
wl->cmd_box_addr = wlcore_read_reg(wl, REG_COMMAND_MAILBOX_PTR);
+ wl1271_debug(DEBUG_MAILBOX, "cmd_box_addr 0x%x", wl->cmd_box_addr);
+
/* get hardware config event mail box */
- wl->event_box_addr = wlcore_read_reg(wl, REG_EVENT_MAILBOX_PTR);
+ wl->mbox_ptr[0] = wlcore_read_reg(wl, REG_EVENT_MAILBOX_PTR);
+ wl->mbox_ptr[1] = wl->mbox_ptr[0] + sizeof(struct event_mailbox);
- /* set the working partition to its "running" mode offset */
- wlcore_set_partition(wl, &wl->ptable[PART_WORK]);
+ wl1271_debug(DEBUG_MAILBOX, "MBOX ptrs: 0x%x 0x%x",
+ wl->mbox_ptr[0], wl->mbox_ptr[1]);
- wl1271_debug(DEBUG_MAILBOX, "cmd_box_addr 0x%x event_box_addr 0x%x",
- wl->cmd_box_addr, wl->event_box_addr);
+ /*
+ * TODO: wl12xx used to set the partition here, but it seems
+ * that it can be done later. Make sure this is okay.
+ */
wl1271_boot_fw_version(wl);
@@ -438,7 +443,8 @@ int wlcore_boot_run_firmware(struct wl1271 *wl)
return ret;
}
- wl1271_event_mbox_config(wl);
+ /* set the working partition to its "running" mode offset */
+ wlcore_set_partition(wl, &wl->ptable[PART_WORK]);
/* firmware startup completed */
return 0;