diff options
Diffstat (limited to 'drivers/ide/pci/aec62xx.c')
-rw-r--r-- | drivers/ide/pci/aec62xx.c | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index abe0b1bb55ff..099539e8c7a3 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -87,38 +87,12 @@ static u8 pci_bus_clock_list_ultra (u8 speed, struct chipset_bus_clock_list_entr | |||
87 | return chipset_table->ultra_settings; | 87 | return chipset_table->ultra_settings; |
88 | } | 88 | } |
89 | 89 | ||
90 | static u8 aec62xx_ratemask (ide_drive_t *drive) | ||
91 | { | ||
92 | ide_hwif_t *hwif = HWIF(drive); | ||
93 | u8 mode; | ||
94 | |||
95 | switch(hwif->pci_dev->device) { | ||
96 | case PCI_DEVICE_ID_ARTOP_ATP865: | ||
97 | case PCI_DEVICE_ID_ARTOP_ATP865R: | ||
98 | mode = (inb(hwif->channel ? | ||
99 | hwif->mate->dma_status : | ||
100 | hwif->dma_status) & 0x10) ? 4 : 3; | ||
101 | break; | ||
102 | case PCI_DEVICE_ID_ARTOP_ATP860: | ||
103 | case PCI_DEVICE_ID_ARTOP_ATP860R: | ||
104 | mode = 2; | ||
105 | break; | ||
106 | case PCI_DEVICE_ID_ARTOP_ATP850UF: | ||
107 | default: | ||
108 | return 1; | ||
109 | } | ||
110 | |||
111 | if (!eighty_ninty_three(drive)) | ||
112 | mode = min(mode, (u8)1); | ||
113 | return mode; | ||
114 | } | ||
115 | |||
116 | static int aec6210_tune_chipset (ide_drive_t *drive, u8 xferspeed) | 90 | static int aec6210_tune_chipset (ide_drive_t *drive, u8 xferspeed) |
117 | { | 91 | { |
118 | ide_hwif_t *hwif = HWIF(drive); | 92 | ide_hwif_t *hwif = HWIF(drive); |
119 | struct pci_dev *dev = hwif->pci_dev; | 93 | struct pci_dev *dev = hwif->pci_dev; |
120 | u16 d_conf = 0; | 94 | u16 d_conf = 0; |
121 | u8 speed = ide_rate_filter(aec62xx_ratemask(drive), xferspeed); | 95 | u8 speed = ide_rate_filter(drive, xferspeed); |
122 | u8 ultra = 0, ultra_conf = 0; | 96 | u8 ultra = 0, ultra_conf = 0; |
123 | u8 tmp0 = 0, tmp1 = 0, tmp2 = 0; | 97 | u8 tmp0 = 0, tmp1 = 0, tmp2 = 0; |
124 | unsigned long flags; | 98 | unsigned long flags; |
@@ -145,7 +119,7 @@ static int aec6260_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
145 | { | 119 | { |
146 | ide_hwif_t *hwif = HWIF(drive); | 120 | ide_hwif_t *hwif = HWIF(drive); |
147 | struct pci_dev *dev = hwif->pci_dev; | 121 | struct pci_dev *dev = hwif->pci_dev; |
148 | u8 speed = ide_rate_filter(aec62xx_ratemask(drive), xferspeed); | 122 | u8 speed = ide_rate_filter(drive, xferspeed); |
149 | u8 unit = (drive->select.b.unit & 0x01); | 123 | u8 unit = (drive->select.b.unit & 0x01); |
150 | u8 tmp1 = 0, tmp2 = 0; | 124 | u8 tmp1 = 0, tmp2 = 0; |
151 | u8 ultra = 0, drive_conf = 0, ultra_conf = 0; | 125 | u8 ultra = 0, drive_conf = 0, ultra_conf = 0; |
@@ -183,7 +157,7 @@ static int aec62xx_tune_chipset (ide_drive_t *drive, u8 speed) | |||
183 | 157 | ||
184 | static int config_chipset_for_dma (ide_drive_t *drive) | 158 | static int config_chipset_for_dma (ide_drive_t *drive) |
185 | { | 159 | { |
186 | u8 speed = ide_dma_speed(drive, aec62xx_ratemask(drive)); | 160 | u8 speed = ide_max_dma_mode(drive); |
187 | 161 | ||
188 | if (!(speed)) | 162 | if (!(speed)) |
189 | return 0; | 163 | return 0; |