Commit 85255b9d authored by Adrian Hunter's avatar Adrian Hunter Committed by James Toy

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>

Acked-by: default avatarMatt Fleming <matt@console-pimps.org>
Cc: Ian Molton <ian@mnementh.co.uk>
Cc: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Cc: Denis Karpov <ext-denis.2.karpov@nokia.com>
Cc: Pierre Ossman <pierre@ossman.eu>
Cc: Philip Langdale <philipl@overt.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent d26c60ec
...@@ -742,22 +742,24 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd) ...@@ -742,22 +742,24 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd)
/* Disable the clocks */ /* Disable the clocks */
clk_disable(host->fclk); clk_disable(host->fclk);
clk_disable(host->iclk); clk_disable(host->iclk);
clk_disable(host->dbclk); if (host->dbclk_enabled)
clk_disable(host->dbclk);
/* Turn the power off */ /* Turn the power off */
ret = mmc_slot(host).set_power(host->dev, host->slot_id, 0, 0); ret = mmc_slot(host).set_power(host->dev, host->slot_id, 0, 0);
if (ret != 0)
goto err;
/* Turn the power ON with given VDD 1.8 or 3.0v */ /* Turn the power ON with given VDD 1.8 or 3.0v */
ret = mmc_slot(host).set_power(host->dev, host->slot_id, 1, vdd); if (!ret)
ret = mmc_slot(host).set_power(host->dev, host->slot_id, 1,
vdd);
clk_enable(host->iclk);
if (host->dbclk_enabled)
clk_enable(host->dbclk);
clk_enable(host->fclk);
if (ret != 0) if (ret != 0)
goto err; goto err;
clk_enable(host->fclk);
clk_enable(host->iclk);
clk_enable(host->dbclk);
OMAP_HSMMC_WRITE(host->base, HCTL, OMAP_HSMMC_WRITE(host->base, HCTL,
OMAP_HSMMC_READ(host->base, HCTL) & SDVSCLR); OMAP_HSMMC_READ(host->base, HCTL) & SDVSCLR);
reg_val = OMAP_HSMMC_READ(host->base, HCTL); reg_val = OMAP_HSMMC_READ(host->base, HCTL);
...@@ -1905,7 +1907,8 @@ static int omap_hsmmc_suspend(struct platform_device *pdev, pm_message_t state) ...@@ -1905,7 +1907,8 @@ static int omap_hsmmc_suspend(struct platform_device *pdev, pm_message_t state)
OMAP_HSMMC_READ(host->base, HCTL) & ~SDBP); OMAP_HSMMC_READ(host->base, HCTL) & ~SDBP);
mmc_host_disable(host->mmc); mmc_host_disable(host->mmc);
clk_disable(host->iclk); clk_disable(host->iclk);
clk_disable(host->dbclk); if (host->dbclk_enabled)
clk_disable(host->dbclk);
} else { } else {
host->suspended = 0; host->suspended = 0;
if (host->pdata->resume) { if (host->pdata->resume) {
...@@ -1936,9 +1939,8 @@ static int omap_hsmmc_resume(struct platform_device *pdev) ...@@ -1936,9 +1939,8 @@ static int omap_hsmmc_resume(struct platform_device *pdev)
if (ret) if (ret)
goto clk_en_err; goto clk_en_err;
if (clk_enable(host->dbclk) != 0) if (host->dbclk_enabled)
dev_dbg(mmc_dev(host->mmc), clk_enable(host->dbclk);
"Enabling debounce clk failed\n");
if (mmc_host_enable(host->mmc) != 0) { if (mmc_host_enable(host->mmc) != 0) {
clk_disable(host->iclk); clk_disable(host->iclk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment