aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/via82cxxx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/via82cxxx.c')
-rw-r--r--drivers/ide/pci/via82cxxx.c37
1 files changed, 5 insertions, 32 deletions
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index 479e49661032..b25fb65b240e 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -197,24 +197,6 @@ static void via_set_pio_mode(ide_drive_t *drive, const u8 pio)
197 via_set_drive(drive, XFER_PIO_0 + pio); 197 via_set_drive(drive, XFER_PIO_0 + pio);
198} 198}
199 199
200/**
201 * via82cxxx_ide_dma_check - set up for DMA if possible
202 * @drive: IDE drive to set up
203 *
204 * Set up the drive for the highest supported speed considering the
205 * driver, controller and cable
206 */
207
208static int via82cxxx_ide_dma_check (ide_drive_t *drive)
209{
210 if (ide_tune_dma(drive))
211 return 0;
212
213 ide_set_max_pio(drive);
214
215 return -1;
216}
217
218static struct via_isa_bridge *via_config_find(struct pci_dev **isa) 200static struct via_isa_bridge *via_config_find(struct pci_dev **isa)
219{ 201{
220 struct via_isa_bridge *via_config; 202 struct via_isa_bridge *via_config;
@@ -443,8 +425,6 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif)
443 struct via82cxxx_dev *vdev = pci_get_drvdata(hwif->pci_dev); 425 struct via82cxxx_dev *vdev = pci_get_drvdata(hwif->pci_dev);
444 int i; 426 int i;
445 427
446 hwif->autodma = 0;
447
448 hwif->set_pio_mode = &via_set_pio_mode; 428 hwif->set_pio_mode = &via_set_pio_mode;
449 hwif->set_dma_mode = &via_set_drive; 429 hwif->set_dma_mode = &via_set_drive;
450 430
@@ -458,7 +438,6 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif)
458 hwif->drives[i].io_32bit = 1; 438 hwif->drives[i].io_32bit = 1;
459 hwif->drives[i].unmask = (vdev->via_config->flags & VIA_NO_UNMASK) ? 0 : 1; 439 hwif->drives[i].unmask = (vdev->via_config->flags & VIA_NO_UNMASK) ? 0 : 1;
460 hwif->drives[i].autotune = 1; 440 hwif->drives[i].autotune = 1;
461 hwif->drives[i].dn = hwif->channel * 2 + i;
462 } 441 }
463 442
464 if (!hwif->dma_base) 443 if (!hwif->dma_base)
@@ -472,12 +451,6 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif)
472 451
473 if (hwif->cbl != ATA_CBL_PATA40_SHORT) 452 if (hwif->cbl != ATA_CBL_PATA40_SHORT)
474 hwif->cbl = via82cxxx_cable_detect(hwif); 453 hwif->cbl = via82cxxx_cable_detect(hwif);
475
476 hwif->ide_dma_check = &via82cxxx_ide_dma_check;
477 if (!noautodma)
478 hwif->autodma = 1;
479 hwif->drives[0].autodma = hwif->autodma;
480 hwif->drives[1].autodma = hwif->autodma;
481} 454}
482 455
483static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = { 456static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
@@ -522,11 +495,11 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i
522 return ide_setup_pci_device(dev, &via82cxxx_chipsets[id->driver_data]); 495 return ide_setup_pci_device(dev, &via82cxxx_chipsets[id->driver_data]);
523} 496}
524 497
525static struct pci_device_id via_pci_tbl[] = { 498static const struct pci_device_id via_pci_tbl[] = {
526 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 499 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), 0 },
527 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 500 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C586_1), 0 },
528 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_6410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, 501 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_6410), 1 },
529 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_SATA_EIDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, 502 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_SATA_EIDE), 1 },
530 { 0, }, 503 { 0, },
531}; 504};
532MODULE_DEVICE_TABLE(pci, via_pci_tbl); 505MODULE_DEVICE_TABLE(pci, via_pci_tbl);