summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Kondratiev <QCA_vkondrat@QCA.qualcomm.com>2015-04-30 16:25:07 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2015-05-04 20:55:31 +0300
commitbb6c8dccfe2302a97d8edd4ba5e6234a8fd3c626 (patch)
tree7cb34775d6e254235686ff9cd96ea60aabef7d78
parent48c963af7432f974348d9a006914dbaf5e7c7140 (diff)
downloadlinux-stable-bb6c8dccfe2302a97d8edd4ba5e6234a8fd3c626.tar.gz
linux-stable-bb6c8dccfe2302a97d8edd4ba5e6234a8fd3c626.tar.bz2
linux-stable-bb6c8dccfe2302a97d8edd4ba5e6234a8fd3c626.zip
wil6210: fix boot loader "ready" indication
Boot loader "ready" indication has changed from "bit0 set" to "only bit0 set". This is to address hardware glitches. Due to glitches, sometimes right after reset register reads 0xffffffff, or (rarely) other garbage. Reflect this in the driver Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/wil6210/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index 0623d8c98956..146fd8088fde 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -551,7 +551,7 @@ static inline void wil_release_cpu(struct wil6210_priv *wil)
static int wil_target_reset(struct wil6210_priv *wil)
{
int delay = 0;
- u32 x;
+ u32 x, x1 = 0;
wil_dbg_misc(wil, "Resetting \"%s\"...\n", wil->hw_name);
@@ -606,12 +606,16 @@ static int wil_target_reset(struct wil6210_priv *wil)
do {
msleep(RST_DELAY);
x = R(RGF_USER_BL + offsetof(struct RGF_BL, ready));
+ if (x1 != x) {
+ wil_dbg_misc(wil, "BL.ready 0x%08x => 0x%08x\n", x1, x);
+ x1 = x;
+ }
if (delay++ > RST_COUNT) {
wil_err(wil, "Reset not completed, bl.ready 0x%08x\n",
x);
return -ETIME;
}
- } while (!(x & BIT_BL_READY));
+ } while (x != BIT_BL_READY);
C(RGF_USER_CLKS_CTL_0, BIT_USER_CLKS_RST_PWGD);