diff options
Diffstat (limited to 'drivers/ide/pci/pdc202xx_old.c')
-rw-r--r-- | drivers/ide/pci/pdc202xx_old.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index d7a38067fb34..207a6191fac7 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -101,35 +101,12 @@ static const char *pdc_quirk_drives[] = { | |||
101 | #define MC1 0x02 /* DMA"C" timing */ | 101 | #define MC1 0x02 /* DMA"C" timing */ |
102 | #define MC0 0x01 /* DMA"C" timing */ | 102 | #define MC0 0x01 /* DMA"C" timing */ |
103 | 103 | ||
104 | static u8 pdc202xx_ratemask (ide_drive_t *drive) | ||
105 | { | ||
106 | u8 mode; | ||
107 | |||
108 | switch(HWIF(drive)->pci_dev->device) { | ||
109 | case PCI_DEVICE_ID_PROMISE_20267: | ||
110 | case PCI_DEVICE_ID_PROMISE_20265: | ||
111 | mode = 3; | ||
112 | break; | ||
113 | case PCI_DEVICE_ID_PROMISE_20263: | ||
114 | case PCI_DEVICE_ID_PROMISE_20262: | ||
115 | mode = 2; | ||
116 | break; | ||
117 | case PCI_DEVICE_ID_PROMISE_20246: | ||
118 | return 1; | ||
119 | default: | ||
120 | return 0; | ||
121 | } | ||
122 | if (!eighty_ninty_three(drive)) | ||
123 | mode = min(mode, (u8)1); | ||
124 | return mode; | ||
125 | } | ||
126 | |||
127 | static int pdc202xx_tune_chipset (ide_drive_t *drive, u8 xferspeed) | 104 | static int pdc202xx_tune_chipset (ide_drive_t *drive, u8 xferspeed) |
128 | { | 105 | { |
129 | ide_hwif_t *hwif = HWIF(drive); | 106 | ide_hwif_t *hwif = HWIF(drive); |
130 | struct pci_dev *dev = hwif->pci_dev; | 107 | struct pci_dev *dev = hwif->pci_dev; |
131 | u8 drive_pci = 0x60 + (drive->dn << 2); | 108 | u8 drive_pci = 0x60 + (drive->dn << 2); |
132 | u8 speed = ide_rate_filter(pdc202xx_ratemask(drive), xferspeed); | 109 | u8 speed = ide_rate_filter(drive, xferspeed); |
133 | 110 | ||
134 | u32 drive_conf; | 111 | u32 drive_conf; |
135 | u8 AP, BP, CP, DP; | 112 | u8 AP, BP, CP, DP; |
@@ -308,7 +285,7 @@ chipset_is_set: | |||
308 | if (drive->media == ide_disk) /* PREFETCH_EN */ | 285 | if (drive->media == ide_disk) /* PREFETCH_EN */ |
309 | pci_write_config_byte(dev, (drive_pci), AP|PREFETCH_EN); | 286 | pci_write_config_byte(dev, (drive_pci), AP|PREFETCH_EN); |
310 | 287 | ||
311 | speed = ide_dma_speed(drive, pdc202xx_ratemask(drive)); | 288 | speed = ide_max_dma_mode(drive); |
312 | 289 | ||
313 | if (!(speed)) { | 290 | if (!(speed)) { |
314 | /* restore original pci-config space */ | 291 | /* restore original pci-config space */ |