static void sdhci_disable_clk(struct sdhci_host *host, int delay)
{
- if (host->clk_mgr_en && !sdhci_is_sdio_attached(host)) {
+ if (host->clk_mgr_en) {
if (delay == 0 && !in_interrupt()) {
if (host->ops->platform_clk_ctrl && host->clk_status)
host->ops->platform_clk_ctrl(host, false);
sdhci_activate_led(host);
spin_unlock_irqrestore(&host->lock, flags);
- sdhci_disable_clk(host, CLK_TIMEOUT);
+ if (!sdhci_is_sdio_attached(host))
+ sdhci_disable_clk(host, CLK_TIMEOUT);
}
#endif
* signalling timeout and CRC errors even on CMD0. Resetting
* it on each ios seems to solve the problem.
*/
- if(host->quirks & SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS)
+ if (host->quirks & SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS)
sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA);
out:
& SDHCI_WRITE_PROTECT);
spin_unlock_irqrestore(&host->lock, flags);
- sdhci_disable_clk(host, CLK_TIMEOUT);
+ if (!sdhci_is_sdio_attached(host))
+ sdhci_disable_clk(host, CLK_TIMEOUT);
/* This quirk needs to be replaced by a callback-function later */
return host->quirks & SDHCI_QUIRK_INVERTED_WRITE_PROTECT ?
mmiowb();
spin_unlock_irqrestore(&host->lock, flags);
- sdhci_disable_clk(host, CLK_TIMEOUT);
+ if (!sdhci_is_sdio_attached(host))
+ sdhci_disable_clk(host, CLK_TIMEOUT);
mmc_request_done(host->mmc, mrq);
}
* mmc_suspend_host may disable the clk
*/
sdhci_enable_clk(host);
- sdhci_disable_clk(host, 0);
+ if (!sdhci_is_sdio_attached(host))
+ sdhci_disable_clk(host, 0);
return ret;
}
out:
/* sync worker */
- sdhci_disable_clk(host, 0);
+ if (!sdhci_is_sdio_attached(host))
+ sdhci_disable_clk(host, 0);
/* Set the re-tuning expiration flag */
if ((host->version >= SDHCI_SPEC_300) && host->tuning_count &&
val = sdhci_readb(host, SDHCI_WAKE_UP_CONTROL);
val |= SDHCI_WAKE_ON_INT;
sdhci_writeb(host, val, SDHCI_WAKE_UP_CONTROL);
- sdhci_disable_clk(host, CLK_TIMEOUT);
+ if (!sdhci_is_sdio_attached(host))
+ sdhci_disable_clk(host, CLK_TIMEOUT);
}
EXPORT_SYMBOL_GPL(sdhci_enable_irq_wakeups);
printk(KERN_ERR
"%s: Hardware doesn't specify base clock "
"frequency.\n", mmc_hostname(mmc));
- sdhci_disable_clk(host, 0);
+ if (!sdhci_is_sdio_attached(host))
+ sdhci_disable_clk(host, 0);
return -ENODEV;
}
host->max_clk = host->ops->get_max_clock(host);
printk(KERN_ERR
"%s: Hardware doesn't specify timeout clock "
"frequency.\n", mmc_hostname(mmc));
- sdhci_disable_clk(host, 0);
+ if (!sdhci_is_sdio_attached(host))
+ sdhci_disable_clk(host, 0);
return -ENODEV;
}
}
if (mmc->ocr_avail == 0) {
printk(KERN_ERR "%s: Hardware doesn't report any "
"support voltages.\n", mmc_hostname(mmc));
- sdhci_disable_clk(host, 0);
+ if (!sdhci_is_sdio_attached(host))
+ sdhci_disable_clk(host, 0);
return -ENODEV;
}
(host->flags & SDHCI_USE_SDMA) ? "DMA" : "PIO");
sdhci_enable_card_detection(host);
- sdhci_disable_clk(host, CLK_TIMEOUT);
+ if (!sdhci_is_sdio_attached(host))
+ sdhci_disable_clk(host, CLK_TIMEOUT);
return 0;
#ifdef SDHCI_USE_LEDS_CLASS
untasklet:
tasklet_kill(&host->card_tasklet);
tasklet_kill(&host->finish_tasklet);
- sdhci_disable_clk(host, 0);
+ if (!sdhci_is_sdio_attached(host))
+ sdhci_disable_clk(host, 0);
return ret;
}
sdhci_enable_clk(host);
if (!dead)
sdhci_reset(host, SDHCI_RESET_ALL);
- sdhci_disable_clk(host, 0);
+ if (!sdhci_is_sdio_attached(host))
+ sdhci_disable_clk(host, 0);
free_irq(host->irq, host);