diff options
Diffstat (limited to 'drivers/mmc/host/omap_hsmmc.c')
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index d9c84ea46b63..6cb4e19dcf07 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -192,6 +192,7 @@ struct omap_hsmmc_host { | |||
192 | int reqs_blocked; | 192 | int reqs_blocked; |
193 | int use_reg; | 193 | int use_reg; |
194 | int req_in_progress; | 194 | int req_in_progress; |
195 | unsigned long clk_rate; | ||
195 | struct omap_hsmmc_next next_data; | 196 | struct omap_hsmmc_next next_data; |
196 | struct omap_mmc_platform_data *pdata; | 197 | struct omap_mmc_platform_data *pdata; |
197 | }; | 198 | }; |
@@ -1360,7 +1361,7 @@ static void set_data_timeout(struct omap_hsmmc_host *host, | |||
1360 | if (clkd == 0) | 1361 | if (clkd == 0) |
1361 | clkd = 1; | 1362 | clkd = 1; |
1362 | 1363 | ||
1363 | cycle_ns = 1000000000 / (clk_get_rate(host->fclk) / clkd); | 1364 | cycle_ns = 1000000000 / (host->clk_rate / clkd); |
1364 | timeout = timeout_ns / cycle_ns; | 1365 | timeout = timeout_ns / cycle_ns; |
1365 | timeout += timeout_clks; | 1366 | timeout += timeout_clks; |
1366 | if (timeout) { | 1367 | if (timeout) { |
@@ -1484,6 +1485,7 @@ static void omap_hsmmc_request(struct mmc_host *mmc, struct mmc_request *req) | |||
1484 | host->reqs_blocked = 0; | 1485 | host->reqs_blocked = 0; |
1485 | WARN_ON(host->mrq != NULL); | 1486 | WARN_ON(host->mrq != NULL); |
1486 | host->mrq = req; | 1487 | host->mrq = req; |
1488 | host->clk_rate = clk_get_rate(host->fclk); | ||
1487 | err = omap_hsmmc_prepare_data(host, req); | 1489 | err = omap_hsmmc_prepare_data(host, req); |
1488 | if (err) { | 1490 | if (err) { |
1489 | req->cmd->error = err; | 1491 | req->cmd->error = err; |