From: Bob Copeland <me@bobcopeland.com>
To: Kalle Valo <kalle.valo@iki.fi>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH] wl1251: halt the embedded CPU before loading firmware
Date: Mon, 17 Aug 2009 23:33:56 -0400 [thread overview]
Message-ID: <20090818033356.GB524@hash.localnet> (raw)
After initial power-up, the embedded cpu is usually halted. However,
if we down the interface and only do a soft reset before bringing
the interface back up, it will still be running and the firmware
loading code will bail out. This change halts the CPU before loading
the firmware, enabling a second call to wl1251_boot() to succeed
without a hard reset.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
Hi Kalle,
Thoughts on this? It fixes my remaining issue with warm card reset.
I think Android code does this in the firmware loader:
http://android.git.kernel.org/?p=platform/system/wlan/ti.git;a=blob;f=sta_dk_4_0_4_32/common/src/TNETW_Driver/FW_Transfer/HwInit/HwInit.c;h=e5cc2becdd2b9010903598fc56574776f6aeec8d;hb=HEAD#l291
drivers/net/wireless/wl12xx/wl1251_boot.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1251_boot.c b/drivers/net/wireless/wl12xx/wl1251_boot.c
index 592c3b5..452d748 100644
--- a/drivers/net/wireless/wl12xx/wl1251_boot.c
+++ b/drivers/net/wireless/wl12xx/wl1251_boot.c
@@ -465,6 +465,9 @@ int wl1251_boot(struct wl1251 *wl)
int ret = 0, minor_minor_e2_ver;
u32 tmp, boot_data;
+ /* halt embedded ARM CPU while loading firmware */
+ wl1251_reg_write32(wl, ACX_REG_ECPU_CONTROL, ECPU_CONTROL_HALT);
+
ret = wl1251_boot_soft_reset(wl);
if (ret < 0)
goto out;
--
1.6.2.5
--
Bob Copeland %% www.bobcopeland.com
next reply other threads:[~2009-08-18 3:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-18 3:33 Bob Copeland [this message]
2009-09-10 19:25 ` [PATCH] wl1251: halt the embedded CPU before loading firmware Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090818033356.GB524@hash.localnet \
--to=me@bobcopeland.com \
--cc=kalle.valo@iki.fi \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).