diff options
author | Tejun Heo <htejun@gmail.com> | 2007-12-18 02:33:03 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-01-23 05:24:12 -0500 |
commit | 7c77fa4d51b1480bcec2e898c94d6912fe063c16 (patch) | |
tree | d7d18fb22c8df2425878d02f4b415c06efa56457 /include | |
parent | 9cde9ed151e170f2e2a530f7ec0032dfbe9f443b (diff) |
libata: separate out ata_acpi_gtm_xfermask() from pacpi_discover_modes()
Finding out matching transfer mode from ACPI GTM values is useful for
other purposes too. Separate out the function and timing tables from
pata_acpi::pacpi_discover_modes().
Other than checking shared-configuration bit after doing
ata_acpi_gtm() in pacpi_discover_modes() which should be safe, this
patch doesn't introduce any behavior change.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index bdb7c6e13993..8022e5b2224d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -961,6 +961,10 @@ enum { | |||
961 | 961 | ||
962 | /* libata-acpi.c */ | 962 | /* libata-acpi.c */ |
963 | #ifdef CONFIG_ATA_ACPI | 963 | #ifdef CONFIG_ATA_ACPI |
964 | extern const unsigned int ata_acpi_pio_cycle[7]; | ||
965 | extern const unsigned int ata_acpi_mwdma_cycle[5]; | ||
966 | extern const unsigned int ata_acpi_udma_cycle[7]; | ||
967 | |||
964 | static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap) | 968 | static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap) |
965 | { | 969 | { |
966 | if (ap->pflags & ATA_PFLAG_INIT_GTM_VALID) | 970 | if (ap->pflags & ATA_PFLAG_INIT_GTM_VALID) |
@@ -970,12 +974,33 @@ static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap) | |||
970 | extern int ata_acpi_cbl_80wire(struct ata_port *ap); | 974 | extern int ata_acpi_cbl_80wire(struct ata_port *ap); |
971 | int ata_acpi_stm(struct ata_port *ap, const struct ata_acpi_gtm *stm); | 975 | int ata_acpi_stm(struct ata_port *ap, const struct ata_acpi_gtm *stm); |
972 | int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *stm); | 976 | int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *stm); |
977 | unsigned long ata_acpi_gtm_xfermask(struct ata_device *dev, | ||
978 | const struct ata_acpi_gtm *gtm); | ||
979 | |||
973 | #else | 980 | #else |
974 | static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap) | 981 | static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap) |
975 | { | 982 | { |
976 | return NULL; | 983 | return NULL; |
977 | } | 984 | } |
978 | static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; } | 985 | static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; } |
986 | |||
987 | static inline int ata_acpi_stm(const struct ata_port *ap, | ||
988 | struct ata_acpi_gtm *stm) | ||
989 | { | ||
990 | return -ENOSYS; | ||
991 | } | ||
992 | |||
993 | static inline int ata_acpi_gtm(const struct ata_port *ap, | ||
994 | struct ata_acpi_gtm *stm) | ||
995 | { | ||
996 | return -ENOSYS; | ||
997 | } | ||
998 | |||
999 | static inline unsigned int ata_acpi_gtm_xfermask(struct ata_device *dev, | ||
1000 | const struct ata_acpi_gtm *gtm) | ||
1001 | { | ||
1002 | return 0; | ||
1003 | } | ||
979 | #endif | 1004 | #endif |
980 | 1005 | ||
981 | #ifdef CONFIG_PCI | 1006 | #ifdef CONFIG_PCI |