Skip to content
Snippets Groups Projects
Commit 1fa25ab2 authored by David Daney's avatar David Daney Committed by Ralf Baechle
Browse files

ATA: pata_octeon_cf: Use I/O clock rate for timing calculations.


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: default avatarDavid 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: default avatarJeff Garzik <jgarzik@redhat.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 4b8bca70
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment