static int sdhci_at91_runtime_resume(struct device *dev) { struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_at91_priv *priv = pltfm_host->priv; int ret; ret = clk_prepare_enable(priv->mainck); if (ret) { dev_err(dev, "can't enable mainck\n"); return ret; } ret = clk_prepare_enable(priv->hclock); if (ret) { dev_err(dev, "can't enable hclock\n"); return ret; } ret = clk_prepare_enable(priv->gck); if (ret) { dev_err(dev, "can't enable gck\n"); return ret; } return sdhci_runtime_resume_host(host); }
static int sdhci_pltfm_runtime_suspend(struct device *device) { int ret = 0; unsigned long flags; struct sdio_dev *dev = platform_get_drvdata(to_platform_device(device)); struct sdhci_host *host = dev->host; /* This is never going to happen, but still */ if (!sdhci_pltfm_rpm_enabled(dev)) { dev_err(dev->dev, "Spurious rpm suspend call\n"); /* But no meaning in returning error */ return 0; } spin_lock_irqsave(&host->lock, flags); host->runtime_suspended = true; spin_unlock_irqrestore(&host->lock, flags); ret = sdhci_pltfm_clk_enable(dev, 0); if (ret) { dev_err(dev->dev, "Failed to disable clock during run time suspend\n"); sdhci_runtime_resume_host(host); return -EAGAIN; } return 0; }
static int sdhci_acpi_runtime_resume(struct device *dev) { struct sdhci_acpi_host *c = dev_get_drvdata(dev); sdhci_acpi_byt_setting(&c->pdev->dev); return sdhci_runtime_resume_host(c->host); }
static int sdhci_s3c_runtime_resume(struct device *dev) { struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_s3c *ourhost = to_s3c(host); struct clk *busclk = ourhost->clk_io; int ret; clk_prepare_enable(busclk); clk_prepare_enable(ourhost->clk_bus[ourhost->cur_clk]); ret = sdhci_runtime_resume_host(host); return ret; }
static int sdhci_pxav3_runtime_resume(struct device *dev) { struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_pxa *pxa = sdhci_pltfm_priv(pltfm_host); clk_prepare_enable(pxa->clk_io); if (!IS_ERR(pxa->clk_core)) clk_prepare_enable(pxa->clk_core); return sdhci_runtime_resume_host(host); }
static int sprd_mmc_host_runtime_resume(struct device *dev) { unsigned long flags; struct platform_device *pdev = container_of(dev, struct platform_device, dev); struct sdhci_host *host = platform_get_drvdata(pdev); if(dev->driver != NULL) { if(host->ops->set_clock) { spin_lock_irqsave(&host->lock, flags); host->ops->set_clock(host, 1); spin_unlock_irqrestore(&host->lock, flags); mdelay(10); } sdhci_runtime_resume_host(host); } return 0; }
static int sdhci_sprd_runtime_resume(struct device *dev) { struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); int ret; ret = clk_prepare_enable(sprd_host->clk_enable); if (ret) return ret; ret = clk_prepare_enable(sprd_host->clk_sdio); if (ret) { clk_disable_unprepare(sprd_host->clk_enable); return ret; } sdhci_runtime_resume_host(host); return 0; }
static int sdhci_s3c_runtime_resume(struct device *dev) { struct sdhci_host *host = dev_get_drvdata(dev); return sdhci_runtime_resume_host(host); }