]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/ide/pci/tc86c001.c
ide: add ->mwdma_mask and ->swdma_mask to ide_pci_device_t (take 2)
[mirror_ubuntu-artful-kernel.git] / drivers / ide / pci / tc86c001.c
index 840415d68d38e56482e24f5e9a61809d12db7a56..9f50927e90982091be10bc4b4563fe13456130b4 100644 (file)
@@ -162,17 +162,6 @@ static int tc86c001_busproc(ide_drive_t *drive, int state)
        return 0;
 }
 
-static int tc86c001_config_drive_xfer_rate(ide_drive_t *drive)
-{
-       if (ide_tune_dma(drive))
-               return 0;
-
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
-
-       return -1;
-}
-
 static void __devinit init_hwif_tc86c001(ide_hwif_t *hwif)
 {
        unsigned long sc_base   = pci_resource_start(hwif->pci_dev, 5);
@@ -209,11 +198,6 @@ static void __devinit init_hwif_tc86c001(ide_hwif_t *hwif)
        /* Sector Count Register limit */
        hwif->rqsize     = 0xffff;
 
-       hwif->atapi_dma  = 1;
-       hwif->ultra_mask = 0x1f;
-       hwif->mwdma_mask = 0x07;
-
-       hwif->ide_dma_check     = &tc86c001_config_drive_xfer_rate;
        hwif->dma_start         = &tc86c001_dma_start;
 
        if (hwif->cbl != ATA_CBL_PATA40_SHORT) {
@@ -224,10 +208,6 @@ static void __devinit init_hwif_tc86c001(ide_hwif_t *hwif)
                scr1 = hwif->INW(sc_base + 0x00);
                hwif->cbl = (scr1 & 0x2000) ? ATA_CBL_PATA40 : ATA_CBL_PATA80;
        }
-
-       if (!noautodma)
-               hwif->autodma = 1;
-       hwif->drives[0].autodma = hwif->drives[1].autodma = hwif->autodma;
 }
 
 static unsigned int __devinit init_chipset_tc86c001(struct pci_dev *dev,
@@ -244,10 +224,10 @@ static ide_pci_device_t tc86c001_chipset __devinitdata = {
        .name           = "TC86C001",
        .init_chipset   = init_chipset_tc86c001,
        .init_hwif      = init_hwif_tc86c001,
-       .autodma        = AUTODMA,
-       .bootable       = OFF_BOARD,
-       .host_flags     = IDE_HFLAG_SINGLE,
+       .host_flags     = IDE_HFLAG_SINGLE | IDE_HFLAG_OFF_BOARD,
        .pio_mask       = ATA_PIO4,
+       .mwdma_mask     = ATA_MWDMA2,
+       .udma_mask      = ATA_UDMA4,
 };
 
 static int __devinit tc86c001_init_one(struct pci_dev *dev,
@@ -256,9 +236,8 @@ static int __devinit tc86c001_init_one(struct pci_dev *dev,
        return ide_setup_pci_device(dev, &tc86c001_chipset);
 }
 
-static struct pci_device_id tc86c001_pci_tbl[] = {
-       { PCI_VENDOR_ID_TOSHIBA_2, PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE,
-         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+static const struct pci_device_id tc86c001_pci_tbl[] = {
+       { PCI_VDEVICE(TOSHIBA_2, PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE), 0 },
        { 0, }
 };
 MODULE_DEVICE_TABLE(pci, tc86c001_pci_tbl);