Skip to content

Commit

Permalink
ATA: pata_octeon_cf: Use I/O clock rate for timing calculations.
Browse files Browse the repository at this point in the history
The creation of the I/O clock domain requires some adjustments.  Since the
CF bus timing logic is clocked by the I/O clock, use its rate for delay
calculations.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-ide@vger.kernel.org
Patchwork: http://patchwork.linux-mips.org/patch/1660/
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
David Daney authored and ralfbaechle committed Oct 29, 2010
1 parent 4b8bca7 commit 1fa25ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/pata_octeon_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static unsigned int ns_to_tim_reg(unsigned int tim_mult, unsigned int nsecs)
* Compute # of eclock periods to get desired duration in
* nanoseconds.
*/
val = DIV_ROUND_UP(nsecs * (octeon_get_clock_rate() / 1000000),
val = DIV_ROUND_UP(nsecs * (octeon_get_io_clock_rate() / 1000000),
1000 * tim_mult);

return val;
Expand Down

0 comments on commit 1fa25ab

Please sign in to comment.