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: NSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 b552a2c1
...@@ -381,12 +381,11 @@ static void auide_dma_timeout(ide_drive_t *drive) ...@@ -381,12 +381,11 @@ static void auide_dma_timeout(ide_drive_t *drive)
hwif->ide_dma_end(drive); hwif->ide_dma_end(drive);
} }
static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
static int auide_ddma_init(_auide_hwif *auide) { {
_auide_hwif *auide = (_auide_hwif *)hwif->hwif_data;
dbdev_tab_t source_dev_tab, target_dev_tab; dbdev_tab_t source_dev_tab, target_dev_tab;
u32 dev_id, tsize, devwidth, flags; u32 dev_id, tsize, devwidth, flags;
ide_hwif_t *hwif = auide->hwif;
dev_id = AU1XXX_ATA_DDMA_REQ; dev_id = AU1XXX_ATA_DDMA_REQ;
...@@ -443,9 +442,9 @@ static int auide_ddma_init(_auide_hwif *auide) { ...@@ -443,9 +442,9 @@ static int auide_ddma_init(_auide_hwif *auide) {
return 0; return 0;
} }
#else #else
static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
static int auide_ddma_init( _auide_hwif *auide )
{ {
_auide_hwif *auide = (_auide_hwif *)hwif->hwif_data;
dbdev_tab_t source_dev_tab; dbdev_tab_t source_dev_tab;
int flags; int flags;
...@@ -510,9 +509,9 @@ static const struct ide_port_ops au1xxx_port_ops = { ...@@ -510,9 +509,9 @@ static const struct ide_port_ops au1xxx_port_ops = {
}; };
static const struct ide_port_info au1xxx_port_info = { static const struct ide_port_info au1xxx_port_info = {
.init_dma = auide_ddma_init,
.port_ops = &au1xxx_port_ops, .port_ops = &au1xxx_port_ops,
.host_flags = IDE_HFLAG_POST_SET_MODE | .host_flags = IDE_HFLAG_POST_SET_MODE |
IDE_HFLAG_NO_DMA | /* no SFF-style DMA */
IDE_HFLAG_NO_IO_32BIT | IDE_HFLAG_NO_IO_32BIT |
IDE_HFLAG_UNMASK_IRQS, IDE_HFLAG_UNMASK_IRQS,
.pio_mask = ATA_PIO4, .pio_mask = ATA_PIO4,
...@@ -606,8 +605,6 @@ static int au_ide_probe(struct device *dev) ...@@ -606,8 +605,6 @@ static int au_ide_probe(struct device *dev)
auide_hwif.hwif = hwif; auide_hwif.hwif = hwif;
hwif->hwif_data = &auide_hwif; hwif->hwif_data = &auide_hwif;
auide_ddma_init(&auide_hwif);
idx[0] = hwif->index; idx[0] = hwif->index;
ide_device_add(idx, &au1xxx_port_info); ide_device_add(idx, &au1xxx_port_info);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册