aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/sc1200.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/sc1200.c')
-rw-r--r--drivers/ide/pci/sc1200.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c
index 561aa47c7720..14c787b5d95f 100644
--- a/drivers/ide/pci/sc1200.c
+++ b/drivers/ide/pci/sc1200.c
@@ -165,7 +165,7 @@ static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode)
165 * 165 *
166 * returns 1 on error, 0 otherwise 166 * returns 1 on error, 0 otherwise
167 */ 167 */
168static int sc1200_ide_dma_end (ide_drive_t *drive) 168static int sc1200_dma_end(ide_drive_t *drive)
169{ 169{
170 ide_hwif_t *hwif = HWIF(drive); 170 ide_hwif_t *hwif = HWIF(drive);
171 unsigned long dma_base = hwif->dma_base; 171 unsigned long dma_base = hwif->dma_base;
@@ -214,7 +214,7 @@ static void sc1200_set_pio_mode(ide_drive_t *drive, const u8 pio)
214 printk("SC1200: %s: changing (U)DMA mode\n", drive->name); 214 printk("SC1200: %s: changing (U)DMA mode\n", drive->name);
215 ide_dma_off_quietly(drive); 215 ide_dma_off_quietly(drive);
216 if (ide_set_dma_mode(drive, mode) == 0 && drive->using_dma) 216 if (ide_set_dma_mode(drive, mode) == 0 && drive->using_dma)
217 hwif->dma_host_set(drive, 1); 217 hwif->dma_ops->dma_host_set(drive, 1);
218 return; 218 return;
219 } 219 }
220 220
@@ -286,29 +286,30 @@ static int sc1200_resume (struct pci_dev *dev)
286} 286}
287#endif 287#endif
288 288
289/* 289static const struct ide_port_ops sc1200_port_ops = {
290 * This gets invoked by the IDE driver once for each channel, 290 .set_pio_mode = sc1200_set_pio_mode,
291 * and performs channel-specific pre-initialization before drive probing. 291 .set_dma_mode = sc1200_set_dma_mode,
292 */ 292 .udma_filter = sc1200_udma_filter,
293static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif) 293};
294{
295 hwif->set_pio_mode = &sc1200_set_pio_mode;
296 hwif->set_dma_mode = &sc1200_set_dma_mode;
297
298 if (hwif->dma_base == 0)
299 return;
300 294
301 hwif->udma_filter = sc1200_udma_filter; 295static const struct ide_dma_ops sc1200_dma_ops = {
302 hwif->ide_dma_end = &sc1200_ide_dma_end; 296 .dma_host_set = ide_dma_host_set,
303} 297 .dma_setup = ide_dma_setup,
298 .dma_exec_cmd = ide_dma_exec_cmd,
299 .dma_start = ide_dma_start,
300 .dma_end = sc1200_dma_end,
301 .dma_test_irq = ide_dma_test_irq,
302 .dma_lost_irq = ide_dma_lost_irq,
303 .dma_timeout = ide_dma_timeout,
304};
304 305
305static const struct ide_port_info sc1200_chipset __devinitdata = { 306static const struct ide_port_info sc1200_chipset __devinitdata = {
306 .name = "SC1200", 307 .name = "SC1200",
307 .init_hwif = init_hwif_sc1200, 308 .port_ops = &sc1200_port_ops,
309 .dma_ops = &sc1200_dma_ops,
308 .host_flags = IDE_HFLAG_SERIALIZE | 310 .host_flags = IDE_HFLAG_SERIALIZE |
309 IDE_HFLAG_POST_SET_MODE | 311 IDE_HFLAG_POST_SET_MODE |
310 IDE_HFLAG_ABUSE_DMA_MODES | 312 IDE_HFLAG_ABUSE_DMA_MODES,
311 IDE_HFLAG_BOOTABLE,
312 .pio_mask = ATA_PIO4, 313 .pio_mask = ATA_PIO4,
313 .mwdma_mask = ATA_MWDMA2, 314 .mwdma_mask = ATA_MWDMA2,
314 .udma_mask = ATA_UDMA2, 315 .udma_mask = ATA_UDMA2,