]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
OMAP: HSMMC: Fix suspend/resume for MMCHS2
authorJarkko Lavinen <jarkko.lavinen@nokia.com>
Tue, 28 Oct 2008 09:12:28 +0000 (11:12 +0200)
committerAdrian Hunter <ext-adrian.hunter@nokia.com>
Thu, 27 Nov 2008 08:35:45 +0000 (10:35 +0200)
For HSMMC2 and HSMMC3 set SDVSS to 1.8V in HCTL before enabling the SDBP bit.

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
drivers/mmc/host/omap_hsmmc.c

index a134f76ede2354c71c8bd6beb4907ca3aa47bdc7..4bc25c0d51dc4396a787b76b072a7a2786d879f3 100644 (file)
@@ -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);