aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/sis5513.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-11 17:54:02 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-11 17:54:02 -0400
commit8f4dd2e42637fd61a6366d2cace69091926eaa15 (patch)
tree38dc8e475afc27c575ff7f3701e57d5c9e3a9be9 /drivers/ide/pci/sis5513.c
parent0d3be723cb6432e384267d0fe83ee0bae5e17846 (diff)
ide: use only ->set_pio_mode method for programming PIO modes (take 2)
Use ->set_pio_mode method to program PIO modes in ide_set_xfer_rate() (the only place which used ->speedproc to program PIO modes) and remove handling of PIO modes from all ->speedproc implementations. v2: * Fix pmac_ide_tune_chipset() comment. There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/sis5513.c')
-rw-r--r--drivers/ide/pci/sis5513.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index 3a8cb1468a76..3e18899de631 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -519,15 +519,10 @@ static void config_art_rwp_pio (ide_drive_t *drive, u8 pio)
519 } 519 }
520} 520}
521 521
522static int sis5513_tune_drive(ide_drive_t *drive, const u8 pio)
523{
524 config_art_rwp_pio(drive, pio);
525 return ide_config_drive_speed(drive, XFER_PIO_0 + pio);
526}
527
528static void sis_set_pio_mode(ide_drive_t *drive, const u8 pio) 522static void sis_set_pio_mode(ide_drive_t *drive, const u8 pio)
529{ 523{
530 (void)sis5513_tune_drive(drive, pio); 524 config_art_rwp_pio(drive, pio);
525 (void)ide_config_drive_speed(drive, XFER_PIO_0 + pio);
531} 526}
532 527
533static int sis5513_tune_chipset(ide_drive_t *drive, const u8 speed) 528static int sis5513_tune_chipset(ide_drive_t *drive, const u8 speed)
@@ -537,9 +532,6 @@ static int sis5513_tune_chipset(ide_drive_t *drive, const u8 speed)
537 u32 regdw; 532 u32 regdw;
538 u8 drive_pci, reg; 533 u8 drive_pci, reg;
539 534
540 if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4)
541 return sis5513_tune_drive(drive, speed - XFER_PIO_0);
542
543 /* See config_art_rwp_pio for drive pci config registers */ 535 /* See config_art_rwp_pio for drive pci config registers */
544 drive_pci = 0x40; 536 drive_pci = 0x40;
545 if (chipset_family >= ATA_133) { 537 if (chipset_family >= ATA_133) {