Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91779
b: refs/heads/master
c: b8f9f0e
h: refs/heads/master
i:
  91777: ae95db3
  91775: 8c1bafb
v: v3
  • Loading branch information
Juha Yrjola authored and Pierre Ossman committed Apr 18, 2008
1 parent 0c1ffb8 commit f8e3657
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: a914ded23565d8688e2b7e435916630def5bdd19
refs/heads/master: b8f9f0e90a6c3fb999d00301f45bb2213dbe8c00
9 changes: 4 additions & 5 deletions trunk/drivers/mmc/host/omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,13 +861,12 @@ static inline void set_cmd_timeout(struct mmc_omap_host *host, struct mmc_reques

static inline void set_data_timeout(struct mmc_omap_host *host, struct mmc_request *req)
{
int timeout;
unsigned int timeout, cycle_ns;
u16 reg;

/* Convert ns to clock cycles by assuming 20MHz frequency
* 1 cycle at 20MHz = 500 ns
*/
timeout = req->data->timeout_clks + req->data->timeout_ns / 500;
cycle_ns = 1000000000 / host->current_slot->fclk_freq;
timeout = req->data->timeout_ns / cycle_ns;
timeout += req->data->timeout_clks;

/* Check if we need to use timeout multiplier register */
reg = OMAP_MMC_READ(host, SDIO);
Expand Down

0 comments on commit f8e3657

Please sign in to comment.