|
@@ -172,7 +172,8 @@ static void tmio_mmc_set_clock(struct tmio_mmc_host *host,
|
|
host->set_clk_div(host->pdev, (clk>>22) & 1);
|
|
host->set_clk_div(host->pdev, (clk>>22) & 1);
|
|
|
|
|
|
sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, clk & 0x1ff);
|
|
sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, clk & 0x1ff);
|
|
- msleep(10);
|
|
|
|
|
|
+ if (!(host->pdata->flags & TMIO_MMC_FAST_CLK_CHG))
|
|
|
|
+ msleep(10);
|
|
}
|
|
}
|
|
|
|
|
|
static void tmio_mmc_clk_stop(struct tmio_mmc_host *host)
|
|
static void tmio_mmc_clk_stop(struct tmio_mmc_host *host)
|
|
@@ -185,14 +186,14 @@ static void tmio_mmc_clk_stop(struct tmio_mmc_host *host)
|
|
|
|
|
|
sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, ~0x0100 &
|
|
sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, ~0x0100 &
|
|
sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL));
|
|
sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL));
|
|
- msleep(10);
|
|
|
|
|
|
+ msleep(host->pdata->flags & TMIO_MMC_FAST_CLK_CHG ? 5 : 10);
|
|
}
|
|
}
|
|
|
|
|
|
static void tmio_mmc_clk_start(struct tmio_mmc_host *host)
|
|
static void tmio_mmc_clk_start(struct tmio_mmc_host *host)
|
|
{
|
|
{
|
|
sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, 0x0100 |
|
|
sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, 0x0100 |
|
|
sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL));
|
|
sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL));
|
|
- msleep(10);
|
|
|
|
|
|
+ msleep(host->pdata->flags & TMIO_MMC_FAST_CLK_CHG ? 1 : 10);
|
|
|
|
|
|
/* implicit BUG_ON(!res) */
|
|
/* implicit BUG_ON(!res) */
|
|
if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) {
|
|
if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) {
|