ide: IORDY handling fixes

Add ide_pio_need_iordy() helper and convert host drivers to use it.

This fixes it8172, it8213, pdc202xx_old, piix, slc90e66 and siimage
host drivers to handle IORDY correctly.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
Bartlomiej Zolnierkiewicz
2009-06-15 18:52:53 +02:00
parent 6dae44f9a5
commit c9ef59ff01
10 changed files with 22 additions and 16 deletions

View File

@ -185,8 +185,7 @@ static void at91_ide_set_pio_mode(ide_drive_t *drive, const u8 pio)
timing = ide_timing_find_mode(XFER_PIO_0 + pio);
BUG_ON(!timing);
if ((pio > 2 || ata_id_has_iordy(drive->id)) &&
!(ata_id_is_cfa(drive->id) && pio > 4))
if (ide_pio_need_iordy(drive, pio))
use_iordy = 1;
apply_timings(chipselect, pio, timing, use_iordy);