diff options
author | Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> | 2014-03-17 15:34:23 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-03-17 13:44:19 -0400 |
commit | d28bcc302678e3c2932c4e4e73cd4f40ca4c5fc0 (patch) | |
tree | bebc48e3a19bfebc21563592771e54625917ed65 /drivers/net/wireless/ath/wil6210/main.c | |
parent | b5998e6a3d695c9261a1b1d9cf27db526aa72b3b (diff) |
wil6210: target reset flow update
Use 'real' indication for hardware state.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/main.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index 351925b5d2c8..c782e2522d38 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -269,7 +269,7 @@ void wil_priv_deinit(struct wil6210_priv *wil) static void wil_target_reset(struct wil6210_priv *wil) { int delay = 0; - u32 baud_rate; + u32 hw_state; u32 rev_id; wil_dbg_misc(wil, "Resetting...\n"); @@ -312,15 +312,16 @@ static void wil_target_reset(struct wil6210_priv *wil) } W(RGF_USER_CLKS_CTL_SW_RST_VEC_0, 0); - /* wait until device ready. Use baud rate */ + /* wait until device ready */ do { msleep(1); - baud_rate = R(RGF_USER_SERIAL_BAUD_RATE); + hw_state = R(RGF_USER_HW_MACHINE_STATE); if (delay++ > 100) { - wil_err(wil, "Reset not completed\n"); + wil_err(wil, "Reset not completed, hw_state 0x%08x\n", + hw_state); return; } - } while (baud_rate != 0x15e); + } while (hw_state != HW_MACHINE_BOOT_DONE); if (rev_id == 2) W(RGF_PCIE_LOS_COUNTER_CTL, BIT(8)); |