diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2011-02-25 10:58:38 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-03-16 12:30:25 -0400 |
commit | f5e0cec4495398b259b3ede7cbc3ce4bd0e1cef0 (patch) | |
tree | 1ba09ad3756365de0fcd64185592014e33e5376e /drivers/mmc | |
parent | b676f0391a5f6816c047cbd1e2ad2a897f3c161a (diff) |
mmc: sh_mmcif: support aggressive clock gating
To support MMC aggressive clock gating the driver has to stop the
interface clock when the .set_ios() method is called with .clock == 0.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sh_mmcif.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index aea86262ed66..af97015a2fc7 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c | |||
@@ -844,15 +844,15 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
844 | struct sh_mmcif_host *host = mmc_priv(mmc); | 844 | struct sh_mmcif_host *host = mmc_priv(mmc); |
845 | struct sh_mmcif_plat_data *p = host->pd->dev.platform_data; | 845 | struct sh_mmcif_plat_data *p = host->pd->dev.platform_data; |
846 | 846 | ||
847 | if (ios->power_mode == MMC_POWER_OFF) { | 847 | if (ios->power_mode == MMC_POWER_UP) { |
848 | if (p->set_pwr) | ||
849 | p->set_pwr(host->pd, ios->power_mode); | ||
850 | } else if (ios->power_mode == MMC_POWER_OFF || !ios->clock) { | ||
848 | /* clock stop */ | 851 | /* clock stop */ |
849 | sh_mmcif_clock_control(host, 0); | 852 | sh_mmcif_clock_control(host, 0); |
850 | if (p->down_pwr) | 853 | if (ios->power_mode == MMC_POWER_OFF && p->down_pwr) |
851 | p->down_pwr(host->pd); | 854 | p->down_pwr(host->pd); |
852 | return; | 855 | return; |
853 | } else if (ios->power_mode == MMC_POWER_UP) { | ||
854 | if (p->set_pwr) | ||
855 | p->set_pwr(host->pd, ios->power_mode); | ||
856 | } | 856 | } |
857 | 857 | ||
858 | if (ios->clock) | 858 | if (ios->clock) |