aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-12-18 02:33:03 -0500
committerJeff Garzik <jeff@garzik.org>2008-01-23 05:24:12 -0500
commit7c77fa4d51b1480bcec2e898c94d6912fe063c16 (patch)
treed7d18fb22c8df2425878d02f4b415c06efa56457 /include/linux
parent9cde9ed151e170f2e2a530f7ec0032dfbe9f443b (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/linux')
-rw-r--r--include/linux/libata.h25
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
964extern const unsigned int ata_acpi_pio_cycle[7];
965extern const unsigned int ata_acpi_mwdma_cycle[5];
966extern const unsigned int ata_acpi_udma_cycle[7];
967
964static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap) 968static 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)
970extern int ata_acpi_cbl_80wire(struct ata_port *ap); 974extern int ata_acpi_cbl_80wire(struct ata_port *ap);
971int ata_acpi_stm(struct ata_port *ap, const struct ata_acpi_gtm *stm); 975int ata_acpi_stm(struct ata_port *ap, const struct ata_acpi_gtm *stm);
972int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *stm); 976int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *stm);
977unsigned long ata_acpi_gtm_xfermask(struct ata_device *dev,
978 const struct ata_acpi_gtm *gtm);
979
973#else 980#else
974static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap) 981static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap)
975{ 982{
976 return NULL; 983 return NULL;
977} 984}
978static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; } 985static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; }
986
987static inline int ata_acpi_stm(const struct ata_port *ap,
988 struct ata_acpi_gtm *stm)
989{
990 return -ENOSYS;
991}
992
993static inline int ata_acpi_gtm(const struct ata_port *ap,
994 struct ata_acpi_gtm *stm)
995{
996 return -ENOSYS;
997}
998
999static 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