Patchwork [U-Boot] mmc: add no simultaenous power and vdd

login
register
mail settings
Submitter Mela Custodio
Date Nov. 4, 2012, 12:10 a.m.
Message ID <20121104001018.GA57283@crg>
Download mbox | patch
Permalink /patch/196963/
State Superseded
Delegated to: Andy Fleming
Headers show

Comments

Mela Custodio - Nov. 4, 2012, 12:10 a.m.
Bring in the code from Linux kernel.

Signed-off-by: RgC <sessyargc@gmail.com>
CC: Andy Fleming <afleming@freescale.com>

	modified:   drivers/mmc/sdhci.c
	modified:   include/sdhci.h
---
 drivers/mmc/sdhci.c | 3 +++
 include/sdhci.h     | 1 +
 2 files changed, 4 insertions(+)
Wolfgang Denk - Nov. 4, 2012, 12:37 a.m.
Dear RgC,

In message <20121104001018.GA57283@crg> you wrote:
> 
> Bring in the code from Linux kernel.

PLease provide exact reference; see
http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign

> Signed-off-by: RgC <sessyargc@gmail.com>

Sorry, but we need a real name here.

Best regards,

Wolfgang Denk
Mela Custodio - Nov. 4, 2012, 3:21 a.m.
Dear Wolfgang,

On 2012.11/04, Wolfgang Denk wrote:
> Dear RgC,
> 
> In message <20121104001018.GA57283@crg> you wrote:
> > 
> > Bring in the code from Linux kernel.
> 
> PLease provide exact reference; see
> http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign
> 

Sorry wasn't reading the documents, my bad.

The orignal code was brought in by commit e08c1694d9e2138204f2b79b73f0f159074ce2f5
last 2008 to the Linux kernel but has since evolved.

> > Signed-off-by: RgC <sessyargc@gmail.com>
> 
> Sorry, but we need a real name here.

Sorry. The real name is Rommel G Custodio.
I will prepare a V2 of the patch later.

> 
> Best regards,
> 
> Wolfgang Denk

All the best,
Rommel

Patch

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 7845f87..b9cbe34 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -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);
diff --git a/include/sdhci.h b/include/sdhci.h
index c44793d..cffbe53 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -225,6 +225,7 @@ 
 #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;