Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255232
b: refs/heads/master
c: e0c7f99
h: refs/heads/master
v: v3
  • Loading branch information
Andy Shevchenko authored and Chris Ball committed Jul 21, 2011
1 parent 76aa864 commit b4f22db
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ac330f44c6bcc5f8ef7eb6ea7fd00575a1d5ef1a
refs/heads/master: e0c7f99b863b485ad0cde371ea1f62ec8ff70c5d
19 changes: 13 additions & 6 deletions trunk/drivers/mmc/host/omap_hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,15 @@ static void omap_hsmmc_gpio_free(struct omap_mmc_platform_data *pdata)
gpio_free(pdata->slots[0].switch_pin);
}

/*
* Start clock to the card
*/
static void omap_hsmmc_start_clock(struct omap_hsmmc_host *host)
{
OMAP_HSMMC_WRITE(host->base, SYSCTL,
OMAP_HSMMC_READ(host->base, SYSCTL) | CEN);
}

/*
* Stop clock to the card
*/
Expand Down Expand Up @@ -693,8 +702,8 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host)
break;
}

OMAP_HSMMC_WRITE(host->base, SYSCTL,
OMAP_HSMMC_READ(host->base, SYSCTL) & ~CEN);
omap_hsmmc_stop_clock(host);

OMAP_HSMMC_WRITE(host->base, SYSCTL,
(calc_divisor(ios) << 6) | (DTO << 16));
OMAP_HSMMC_WRITE(host->base, SYSCTL,
Expand All @@ -705,8 +714,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host)
&& time_before(jiffies, timeout))
;

OMAP_HSMMC_WRITE(host->base, SYSCTL,
OMAP_HSMMC_READ(host->base, SYSCTL) | CEN);
omap_hsmmc_start_clock(host);

con = OMAP_HSMMC_READ(host->base, CON);
if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN)
Expand Down Expand Up @@ -1684,8 +1692,7 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
&& time_before(jiffies, timeout))
msleep(1);

OMAP_HSMMC_WRITE(host->base, SYSCTL,
OMAP_HSMMC_READ(host->base, SYSCTL) | CEN);
omap_hsmmc_start_clock(host);

if (do_send_init_stream)
send_init_stream(host);
Expand Down

0 comments on commit b4f22db

Please sign in to comment.