aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-02-16 20:40:23 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-02-16 20:40:23 -0500
commit946f8e4abb1e30a5b69e388543f665e5e424d2fe (patch)
tree88f1f83a6f6979c87593fd299dfbbcb497c0f96b /drivers/ide
parent15b854853515e7223fd7224de53799af4a66059c (diff)
svwks: small cleanup
* remove redundant svwks_ide_dma_end() [ __ide_dma_end() is used by default ] * remove init_dma_svwks() so the default ide_setup_dma() function is used [ init_setup_csb6() takes care of not initializing disabled channels ] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/pci/serverworks.c34
1 files changed, 4 insertions, 30 deletions
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
index ea9a28a45853..81a0742c4594 100644
--- a/drivers/ide/pci/serverworks.c
+++ b/drivers/ide/pci/serverworks.c
@@ -339,13 +339,6 @@ fast_ata_pio:
339 return 0; 339 return 0;
340} 340}
341 341
342/* This can go soon */
343
344static int svwks_ide_dma_end (ide_drive_t *drive)
345{
346 return __ide_dma_end(drive);
347}
348
349static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const char *name) 342static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const char *name)
350{ 343{
351 unsigned int reg; 344 unsigned int reg;
@@ -537,10 +530,10 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
537 } 530 }
538 531
539 hwif->ide_dma_check = &svwks_config_drive_xfer_rate; 532 hwif->ide_dma_check = &svwks_config_drive_xfer_rate;
540 if (hwif->pci_dev->device == PCI_DEVICE_ID_SERVERWORKS_OSB4IDE) 533 if (hwif->pci_dev->device != PCI_DEVICE_ID_SERVERWORKS_OSB4IDE) {
541 hwif->ide_dma_end = &svwks_ide_dma_end; 534 if (!hwif->udma_four)
542 else if (!(hwif->udma_four)) 535 hwif->udma_four = ata66_svwks(hwif);
543 hwif->udma_four = ata66_svwks(hwif); 536 }
544 if (!noautodma) 537 if (!noautodma)
545 hwif->autodma = 1; 538 hwif->autodma = 1;
546 539
@@ -551,21 +544,6 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
551 hwif->drives[1].autotune = (!(dma_stat & 0x40)); 544 hwif->drives[1].autotune = (!(dma_stat & 0x40));
552} 545}
553 546
554/*
555 * We allow the BM-DMA driver to only work on enabled interfaces.
556 */
557static void __devinit init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
558{
559 struct pci_dev *dev = hwif->pci_dev;
560
561 if (((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE) ||
562 (dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2)) &&
563 (!(PCI_FUNC(dev->devfn) & 1)) && (hwif->channel))
564 return;
565
566 ide_setup_dma(hwif, dmabase, 8);
567}
568
569static int __devinit init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d) 547static int __devinit init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
570{ 548{
571 return ide_setup_pci_device(dev, d); 549 return ide_setup_pci_device(dev, d);
@@ -600,7 +578,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
600 .init_setup = init_setup_svwks, 578 .init_setup = init_setup_svwks,
601 .init_chipset = init_chipset_svwks, 579 .init_chipset = init_chipset_svwks,
602 .init_hwif = init_hwif_svwks, 580 .init_hwif = init_hwif_svwks,
603 .init_dma = init_dma_svwks,
604 .channels = 2, 581 .channels = 2,
605 .autodma = AUTODMA, 582 .autodma = AUTODMA,
606 .bootable = ON_BOARD, 583 .bootable = ON_BOARD,
@@ -609,7 +586,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
609 .init_setup = init_setup_csb6, 586 .init_setup = init_setup_csb6,
610 .init_chipset = init_chipset_svwks, 587 .init_chipset = init_chipset_svwks,
611 .init_hwif = init_hwif_svwks, 588 .init_hwif = init_hwif_svwks,
612 .init_dma = init_dma_svwks,
613 .channels = 2, 589 .channels = 2,
614 .autodma = AUTODMA, 590 .autodma = AUTODMA,
615 .bootable = ON_BOARD, 591 .bootable = ON_BOARD,
@@ -618,7 +594,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
618 .init_setup = init_setup_csb6, 594 .init_setup = init_setup_csb6,
619 .init_chipset = init_chipset_svwks, 595 .init_chipset = init_chipset_svwks,
620 .init_hwif = init_hwif_svwks, 596 .init_hwif = init_hwif_svwks,
621 .init_dma = init_dma_svwks,
622 .channels = 1, /* 2 */ 597 .channels = 1, /* 2 */
623 .autodma = AUTODMA, 598 .autodma = AUTODMA,
624 .bootable = ON_BOARD, 599 .bootable = ON_BOARD,
@@ -627,7 +602,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
627 .init_setup = init_setup_svwks, 602 .init_setup = init_setup_svwks,
628 .init_chipset = init_chipset_svwks, 603 .init_chipset = init_chipset_svwks,
629 .init_hwif = init_hwif_svwks, 604 .init_hwif = init_hwif_svwks,
630 .init_dma = init_dma_svwks,
631 .channels = 1, /* 2 */ 605 .channels = 1, /* 2 */
632 .autodma = AUTODMA, 606 .autodma = AUTODMA,
633 .bootable = ON_BOARD, 607 .bootable = ON_BOARD,