diff options
Diffstat (limited to 'drivers/ide/pci/sis5513.c')
-rw-r--r-- | drivers/ide/pci/sis5513.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index 3e18899de631..b375ee53d66d 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c | |||
@@ -451,7 +451,7 @@ static void config_drive_art_rwp (ide_drive_t *drive) | |||
451 | } | 451 | } |
452 | 452 | ||
453 | /* Set per-drive active and recovery time */ | 453 | /* Set per-drive active and recovery time */ |
454 | static void config_art_rwp_pio (ide_drive_t *drive, u8 pio) | 454 | static void sis_set_pio_mode(ide_drive_t *drive, const u8 pio) |
455 | { | 455 | { |
456 | ide_hwif_t *hwif = HWIF(drive); | 456 | ide_hwif_t *hwif = HWIF(drive); |
457 | struct pci_dev *dev = hwif->pci_dev; | 457 | struct pci_dev *dev = hwif->pci_dev; |
@@ -519,20 +519,14 @@ static void config_art_rwp_pio (ide_drive_t *drive, u8 pio) | |||
519 | } | 519 | } |
520 | } | 520 | } |
521 | 521 | ||
522 | static void sis_set_pio_mode(ide_drive_t *drive, const u8 pio) | 522 | static void sis_set_dma_mode(ide_drive_t *drive, const u8 speed) |
523 | { | ||
524 | config_art_rwp_pio(drive, pio); | ||
525 | (void)ide_config_drive_speed(drive, XFER_PIO_0 + pio); | ||
526 | } | ||
527 | |||
528 | static int sis5513_tune_chipset(ide_drive_t *drive, const u8 speed) | ||
529 | { | 523 | { |
530 | ide_hwif_t *hwif = HWIF(drive); | 524 | ide_hwif_t *hwif = HWIF(drive); |
531 | struct pci_dev *dev = hwif->pci_dev; | 525 | struct pci_dev *dev = hwif->pci_dev; |
532 | u32 regdw; | 526 | u32 regdw; |
533 | u8 drive_pci, reg; | 527 | u8 drive_pci, reg; |
534 | 528 | ||
535 | /* See config_art_rwp_pio for drive pci config registers */ | 529 | /* See sis_set_pio_mode() for drive PCI config registers */ |
536 | drive_pci = 0x40; | 530 | drive_pci = 0x40; |
537 | if (chipset_family >= ATA_133) { | 531 | if (chipset_family >= ATA_133) { |
538 | u32 reg54h; | 532 | u32 reg54h; |
@@ -600,8 +594,6 @@ static int sis5513_tune_chipset(ide_drive_t *drive, const u8 speed) | |||
600 | BUG(); | 594 | BUG(); |
601 | break; | 595 | break; |
602 | } | 596 | } |
603 | |||
604 | return ide_config_drive_speed(drive, speed); | ||
605 | } | 597 | } |
606 | 598 | ||
607 | static int sis5513_config_xfer_rate(ide_drive_t *drive) | 599 | static int sis5513_config_xfer_rate(ide_drive_t *drive) |
@@ -841,7 +833,7 @@ static void __devinit init_hwif_sis5513 (ide_hwif_t *hwif) | |||
841 | hwif->irq = hwif->channel ? 15 : 14; | 833 | hwif->irq = hwif->channel ? 15 : 14; |
842 | 834 | ||
843 | hwif->set_pio_mode = &sis_set_pio_mode; | 835 | hwif->set_pio_mode = &sis_set_pio_mode; |
844 | hwif->speedproc = &sis5513_tune_chipset; | 836 | hwif->set_dma_mode = &sis_set_dma_mode; |
845 | 837 | ||
846 | if (chipset_family >= ATA_133) | 838 | if (chipset_family >= ATA_133) |
847 | hwif->udma_filter = sis5513_ata133_udma_filter; | 839 | hwif->udma_filter = sis5513_ata133_udma_filter; |