Commit 3560db8e authored by Russell King's avatar Russell King Committed by Chris Ball

mmc: sdhci: push card_tasklet into threaded irq handler

There's no requirement to have the card tasklet separate now that we
have a threaded interrupt handler, so kill this and move the called
code into the threaded part of the handler.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Tested-by: default avatarMarkus Pargmann <mpa@pengutronix.de>
Tested-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarChris Ball <chris@printf.net>
parent 781e989c
...@@ -2128,15 +2128,6 @@ static const struct mmc_host_ops sdhci_ops = { ...@@ -2128,15 +2128,6 @@ static const struct mmc_host_ops sdhci_ops = {
* * * *
\*****************************************************************************/ \*****************************************************************************/
static void sdhci_tasklet_card(unsigned long param)
{
struct sdhci_host *host = (struct sdhci_host*)param;
sdhci_card_event(host->mmc);
mmc_detect_change(host->mmc, msecs_to_jiffies(200));
}
static void sdhci_tasklet_finish(unsigned long param) static void sdhci_tasklet_finish(unsigned long param)
{ {
struct sdhci_host *host; struct sdhci_host *host;
...@@ -2477,7 +2468,10 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) ...@@ -2477,7 +2468,10 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
sdhci_writel(host, intmask & (SDHCI_INT_CARD_INSERT | sdhci_writel(host, intmask & (SDHCI_INT_CARD_INSERT |
SDHCI_INT_CARD_REMOVE), SDHCI_INT_STATUS); SDHCI_INT_CARD_REMOVE), SDHCI_INT_STATUS);
tasklet_schedule(&host->card_tasklet);
host->thread_isr |= intmask & (SDHCI_INT_CARD_INSERT |
SDHCI_INT_CARD_REMOVE);
result = IRQ_WAKE_THREAD;
} }
if (intmask & SDHCI_INT_CMD_MASK) if (intmask & SDHCI_INT_CMD_MASK)
...@@ -2534,6 +2528,11 @@ static irqreturn_t sdhci_thread_irq(int irq, void *dev_id) ...@@ -2534,6 +2528,11 @@ static irqreturn_t sdhci_thread_irq(int irq, void *dev_id)
host->thread_isr = 0; host->thread_isr = 0;
spin_unlock_irqrestore(&host->lock, flags); spin_unlock_irqrestore(&host->lock, flags);
if (isr & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) {
sdhci_card_event(host->mmc);
mmc_detect_change(host->mmc, msecs_to_jiffies(200));
}
if (isr & SDHCI_INT_CARD_INT) { if (isr & SDHCI_INT_CARD_INT) {
sdio_run_irqs(host->mmc); sdio_run_irqs(host->mmc);
...@@ -3224,8 +3223,6 @@ int sdhci_add_host(struct sdhci_host *host) ...@@ -3224,8 +3223,6 @@ int sdhci_add_host(struct sdhci_host *host)
/* /*
* Init tasklets. * Init tasklets.
*/ */
tasklet_init(&host->card_tasklet,
sdhci_tasklet_card, (unsigned long)host);
tasklet_init(&host->finish_tasklet, tasklet_init(&host->finish_tasklet,
sdhci_tasklet_finish, (unsigned long)host); sdhci_tasklet_finish, (unsigned long)host);
...@@ -3290,7 +3287,6 @@ int sdhci_add_host(struct sdhci_host *host) ...@@ -3290,7 +3287,6 @@ int sdhci_add_host(struct sdhci_host *host)
free_irq(host->irq, host); free_irq(host->irq, host);
#endif #endif
untasklet: untasklet:
tasklet_kill(&host->card_tasklet);
tasklet_kill(&host->finish_tasklet); tasklet_kill(&host->finish_tasklet);
return ret; return ret;
...@@ -3334,7 +3330,6 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) ...@@ -3334,7 +3330,6 @@ void sdhci_remove_host(struct sdhci_host *host, int dead)
del_timer_sync(&host->timer); del_timer_sync(&host->timer);
tasklet_kill(&host->card_tasklet);
tasklet_kill(&host->finish_tasklet); tasklet_kill(&host->finish_tasklet);
if (host->vmmc) { if (host->vmmc) {
......
...@@ -164,8 +164,7 @@ struct sdhci_host { ...@@ -164,8 +164,7 @@ struct sdhci_host {
dma_addr_t adma_addr; /* Mapped ADMA descr. table */ dma_addr_t adma_addr; /* Mapped ADMA descr. table */
dma_addr_t align_addr; /* Mapped bounce buffer */ dma_addr_t align_addr; /* Mapped bounce buffer */
struct tasklet_struct card_tasklet; /* Tasklet structures */ struct tasklet_struct finish_tasklet; /* Tasklet structures */
struct tasklet_struct finish_tasklet;
struct timer_list timer; /* Timer for timeouts */ struct timer_list timer; /* Timer for timeouts */
......
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