aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/cs5520.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/cs5520.c')
-rw-r--r--drivers/ide/pci/cs5520.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index 1c163e4ef03f..17669a434438 100644
--- a/drivers/ide/pci/cs5520.c
+++ b/drivers/ide/pci/cs5520.c
@@ -103,27 +103,32 @@ static void cs5520_dma_host_set(ide_drive_t *drive, int on)
103 ide_dma_host_set(drive, on); 103 ide_dma_host_set(drive, on);
104} 104}
105 105
106static void __devinit init_hwif_cs5520(ide_hwif_t *hwif) 106static const struct ide_port_ops cs5520_port_ops = {
107{ 107 .set_pio_mode = cs5520_set_pio_mode,
108 hwif->set_pio_mode = &cs5520_set_pio_mode; 108 .set_dma_mode = cs5520_set_dma_mode,
109 hwif->set_dma_mode = &cs5520_set_dma_mode; 109};
110
111 if (hwif->dma_base == 0)
112 return;
113 110
114 hwif->dma_host_set = &cs5520_dma_host_set; 111static const struct ide_dma_ops cs5520_dma_ops = {
115} 112 .dma_host_set = cs5520_dma_host_set,
113 .dma_setup = ide_dma_setup,
114 .dma_exec_cmd = ide_dma_exec_cmd,
115 .dma_start = ide_dma_start,
116 .dma_end = __ide_dma_end,
117 .dma_test_irq = ide_dma_test_irq,
118 .dma_lost_irq = ide_dma_lost_irq,
119 .dma_timeout = ide_dma_timeout,
120};
116 121
117#define DECLARE_CS_DEV(name_str) \ 122#define DECLARE_CS_DEV(name_str) \
118 { \ 123 { \
119 .name = name_str, \ 124 .name = name_str, \
120 .init_hwif = init_hwif_cs5520, \ 125 .port_ops = &cs5520_port_ops, \
126 .dma_ops = &cs5520_dma_ops, \
121 .host_flags = IDE_HFLAG_ISA_PORTS | \ 127 .host_flags = IDE_HFLAG_ISA_PORTS | \
122 IDE_HFLAG_CS5520 | \ 128 IDE_HFLAG_CS5520 | \
123 IDE_HFLAG_VDMA | \ 129 IDE_HFLAG_VDMA | \
124 IDE_HFLAG_NO_ATAPI_DMA | \ 130 IDE_HFLAG_NO_ATAPI_DMA | \
125 IDE_HFLAG_ABUSE_SET_DMA_MODE |\ 131 IDE_HFLAG_ABUSE_SET_DMA_MODE, \
126 IDE_HFLAG_BOOTABLE, \
127 .pio_mask = ATA_PIO4, \ 132 .pio_mask = ATA_PIO4, \
128 } 133 }
129 134