aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/cris
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:24 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:24 -0400
commit5e37bdc081a980dd0d669e6387bcf15ca9666f81 (patch)
treed842166c3bd23fbf3dfba0ccaa0f9ed5cc3096db /drivers/ide/cris
parent1fd1890594bd355a4217f5658a34763e77decee3 (diff)
ide: add struct ide_dma_ops (take 3)
Add struct ide_dma_ops and convert core code + drivers to use it. While at it: * Drop "ide_" prefix from ->ide_dma_end and ->ide_dma_test_irq methods. * Drop "ide_" "infixes" from DMA methods. * au1xxx-ide.c: - use auide_dma_{test_irq,end}() directly in auide_dma_timeout() * pdc202xx_old.c: - drop "old_" "infixes" from DMA methods * siimage.c: - add siimage_dma_test_irq() helper - print SATA warning in siimage_init_one() * Remove no longer needed ->init_hwif implementations. v2: * Changes based on review from Sergei: - s/siimage_ide_dma_test_irq/siimage_dma_test_irq/ - s/drive->hwif/hwif/ in idefloppy_pc_intr(). - fix patch description w.r.t. au1xxx-ide changes - fix au1xxx-ide build - fix naming for cmd64*_dma_ops - drop "ide_" and "old_" infixes - s/hpt3xxx_dma_ops/hpt37x_dma_ops/ - s/hpt370x_dma_ops/hpt370_dma_ops/ - use correct DMA ops for HPT302/N, HPT371/N and HPT374 - s/it821x_smart_dma_ops/it821x_pass_through_dma_ops/ v3: * Two bugs slipped in v2 (noticed by Sergei): - use correct DMA ops for HPT374 (for real this time) - handle HPT370/HPT370A properly Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/cris')
-rw-r--r--drivers/ide/cris/ide-cris.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c
index 4b2c6b2caca5..12d9842dc7cc 100644
--- a/drivers/ide/cris/ide-cris.c
+++ b/drivers/ide/cris/ide-cris.c
@@ -673,11 +673,6 @@ cris_ide_inb(unsigned long reg)
673 return (unsigned char)cris_ide_inw(reg); 673 return (unsigned char)cris_ide_inw(reg);
674} 674}
675 675
676static int cris_dma_end (ide_drive_t *drive);
677static int cris_dma_setup (ide_drive_t *drive);
678static void cris_dma_exec_cmd (ide_drive_t *drive, u8 command);
679static int cris_dma_test_irq(ide_drive_t *drive);
680static void cris_dma_start(ide_drive_t *drive);
681static void cris_ide_input_data (ide_drive_t *drive, void *, unsigned int); 676static void cris_ide_input_data (ide_drive_t *drive, void *, unsigned int);
682static void cris_ide_output_data (ide_drive_t *drive, void *, unsigned int); 677static void cris_ide_output_data (ide_drive_t *drive, void *, unsigned int);
683static void cris_atapi_input_bytes(ide_drive_t *drive, void *, unsigned int); 678static void cris_atapi_input_bytes(ide_drive_t *drive, void *, unsigned int);
@@ -787,9 +782,12 @@ static const struct ide_port_ops cris_port_ops = {
787 .set_dma_mode = cris_set_dma_mode, 782 .set_dma_mode = cris_set_dma_mode,
788}; 783};
789 784
785static struct ide_dma_ops cris_dma_ops;
786
790static const struct ide_port_info cris_port_info __initdata = { 787static const struct ide_port_info cris_port_info __initdata = {
791 .chipset = ide_etrax100, 788 .chipset = ide_etrax100,
792 .port_ops = &cris_port_ops, 789 .port_ops = &cris_port_ops,
790 .dma_ops = &cris_dma_ops,
793 .host_flags = IDE_HFLAG_NO_ATAPI_DMA | 791 .host_flags = IDE_HFLAG_NO_ATAPI_DMA |
794 IDE_HFLAG_NO_DMA, /* no SFF-style DMA */ 792 IDE_HFLAG_NO_DMA, /* no SFF-style DMA */
795 .pio_mask = ATA_PIO4, 793 .pio_mask = ATA_PIO4,
@@ -820,12 +818,6 @@ static int __init init_e100_ide(void)
820 hwif->ata_output_data = &cris_ide_output_data; 818 hwif->ata_output_data = &cris_ide_output_data;
821 hwif->atapi_input_bytes = &cris_atapi_input_bytes; 819 hwif->atapi_input_bytes = &cris_atapi_input_bytes;
822 hwif->atapi_output_bytes = &cris_atapi_output_bytes; 820 hwif->atapi_output_bytes = &cris_atapi_output_bytes;
823 hwif->dma_host_set = &cris_dma_host_set;
824 hwif->ide_dma_end = &cris_dma_end;
825 hwif->dma_setup = &cris_dma_setup;
826 hwif->dma_exec_cmd = &cris_dma_exec_cmd;
827 hwif->ide_dma_test_irq = &cris_dma_test_irq;
828 hwif->dma_start = &cris_dma_start;
829 hwif->OUTB = &cris_ide_outb; 821 hwif->OUTB = &cris_ide_outb;
830 hwif->OUTW = &cris_ide_outw; 822 hwif->OUTW = &cris_ide_outw;
831 hwif->OUTBSYNC = &cris_ide_outbsync; 823 hwif->OUTBSYNC = &cris_ide_outbsync;
@@ -1080,6 +1072,15 @@ static void cris_dma_start(ide_drive_t *drive)
1080 } 1072 }
1081} 1073}
1082 1074
1075static struct ide_dma_ops cris_dma_ops = {
1076 .dma_host_set = cris_dma_host_set,
1077 .dma_setup = cris_dma_setup,
1078 .dma_exec_cmd = cris_dma_exec_cmd,
1079 .dma_start = cris_dma_start,
1080 .dma_end = cris_dma_end,
1081 .dma_test_irq = cris_dma_test_irq,
1082};
1083
1083module_init(init_e100_ide); 1084module_init(init_e100_ide);
1084 1085
1085MODULE_LICENSE("GPL"); 1086MODULE_LICENSE("GPL");