diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-04-25 07:55:51 -0400 |
|---|---|---|
| committer | Chris Ball <chris@printf.net> | 2014-05-22 07:26:25 -0400 |
| commit | 3560db8e247aa35bc6b287ec7ec51cd41abd512e (patch) | |
| tree | 5cad35527d353e46ef77dcdb77edb6b264e7fdc8 | |
| parent | 781e989cf593c71d26bdca74f5e77b3651fc060e (diff) | |
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: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
| -rw-r--r-- | drivers/mmc/host/sdhci.c | 23 | ||||
| -rw-r--r-- | include/linux/mmc/sdhci.h | 3 |
2 files changed, 10 insertions, 16 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 4a0622d52ae5..8def3919b32c 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
| @@ -2128,15 +2128,6 @@ static const struct mmc_host_ops sdhci_ops = { | |||
| 2128 | * * | 2128 | * * |
| 2129 | \*****************************************************************************/ | 2129 | \*****************************************************************************/ |
| 2130 | 2130 | ||
| 2131 | static void sdhci_tasklet_card(unsigned long param) | ||
| 2132 | { | ||
| 2133 | struct sdhci_host *host = (struct sdhci_host*)param; | ||
| 2134 | |||
| 2135 | sdhci_card_event(host->mmc); | ||
| 2136 | |||
| 2137 | mmc_detect_change(host->mmc, msecs_to_jiffies(200)); | ||
| 2138 | } | ||
| 2139 | |||
| 2140 | static void sdhci_tasklet_finish(unsigned long param) | 2131 | static void sdhci_tasklet_finish(unsigned long param) |
| 2141 | { | 2132 | { |
| 2142 | struct sdhci_host *host; | 2133 | struct sdhci_host *host; |
| @@ -2477,7 +2468,10 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) | |||
| 2477 | 2468 | ||
| 2478 | sdhci_writel(host, intmask & (SDHCI_INT_CARD_INSERT | | 2469 | sdhci_writel(host, intmask & (SDHCI_INT_CARD_INSERT | |
| 2479 | SDHCI_INT_CARD_REMOVE), SDHCI_INT_STATUS); | 2470 | SDHCI_INT_CARD_REMOVE), SDHCI_INT_STATUS); |
| 2480 | tasklet_schedule(&host->card_tasklet); | 2471 | |
| 2472 | host->thread_isr |= intmask & (SDHCI_INT_CARD_INSERT | | ||
| 2473 | SDHCI_INT_CARD_REMOVE); | ||
| 2474 | result = IRQ_WAKE_THREAD; | ||
| 2481 | } | 2475 | } |
| 2482 | 2476 | ||
| 2483 | if (intmask & SDHCI_INT_CMD_MASK) | 2477 | if (intmask & SDHCI_INT_CMD_MASK) |
| @@ -2534,6 +2528,11 @@ static irqreturn_t sdhci_thread_irq(int irq, void *dev_id) | |||
| 2534 | host->thread_isr = 0; | 2528 | host->thread_isr = 0; |
| 2535 | spin_unlock_irqrestore(&host->lock, flags); | 2529 | spin_unlock_irqrestore(&host->lock, flags); |
| 2536 | 2530 | ||
| 2531 | if (isr & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) { | ||
| 2532 | sdhci_card_event(host->mmc); | ||
| 2533 | mmc_detect_change(host->mmc, msecs_to_jiffies(200)); | ||
| 2534 | } | ||
| 2535 | |||
| 2537 | if (isr & SDHCI_INT_CARD_INT) { | 2536 | if (isr & SDHCI_INT_CARD_INT) { |
| 2538 | sdio_run_irqs(host->mmc); | 2537 | sdio_run_irqs(host->mmc); |
| 2539 | 2538 | ||
| @@ -3224,8 +3223,6 @@ int sdhci_add_host(struct sdhci_host *host) | |||
| 3224 | /* | 3223 | /* |
| 3225 | * Init tasklets. | 3224 | * Init tasklets. |
| 3226 | */ | 3225 | */ |
| 3227 | tasklet_init(&host->card_tasklet, | ||
| 3228 | sdhci_tasklet_card, (unsigned long)host); | ||
| 3229 | tasklet_init(&host->finish_tasklet, | 3226 | tasklet_init(&host->finish_tasklet, |
| 3230 | sdhci_tasklet_finish, (unsigned long)host); | 3227 | sdhci_tasklet_finish, (unsigned long)host); |
| 3231 | 3228 | ||
| @@ -3290,7 +3287,6 @@ reset: | |||
| 3290 | free_irq(host->irq, host); | 3287 | free_irq(host->irq, host); |
| 3291 | #endif | 3288 | #endif |
| 3292 | untasklet: | 3289 | untasklet: |
| 3293 | tasklet_kill(&host->card_tasklet); | ||
| 3294 | tasklet_kill(&host->finish_tasklet); | 3290 | tasklet_kill(&host->finish_tasklet); |
| 3295 | 3291 | ||
| 3296 | return ret; | 3292 | return ret; |
| @@ -3334,7 +3330,6 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) | |||
| 3334 | 3330 | ||
| 3335 | del_timer_sync(&host->timer); | 3331 | del_timer_sync(&host->timer); |
| 3336 | 3332 | ||
| 3337 | tasklet_kill(&host->card_tasklet); | ||
| 3338 | tasklet_kill(&host->finish_tasklet); | 3333 | tasklet_kill(&host->finish_tasklet); |
| 3339 | 3334 | ||
| 3340 | if (host->vmmc) { | 3335 | if (host->vmmc) { |
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index d1aa97b77dd9..f1c8e14e8751 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h | |||
| @@ -164,8 +164,7 @@ struct sdhci_host { | |||
| 164 | dma_addr_t adma_addr; /* Mapped ADMA descr. table */ | 164 | dma_addr_t adma_addr; /* Mapped ADMA descr. table */ |
| 165 | dma_addr_t align_addr; /* Mapped bounce buffer */ | 165 | dma_addr_t align_addr; /* Mapped bounce buffer */ |
| 166 | 166 | ||
| 167 | struct tasklet_struct card_tasklet; /* Tasklet structures */ | 167 | struct tasklet_struct finish_tasklet; /* Tasklet structures */ |
| 168 | struct tasklet_struct finish_tasklet; | ||
| 169 | 168 | ||
| 170 | struct timer_list timer; /* Timer for timeouts */ | 169 | struct timer_list timer; /* Timer for timeouts */ |
| 171 | 170 | ||
