linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] OMAP4 ES2:  HSMMC soft reset change
@ 2010-09-29  0:46 Madhusudhan Chikkature
  2010-09-30 20:53 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Madhusudhan Chikkature @ 2010-09-29  0:46 UTC (permalink / raw)
  To: tony; +Cc: linux-mmc, linux-omap, cjb

The omap4 es2 hsmmc has a updated soft reset logic.After the
reset is issued monitor a 0->1 transition first. The reset of
CMD or DATA lines is complete only after a 0->1->0 transition
of SRC or SRD bits.

Signed-off-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Tested-by: Anand Gadiyar <gadiyar@ti.com>
---
 arch/arm/mach-omap2/hsmmc.c           |    3 +++
 arch/arm/plat-omap/include/plat/mmc.h |    1 +
 drivers/mmc/host/omap_hsmmc.c         |   11 +++++++++++
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index 87ce6ff..37f9f56 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -298,6 +298,9 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info
*controllers)
 		else
 			mmc->slots[0].features |= HSMMC_HAS_PBIAS;

+		if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0))
+			mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET;
+
 		switch (c->mmc) {
 		case 1:
 			if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
diff --git a/arch/arm/plat-omap/include/plat/mmc.h
b/arch/arm/plat-omap/include/plat/mmc.h
index 4f819fc..2c4629a 100644
--- a/arch/arm/plat-omap/include/plat/mmc.h
+++ b/arch/arm/plat-omap/include/plat/mmc.h
@@ -103,6 +103,7 @@ struct omap_mmc_platform_data {

 		/* we can put the features above into this variable */
 #define HSMMC_HAS_PBIAS		(1 << 0)
+#define HSMMC_HAS_UPDATED_RESET	(1 << 1)
 		unsigned features;

 		int switch_pin;			/* gpio (card detect) */
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 53f8fa5..69858e7 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -982,6 +982,17 @@ static inline void omap_hsmmc_reset_controller_fsm(struct
omap_hsmmc_host *host,
 	OMAP_HSMMC_WRITE(host->base, SYSCTL,
 			 OMAP_HSMMC_READ(host->base, SYSCTL) | bit);

+	/*
+	 * OMAP4 ES2 and greater has an updated reset logic.
+	 * Monitor a 0->1 transition first
+	 */
+	if (mmc_slot(host).features & HSMMC_HAS_UPDATED_RESET) {
+		while ((!(OMAP_HSMMC_READ(host, SYSCTL) & bit))
+					&& (i++ < limit))
+			cpu_relax();
+	}
+	i = 0;
+
 	while ((OMAP_HSMMC_READ(host->base, SYSCTL) & bit) &&
 		(i++ < limit))
 		cpu_relax();
-- 
1.7.0.4




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

* Re: [PATCH V2] OMAP4 ES2:  HSMMC soft reset change
  2010-09-29  0:46 [PATCH V2] OMAP4 ES2: HSMMC soft reset change Madhusudhan Chikkature
@ 2010-09-30 20:53 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2010-09-30 20:53 UTC (permalink / raw)
  To: Madhusudhan Chikkature; +Cc: linux-mmc, linux-omap, cjb

* Madhusudhan Chikkature <madhu.cr@ti.com> [100928 17:37]:
> The omap4 es2 hsmmc has a updated soft reset logic.After the
> reset is issued monitor a 0->1 transition first. The reset of
> CMD or DATA lines is complete only after a 0->1->0 transition
> of SRC or SRD bits.

Thanks for updating this. I'll queue it for the upcoming merge window.

Tony

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

end of thread, other threads:[~2010-09-30 20:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29  0:46 [PATCH V2] OMAP4 ES2: HSMMC soft reset change Madhusudhan Chikkature
2010-09-30 20:53 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).