Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118358
b: refs/heads/master
c: 630a8b2
h: refs/heads/master
v: v3
  • Loading branch information
Atsushi Nemoto authored and Bartlomiej Zolnierkiewicz committed Nov 2, 2008
1 parent f5942fd commit 0f90c33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: ccd32e221c3e3797ac56305c554ad8b07c13c815
refs/heads/master: 630a8b2500c8d04e87e597c4afa5e1fafff04591
9 changes: 8 additions & 1 deletion trunk/drivers/ide/tx4938ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,17 @@ static void tx4938ide_tune_ebusc(unsigned int ebus_ch,
/* Address-valid to DIOR/DIOW setup */
shwt = DIV_ROUND_UP(t->setup, cycle);

/* -DIOx recovery time (SHWT * 4) and cycle time requirement */
while ((shwt * 4 + wt + (wt ? 2 : 3)) * cycle < t->cycle)
shwt++;
if (shwt > 7) {
pr_warning("tx4938ide: SHWT violation (%d)\n", shwt);
shwt = 7;
}
pr_debug("tx4938ide: ebus %d, bus cycle %dns, WT %d, SHWT %d\n",
ebus_ch, cycle, wt, shwt);

__raw_writeq((cr & ~(0x3f007ull)) | (wt << 12) | shwt,
__raw_writeq((cr & ~0x3f007ull) | (wt << 12) | shwt,
&tx4938_ebuscptr->cr[ebus_ch]);
}

Expand Down

0 comments on commit 0f90c33

Please sign in to comment.