diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/mxcmmc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index 5950102113f4..dcc9cdb2a4df 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c | |||
@@ -140,6 +140,8 @@ struct mxcmci_host { | |||
140 | struct work_struct datawork; | 140 | struct work_struct datawork; |
141 | }; | 141 | }; |
142 | 142 | ||
143 | static void mxcmci_set_clk_rate(struct mxcmci_host *host, unsigned int clk_ios); | ||
144 | |||
143 | static inline int mxcmci_use_dma(struct mxcmci_host *host) | 145 | static inline int mxcmci_use_dma(struct mxcmci_host *host) |
144 | { | 146 | { |
145 | return host->do_dma; | 147 | return host->do_dma; |
@@ -345,8 +347,11 @@ static int mxcmci_poll_status(struct mxcmci_host *host, u32 mask) | |||
345 | stat = readl(host->base + MMC_REG_STATUS); | 347 | stat = readl(host->base + MMC_REG_STATUS); |
346 | if (stat & STATUS_ERR_MASK) | 348 | if (stat & STATUS_ERR_MASK) |
347 | return stat; | 349 | return stat; |
348 | if (time_after(jiffies, timeout)) | 350 | if (time_after(jiffies, timeout)) { |
351 | mxcmci_softreset(host); | ||
352 | mxcmci_set_clk_rate(host, host->clock); | ||
349 | return STATUS_TIME_OUT_READ; | 353 | return STATUS_TIME_OUT_READ; |
354 | } | ||
350 | if (stat & mask) | 355 | if (stat & mask) |
351 | return 0; | 356 | return 0; |
352 | cpu_relax(); | 357 | cpu_relax(); |