diff options
Diffstat (limited to 'drivers/ide/pci/sc1200.c')
-rw-r--r-- | drivers/ide/pci/sc1200.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index ee0e3f554d9a..54c5c98a2e26 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/sc1200.c Version 0.95 Jun 16 2007 | 2 | * linux/drivers/ide/pci/sc1200.c Version 0.97 Aug 3 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 2000-2002 Mark Lord <mlord@pobox.com> | 4 | * Copyright (C) 2000-2002 Mark Lord <mlord@pobox.com> |
5 | * Copyright (C) 2007 Bartlomiej Zolnierkiewicz | 5 | * Copyright (C) 2007 Bartlomiej Zolnierkiewicz |
@@ -199,19 +199,6 @@ static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode) | |||
199 | } | 199 | } |
200 | } | 200 | } |
201 | 201 | ||
202 | /* | ||
203 | * sc1200_config_dma() handles selection/setting of DMA/UDMA modes | ||
204 | * for both the chipset and drive. | ||
205 | */ | ||
206 | static int sc1200_config_dma (ide_drive_t *drive) | ||
207 | { | ||
208 | if (ide_tune_dma(drive)) | ||
209 | return 0; | ||
210 | |||
211 | return 1; | ||
212 | } | ||
213 | |||
214 | |||
215 | /* Replacement for the standard ide_dma_end action in | 202 | /* Replacement for the standard ide_dma_end action in |
216 | * dma_proc. | 203 | * dma_proc. |
217 | * | 204 | * |
@@ -377,27 +364,22 @@ static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif) | |||
377 | { | 364 | { |
378 | if (hwif->mate) | 365 | if (hwif->mate) |
379 | hwif->serialized = hwif->mate->serialized = 1; | 366 | hwif->serialized = hwif->mate->serialized = 1; |
380 | hwif->autodma = 0; | ||
381 | 367 | ||
382 | hwif->set_pio_mode = &sc1200_set_pio_mode; | 368 | hwif->set_pio_mode = &sc1200_set_pio_mode; |
383 | hwif->set_dma_mode = &sc1200_set_dma_mode; | 369 | hwif->set_dma_mode = &sc1200_set_dma_mode; |
384 | 370 | ||
371 | hwif->drives[0].autotune = 1; | ||
372 | hwif->drives[1].autotune = 1; | ||
373 | |||
385 | if (hwif->dma_base == 0) | 374 | if (hwif->dma_base == 0) |
386 | return; | 375 | return; |
387 | 376 | ||
388 | hwif->udma_filter = sc1200_udma_filter; | 377 | hwif->udma_filter = sc1200_udma_filter; |
389 | hwif->ide_dma_check = &sc1200_config_dma; | ||
390 | hwif->ide_dma_end = &sc1200_ide_dma_end; | 378 | hwif->ide_dma_end = &sc1200_ide_dma_end; |
391 | 379 | ||
392 | if (!noautodma) | ||
393 | hwif->autodma = 1; | ||
394 | |||
395 | hwif->atapi_dma = 1; | 380 | hwif->atapi_dma = 1; |
396 | hwif->ultra_mask = 0x07; | 381 | hwif->ultra_mask = 0x07; |
397 | hwif->mwdma_mask = 0x07; | 382 | hwif->mwdma_mask = 0x07; |
398 | |||
399 | hwif->drives[0].autodma = hwif->autodma; | ||
400 | hwif->drives[1].autodma = hwif->autodma; | ||
401 | } | 383 | } |
402 | 384 | ||
403 | static ide_pci_device_t sc1200_chipset __devinitdata = { | 385 | static ide_pci_device_t sc1200_chipset __devinitdata = { |
@@ -414,8 +396,8 @@ static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_devic | |||
414 | return ide_setup_pci_device(dev, &sc1200_chipset); | 396 | return ide_setup_pci_device(dev, &sc1200_chipset); |
415 | } | 397 | } |
416 | 398 | ||
417 | static struct pci_device_id sc1200_pci_tbl[] = { | 399 | static const struct pci_device_id sc1200_pci_tbl[] = { |
418 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_IDE), 0}, | 400 | { PCI_VDEVICE(NS, PCI_DEVICE_ID_NS_SCx200_IDE), 0}, |
419 | { 0, }, | 401 | { 0, }, |
420 | }; | 402 | }; |
421 | MODULE_DEVICE_TABLE(pci, sc1200_pci_tbl); | 403 | MODULE_DEVICE_TABLE(pci, sc1200_pci_tbl); |