aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/pdc202xx_old.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/pdc202xx_old.c')
-rw-r--r--drivers/ide/pci/pdc202xx_old.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index 8c3e8cf36ec9..e1d2337a9f1d 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -179,19 +179,6 @@ static void pdc_old_disable_66MHz_clock(ide_hwif_t *hwif)
179 outb(clock & ~(hwif->channel ? 0x08 : 0x02), clock_reg); 179 outb(clock & ~(hwif->channel ? 0x08 : 0x02), clock_reg);
180} 180}
181 181
182static int pdc202xx_config_drive_xfer_rate (ide_drive_t *drive)
183{
184 drive->init_speed = 0;
185
186 if (ide_tune_dma(drive))
187 return 0;
188
189 if (ide_use_fast_pio(drive))
190 ide_set_max_pio(drive);
191
192 return -1;
193}
194
195static int pdc202xx_quirkproc (ide_drive_t *drive) 182static int pdc202xx_quirkproc (ide_drive_t *drive)
196{ 183{
197 const char **list, *model = drive->id->model; 184 const char **list, *model = drive->id->model;
@@ -325,8 +312,6 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif)
325 (dev->device == PCI_DEVICE_ID_PROMISE_20265)) 312 (dev->device == PCI_DEVICE_ID_PROMISE_20265))
326 hwif->rqsize = 256; 313 hwif->rqsize = 256;
327 314
328 hwif->autodma = 0;
329
330 hwif->set_pio_mode = &pdc202xx_set_pio_mode; 315 hwif->set_pio_mode = &pdc202xx_set_pio_mode;
331 hwif->set_dma_mode = &pdc202xx_set_mode; 316 hwif->set_dma_mode = &pdc202xx_set_mode;
332 317
@@ -347,7 +332,6 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif)
347 hwif->swdma_mask = 0x07; 332 hwif->swdma_mask = 0x07;
348 hwif->atapi_dma = 1; 333 hwif->atapi_dma = 1;
349 334
350 hwif->ide_dma_check = &pdc202xx_config_drive_xfer_rate;
351 hwif->dma_lost_irq = &pdc202xx_dma_lost_irq; 335 hwif->dma_lost_irq = &pdc202xx_dma_lost_irq;
352 hwif->dma_timeout = &pdc202xx_dma_timeout; 336 hwif->dma_timeout = &pdc202xx_dma_timeout;
353 337
@@ -359,10 +343,6 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif)
359 hwif->ide_dma_end = &pdc202xx_old_ide_dma_end; 343 hwif->ide_dma_end = &pdc202xx_old_ide_dma_end;
360 } 344 }
361 hwif->ide_dma_test_irq = &pdc202xx_old_ide_dma_test_irq; 345 hwif->ide_dma_test_irq = &pdc202xx_old_ide_dma_test_irq;
362
363 if (!noautodma)
364 hwif->autodma = 1;
365 hwif->drives[0].autodma = hwif->drives[1].autodma = hwif->autodma;
366} 346}
367 347
368static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, unsigned long dmabase) 348static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, unsigned long dmabase)
@@ -510,12 +490,12 @@ static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_dev
510 return d->init_setup(dev, d); 490 return d->init_setup(dev, d);
511} 491}
512 492
513static struct pci_device_id pdc202xx_pci_tbl[] = { 493static const struct pci_device_id pdc202xx_pci_tbl[] = {
514 { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20246, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 494 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20246), 0 },
515 { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20262, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, 495 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20262), 1 },
516 { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20263, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, 496 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20263), 2 },
517 { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20265, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3}, 497 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20265), 3 },
518 { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20267, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, 498 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20267), 4 },
519 { 0, }, 499 { 0, },
520}; 500};
521MODULE_DEVICE_TABLE(pci, pdc202xx_pci_tbl); 501MODULE_DEVICE_TABLE(pci, pdc202xx_pci_tbl);