aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/mips
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:23 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:23 -0400
commit8552865935538127d2603110b3d36dba2b4e8eff (patch)
tree511d10093d8cffe4834a80fa96ff7946675fe756 /drivers/ide/mips
parentb552a2c1dd01ab2380ea9429899591aa743f02e7 (diff)
au1xxx-ide: use ->init_dma method
* Pass 'ide_hwif_t *hwif' instead of '_auide_hwif *auide' to auide_ddma_init(). * Add 'const struct ide_port_info *d' argument to auide_ddma_init(). * Convert the driver to use ->init_dma method. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/mips')
-rw-r--r--drivers/ide/mips/au1xxx-ide.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index d2e926efd3cc..54323ab64def 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -380,13 +380,12 @@ static void auide_dma_timeout(ide_drive_t *drive)
380 380
381 hwif->ide_dma_end(drive); 381 hwif->ide_dma_end(drive);
382} 382}
383
384 383
385static int auide_ddma_init(_auide_hwif *auide) { 384static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
386 385{
386 _auide_hwif *auide = (_auide_hwif *)hwif->hwif_data;
387 dbdev_tab_t source_dev_tab, target_dev_tab; 387 dbdev_tab_t source_dev_tab, target_dev_tab;
388 u32 dev_id, tsize, devwidth, flags; 388 u32 dev_id, tsize, devwidth, flags;
389 ide_hwif_t *hwif = auide->hwif;
390 389
391 dev_id = AU1XXX_ATA_DDMA_REQ; 390 dev_id = AU1XXX_ATA_DDMA_REQ;
392 391
@@ -443,9 +442,9 @@ static int auide_ddma_init(_auide_hwif *auide) {
443 return 0; 442 return 0;
444} 443}
445#else 444#else
446 445static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
447static int auide_ddma_init( _auide_hwif *auide )
448{ 446{
447 _auide_hwif *auide = (_auide_hwif *)hwif->hwif_data;
449 dbdev_tab_t source_dev_tab; 448 dbdev_tab_t source_dev_tab;
450 int flags; 449 int flags;
451 450
@@ -510,9 +509,9 @@ static const struct ide_port_ops au1xxx_port_ops = {
510}; 509};
511 510
512static const struct ide_port_info au1xxx_port_info = { 511static const struct ide_port_info au1xxx_port_info = {
512 .init_dma = auide_ddma_init,
513 .port_ops = &au1xxx_port_ops, 513 .port_ops = &au1xxx_port_ops,
514 .host_flags = IDE_HFLAG_POST_SET_MODE | 514 .host_flags = IDE_HFLAG_POST_SET_MODE |
515 IDE_HFLAG_NO_DMA | /* no SFF-style DMA */
516 IDE_HFLAG_NO_IO_32BIT | 515 IDE_HFLAG_NO_IO_32BIT |
517 IDE_HFLAG_UNMASK_IRQS, 516 IDE_HFLAG_UNMASK_IRQS,
518 .pio_mask = ATA_PIO4, 517 .pio_mask = ATA_PIO4,
@@ -606,8 +605,6 @@ static int au_ide_probe(struct device *dev)
606 auide_hwif.hwif = hwif; 605 auide_hwif.hwif = hwif;
607 hwif->hwif_data = &auide_hwif; 606 hwif->hwif_data = &auide_hwif;
608 607
609 auide_ddma_init(&auide_hwif);
610
611 idx[0] = hwif->index; 608 idx[0] = hwif->index;
612 609
613 ide_device_add(idx, &au1xxx_port_info); 610 ide_device_add(idx, &au1xxx_port_info);