summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
diff options
context:
space:
mode:
authorHante Meuleman <meuleman@broadcom.com>2014-01-14 01:20:23 +0400
committerJohn W. Linville <linville@tuxdriver.com>2014-01-16 23:54:16 +0400
commit53036261033abdab7323a4a896a9bde84d2c2f17 (patch)
tree1463f8305582ff23f344bf3fc50fc9c16484afeb /drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
parenta74d036f98280b0de312f842ad09c26de56f27c5 (diff)
downloadlinux-53036261033abdab7323a4a896a9bde84d2c2f17.tar.xz
brcmfmac: update core reset and disable routines.
The original core reset and disable routines do not work always on running system. These routines were updated to properly reset a core. When module is unloaded the device is put into download state where all necessary cores have been reset. This will make sure the device is in idle mode after module unload. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
index 4f936c6b682d..19057896d92e 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -2263,8 +2263,6 @@ static void brcmf_sdio_bus_stop(struct device *dev)
w_sdreg32(bus, local_hostintmask,
offsetof(struct sdpcmd_regs, intstatus));
- /* Turn off the backplane clock (only) */
- brcmf_sdio_clkctl(bus, CLK_SDONLY, false);
sdio_release_host(bus->sdiodev->func[1]);
/* Clear the data packet queues */
@@ -4085,6 +4083,12 @@ void brcmf_sdio_remove(struct brcmf_sdio *bus)
if (bus->ci) {
sdio_claim_host(bus->sdiodev->func[1]);
brcmf_sdio_clkctl(bus, CLK_AVAIL, false);
+ /* Leave the device in state where it is 'quiet'. This
+ * is done by putting it in download_state which
+ * essentially resets all necessary cores
+ */
+ msleep(20);
+ brcmf_sdio_download_state(bus, true);
brcmf_sdio_clkctl(bus, CLK_NONE, false);
sdio_release_host(bus->sdiodev->func[1]);
brcmf_sdio_chip_detach(&bus->ci);