Commit 1c351da6 authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Luciano Coelho

wl18xx: read FW pc on recovery

Define the FW pc in the 18xx register translation table. This specific
register is only valid in the boot partition, so change the momentarily
change partitions. This doesn't damage 12xx cards, where the FW pc is
accessible via boot partition as well.
Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent d5b59276
...@@ -549,7 +549,7 @@ static const int wl18xx_rtable[REG_TABLE_LEN] = { ...@@ -549,7 +549,7 @@ static const int wl18xx_rtable[REG_TABLE_LEN] = {
[REG_EVENT_MAILBOX_PTR] = WL18XX_REG_EVENT_MAILBOX_PTR, [REG_EVENT_MAILBOX_PTR] = WL18XX_REG_EVENT_MAILBOX_PTR,
[REG_INTERRUPT_TRIG] = WL18XX_REG_INTERRUPT_TRIG_H, [REG_INTERRUPT_TRIG] = WL18XX_REG_INTERRUPT_TRIG_H,
[REG_INTERRUPT_MASK] = WL18XX_REG_INTERRUPT_MASK, [REG_INTERRUPT_MASK] = WL18XX_REG_INTERRUPT_MASK,
[REG_PC_ON_RECOVERY] = 0, /* TODO: where is the PC? */ [REG_PC_ON_RECOVERY] = WL18XX_SCR_PAD4,
[REG_CHIP_ID_B] = WL18XX_REG_CHIP_ID_B, [REG_CHIP_ID_B] = WL18XX_REG_CHIP_ID_B,
[REG_CMD_MBOX_ADDRESS] = WL18XX_CMD_MBOX_ADDRESS, [REG_CMD_MBOX_ADDRESS] = WL18XX_CMD_MBOX_ADDRESS,
......
...@@ -872,9 +872,12 @@ static void wl1271_recovery_work(struct work_struct *work) ...@@ -872,9 +872,12 @@ static void wl1271_recovery_work(struct work_struct *work)
wl12xx_read_fwlog_panic(wl); wl12xx_read_fwlog_panic(wl);
/* change partitions momentarily so we can read the FW pc */
wlcore_set_partition(wl, &wl->ptable[PART_BOOT]);
wl1271_info("Hardware recovery in progress. FW ver: %s pc: 0x%x", wl1271_info("Hardware recovery in progress. FW ver: %s pc: 0x%x",
wl->chip.fw_ver_str, wl->chip.fw_ver_str,
wlcore_read_reg(wl, REG_PC_ON_RECOVERY)); wlcore_read_reg(wl, REG_PC_ON_RECOVERY));
wlcore_set_partition(wl, &wl->ptable[PART_WORK]);
BUG_ON(bug_on_recovery && BUG_ON(bug_on_recovery &&
!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags)); !test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags));
......
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