Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186280
b: refs/heads/master
c: 729adf1
h: refs/heads/master
v: v3
  • Loading branch information
Cliff Cai authored and Linus Torvalds committed Mar 6, 2010
1 parent 6c7ab0f commit 4e2d0b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 05dabcc4a51eab7342b2220f0121b4f4a5109386
refs/heads/master: 729adf1b5f4562f67fe8bf6c1df97edc1128fac7
8 changes: 6 additions & 2 deletions trunk/drivers/mmc/host/bfin_sdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ static int sdh_setup_data(struct sdh_host *host, struct mmc_data *data)
unsigned int length;
unsigned int data_ctl;
unsigned int dma_cfg;
unsigned int cycle_ns, timeout;

dev_dbg(mmc_dev(host->mmc), "%s enter flags: 0x%x\n", __func__, data->flags);
host->data = data;
Expand All @@ -135,8 +136,11 @@ static int sdh_setup_data(struct sdh_host *host, struct mmc_data *data)
data_ctl |= ((ffs(data->blksz) - 1) << 4);

bfin_write_SDH_DATA_CTL(data_ctl);

bfin_write_SDH_DATA_TIMER(0xFFFF);
/* the time of a host clock period in ns */
cycle_ns = 1000000000 / (get_sclk() / (2 * (host->clk_div + 1)));
timeout = data->timeout_ns / cycle_ns;
timeout += data->timeout_clks;
bfin_write_SDH_DATA_TIMER(timeout);
SSYNC();

if (data->flags & MMC_DATA_READ) {
Expand Down

0 comments on commit 4e2d0b5

Please sign in to comment.