pdc202xx_old: remove init_dma_pdc202xx()
[safe/jmp/linux-2.6] / drivers / ide / pci / sl82c105.c
index da13a12..8ac4e62 100644 (file)
 #include <linux/types.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
-#include <linux/timer.h>
-#include <linux/mm.h>
-#include <linux/ioport.h>
-#include <linux/interrupt.h>
-#include <linux/blkdev.h>
 #include <linux/hdreg.h>
 #include <linux/pci.h>
 #include <linux/ide.h>
 
 #include <asm/io.h>
-#include <asm/dma.h>
 
 #undef DEBUG
 
@@ -185,7 +179,7 @@ static void sl82c105_dma_start(ide_drive_t *drive)
        struct pci_dev *dev     = to_pci_dev(hwif->dev);
        int reg                 = 0x44 + drive->dn * 4;
 
-       DBG(("%s(drive:%s)\n", __FUNCTION__, drive->name));
+       DBG(("%s(drive:%s)\n", __func__, drive->name));
 
        pci_write_config_word(dev, reg, drive->drive_data >> 16);
 
@@ -209,7 +203,7 @@ static int sl82c105_dma_end(ide_drive_t *drive)
        int reg                 = 0x44 + drive->dn * 4;
        int ret;
 
-       DBG(("%s(drive:%s)\n", __FUNCTION__, drive->name));
+       DBG(("%s(drive:%s)\n", __func__, drive->name));
 
        ret = __ide_dma_end(drive);
 
@@ -298,10 +292,6 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
 
        DBG(("init_hwif_sl82c105(hwif: ide%d)\n", hwif->index));
 
-       hwif->set_pio_mode      = &sl82c105_set_pio_mode;
-       hwif->set_dma_mode      = &sl82c105_set_dma_mode;
-       hwif->resetproc         = &sl82c105_resetproc;
-
        if (!hwif->dma_base)
                return;
 
@@ -327,15 +317,25 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
                hwif->serialized = hwif->mate->serialized = 1;
 }
 
+static const struct ide_port_ops sl82c105_port_ops = {
+       .set_pio_mode           = sl82c105_set_pio_mode,
+       .set_dma_mode           = sl82c105_set_dma_mode,
+       .resetproc              = sl82c105_resetproc,
+};
+
 static const struct ide_port_info sl82c105_chipset __devinitdata = {
        .name           = "W82C105",
        .init_chipset   = init_chipset_sl82c105,
        .init_hwif      = init_hwif_sl82c105,
        .enablebits     = {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
+       .port_ops       = &sl82c105_port_ops,
        .host_flags     = IDE_HFLAG_IO_32BIT |
                          IDE_HFLAG_UNMASK_IRQS |
-                         IDE_HFLAG_NO_AUTODMA |
-                         IDE_HFLAG_BOOTABLE,
+/* FIXME: check for Compatibility mode in generic IDE PCI code */
+#if defined(CONFIG_LOPEC) || defined(CONFIG_SANDPOINT)
+                         IDE_HFLAG_FORCE_LEGACY_IRQS |
+#endif
+                         IDE_HFLAG_NO_AUTODMA,
        .pio_mask       = ATA_PIO5,
 };