diff options
author | Sukumar Ghorai <s-ghorai@ti.com> | 2010-06-01 16:02:14 -0500 |
---|---|---|
committer | Ricardo Perez Olivares <x0081762@ti.com> | 2010-06-01 16:02:14 -0500 |
commit | bb34108f076f48db024511d45e22877700dea576 (patch) | |
tree | 57f3ddad2721786e4713846afe4966449ab8a4f1 | |
parent | d267963b8b018a36ec35a17a431fe9e76628282d (diff) |
PATCH omap: hsmmc funtionality breaks when CONFIG_PM not define
Issue if power_saving option passed from board file and CONFIG_PM not define.
This is because hosts refer to wrong operation table and that try to power save.
Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com>
Signed-off-by: Ricardo Perez Olivares <x0081762@ti.com>
-rwxr-xr-x[-rw-r--r--] | drivers/mmc/host/omap_hsmmc.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 1c4cce6689a1..ab0b51ce4ca8 100644..100755 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1694,6 +1694,7 @@ static int omap_hsmmc_enabled_to_disabled(struct omap_hsmmc_host *host) pm_runtime_put_sync(host->dev); #ifndef CONFIG_PM_RUNTIME + omap_hsmmc_context_save(host); /* * If runtime PM is not enabled, ensure clocks are always enabled. * Use H/w Mod FW. @@ -1731,6 +1732,7 @@ static int omap_hsmmc_disabled_to_sleep(struct omap_hsmmc_host *host) * Use H/w Mod FW. */ omap_device_enable(pdev); + omap_hsmmc_context_restore(host); #endif/*CONFIG_PM_RUNTIME*/ if (mmc_card_can_sleep(host->mmc)) { @@ -1821,6 +1823,7 @@ static int omap_hsmmc_disabled_to_enabled(struct omap_hsmmc_host *host) * Use H/w Mod FW. */ omap_device_enable(pdev); + omap_hsmmc_context_restore(host); #endif host->dpm_state = ENABLED; @@ -1847,6 +1850,7 @@ static int omap_hsmmc_sleep_to_enabled(struct omap_hsmmc_host *host) * Use H/w Mod FW. */ omap_device_enable(pdev); + omap_hsmmc_context_restore(host); #endif if (mmc_slot(host).set_sleep) mmc_slot(host).set_sleep(host->dev, host->slot_id, 0, @@ -1879,6 +1883,7 @@ static int omap_hsmmc_off_to_enabled(struct omap_hsmmc_host *host) * Use H/w Mod FW. */ omap_device_enable(pdev); + omap_hsmmc_context_restore(host); #endif omap_hsmmc_conf_bus_power(host); mmc_power_restore_host(host->mmc); @@ -1955,6 +1960,7 @@ static int omap_hsmmc_enable_simple(struct mmc_host *mmc) * Use H/w Mod FW. */ omap_device_enable(pdev); + omap_hsmmc_context_restore(host); #endif/*CONFIG_PM_RUNTIME*/ dev_dbg(mmc_dev(host->mmc), "enabled\n"); @@ -1972,6 +1978,7 @@ static int omap_hsmmc_disable_simple(struct mmc_host *mmc, int lazy) pm_runtime_put_sync(host->dev); #ifndef CONFIG_PM_RUNTIME + omap_hsmmc_context_save(host); /* * If runtime PM is not enabled, ensure clocks are always enabled. * Use H/w Mod FW. @@ -2154,10 +2161,13 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, host); INIT_WORK(&host->mmc_carddetect_work, omap_hsmmc_detect); - - if (mmc_slot(host).power_saving) + if (mmc_slot(host).power_saving) { +#ifdef CONFIG_PM mmc->ops = &omap_hsmmc_ps_ops; - else +#else + mmc->ops = &omap_hsmmc_ops; +#endif + } else mmc->ops = &omap_hsmmc_ops; /* |