summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRichard Zhao <richard.zhao@freescale.com>2010-03-08 14:37:59 +0800
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-05-25 11:01:41 +0200
commit86a6ddbef774251b86a1e617a1de2a66729eec18 (patch)
tree262f69d924284d097f8032f69693c13792b2e3d6 /drivers
parentbf3fa686ebca341e65af73920792b5054508f381 (diff)
ENGR00121375 mx_sdhci: keep clock on for sdio cards
Atheros AR6102 wifi driver need it, or host controler will not receive sdio irq. Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Signed-off-by: Rob Herring <r.herring@freescale.com> Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/mx_sdhci.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/drivers/mmc/host/mx_sdhci.c b/drivers/mmc/host/mx_sdhci.c
index f79fab00120b..4b7e4b857337 100644
--- a/drivers/mmc/host/mx_sdhci.c
+++ b/drivers/mmc/host/mx_sdhci.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -1139,6 +1139,7 @@ static void sdhci_tasklet_finish(unsigned long param)
{
struct sdhci_host *host;
unsigned long flags;
+ int req_done;
struct mmc_request *mrq;
host = (struct sdhci_host *)param;
@@ -1194,25 +1195,21 @@ static void sdhci_tasklet_finish(unsigned long param)
return;
}
- flags = SDHCI_DATA_ACTIVE | SDHCI_DOING_WRITE | SDHCI_DOING_READ;
- if (machine_is_mx35_3ds()) {
- /* Do not disable the eSDHC clk on MX35 3DS board,
- * since SYSTEM can't boot up after the reset key
- * is pressed when the SD/MMC boot mode is used.
- * The root cause is that the ROM code don't ensure
- * the SD/MMC clk is running when boot system.
- * */
- mmc_request_done(host->mmc, mrq);
- } else {
- if (!(readl(host->ioaddr + SDHCI_PRESENT_STATE) & flags)) {
- if (host->plat_data->clk_flg) {
- clk_disable(host->clk);
- host->plat_data->clk_flg = 0;
- }
- }
-
- mmc_request_done(host->mmc, mrq);
+ req_done = !(readl(host->ioaddr + SDHCI_PRESENT_STATE) &
+ (SDHCI_DATA_ACTIVE | SDHCI_DOING_WRITE | SDHCI_DOING_READ));
+ /* Do not disable the eSDHC clk on MX35 3DS board,
+ * since SYSTEM can't boot up after the reset key
+ * is pressed when the SD/MMC boot mode is used.
+ * The root cause is that the ROM code don't ensure
+ * the SD/MMC clk is running when boot system.
+ * */
+ if (!machine_is_mx35_3ds() && req_done && host->plat_data->clk_flg &&
+ !(host->mmc && host->mmc->card && mmc_card_sdio(host->mmc->card))) {
+ clk_disable(host->clk);
+ host->plat_data->clk_flg = 0;
}
+ mmc_request_done(host->mmc, mrq);
+
}
static void sdhci_timeout_timer(unsigned long data)