diff options
Diffstat (limited to 'drivers/ide/pci/aec62xx.c')
-rw-r--r-- | drivers/ide/pci/aec62xx.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index 74432830abf7..0d5f62c5dfae 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -87,12 +87,11 @@ 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 int aec6210_tune_chipset (ide_drive_t *drive, u8 xferspeed) | 90 | static int aec6210_tune_chipset(ide_drive_t *drive, const u8 speed) |
91 | { | 91 | { |
92 | ide_hwif_t *hwif = HWIF(drive); | 92 | ide_hwif_t *hwif = HWIF(drive); |
93 | struct pci_dev *dev = hwif->pci_dev; | 93 | struct pci_dev *dev = hwif->pci_dev; |
94 | u16 d_conf = 0; | 94 | u16 d_conf = 0; |
95 | u8 speed = ide_rate_filter(drive, xferspeed); | ||
96 | u8 ultra = 0, ultra_conf = 0; | 95 | u8 ultra = 0, ultra_conf = 0; |
97 | u8 tmp0 = 0, tmp1 = 0, tmp2 = 0; | 96 | u8 tmp0 = 0, tmp1 = 0, tmp2 = 0; |
98 | unsigned long flags; | 97 | unsigned long flags; |
@@ -115,11 +114,10 @@ static int aec6210_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
115 | return(ide_config_drive_speed(drive, speed)); | 114 | return(ide_config_drive_speed(drive, speed)); |
116 | } | 115 | } |
117 | 116 | ||
118 | static int aec6260_tune_chipset (ide_drive_t *drive, u8 xferspeed) | 117 | static int aec6260_tune_chipset(ide_drive_t *drive, const u8 speed) |
119 | { | 118 | { |
120 | ide_hwif_t *hwif = HWIF(drive); | 119 | ide_hwif_t *hwif = HWIF(drive); |
121 | struct pci_dev *dev = hwif->pci_dev; | 120 | struct pci_dev *dev = hwif->pci_dev; |
122 | u8 speed = ide_rate_filter(drive, xferspeed); | ||
123 | u8 unit = (drive->select.b.unit & 0x01); | 121 | u8 unit = (drive->select.b.unit & 0x01); |
124 | u8 tmp1 = 0, tmp2 = 0; | 122 | u8 tmp1 = 0, tmp2 = 0; |
125 | u8 ultra = 0, drive_conf = 0, ultra_conf = 0; | 123 | u8 ultra = 0, drive_conf = 0, ultra_conf = 0; |
@@ -140,9 +138,8 @@ static int aec6260_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
140 | return(ide_config_drive_speed(drive, speed)); | 138 | return(ide_config_drive_speed(drive, speed)); |
141 | } | 139 | } |
142 | 140 | ||
143 | static void aec62xx_tune_drive (ide_drive_t *drive, u8 pio) | 141 | static void aec_set_pio_mode(ide_drive_t *drive, const u8 pio) |
144 | { | 142 | { |
145 | pio = ide_get_best_pio_mode(drive, pio, 4); | ||
146 | (void) HWIF(drive)->speedproc(drive, pio + XFER_PIO_0); | 143 | (void) HWIF(drive)->speedproc(drive, pio + XFER_PIO_0); |
147 | } | 144 | } |
148 | 145 | ||
@@ -152,7 +149,7 @@ static int aec62xx_config_drive_xfer_rate (ide_drive_t *drive) | |||
152 | return 0; | 149 | return 0; |
153 | 150 | ||
154 | if (ide_use_fast_pio(drive)) | 151 | if (ide_use_fast_pio(drive)) |
155 | aec62xx_tune_drive(drive, 255); | 152 | ide_set_max_pio(drive); |
156 | 153 | ||
157 | return -1; | 154 | return -1; |
158 | } | 155 | } |
@@ -203,7 +200,7 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif) | |||
203 | u8 reg54 = 0, mask = hwif->channel ? 0xf0 : 0x0f; | 200 | u8 reg54 = 0, mask = hwif->channel ? 0xf0 : 0x0f; |
204 | unsigned long flags; | 201 | unsigned long flags; |
205 | 202 | ||
206 | hwif->tuneproc = &aec62xx_tune_drive; | 203 | hwif->set_pio_mode = &aec_set_pio_mode; |
207 | 204 | ||
208 | if (dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) { | 205 | if (dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) { |
209 | if(hwif->mate) | 206 | if(hwif->mate) |