Commit 45fda7d2 authored by Franky Lin's avatar Franky Lin Committed by Greg Kroah-Hartman

staging: brcm80211: remove global wait queue head sdioh_spinwait_sleep

Remove global wait queue head sdioh_spinwait_sleep in fullmac.
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a9b97718
...@@ -619,28 +619,6 @@ struct bcmevent_name { ...@@ -619,28 +619,6 @@ struct bcmevent_name {
const char *name; const char *name;
}; };
#if defined(CONFIG_PM_SLEEP)
#define BRCMF_SPINWAIT_SLEEP_INIT(a) DECLARE_WAIT_QUEUE_HEAD(a);
#define BRCMF_SPINWAIT_SLEEP(a, exp, us) do { \
uint countdown = (us) + 9999; \
while ((exp) && (countdown >= 10000)) { \
wait_event_timeout(a, false, HZ/100); \
countdown -= 10000; \
} \
} while (0)
#else
#define BRCMF_SPINWAIT_SLEEP_INIT(a)
#define BRCMF_SPINWAIT_SLEEP(a, exp, us) do { \
uint countdown = (us) + 9; \
while ((exp) && (countdown >= 10)) { \
udelay(10); \
countdown -= 10; \
} \
} while (0)
#endif /* defined(CONFIG_PM_SLEEP) */
/* /*
* Insmod parameters for debug/test * Insmod parameters for debug/test
*/ */
......
...@@ -444,8 +444,6 @@ struct rte_console { ...@@ -444,8 +444,6 @@ struct rte_console {
(((prio) == PRIO_8021D_NONE || (prio) == PRIO_8021D_BE) ? \ (((prio) == PRIO_8021D_NONE || (prio) == PRIO_8021D_BE) ? \
((prio^2)) : (prio)) ((prio^2)) : (prio))
BRCMF_SPINWAIT_SLEEP_INIT(sdioh_spinwait_sleep);
/* /*
* Core reg address translation. * Core reg address translation.
* Both macro's returns a 32 bits byte address on the backplane bus. * Both macro's returns a 32 bits byte address on the backplane bus.
...@@ -1033,6 +1031,7 @@ static int brcmf_sdbrcm_htclk(struct brcmf_bus *bus, bool on, bool pendok) ...@@ -1033,6 +1031,7 @@ static int brcmf_sdbrcm_htclk(struct brcmf_bus *bus, bool on, bool pendok)
int err; int err;
u8 clkctl, clkreq, devctl; u8 clkctl, clkreq, devctl;
struct brcmf_sdio_card *card; struct brcmf_sdio_card *card;
unsigned long timeout;
BRCMF_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
...@@ -1102,14 +1101,16 @@ static int brcmf_sdbrcm_htclk(struct brcmf_bus *bus, bool on, bool pendok) ...@@ -1102,14 +1101,16 @@ static int brcmf_sdbrcm_htclk(struct brcmf_bus *bus, bool on, bool pendok)
} }
/* Otherwise, wait here (polling) for HT Avail */ /* Otherwise, wait here (polling) for HT Avail */
if (!SBSDIO_CLKAV(clkctl, bus->alp_only)) { timeout = jiffies +
BRCMF_SPINWAIT_SLEEP(sdioh_spinwait_sleep, msecs_to_jiffies(PMU_MAX_TRANSITION_DLY/1000);
((clkctl = while (!SBSDIO_CLKAV(clkctl, bus->alp_only)) {
brcmf_sdcard_cfg_read(card, SDIO_FUNC_1, clkctl = brcmf_sdcard_cfg_read(card, SDIO_FUNC_1,
SBSDIO_FUNC1_CHIPCLKCSR, SBSDIO_FUNC1_CHIPCLKCSR,
&err)), &err);
!SBSDIO_CLKAV(clkctl, bus->alp_only)), if (time_after(jiffies, timeout))
PMU_MAX_TRANSITION_DLY); break;
else
usleep_range(5000, 10000);
} }
if (err) { if (err) {
BRCMF_ERROR(("%s: HT Avail request error: %d\n", BRCMF_ERROR(("%s: HT Avail request error: %d\n",
......
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