summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2012-05-10 12:13:50 +0300
committerLuciano Coelho <coelho@ti.com>2012-06-05 15:56:39 +0300
commitbe42aee6df93597f669b4d20e7a32c8fc144f104 (patch)
treeeff58e20b109fabf95d46d400cc5d64174d1ccdc
parentc331b344d5def33194427b24cb2190ff345f7f55 (diff)
wl18xx: add plt_init operation
Add the correct FW name for PLT (which is the same as the normal firmware) and implement the plt_init operation. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
-rw-r--r--drivers/net/wireless/ti/wl18xx/main.c10
-rw-r--r--drivers/net/wireless/ti/wl18xx/reg.h6
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index f892d37443e2..59408291d30d 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -580,6 +580,8 @@ static int wl18xx_identify_chip(struct wl1271 *wl)
wl1271_debug(DEBUG_BOOT, "chip id 0x%x (185x PG10)",
wl->chip.id);
wl->sr_fw_name = WL18XX_FW_NAME;
+ /* wl18xx uses the same firmware for PLT */
+ wl->plt_fw_name = WL18XX_FW_NAME;
wl->quirks |= WLCORE_QUIRK_NO_ELP |
WLCORE_QUIRK_FWLOG_NOT_IMPLEMENTED |
WLCORE_QUIRK_RX_BLOCKSIZE_ALIGN;
@@ -958,9 +960,17 @@ static void wl18xx_conf_init(struct wl1271 *wl)
memcpy(&priv->conf, &wl18xx_default_priv_conf, sizeof(priv->conf));
}
+static int wl18xx_plt_init(struct wl1271 *wl)
+{
+ wl1271_write32(wl, WL18XX_SCR_PAD8, WL18XX_SCR_PAD8_PLT);
+
+ return wl->ops->boot(wl);
+}
+
static struct wlcore_ops wl18xx_ops = {
.identify_chip = wl18xx_identify_chip,
.boot = wl18xx_boot,
+ .plt_init = wl18xx_plt_init,
.trigger_cmd = wl18xx_trigger_cmd,
.ack_event = wl18xx_ack_event,
.calc_tx_blocks = wl18xx_calc_tx_blocks,
diff --git a/drivers/net/wireless/ti/wl18xx/reg.h b/drivers/net/wireless/ti/wl18xx/reg.h
index 1674c1ad002e..aaedf91ed7b7 100644
--- a/drivers/net/wireless/ti/wl18xx/reg.h
+++ b/drivers/net/wireless/ti/wl18xx/reg.h
@@ -154,6 +154,12 @@
*/
#define WL18XX_INTR_TRIG_EVENT_ACK BIT(29)
+/*
+ * To boot the firmware in PLT mode we need to write this value in
+ * SCR_PAD8 before starting.
+ */
+#define WL18XX_SCR_PAD8_PLT 0xBABABEBE
+
/* TODO: maybe move elsewhere? */
#define NUM_OF_CHANNELS_11_ABG 150
#define NUM_OF_CHANNELS_11_P 7