diff options
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index e5f41741ba91..079b6f9405ed 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -413,6 +413,17 @@ struct ide_port_ops { | |||
413 | u8 (*cable_detect)(struct hwif_s *); | 413 | u8 (*cable_detect)(struct hwif_s *); |
414 | }; | 414 | }; |
415 | 415 | ||
416 | struct ide_dma_ops { | ||
417 | void (*dma_host_set)(struct ide_drive_s *, int); | ||
418 | int (*dma_setup)(struct ide_drive_s *); | ||
419 | void (*dma_exec_cmd)(struct ide_drive_s *, u8); | ||
420 | void (*dma_start)(struct ide_drive_s *); | ||
421 | int (*dma_end)(struct ide_drive_s *); | ||
422 | int (*dma_test_irq)(struct ide_drive_s *); | ||
423 | void (*dma_lost_irq)(struct ide_drive_s *); | ||
424 | void (*dma_timeout)(struct ide_drive_s *); | ||
425 | }; | ||
426 | |||
416 | typedef struct hwif_s { | 427 | typedef struct hwif_s { |
417 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ | 428 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ |
418 | struct hwif_s *mate; /* other hwif from same PCI chip */ | 429 | struct hwif_s *mate; /* other hwif from same PCI chip */ |
@@ -451,6 +462,7 @@ typedef struct hwif_s { | |||
451 | void (*rw_disk)(ide_drive_t *, struct request *); | 462 | void (*rw_disk)(ide_drive_t *, struct request *); |
452 | 463 | ||
453 | const struct ide_port_ops *port_ops; | 464 | const struct ide_port_ops *port_ops; |
465 | struct ide_dma_ops *dma_ops; | ||
454 | 466 | ||
455 | void (*ata_input_data)(ide_drive_t *, void *, u32); | 467 | void (*ata_input_data)(ide_drive_t *, void *, u32); |
456 | void (*ata_output_data)(ide_drive_t *, void *, u32); | 468 | void (*ata_output_data)(ide_drive_t *, void *, u32); |
@@ -458,15 +470,7 @@ typedef struct hwif_s { | |||
458 | void (*atapi_input_bytes)(ide_drive_t *, void *, u32); | 470 | void (*atapi_input_bytes)(ide_drive_t *, void *, u32); |
459 | void (*atapi_output_bytes)(ide_drive_t *, void *, u32); | 471 | void (*atapi_output_bytes)(ide_drive_t *, void *, u32); |
460 | 472 | ||
461 | void (*dma_host_set)(ide_drive_t *, int); | ||
462 | int (*dma_setup)(ide_drive_t *); | ||
463 | void (*dma_exec_cmd)(ide_drive_t *, u8); | ||
464 | void (*dma_start)(ide_drive_t *); | ||
465 | int (*ide_dma_end)(ide_drive_t *drive); | ||
466 | int (*ide_dma_test_irq)(ide_drive_t *drive); | ||
467 | void (*ide_dma_clear_irq)(ide_drive_t *drive); | 473 | void (*ide_dma_clear_irq)(ide_drive_t *drive); |
468 | void (*dma_lost_irq)(ide_drive_t *drive); | ||
469 | void (*dma_timeout)(ide_drive_t *drive); | ||
470 | 474 | ||
471 | void (*OUTB)(u8 addr, unsigned long port); | 475 | void (*OUTB)(u8 addr, unsigned long port); |
472 | void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); | 476 | void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); |
@@ -1114,6 +1118,7 @@ struct ide_port_info { | |||
1114 | const struct ide_port_info *); | 1118 | const struct ide_port_info *); |
1115 | 1119 | ||
1116 | const struct ide_port_ops *port_ops; | 1120 | const struct ide_port_ops *port_ops; |
1121 | struct ide_dma_ops *dma_ops; | ||
1117 | 1122 | ||
1118 | ide_pci_enablebit_t enablebits[2]; | 1123 | ide_pci_enablebit_t enablebits[2]; |
1119 | hwif_chipset_t chipset; | 1124 | hwif_chipset_t chipset; |
@@ -1165,7 +1170,7 @@ void ide_destroy_dmatable(ide_drive_t *); | |||
1165 | extern int ide_build_dmatable(ide_drive_t *, struct request *); | 1170 | extern int ide_build_dmatable(ide_drive_t *, struct request *); |
1166 | int ide_allocate_dma_engine(ide_hwif_t *); | 1171 | int ide_allocate_dma_engine(ide_hwif_t *); |
1167 | void ide_release_dma_engine(ide_hwif_t *); | 1172 | void ide_release_dma_engine(ide_hwif_t *); |
1168 | extern void ide_setup_dma(ide_hwif_t *, unsigned long); | 1173 | void ide_setup_dma(ide_hwif_t *, unsigned long, const struct ide_port_info *); |
1169 | 1174 | ||
1170 | void ide_dma_host_set(ide_drive_t *, int); | 1175 | void ide_dma_host_set(ide_drive_t *, int); |
1171 | extern int ide_dma_setup(ide_drive_t *); | 1176 | extern int ide_dma_setup(ide_drive_t *); |