libata: implement ata_timing_cycle2mode() and use it in libata-acpi and pata_acpi
authorTejun Heo <htejun@gmail.com>
Tue, 18 Dec 2007 07:33:05 +0000 (16:33 +0900)
committerJeff Garzik <jeff@garzik.org>
Wed, 23 Jan 2008 10:24:12 +0000 (05:24 -0500)
commita0f79b929acaba10d4780acd2543eff20bf4b5b0
treee637c1d9388a3991cd71c5be339c2ead59c460a2
parent5df91a25df08d85700fef5fd59bb1873273e5ef5
libata: implement ata_timing_cycle2mode() and use it in libata-acpi and pata_acpi

libata-acpi is using separate timing tables for transfer modes
although libata-core has the complete ata_timing table.  Implement
ata_timing_cycle2mode() to look for matching mode given transfer type
and cycle duration and use it in libata-acpi and pata_acpi to replace
private timing tables.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-acpi.c
drivers/ata/libata-core.c
drivers/ata/pata_acpi.c
include/linux/libata.h