From: Jarkko Lavinen Date: Tue, 28 Oct 2008 09:12:28 +0000 (+0200) Subject: OMAP: HSMMC: Fix suspend/resume for MMCHS2 X-Git-Tag: v2.6.28-omap1~76^2~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=14ee306d7d5555c75a28e17dccdfbeda5729da17;p=linux-2.6-omap-h63xx.git OMAP: HSMMC: Fix suspend/resume for MMCHS2 For HSMMC2 and HSMMC3 set SDVSS to 1.8V in HCTL before enabling the SDBP bit. Signed-off-by: Jarkko Lavinen --- diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index a134f76ede2..4bc25c0d51d 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1197,15 +1197,16 @@ static int omap_mmc_suspend(struct platform_device *pdev, pm_message_t state) } if (!(OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET)) { - OMAP_HSMMC_WRITE(host->base, HCTL, - OMAP_HSMMC_READ(host->base, HCTL) - & SDVSCLR); - OMAP_HSMMC_WRITE(host->base, HCTL, - OMAP_HSMMC_READ(host->base, HCTL) - | SDVS30); - OMAP_HSMMC_WRITE(host->base, HCTL, - OMAP_HSMMC_READ(host->base, HCTL) - | SDBP); + u32 hctl = OMAP_HSMMC_READ(host->base, HCTL) & + SDVSCLR; + + if (host->id == OMAP_MMC1_DEVID) + hctl |= SDVS30; + else + hctl |= SDVS18; + + OMAP_HSMMC_WRITE(host->base, HCTL, hctl); + OMAP_HSMMC_WRITE(host->base, HCTL, hctl | SDBP); } mmc_omap_fclk_state(host, OFF);