Skip to contentSkip to conversation

mmc: tmio: Fix tmio MMC_POWER_UP

PATCH New Paul Parsons 1 participant 1 message Apr 20, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: tmio: Fix tmio MMC_POWER_UP

Fix tmio MMC_POWER_UP invocation which had been broken in linux-2.6.39-rc1. In tmio_mmc_set_ios() an affirmative test for ios->clock == 0 executes the MMC_POWER_OFF block regardless of ios->power_mode. Because mmc_power_up() invokes MMC_POWER_UP before setting ios->clock, tmio_mmc_set_ios() turns the MMC power off instead of on.

---

drivers/mmc/host/tmio_mmc_pio.c +1 -1
@@ -728,7 +728,7 @@ static void tmio_mmc_set_ios(struct mmc_
 		tmio_mmc_set_clock(host, ios->clock);
 
 	/* Power sequence - OFF -> UP -> ON */
-	if (ios->power_mode == MMC_POWER_OFF || !ios->clock) {
+	if (ios->power_mode == MMC_POWER_OFF) {
 		/* power down SD bus */
 		if (ios->power_mode == MMC_POWER_OFF && host->set_pwr)
 			host->set_pwr(host->pdev, 0);