diff options
author | David Daney <ddaney@caviumnetworks.com> | 2010-10-07 19:03:51 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-10-29 14:08:41 -0400 |
commit | 1fa25ab2caf79b99094c3da6e09f20a35e8f01f8 (patch) | |
tree | e476c708e2bb7e9de70b1a7aeebef23ce6bdeef9 /drivers/ata | |
parent | 4b8bca7028fbed182c78b4f86769e365f2075d8e (diff) |
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: 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>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_octeon_cf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c index 06ddd91ffeda..74b829817891 100644 --- a/drivers/ata/pata_octeon_cf.c +++ b/drivers/ata/pata_octeon_cf.c | |||
@@ -60,7 +60,7 @@ static unsigned int ns_to_tim_reg(unsigned int tim_mult, unsigned int nsecs) | |||
60 | * Compute # of eclock periods to get desired duration in | 60 | * Compute # of eclock periods to get desired duration in |
61 | * nanoseconds. | 61 | * nanoseconds. |
62 | */ | 62 | */ |
63 | val = DIV_ROUND_UP(nsecs * (octeon_get_clock_rate() / 1000000), | 63 | val = DIV_ROUND_UP(nsecs * (octeon_get_io_clock_rate() / 1000000), |
64 | 1000 * tim_mult); | 64 | 1000 * tim_mult); |
65 | 65 | ||
66 | return val; | 66 | return val; |