Commit Graph

5 Commits

Author SHA1 Message Date
Tejun Heo
a0f79b929a 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>
2008-01-23 05:24:12 -05:00
Tejun Heo
7c77fa4d51 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>
2008-01-23 05:24:12 -05:00
Jeff Garzik
b447916e2b [libata] fix 'if(' and similar areas that lack whitespace
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-29 06:15:27 -04:00
Tejun Heo
8e2840e06d pata_acpi: fix build breakage if !CONFIG_PM
There are configurations where CONFIG_ACPI but !CONFIG_PM.  In this
case, pata_acpi can be selected but won't build.  Fix it.

Reported by Avuton Olrich.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Avuton Olrich <avuton@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-17 20:48:30 -04:00
Alan Cox
025621f9a7 pata_acpi: ACPI driver support
On a cable there may be
	eighty wires or perhaps forty
	and we learn about its type
	In the world of ACPI

	So we call the GTM
	And we find the the timing rate
	And we look through it to see
	If eighty wire it must be

	Timing lives in ACPI routines
	ACPI routines, ACPI routines
	Timing lives in ACPI routines
	ACPI routes ACPI routines

	And the drivers last you see
	Picking up unknown pci ids
	and the code begins to work

	Timing lives in ACPI routines
	ACPI routines, ACPI routines
	Timing lives in ACPI routines
	ACPI routes ACPI routines

	[Full speed ahead, Mr Hacker, full speed ahead]
	 Full speed over here sir!
	 Checking Cable, checking cable
	 Aye aye, 80 wire,
	 Heaven heaven]

	If we use ACPI (ACPI)
	Every box (every box) has all we need (has all we need)
	Cable type (cable type) and mode timing (mode timing)
	In our ATA (in our ATA) subroutines (subroutines, ha ha)

	Timing lives in ACPI routines
	ACPI routines, ACPI routines
	Timing lives in ACPI routines
	ACPI routes ACPI routines
	Timing lives in ACPI routines
	ACPI routines, ACPI routines
	Timing lives in ACPI routines
	ACPI routes ACPI routines

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-12 14:55:46 -04:00