diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/arm/icside.c | 9 | ||||
-rw-r--r-- | drivers/ide/cris/ide-cris.c | 9 | ||||
-rw-r--r-- | drivers/ide/ide-dma.c | 50 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-iops.c | 8 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide.c | 5 | ||||
-rw-r--r-- | drivers/ide/mips/au1xxx-ide.c | 9 | ||||
-rw-r--r-- | drivers/ide/pci/cs5520.c | 17 | ||||
-rw-r--r-- | drivers/ide/pci/sc1200.c | 2 | ||||
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 12 | ||||
-rw-r--r-- | drivers/ide/pci/trm290.c | 9 | ||||
-rw-r--r-- | drivers/ide/ppc/pmac.c | 9 |
13 files changed, 42 insertions, 101 deletions
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c index 3a8402bb5dc3..8a5c7205b77c 100644 --- a/drivers/ide/arm/icside.c +++ b/drivers/ide/arm/icside.c | |||
@@ -287,11 +287,7 @@ static void icside_set_dma_mode(ide_drive_t *drive, const u8 xfer_mode) | |||
287 | ide_xfer_verbose(xfer_mode), 2000 / drive->drive_data); | 287 | ide_xfer_verbose(xfer_mode), 2000 / drive->drive_data); |
288 | } | 288 | } |
289 | 289 | ||
290 | static void icside_dma_host_off(ide_drive_t *drive) | 290 | static void icside_dma_host_set(ide_drive_t *drive, int on) |
291 | { | ||
292 | } | ||
293 | |||
294 | static void icside_dma_host_on(ide_drive_t *drive) | ||
295 | { | 291 | { |
296 | } | 292 | } |
297 | 293 | ||
@@ -410,8 +406,7 @@ static void icside_dma_init(ide_hwif_t *hwif) | |||
410 | hwif->dmatable_dma = 0; | 406 | hwif->dmatable_dma = 0; |
411 | hwif->set_dma_mode = icside_set_dma_mode; | 407 | hwif->set_dma_mode = icside_set_dma_mode; |
412 | 408 | ||
413 | hwif->dma_host_off = icside_dma_host_off; | 409 | hwif->dma_host_set = icside_dma_host_set; |
414 | hwif->dma_host_on = icside_dma_host_on; | ||
415 | hwif->dma_setup = icside_dma_setup; | 410 | hwif->dma_setup = icside_dma_setup; |
416 | hwif->dma_exec_cmd = icside_dma_exec_cmd; | 411 | hwif->dma_exec_cmd = icside_dma_exec_cmd; |
417 | hwif->dma_start = icside_dma_start; | 412 | hwif->dma_start = icside_dma_start; |
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c index b0cd0326cf57..dcebc0299f5e 100644 --- a/drivers/ide/cris/ide-cris.c +++ b/drivers/ide/cris/ide-cris.c | |||
@@ -674,11 +674,7 @@ static void cris_ide_output_data (ide_drive_t *drive, void *, unsigned int); | |||
674 | static void cris_atapi_input_bytes(ide_drive_t *drive, void *, unsigned int); | 674 | static void cris_atapi_input_bytes(ide_drive_t *drive, void *, unsigned int); |
675 | static void cris_atapi_output_bytes(ide_drive_t *drive, void *, unsigned int); | 675 | static void cris_atapi_output_bytes(ide_drive_t *drive, void *, unsigned int); |
676 | 676 | ||
677 | static void cris_dma_host_off(ide_drive_t *drive) | 677 | static void cris_dma_host_set(ide_drive_t *drive, int on) |
678 | { | ||
679 | } | ||
680 | |||
681 | static void cris_dma_host_on(ide_drive_t *drive) | ||
682 | { | 678 | { |
683 | } | 679 | } |
684 | 680 | ||
@@ -792,6 +788,7 @@ init_e100_ide (void) | |||
792 | hwif->ata_output_data = &cris_ide_output_data; | 788 | hwif->ata_output_data = &cris_ide_output_data; |
793 | hwif->atapi_input_bytes = &cris_atapi_input_bytes; | 789 | hwif->atapi_input_bytes = &cris_atapi_input_bytes; |
794 | hwif->atapi_output_bytes = &cris_atapi_output_bytes; | 790 | hwif->atapi_output_bytes = &cris_atapi_output_bytes; |
791 | hwif->dma_host_set = &cris_dma_host_set; | ||
795 | hwif->ide_dma_end = &cris_dma_end; | 792 | hwif->ide_dma_end = &cris_dma_end; |
796 | hwif->dma_setup = &cris_dma_setup; | 793 | hwif->dma_setup = &cris_dma_setup; |
797 | hwif->dma_exec_cmd = &cris_dma_exec_cmd; | 794 | hwif->dma_exec_cmd = &cris_dma_exec_cmd; |
@@ -802,8 +799,6 @@ init_e100_ide (void) | |||
802 | hwif->OUTBSYNC = &cris_ide_outbsync; | 799 | hwif->OUTBSYNC = &cris_ide_outbsync; |
803 | hwif->INB = &cris_ide_inb; | 800 | hwif->INB = &cris_ide_inb; |
804 | hwif->INW = &cris_ide_inw; | 801 | hwif->INW = &cris_ide_inw; |
805 | hwif->dma_host_off = &cris_dma_host_off; | ||
806 | hwif->dma_host_on = &cris_dma_host_on; | ||
807 | hwif->cbl = ATA_CBL_PATA40; | 802 | hwif->cbl = ATA_CBL_PATA40; |
808 | hwif->host_flags |= IDE_HFLAG_NO_ATAPI_DMA; | 803 | hwif->host_flags |= IDE_HFLAG_NO_ATAPI_DMA; |
809 | hwif->pio_mask = ATA_PIO4, | 804 | hwif->pio_mask = ATA_PIO4, |
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 780911e0537e..c9648b1ef220 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -408,23 +408,28 @@ static int dma_timer_expiry (ide_drive_t *drive) | |||
408 | } | 408 | } |
409 | 409 | ||
410 | /** | 410 | /** |
411 | * ide_dma_host_off - Generic DMA kill | 411 | * ide_dma_host_set - Enable/disable DMA on a host |
412 | * @drive: drive to control | 412 | * @drive: drive to control |
413 | * | 413 | * |
414 | * Perform the generic IDE controller DMA off operation. This | 414 | * Enable/disable DMA on an IDE controller following generic |
415 | * works for most IDE bus mastering controllers | 415 | * bus-mastering IDE controller behaviour. |
416 | */ | 416 | */ |
417 | 417 | ||
418 | void ide_dma_host_off(ide_drive_t *drive) | 418 | void ide_dma_host_set(ide_drive_t *drive, int on) |
419 | { | 419 | { |
420 | ide_hwif_t *hwif = HWIF(drive); | 420 | ide_hwif_t *hwif = HWIF(drive); |
421 | u8 unit = (drive->select.b.unit & 0x01); | 421 | u8 unit = (drive->select.b.unit & 0x01); |
422 | u8 dma_stat = hwif->INB(hwif->dma_status); | 422 | u8 dma_stat = hwif->INB(hwif->dma_status); |
423 | 423 | ||
424 | hwif->OUTB((dma_stat & ~(1<<(5+unit))), hwif->dma_status); | 424 | if (on) |
425 | dma_stat |= (1 << (5 + unit)); | ||
426 | else | ||
427 | dma_stat &= ~(1 << (5 + unit)); | ||
428 | |||
429 | hwif->OUTB(dma_stat, hwif->dma_status); | ||
425 | } | 430 | } |
426 | 431 | ||
427 | EXPORT_SYMBOL(ide_dma_host_off); | 432 | EXPORT_SYMBOL_GPL(ide_dma_host_set); |
428 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ | 433 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ |
429 | 434 | ||
430 | /** | 435 | /** |
@@ -439,7 +444,7 @@ void ide_dma_off_quietly(ide_drive_t *drive) | |||
439 | drive->using_dma = 0; | 444 | drive->using_dma = 0; |
440 | ide_toggle_bounce(drive, 0); | 445 | ide_toggle_bounce(drive, 0); |
441 | 446 | ||
442 | drive->hwif->dma_host_off(drive); | 447 | drive->hwif->dma_host_set(drive, 0); |
443 | } | 448 | } |
444 | 449 | ||
445 | EXPORT_SYMBOL(ide_dma_off_quietly); | 450 | EXPORT_SYMBOL(ide_dma_off_quietly); |
@@ -460,29 +465,6 @@ void ide_dma_off(ide_drive_t *drive) | |||
460 | 465 | ||
461 | EXPORT_SYMBOL(ide_dma_off); | 466 | EXPORT_SYMBOL(ide_dma_off); |
462 | 467 | ||
463 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | ||
464 | /** | ||
465 | * ide_dma_host_on - Enable DMA on a host | ||
466 | * @drive: drive to enable for DMA | ||
467 | * | ||
468 | * Enable DMA on an IDE controller following generic bus mastering | ||
469 | * IDE controller behaviour | ||
470 | */ | ||
471 | |||
472 | void ide_dma_host_on(ide_drive_t *drive) | ||
473 | { | ||
474 | if (1) { | ||
475 | ide_hwif_t *hwif = HWIF(drive); | ||
476 | u8 unit = (drive->select.b.unit & 0x01); | ||
477 | u8 dma_stat = hwif->INB(hwif->dma_status); | ||
478 | |||
479 | hwif->OUTB((dma_stat|(1<<(5+unit))), hwif->dma_status); | ||
480 | } | ||
481 | } | ||
482 | |||
483 | EXPORT_SYMBOL(ide_dma_host_on); | ||
484 | #endif | ||
485 | |||
486 | /** | 468 | /** |
487 | * ide_dma_on - Enable DMA on a device | 469 | * ide_dma_on - Enable DMA on a device |
488 | * @drive: drive to enable DMA on | 470 | * @drive: drive to enable DMA on |
@@ -495,7 +477,7 @@ void ide_dma_on(ide_drive_t *drive) | |||
495 | drive->using_dma = 1; | 477 | drive->using_dma = 1; |
496 | ide_toggle_bounce(drive, 1); | 478 | ide_toggle_bounce(drive, 1); |
497 | 479 | ||
498 | drive->hwif->dma_host_on(drive); | 480 | drive->hwif->dma_host_set(drive, 1); |
499 | } | 481 | } |
500 | 482 | ||
501 | EXPORT_SYMBOL(ide_dma_on); | 483 | EXPORT_SYMBOL(ide_dma_on); |
@@ -980,10 +962,8 @@ void ide_setup_dma(ide_hwif_t *hwif, unsigned long base, unsigned num_ports) | |||
980 | if (!(hwif->dma_prdtable)) | 962 | if (!(hwif->dma_prdtable)) |
981 | hwif->dma_prdtable = (hwif->dma_base + 4); | 963 | hwif->dma_prdtable = (hwif->dma_base + 4); |
982 | 964 | ||
983 | if (!hwif->dma_host_off) | 965 | if (!hwif->dma_host_set) |
984 | hwif->dma_host_off = &ide_dma_host_off; | 966 | hwif->dma_host_set = &ide_dma_host_set; |
985 | if (!hwif->dma_host_on) | ||
986 | hwif->dma_host_on = &ide_dma_host_on; | ||
987 | if (!hwif->dma_setup) | 967 | if (!hwif->dma_setup) |
988 | hwif->dma_setup = &ide_dma_setup; | 968 | hwif->dma_setup = &ide_dma_setup; |
989 | if (!hwif->dma_exec_cmd) | 969 | if (!hwif->dma_exec_cmd) |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index b5a7d2578ab8..e37b09c81e3a 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -219,7 +219,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request * | |||
219 | * we could be smarter and check for current xfer_speed | 219 | * we could be smarter and check for current xfer_speed |
220 | * in struct drive etc... | 220 | * in struct drive etc... |
221 | */ | 221 | */ |
222 | if (drive->hwif->dma_host_on == NULL) | 222 | if (drive->hwif->dma_host_set == NULL) |
223 | break; | 223 | break; |
224 | /* | 224 | /* |
225 | * TODO: respect ->using_dma setting | 225 | * TODO: respect ->using_dma setting |
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index e30f67e09b9c..595a5cef41a2 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -742,8 +742,8 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | |||
742 | // msleep(50); | 742 | // msleep(50); |
743 | 743 | ||
744 | #ifdef CONFIG_BLK_DEV_IDEDMA | 744 | #ifdef CONFIG_BLK_DEV_IDEDMA |
745 | if (hwif->dma_host_on) /* check if host supports DMA */ | 745 | if (hwif->dma_host_set) /* check if host supports DMA */ |
746 | hwif->dma_host_off(drive); | 746 | hwif->dma_host_set(drive, 0); |
747 | #endif | 747 | #endif |
748 | 748 | ||
749 | /* Skip setting PIO flow-control modes on pre-EIDE drives */ | 749 | /* Skip setting PIO flow-control modes on pre-EIDE drives */ |
@@ -801,8 +801,8 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | |||
801 | #ifdef CONFIG_BLK_DEV_IDEDMA | 801 | #ifdef CONFIG_BLK_DEV_IDEDMA |
802 | if ((speed >= XFER_SW_DMA_0 || (hwif->host_flags & IDE_HFLAG_VDMA)) && | 802 | if ((speed >= XFER_SW_DMA_0 || (hwif->host_flags & IDE_HFLAG_VDMA)) && |
803 | drive->using_dma) | 803 | drive->using_dma) |
804 | hwif->dma_host_on(drive); | 804 | hwif->dma_host_set(drive, 1); |
805 | else if (hwif->dma_host_on) /* check if host supports DMA */ | 805 | else if (hwif->dma_host_set) /* check if host supports DMA */ |
806 | ide_dma_off_quietly(drive); | 806 | ide_dma_off_quietly(drive); |
807 | #endif | 807 | #endif |
808 | 808 | ||
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index b363a96607d1..fa95e79b9505 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -833,7 +833,7 @@ static void probe_hwif(ide_hwif_t *hwif) | |||
833 | 833 | ||
834 | drive->nice1 = 1; | 834 | drive->nice1 = 1; |
835 | 835 | ||
836 | if (hwif->dma_host_on) | 836 | if (hwif->dma_host_set) |
837 | ide_set_dma(drive); | 837 | ide_set_dma(drive); |
838 | } | 838 | } |
839 | } | 839 | } |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 095ff34870da..7819fbd4d5fd 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -433,14 +433,13 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif) | |||
433 | hwif->atapi_input_bytes = tmp_hwif->atapi_input_bytes; | 433 | hwif->atapi_input_bytes = tmp_hwif->atapi_input_bytes; |
434 | hwif->atapi_output_bytes = tmp_hwif->atapi_output_bytes; | 434 | hwif->atapi_output_bytes = tmp_hwif->atapi_output_bytes; |
435 | 435 | ||
436 | hwif->dma_host_set = tmp_hwif->dma_host_set; | ||
436 | hwif->dma_setup = tmp_hwif->dma_setup; | 437 | hwif->dma_setup = tmp_hwif->dma_setup; |
437 | hwif->dma_exec_cmd = tmp_hwif->dma_exec_cmd; | 438 | hwif->dma_exec_cmd = tmp_hwif->dma_exec_cmd; |
438 | hwif->dma_start = tmp_hwif->dma_start; | 439 | hwif->dma_start = tmp_hwif->dma_start; |
439 | hwif->ide_dma_end = tmp_hwif->ide_dma_end; | 440 | hwif->ide_dma_end = tmp_hwif->ide_dma_end; |
440 | hwif->ide_dma_test_irq = tmp_hwif->ide_dma_test_irq; | 441 | hwif->ide_dma_test_irq = tmp_hwif->ide_dma_test_irq; |
441 | hwif->ide_dma_clear_irq = tmp_hwif->ide_dma_clear_irq; | 442 | hwif->ide_dma_clear_irq = tmp_hwif->ide_dma_clear_irq; |
442 | hwif->dma_host_on = tmp_hwif->dma_host_on; | ||
443 | hwif->dma_host_off = tmp_hwif->dma_host_off; | ||
444 | hwif->dma_lost_irq = tmp_hwif->dma_lost_irq; | 443 | hwif->dma_lost_irq = tmp_hwif->dma_lost_irq; |
445 | hwif->dma_timeout = tmp_hwif->dma_timeout; | 444 | hwif->dma_timeout = tmp_hwif->dma_timeout; |
446 | 445 | ||
@@ -834,7 +833,7 @@ int set_using_dma(ide_drive_t *drive, int arg) | |||
834 | if (!drive->id || !(drive->id->capability & 1)) | 833 | if (!drive->id || !(drive->id->capability & 1)) |
835 | goto out; | 834 | goto out; |
836 | 835 | ||
837 | if (hwif->dma_host_on == NULL) | 836 | if (hwif->dma_host_set == NULL) |
838 | goto out; | 837 | goto out; |
839 | 838 | ||
840 | err = -EBUSY; | 839 | err = -EBUSY; |
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index 4dfdca4ccbde..27abff6f6ba2 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c | |||
@@ -395,11 +395,7 @@ static int auide_dma_test_irq(ide_drive_t *drive) | |||
395 | return 0; | 395 | return 0; |
396 | } | 396 | } |
397 | 397 | ||
398 | static void auide_dma_host_on(ide_drive_t *drive) | 398 | static void auide_dma_host_set(ide_drive_t *drive, int on) |
399 | { | ||
400 | } | ||
401 | |||
402 | static void auide_dma_host_off(ide_drive_t *drive) | ||
403 | { | 399 | { |
404 | } | 400 | } |
405 | 401 | ||
@@ -674,13 +670,12 @@ static int au_ide_probe(struct device *dev) | |||
674 | 670 | ||
675 | hwif->mdma_filter = &auide_mdma_filter; | 671 | hwif->mdma_filter = &auide_mdma_filter; |
676 | 672 | ||
673 | hwif->dma_host_set = &auide_dma_host_set; | ||
677 | hwif->dma_exec_cmd = &auide_dma_exec_cmd; | 674 | hwif->dma_exec_cmd = &auide_dma_exec_cmd; |
678 | hwif->dma_start = &auide_dma_start; | 675 | hwif->dma_start = &auide_dma_start; |
679 | hwif->ide_dma_end = &auide_dma_end; | 676 | hwif->ide_dma_end = &auide_dma_end; |
680 | hwif->dma_setup = &auide_dma_setup; | 677 | hwif->dma_setup = &auide_dma_setup; |
681 | hwif->ide_dma_test_irq = &auide_dma_test_irq; | 678 | hwif->ide_dma_test_irq = &auide_dma_test_irq; |
682 | hwif->dma_host_off = &auide_dma_host_off; | ||
683 | hwif->dma_host_on = &auide_dma_host_on; | ||
684 | hwif->dma_lost_irq = &auide_dma_lost_irq; | 679 | hwif->dma_lost_irq = &auide_dma_lost_irq; |
685 | #else /* !CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */ | 680 | #else /* !CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */ |
686 | hwif->channel = 0; | 681 | hwif->channel = 0; |
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index 2bd52af83d37..6ec00b8d7ec1 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c | |||
@@ -107,18 +107,10 @@ static void cs5520_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
107 | * ATAPI is harder so disable it for now using IDE_HFLAG_NO_ATAPI_DMA | 107 | * ATAPI is harder so disable it for now using IDE_HFLAG_NO_ATAPI_DMA |
108 | */ | 108 | */ |
109 | 109 | ||
110 | static void cs5520_dma_host_on(ide_drive_t *drive) | 110 | static void cs5520_dma_host_set(ide_drive_t *drive, int on) |
111 | { | 111 | { |
112 | drive->vdma = 1; | 112 | drive->vdma = on; |
113 | 113 | ide_dma_host_set(drive, on); | |
114 | ide_dma_host_on(drive); | ||
115 | } | ||
116 | |||
117 | static void cs5520_dma_host_off(ide_drive_t *drive) | ||
118 | { | ||
119 | drive->vdma = 0; | ||
120 | |||
121 | ide_dma_host_off(drive); | ||
122 | } | 114 | } |
123 | 115 | ||
124 | static void __devinit init_hwif_cs5520(ide_hwif_t *hwif) | 116 | static void __devinit init_hwif_cs5520(ide_hwif_t *hwif) |
@@ -129,8 +121,7 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif) | |||
129 | if (hwif->dma_base == 0) | 121 | if (hwif->dma_base == 0) |
130 | return; | 122 | return; |
131 | 123 | ||
132 | hwif->dma_host_on = &cs5520_dma_host_on; | 124 | hwif->dma_host_set = &cs5520_dma_host_set; |
133 | hwif->dma_host_off = &cs5520_dma_host_off; | ||
134 | } | 125 | } |
135 | 126 | ||
136 | #define DECLARE_CS_DEV(name_str) \ | 127 | #define DECLARE_CS_DEV(name_str) \ |
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index 9303dfee7780..32fdf53379f5 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -222,7 +222,7 @@ static void sc1200_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
222 | printk("SC1200: %s: changing (U)DMA mode\n", drive->name); | 222 | printk("SC1200: %s: changing (U)DMA mode\n", drive->name); |
223 | ide_dma_off_quietly(drive); | 223 | ide_dma_off_quietly(drive); |
224 | if (ide_set_dma_mode(drive, mode) == 0 && drive->using_dma) | 224 | if (ide_set_dma_mode(drive, mode) == 0 && drive->using_dma) |
225 | hwif->dma_host_on(drive); | 225 | hwif->dma_host_set(drive, 1); |
226 | return; | 226 | return; |
227 | } | 227 | } |
228 | 228 | ||
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 8c4e94bd4449..9fb35c528d54 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -288,13 +288,10 @@ sgiioc4_ide_dma_test_irq(ide_drive_t * drive) | |||
288 | return sgiioc4_checkirq(HWIF(drive)); | 288 | return sgiioc4_checkirq(HWIF(drive)); |
289 | } | 289 | } |
290 | 290 | ||
291 | static void sgiioc4_dma_host_on(ide_drive_t * drive) | 291 | static void sgiioc4_dma_host_set(ide_drive_t *drive, int on) |
292 | { | 292 | { |
293 | } | 293 | if (!on) |
294 | 294 | sgiioc4_clearirq(drive); | |
295 | static void sgiioc4_dma_host_off(ide_drive_t * drive) | ||
296 | { | ||
297 | sgiioc4_clearirq(drive); | ||
298 | } | 295 | } |
299 | 296 | ||
300 | static void | 297 | static void |
@@ -578,12 +575,11 @@ ide_init_sgiioc4(ide_hwif_t * hwif) | |||
578 | 575 | ||
579 | hwif->mwdma_mask = ATA_MWDMA2_ONLY; | 576 | hwif->mwdma_mask = ATA_MWDMA2_ONLY; |
580 | 577 | ||
578 | hwif->dma_host_set = &sgiioc4_dma_host_set; | ||
581 | hwif->dma_setup = &sgiioc4_ide_dma_setup; | 579 | hwif->dma_setup = &sgiioc4_ide_dma_setup; |
582 | hwif->dma_start = &sgiioc4_ide_dma_start; | 580 | hwif->dma_start = &sgiioc4_ide_dma_start; |
583 | hwif->ide_dma_end = &sgiioc4_ide_dma_end; | 581 | hwif->ide_dma_end = &sgiioc4_ide_dma_end; |
584 | hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq; | 582 | hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq; |
585 | hwif->dma_host_on = &sgiioc4_dma_host_on; | ||
586 | hwif->dma_host_off = &sgiioc4_dma_host_off; | ||
587 | hwif->dma_lost_irq = &sgiioc4_dma_lost_irq; | 583 | hwif->dma_lost_irq = &sgiioc4_dma_lost_irq; |
588 | hwif->dma_timeout = &ide_dma_timeout; | 584 | hwif->dma_timeout = &ide_dma_timeout; |
589 | } | 585 | } |
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c index 0151d7fdfb8a..04cd893e1ab0 100644 --- a/drivers/ide/pci/trm290.c +++ b/drivers/ide/pci/trm290.c | |||
@@ -241,11 +241,7 @@ static int trm290_ide_dma_test_irq (ide_drive_t *drive) | |||
241 | return (status == 0x00ff); | 241 | return (status == 0x00ff); |
242 | } | 242 | } |
243 | 243 | ||
244 | static void trm290_dma_host_on(ide_drive_t *drive) | 244 | static void trm290_dma_host_set(ide_drive_t *drive, int on) |
245 | { | ||
246 | } | ||
247 | |||
248 | static void trm290_dma_host_off(ide_drive_t *drive) | ||
249 | { | 245 | { |
250 | } | 246 | } |
251 | 247 | ||
@@ -289,8 +285,7 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif) | |||
289 | 285 | ||
290 | ide_setup_dma(hwif, (hwif->config_data + 4) ^ (hwif->channel ? 0x0080 : 0x0000), 3); | 286 | ide_setup_dma(hwif, (hwif->config_data + 4) ^ (hwif->channel ? 0x0080 : 0x0000), 3); |
291 | 287 | ||
292 | hwif->dma_host_off = &trm290_dma_host_off; | 288 | hwif->dma_host_set = &trm290_dma_host_set; |
293 | hwif->dma_host_on = &trm290_dma_host_on; | ||
294 | hwif->dma_setup = &trm290_dma_setup; | 289 | hwif->dma_setup = &trm290_dma_setup; |
295 | hwif->dma_exec_cmd = &trm290_dma_exec_cmd; | 290 | hwif->dma_exec_cmd = &trm290_dma_exec_cmd; |
296 | hwif->dma_start = &trm290_dma_start; | 291 | hwif->dma_start = &trm290_dma_start; |
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index ca99b69cfac7..6a4b0d479897 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -1698,11 +1698,7 @@ pmac_ide_dma_test_irq (ide_drive_t *drive) | |||
1698 | return 1; | 1698 | return 1; |
1699 | } | 1699 | } |
1700 | 1700 | ||
1701 | static void pmac_ide_dma_host_off(ide_drive_t *drive) | 1701 | static void pmac_ide_dma_host_set(ide_drive_t *drive, int on) |
1702 | { | ||
1703 | } | ||
1704 | |||
1705 | static void pmac_ide_dma_host_on(ide_drive_t *drive) | ||
1706 | { | 1702 | { |
1707 | } | 1703 | } |
1708 | 1704 | ||
@@ -1748,13 +1744,12 @@ pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) | |||
1748 | return; | 1744 | return; |
1749 | } | 1745 | } |
1750 | 1746 | ||
1747 | hwif->dma_host_set = &pmac_ide_dma_host_set; | ||
1751 | hwif->dma_setup = &pmac_ide_dma_setup; | 1748 | hwif->dma_setup = &pmac_ide_dma_setup; |
1752 | hwif->dma_exec_cmd = &pmac_ide_dma_exec_cmd; | 1749 | hwif->dma_exec_cmd = &pmac_ide_dma_exec_cmd; |
1753 | hwif->dma_start = &pmac_ide_dma_start; | 1750 | hwif->dma_start = &pmac_ide_dma_start; |
1754 | hwif->ide_dma_end = &pmac_ide_dma_end; | 1751 | hwif->ide_dma_end = &pmac_ide_dma_end; |
1755 | hwif->ide_dma_test_irq = &pmac_ide_dma_test_irq; | 1752 | hwif->ide_dma_test_irq = &pmac_ide_dma_test_irq; |
1756 | hwif->dma_host_off = &pmac_ide_dma_host_off; | ||
1757 | hwif->dma_host_on = &pmac_ide_dma_host_on; | ||
1758 | hwif->dma_timeout = &ide_dma_timeout; | 1753 | hwif->dma_timeout = &ide_dma_timeout; |
1759 | hwif->dma_lost_irq = &pmac_ide_dma_lost_irq; | 1754 | hwif->dma_lost_irq = &pmac_ide_dma_lost_irq; |
1760 | 1755 | ||