diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-02-16 20:40:24 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-02-16 20:40:24 -0500 |
commit | ac4a306537b97fcae5da96bedcf521f6dfdf9753 (patch) | |
tree | bdbb4d111063e89abf765cc58bfbe700424aafbb /drivers/ide/pci/sis5513.c | |
parent | 74594fd1454e3588564311f8cd7260edf85204cb (diff) |
sis5513: sis5513_config_xfer_rate() cleanup
* remove bogus comment for sis5513_config_xfer_rate()
* there is no need to call config_drive_art_rwp() because
it is called by config_art_rwp_pio()
* remove needless wrapper
* remove stale "TODO" comment
(IDE core should provide generic tuning code)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/sis5513.c')
-rw-r--r-- | drivers/ide/pci/sis5513.c | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index 1afff659ab55..e71552e64ae4 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c | |||
@@ -667,11 +667,13 @@ static int config_chipset_for_dma (ide_drive_t *drive) | |||
667 | return ide_dma_enable(drive); | 667 | return ide_dma_enable(drive); |
668 | } | 668 | } |
669 | 669 | ||
670 | static int sis5513_config_drive_xfer_rate (ide_drive_t *drive) | 670 | static int sis5513_config_xfer_rate(ide_drive_t *drive) |
671 | { | 671 | { |
672 | ide_hwif_t *hwif = HWIF(drive); | 672 | ide_hwif_t *hwif = HWIF(drive); |
673 | struct hd_driveid *id = drive->id; | 673 | struct hd_driveid *id = drive->id; |
674 | 674 | ||
675 | config_art_rwp_pio(drive, 5); | ||
676 | |||
675 | drive->init_speed = 0; | 677 | drive->init_speed = 0; |
676 | 678 | ||
677 | if (id && (id->capability & 1) && drive->autodma) { | 679 | if (id && (id->capability & 1) && drive->autodma) { |
@@ -692,43 +694,6 @@ fast_ata_pio: | |||
692 | return 0; | 694 | return 0; |
693 | } | 695 | } |
694 | 696 | ||
695 | /* initiates/aborts (U)DMA read/write operations on a drive. */ | ||
696 | static int sis5513_config_xfer_rate (ide_drive_t *drive) | ||
697 | { | ||
698 | config_drive_art_rwp(drive); | ||
699 | config_art_rwp_pio(drive, 5); | ||
700 | return sis5513_config_drive_xfer_rate(drive); | ||
701 | } | ||
702 | |||
703 | /* | ||
704 | Future simpler config_xfer_rate : | ||
705 | When ide_find_best_mode is made bad-drive aware | ||
706 | - remove config_drive_xfer_rate and config_chipset_for_dma, | ||
707 | - replace config_xfer_rate with the following | ||
708 | |||
709 | static int sis5513_config_xfer_rate (ide_drive_t *drive) | ||
710 | { | ||
711 | u16 w80 = HWIF(drive)->udma_four; | ||
712 | u16 speed; | ||
713 | |||
714 | config_drive_art_rwp(drive); | ||
715 | config_art_rwp_pio(drive, 5); | ||
716 | |||
717 | speed = ide_find_best_mode(drive, | ||
718 | XFER_PIO | XFER_EPIO | XFER_SWDMA | XFER_MWDMA | | ||
719 | (chipset_family >= ATA_33 ? XFER_UDMA : 0) | | ||
720 | (w80 && chipset_family >= ATA_66 ? XFER_UDMA_66 : 0) | | ||
721 | (w80 && chipset_family >= ATA_100a ? XFER_UDMA_100 : 0) | | ||
722 | (w80 && chipset_family >= ATA_133a ? XFER_UDMA_133 : 0)); | ||
723 | |||
724 | sis5513_tune_chipset(drive, speed); | ||
725 | |||
726 | if (drive->autodma && (speed & XFER_MODE) != XFER_PIO) | ||
727 | return HWIF(drive)->ide_dma_on(drive); | ||
728 | return HWIF(drive)->ide_dma_off_quietly(drive); | ||
729 | } | ||
730 | */ | ||
731 | |||
732 | /* Chip detection and general config */ | 697 | /* Chip detection and general config */ |
733 | static unsigned int __devinit init_chipset_sis5513 (struct pci_dev *dev, const char *name) | 698 | static unsigned int __devinit init_chipset_sis5513 (struct pci_dev *dev, const char *name) |
734 | { | 699 | { |