Commit 52cee548 authored by Madhusudhan Chikkature's avatar Madhusudhan Chikkature Committed by James Toy

Remove the error message "Failed to get debounce clock.." printed out by

the MMC driver on OMAP3430.  The debounce clock needs to be handled only
for OMAP2430.
Signed-off-by: default avatarMadhusudhan Chikkature <madhu.cr@ti.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Matt 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>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent aecf4c84
......@@ -162,7 +162,7 @@ struct omap_hsmmc_host {
int use_dma, dma_ch;
int dma_line_tx, dma_line_rx;
int slot_id;
int dbclk_enabled;
int got_dbclk;
int response_busy;
int context_loss;
int dpm_state;
......@@ -742,7 +742,7 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd)
/* Disable the clocks */
clk_disable(host->fclk);
clk_disable(host->iclk);
if (host->dbclk_enabled)
if (host->got_dbclk)
clk_disable(host->dbclk);
/* Turn the power off */
......@@ -753,9 +753,9 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd)
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 (host->got_dbclk)
clk_enable(host->dbclk);
if (ret != 0)
goto err;
......@@ -1697,18 +1697,22 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
goto err1;
}
host->dbclk = clk_get(&pdev->dev, "mmchsdb_fck");
/*
* MMC can still work without debounce clock.
*/
if (IS_ERR(host->dbclk))
dev_warn(mmc_dev(host->mmc), "Failed to get debounce clock\n");
else
if (clk_enable(host->dbclk) != 0)
dev_dbg(mmc_dev(host->mmc), "Enabling debounce"
" clk failed\n");
if (cpu_is_omap2430()) {
host->dbclk = clk_get(&pdev->dev, "mmchsdb_fck");
/*
* MMC can still work without debounce clock.
*/
if (IS_ERR(host->dbclk))
dev_warn(mmc_dev(host->mmc),
"Failed to get debounce clock\n");
else
host->dbclk_enabled = 1;
host->got_dbclk = 1;
if (host->got_dbclk)
if (clk_enable(host->dbclk) != 0)
dev_dbg(mmc_dev(host->mmc), "Enabling debounce"
" clk failed\n");
}
/* Since we do only SG emulation, we can have as many segs
* as we want. */
......@@ -1825,7 +1829,7 @@ err_irq:
clk_disable(host->iclk);
clk_put(host->fclk);
clk_put(host->iclk);
if (host->dbclk_enabled) {
if (host->got_dbclk) {
clk_disable(host->dbclk);
clk_put(host->dbclk);
}
......@@ -1859,7 +1863,7 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
clk_disable(host->iclk);
clk_put(host->fclk);
clk_put(host->iclk);
if (host->dbclk_enabled) {
if (host->got_dbclk) {
clk_disable(host->dbclk);
clk_put(host->dbclk);
}
......@@ -1910,7 +1914,7 @@ static int omap_hsmmc_suspend(struct platform_device *pdev, pm_message_t state)
OMAP_HSMMC_READ(host->base, HCTL) & ~SDBP);
mmc_host_disable(host->mmc);
clk_disable(host->iclk);
if (host->dbclk_enabled)
if (host->got_dbclk)
clk_disable(host->dbclk);
} else {
host->suspended = 0;
......@@ -1942,14 +1946,14 @@ static int omap_hsmmc_resume(struct platform_device *pdev)
if (ret)
goto clk_en_err;
if (host->dbclk_enabled)
clk_enable(host->dbclk);
if (mmc_host_enable(host->mmc) != 0) {
clk_disable(host->iclk);
goto clk_en_err;
}
if (host->got_dbclk)
clk_enable(host->dbclk);
omap_hsmmc_conf_bus_power(host);
if (host->pdata->resume) {
......
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