]> git.sur5r.net Git - u-boot/commitdiff
mmc: add no simultaenous power and vdd
authorMela Custodio <sessyargc@gmail.com>
Sat, 3 Nov 2012 17:40:16 +0000 (17:40 +0000)
committerAndy Fleming <afleming@freescale.com>
Tue, 27 Nov 2012 23:26:48 +0000 (17:26 -0600)
Bring in the code from Linux kernel.

Added to Linux kernel by:
commit e08c1694d9e2138204f2b79b73f0f159074ce2f5
Author: Andres Salomon <dilinger@queued.net>
Date:   Fri Jul 4 10:00:03 2008 -0700

Some HW balks when writing both voltage setting and power up at the same
time to SDHCI_POWER_CONTROL register.

Signed-off-by: Rommel G Custodio <sessyargc@gmail.com>
CC: Andy Fleming <afleming@freescale.com>
v2: fix attribution and SOB
Signed-off-by: Andy Fleming <afleming@freescale.com>
drivers/mmc/sdhci.c
include/sdhci.h

index 7845f873ac9009295768c102fd4024d75f85c565..b9cbe34f1f12f728471514ceac568576fe696b9c 100644 (file)
@@ -340,6 +340,9 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
                return;
        }
 
+       if (host->quirks & SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER)
+               sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL);
+
        pwr |= SDHCI_POWER_ON;
 
        sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL);
index c44793d5ecf773b8baea5dd5daf860687e38648c..cffbe53621aee9c9691f9f5ec39d9c8fe98f047b 100644 (file)
 #define SDHCI_QUIRK_BROKEN_VOLTAGE     (1 << 4)
 #define SDHCI_QUIRK_NO_CD              (1 << 5)
 #define SDHCI_QUIRK_WAIT_SEND_CMD      (1 << 6)
+#define SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER (1 << 7)
 
 /* to make gcc happy */
 struct sdhci_host;