提交 a05dcdb9 编写于 作者: P Paul Walmsley

MMC: omap_hsmmc: enable interface clock before calling mmc_host_enable()

The code path entered via mmc_host_enable() can include register
accesses to the HSMMC IP block.  For this to work, both the device
interface clock and functional clock need to be enabled before
mmc_host_enable() is called.  However, omap_hsmmc_probe() calls
mmc_host_enable() before enabling the device interface clock.

Fix by calling mmc_host_enable() after the device interface clock is
enabled.
Signed-off-by: NPaul Walmsley <paul@pwsan.com>
Cc: Madhusudhan Chikkature Rajashekar <madhu.cr@ti.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Kishore Kadiyala <kishore.kadiyala@ti.com>
Cc: Tero Kristo <Tero.Kristo@nokia.com>
Acked-by: NMadhusudhan Chikkature Rajashekar <madhu.cr@ti.com>
上级 dd9c1549
......@@ -2101,14 +2101,14 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
/* we start off in DISABLED state */
host->dpm_state = DISABLED;
if (mmc_host_enable(host->mmc) != 0) {
if (clk_enable(host->iclk) != 0) {
clk_put(host->iclk);
clk_put(host->fclk);
goto err1;
}
if (clk_enable(host->iclk) != 0) {
mmc_host_disable(host->mmc);
if (mmc_host_enable(host->mmc) != 0) {
clk_disable(host->iclk);
clk_put(host->iclk);
clk_put(host->fclk);
goto err1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册