diff options
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r-- | drivers/ide/pci/cmd64x.c | 15 | ||||
-rw-r--r-- | drivers/ide/pci/cs5530.c | 8 | ||||
-rw-r--r-- | drivers/ide/pci/sc1200.c | 8 | ||||
-rw-r--r-- | drivers/ide/pci/scc_pata.c | 22 | ||||
-rw-r--r-- | drivers/ide/pci/siimage.c | 24 | ||||
-rw-r--r-- | drivers/ide/pci/sl82c105.c | 17 |
6 files changed, 8 insertions, 86 deletions
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index 61ea96b5555c..7c57dc696f52 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c | |||
@@ -352,22 +352,9 @@ static int cmd64x_tune_chipset (ide_drive_t *drive, u8 speed) | |||
352 | return ide_config_drive_speed(drive, speed); | 352 | return ide_config_drive_speed(drive, speed); |
353 | } | 353 | } |
354 | 354 | ||
355 | static int config_chipset_for_dma (ide_drive_t *drive) | ||
356 | { | ||
357 | u8 speed = ide_max_dma_mode(drive); | ||
358 | |||
359 | if (!speed) | ||
360 | return 0; | ||
361 | |||
362 | if (cmd64x_tune_chipset(drive, speed)) | ||
363 | return 0; | ||
364 | |||
365 | return ide_dma_enable(drive); | ||
366 | } | ||
367 | |||
368 | static int cmd64x_config_drive_for_dma (ide_drive_t *drive) | 355 | static int cmd64x_config_drive_for_dma (ide_drive_t *drive) |
369 | { | 356 | { |
370 | if (ide_use_dma(drive) && config_chipset_for_dma(drive)) | 357 | if (ide_tune_dma(drive)) |
371 | return 0; | 358 | return 0; |
372 | 359 | ||
373 | if (ide_use_fast_pio(drive)) | 360 | if (ide_use_fast_pio(drive)) |
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c index aacb79b4a9cd..1eec1f308d16 100644 --- a/drivers/ide/pci/cs5530.c +++ b/drivers/ide/pci/cs5530.c | |||
@@ -137,12 +137,8 @@ out: | |||
137 | 137 | ||
138 | static int cs5530_config_dma(ide_drive_t *drive) | 138 | static int cs5530_config_dma(ide_drive_t *drive) |
139 | { | 139 | { |
140 | if (ide_use_dma(drive)) { | 140 | if (ide_tune_dma(drive)) |
141 | u8 mode = ide_max_dma_mode(drive); | 141 | return 0; |
142 | |||
143 | if (mode && drive->hwif->speedproc(drive, mode) == 0) | ||
144 | return 0; | ||
145 | } | ||
146 | 142 | ||
147 | return 1; | 143 | return 1; |
148 | } | 144 | } |
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index c989fd90f377..523363c93794 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -240,12 +240,8 @@ static int sc1200_tune_chipset(ide_drive_t *drive, u8 mode) | |||
240 | */ | 240 | */ |
241 | static int sc1200_config_dma (ide_drive_t *drive) | 241 | static int sc1200_config_dma (ide_drive_t *drive) |
242 | { | 242 | { |
243 | if (ide_use_dma(drive)) { | 243 | if (ide_tune_dma(drive)) |
244 | u8 mode = ide_max_dma_mode(drive); | 244 | return 0; |
245 | |||
246 | if (mode && drive->hwif->speedproc(drive, mode) == 0) | ||
247 | return 0; | ||
248 | } | ||
249 | 245 | ||
250 | return 1; | 246 | return 1; |
251 | } | 247 | } |
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index cbf936325355..55bc0a32e34f 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c | |||
@@ -322,26 +322,6 @@ static int scc_tune_chipset(ide_drive_t *drive, byte xferspeed) | |||
322 | } | 322 | } |
323 | 323 | ||
324 | /** | 324 | /** |
325 | * scc_config_chipset_for_dma - configure for DMA | ||
326 | * @drive: drive to configure | ||
327 | * | ||
328 | * Called by scc_config_drive_for_dma(). | ||
329 | */ | ||
330 | |||
331 | static int scc_config_chipset_for_dma(ide_drive_t *drive) | ||
332 | { | ||
333 | u8 speed = ide_max_dma_mode(drive); | ||
334 | |||
335 | if (!speed) | ||
336 | return 0; | ||
337 | |||
338 | if (scc_tune_chipset(drive, speed)) | ||
339 | return 0; | ||
340 | |||
341 | return ide_dma_enable(drive); | ||
342 | } | ||
343 | |||
344 | /** | ||
345 | * scc_configure_drive_for_dma - set up for DMA transfers | 325 | * scc_configure_drive_for_dma - set up for DMA transfers |
346 | * @drive: drive we are going to set up | 326 | * @drive: drive we are going to set up |
347 | * | 327 | * |
@@ -354,7 +334,7 @@ static int scc_config_chipset_for_dma(ide_drive_t *drive) | |||
354 | 334 | ||
355 | static int scc_config_drive_for_dma(ide_drive_t *drive) | 335 | static int scc_config_drive_for_dma(ide_drive_t *drive) |
356 | { | 336 | { |
357 | if (ide_use_dma(drive) && scc_config_chipset_for_dma(drive)) | 337 | if (ide_tune_dma(drive)) |
358 | return 0; | 338 | return 0; |
359 | 339 | ||
360 | if (ide_use_fast_pio(drive)) | 340 | if (ide_use_fast_pio(drive)) |
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index d09e74c2996e..1a4444e7226a 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -375,28 +375,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed) | |||
375 | } | 375 | } |
376 | 376 | ||
377 | /** | 377 | /** |
378 | * config_chipset_for_dma - configure for DMA | ||
379 | * @drive: drive to configure | ||
380 | * | ||
381 | * Called by the IDE layer when it wants the timings set up. | ||
382 | * For the CMD680 we also need to set up the PIO timings and | ||
383 | * enable DMA. | ||
384 | */ | ||
385 | |||
386 | static int config_chipset_for_dma (ide_drive_t *drive) | ||
387 | { | ||
388 | u8 speed = ide_max_dma_mode(drive); | ||
389 | |||
390 | if (!speed) | ||
391 | return 0; | ||
392 | |||
393 | if (siimage_tune_chipset(drive, speed)) | ||
394 | return 0; | ||
395 | |||
396 | return ide_dma_enable(drive); | ||
397 | } | ||
398 | |||
399 | /** | ||
400 | * siimage_configure_drive_for_dma - set up for DMA transfers | 378 | * siimage_configure_drive_for_dma - set up for DMA transfers |
401 | * @drive: drive we are going to set up | 379 | * @drive: drive we are going to set up |
402 | * | 380 | * |
@@ -408,7 +386,7 @@ static int config_chipset_for_dma (ide_drive_t *drive) | |||
408 | 386 | ||
409 | static int siimage_config_drive_for_dma (ide_drive_t *drive) | 387 | static int siimage_config_drive_for_dma (ide_drive_t *drive) |
410 | { | 388 | { |
411 | if (ide_use_dma(drive) && config_chipset_for_dma(drive)) | 389 | if (ide_tune_dma(drive)) |
412 | return 0; | 390 | return 0; |
413 | 391 | ||
414 | if (ide_use_fast_pio(drive)) | 392 | if (ide_use_fast_pio(drive)) |
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c index 3d7759c361ff..ac1ec170fd26 100644 --- a/drivers/ide/pci/sl82c105.c +++ b/drivers/ide/pci/sl82c105.c | |||
@@ -159,28 +159,13 @@ static int sl82c105_tune_chipset(ide_drive_t *drive, u8 speed) | |||
159 | } | 159 | } |
160 | 160 | ||
161 | /* | 161 | /* |
162 | * Configure the drive for DMA. | ||
163 | */ | ||
164 | static int config_for_dma(ide_drive_t *drive) | ||
165 | { | ||
166 | u8 speed = ide_max_dma_mode(drive); | ||
167 | |||
168 | DBG(("config_for_dma(drive:%s)\n", drive->name)); | ||
169 | |||
170 | if (!speed || sl82c105_tune_chipset(drive, speed)) | ||
171 | return 0; | ||
172 | |||
173 | return ide_dma_enable(drive); | ||
174 | } | ||
175 | |||
176 | /* | ||
177 | * Check to see if the drive and chipset are capable of DMA mode. | 162 | * Check to see if the drive and chipset are capable of DMA mode. |
178 | */ | 163 | */ |
179 | static int sl82c105_ide_dma_check(ide_drive_t *drive) | 164 | static int sl82c105_ide_dma_check(ide_drive_t *drive) |
180 | { | 165 | { |
181 | DBG(("sl82c105_ide_dma_check(drive:%s)\n", drive->name)); | 166 | DBG(("sl82c105_ide_dma_check(drive:%s)\n", drive->name)); |
182 | 167 | ||
183 | if (ide_use_dma(drive) && config_for_dma(drive)) | 168 | if (ide_tune_dma(drive)) |
184 | return 0; | 169 | return 0; |
185 | 170 | ||
186 | return -1; | 171 | return -1; |