public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mmc: add no simultaenous power and vdd
@ 2012-11-04  0:10 RgC
  2012-11-04  0:37 ` Wolfgang Denk
  2012-11-04  3:40 ` [U-Boot] [PATCH v2] " RgC
  0 siblings, 2 replies; 4+ messages in thread
From: RgC @ 2012-11-04  0:10 UTC (permalink / raw)
  To: u-boot

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(+)

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;
-- 
1.8.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121104/c96b4a44/attachment.pgp>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mmc: add no simultaenous power and vdd
  2012-11-04  0:10 [U-Boot] [PATCH] mmc: add no simultaenous power and vdd RgC
@ 2012-11-04  0:37 ` Wolfgang Denk
  2012-11-04  3:21   ` RgC
  2012-11-04  3:40 ` [U-Boot] [PATCH v2] " RgC
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2012-11-04  0:37 UTC (permalink / raw)
  To: u-boot

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

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
He is truly wise who gains wisdom from another's mishap.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mmc: add no simultaenous power and vdd
  2012-11-04  0:37 ` Wolfgang Denk
@ 2012-11-04  3:21   ` RgC
  0 siblings, 0 replies; 4+ messages in thread
From: RgC @ 2012-11-04  3:21 UTC (permalink / raw)
  To: u-boot

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121104/f4b00121/attachment.pgp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2] mmc: add no simultaenous power and vdd
  2012-11-04  0:10 [U-Boot] [PATCH] mmc: add no simultaenous power and vdd RgC
  2012-11-04  0:37 ` Wolfgang Denk
@ 2012-11-04  3:40 ` RgC
  1 sibling, 0 replies; 4+ messages in thread
From: RgC @ 2012-11-04  3:40 UTC (permalink / raw)
  To: u-boot

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
---
 drivers/mmc/sdhci.c | 3 +++
 include/sdhci.h     | 1 +
 2 files changed, 4 insertions(+)

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;
-- 
1.8.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121104/ba48fdbf/attachment.pgp>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-04  3:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-04  0:10 [U-Boot] [PATCH] mmc: add no simultaenous power and vdd RgC
2012-11-04  0:37 ` Wolfgang Denk
2012-11-04  3:21   ` RgC
2012-11-04  3:40 ` [U-Boot] [PATCH v2] " RgC

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox