Skip to contentSkip to conversation

MMC: OMAP: Fix omap to use MMC_POWER_ON

PATCH In review Carlos Aguiar 1 participant 1 message Apr 24, 2007 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 MMC: OMAP: Fix omap to use MMC_POWER_ON

As discussed earlier on LKML:

http://lkml.org/lkml/2006/5/4/44

drivers/mmc/omap.c +4 -2
Index: linux-2.6.20/drivers/mmc/omap.c
===================================================================
@@ -970,8 +970,10 @@ static void mmc_omap_set_ios(struct mmc_
 		mmc_omap_power(host, 0);
 		break;
 	case MMC_POWER_UP:
-	case MMC_POWER_ON:
+		/* Cannot touch dsor yet, just power up MMC */
 		mmc_omap_power(host, 1);
+		return;
+	case MMC_POWER_ON:
 		dsor |= 1 << 11;
 		break;
 	}
@@ -987,7 +989,7 @@ static void mmc_omap_set_ios(struct mmc_
 	 * Writing to the CON register twice seems to do the trick. */
 	for (i = 0; i < 2; i++)
 		OMAP_MMC_WRITE(host, CON, dsor);
-	if (ios->power_mode == MMC_POWER_UP) {
+	if (ios->power_mode == MMC_POWER_ON) {
 		/* Send clock cycles, poll completion */
 		OMAP_MMC_WRITE(host, IE, 0);
 		OMAP_MMC_WRITE(host, STAT, 0xffff);