Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 216958
b: refs/heads/master
c: 07ad64b
h: refs/heads/master
v: v3
  • Loading branch information
Madhusudhan Chikkature authored and Tony Lindgren committed Oct 1, 2010
1 parent dd98450 commit d90af34
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e13bb34bd9bbc01dcab9ed1b8adaa6a199ce059c
refs/heads/master: 07ad64b60c4d1f2bdbefa5db29ccb235596bc670
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-omap2/hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,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) {
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/plat-omap/include/plat/mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/mmc/host/omap_hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d90af34

Please sign in to comment.