static void omap_hsmmc_disable_clks(struct mmc_omap_host *host) { unsigned long flags; spin_lock_irqsave(&host->clk_lock, flags); if (!host->clks_enabled) goto done; omap2_hsmmc_save_ctx(host); if (host->pdata->context_loss) host->off_counter = host->pdata->context_loss(host->dev); clk_disable(host->fclk); clk_disable(host->iclk); host->clks_enabled = 0; if (cpu_is_omap2430()) { if (host->dbclk_enabled) { clk_disable(host->dbclk); host->dbclk_enabled = 0; } } done: spin_unlock_irqrestore(&host->clk_lock, flags); }
static void mmc_clk_try_disable(struct mmc_omap_host *host) { unsigned long flags; spin_lock_irqsave(&host->clk_lock, flags); if (!host->ifclks_enabled) goto done; #ifdef CONFIG_OMAP34XX_OFFMODE omap2_hsmmc_save_ctx(host); #endif clk_disable(host->fclk); clk_disable(host->iclk); host->ifclks_enabled = 0; done: spin_unlock_irqrestore(&host->clk_lock, flags); }