aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMadhusudhan Chikkature <madhu.cr@ti.com>2010-10-01 19:35:25 -0400
committerTony Lindgren <tony@atomide.com>2010-10-01 19:35:25 -0400
commit07ad64b60c4d1f2bdbefa5db29ccb235596bc670 (patch)
tree572c8e17d988c3fb655c9e82804bb733959f224f
parente13bb34bd9bbc01dcab9ed1b8adaa6a199ce059c (diff)
OMAP4 ES2: HSMMC soft reset change
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> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/hsmmc.c3
-rw-r--r--arch/arm/plat-omap/include/plat/mmc.h1
-rw-r--r--drivers/mmc/host/omap_hsmmc.c11
3 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index eb92b8107d2c..df1311d93eba 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -303,6 +303,9 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
303 else 303 else
304 mmc->slots[0].features |= HSMMC_HAS_PBIAS; 304 mmc->slots[0].features |= HSMMC_HAS_PBIAS;
305 305
306 if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0))
307 mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET;
308
306 switch (c->mmc) { 309 switch (c->mmc) {
307 case 1: 310 case 1:
308 if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { 311 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 4f819fc261b7..2c4629a8d9f2 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 {
103 103
104 /* we can put the features above into this variable */ 104 /* we can put the features above into this variable */
105#define HSMMC_HAS_PBIAS (1 << 0) 105#define HSMMC_HAS_PBIAS (1 << 0)
106#define HSMMC_HAS_UPDATED_RESET (1 << 1)
106 unsigned features; 107 unsigned features;
107 108
108 int switch_pin; /* gpio (card detect) */ 109 int switch_pin; /* gpio (card detect) */
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 53f8fa599cf5..69858e750203 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,
982 OMAP_HSMMC_WRITE(host->base, SYSCTL, 982 OMAP_HSMMC_WRITE(host->base, SYSCTL,
983 OMAP_HSMMC_READ(host->base, SYSCTL) | bit); 983 OMAP_HSMMC_READ(host->base, SYSCTL) | bit);
984 984
985 /*
986 * OMAP4 ES2 and greater has an updated reset logic.
987 * Monitor a 0->1 transition first
988 */
989 if (mmc_slot(host).features & HSMMC_HAS_UPDATED_RESET) {
990 while ((!(OMAP_HSMMC_READ(host, SYSCTL) & bit))
991 && (i++ < limit))
992 cpu_relax();
993 }
994 i = 0;
995
985 while ((OMAP_HSMMC_READ(host->base, SYSCTL) & bit) && 996 while ((OMAP_HSMMC_READ(host->base, SYSCTL) & bit) &&
986 (i++ < limit)) 997 (i++ < limit))
987 cpu_relax(); 998 cpu_relax();