diff options
Diffstat (limited to 'drivers/ide/pci/hpt366.c')
-rw-r--r-- | drivers/ide/pci/hpt366.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 0e7d3b60d43c..8812a9bb032f 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -600,7 +600,7 @@ static u32 get_speed_setting(u8 speed, struct hpt_info *info) | |||
600 | return (*info->settings)[i]; | 600 | return (*info->settings)[i]; |
601 | } | 601 | } |
602 | 602 | ||
603 | static int hpt36x_tune_chipset(ide_drive_t *drive, const u8 speed) | 603 | static void hpt36x_set_mode(ide_drive_t *drive, const u8 speed) |
604 | { | 604 | { |
605 | ide_hwif_t *hwif = HWIF(drive); | 605 | ide_hwif_t *hwif = HWIF(drive); |
606 | struct pci_dev *dev = hwif->pci_dev; | 606 | struct pci_dev *dev = hwif->pci_dev; |
@@ -623,11 +623,9 @@ static int hpt36x_tune_chipset(ide_drive_t *drive, const u8 speed) | |||
623 | new_itr &= ~0xc0000000; | 623 | new_itr &= ~0xc0000000; |
624 | 624 | ||
625 | pci_write_config_dword(dev, itr_addr, new_itr); | 625 | pci_write_config_dword(dev, itr_addr, new_itr); |
626 | |||
627 | return ide_config_drive_speed(drive, speed); | ||
628 | } | 626 | } |
629 | 627 | ||
630 | static int hpt37x_tune_chipset(ide_drive_t *drive, const u8 speed) | 628 | static void hpt37x_set_mode(ide_drive_t *drive, const u8 speed) |
631 | { | 629 | { |
632 | ide_hwif_t *hwif = HWIF(drive); | 630 | ide_hwif_t *hwif = HWIF(drive); |
633 | struct pci_dev *dev = hwif->pci_dev; | 631 | struct pci_dev *dev = hwif->pci_dev; |
@@ -647,24 +645,22 @@ static int hpt37x_tune_chipset(ide_drive_t *drive, const u8 speed) | |||
647 | if (speed < XFER_MW_DMA_0) | 645 | if (speed < XFER_MW_DMA_0) |
648 | new_itr &= ~0x80000000; /* Disable on-chip PIO FIFO/buffer */ | 646 | new_itr &= ~0x80000000; /* Disable on-chip PIO FIFO/buffer */ |
649 | pci_write_config_dword(dev, itr_addr, new_itr); | 647 | pci_write_config_dword(dev, itr_addr, new_itr); |
650 | |||
651 | return ide_config_drive_speed(drive, speed); | ||
652 | } | 648 | } |
653 | 649 | ||
654 | static int hpt3xx_tune_chipset(ide_drive_t *drive, u8 speed) | 650 | static void hpt3xx_set_mode(ide_drive_t *drive, const u8 speed) |
655 | { | 651 | { |
656 | ide_hwif_t *hwif = HWIF(drive); | 652 | ide_hwif_t *hwif = HWIF(drive); |
657 | struct hpt_info *info = pci_get_drvdata(hwif->pci_dev); | 653 | struct hpt_info *info = pci_get_drvdata(hwif->pci_dev); |
658 | 654 | ||
659 | if (info->chip_type >= HPT370) | 655 | if (info->chip_type >= HPT370) |
660 | return hpt37x_tune_chipset(drive, speed); | 656 | hpt37x_set_mode(drive, speed); |
661 | else /* hpt368: hpt_minimum_revision(dev, 2) */ | 657 | else /* hpt368: hpt_minimum_revision(dev, 2) */ |
662 | return hpt36x_tune_chipset(drive, speed); | 658 | hpt36x_set_mode(drive, speed); |
663 | } | 659 | } |
664 | 660 | ||
665 | static void hpt3xx_set_pio_mode(ide_drive_t *drive, const u8 pio) | 661 | static void hpt3xx_set_pio_mode(ide_drive_t *drive, const u8 pio) |
666 | { | 662 | { |
667 | (void) hpt3xx_tune_chipset (drive, XFER_PIO_0 + pio); | 663 | hpt3xx_set_mode(drive, XFER_PIO_0 + pio); |
668 | } | 664 | } |
669 | 665 | ||
670 | static int hpt3xx_quirkproc(ide_drive_t *drive) | 666 | static int hpt3xx_quirkproc(ide_drive_t *drive) |
@@ -1257,7 +1253,7 @@ static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) | |||
1257 | hwif->select_data = hwif->channel ? 0x54 : 0x50; | 1253 | hwif->select_data = hwif->channel ? 0x54 : 0x50; |
1258 | 1254 | ||
1259 | hwif->set_pio_mode = &hpt3xx_set_pio_mode; | 1255 | hwif->set_pio_mode = &hpt3xx_set_pio_mode; |
1260 | hwif->speedproc = &hpt3xx_tune_chipset; | 1256 | hwif->set_dma_mode = &hpt3xx_set_mode; |
1261 | hwif->quirkproc = &hpt3xx_quirkproc; | 1257 | hwif->quirkproc = &hpt3xx_quirkproc; |
1262 | hwif->intrproc = &hpt3xx_intrproc; | 1258 | hwif->intrproc = &hpt3xx_intrproc; |
1263 | hwif->maskproc = &hpt3xx_maskproc; | 1259 | hwif->maskproc = &hpt3xx_maskproc; |