aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/scc_pata.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-18 18:30:07 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-18 18:30:07 -0400
commit5f8b6c34854a966fe5eb7241fde0419d47d5d408 (patch)
tree052afd508d9cd314f503d938182db55355f1b392 /drivers/ide/pci/scc_pata.c
parent9adf768a398745c539623210502b521e671c59d7 (diff)
ide: add ->mwdma_mask and ->swdma_mask to ide_pci_device_t (take 2)
* Add ->mwdma_mask and ->swdma_mask to ide_pci_device_t. * Set ide_hwif_t DMA masks using DMA masks from ide_pci_device_t in setup-pci.c::ide_pci_setup_ports() (iff DMA base is valid and ->init_hwif method may still override them). * Convert IDE PCI host drivers to use ide_pci_device_t DMA masks. While at it: * Use ATA_{UDMA,MWDMA,SWDMA}* defines. * hpt34x.c: add separate ide_pci_device_t instances for HPT343 and HPT345. * serverworks.c: fix DMA masks being set before checking DMA base. v2: * Add missing masks to DECLARE_GENERIC_PCI_DEV() macro. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/scc_pata.c')
-rw-r--r--drivers/ide/pci/scc_pata.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index bfddc4270827..2b1d5bd0009f 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -472,7 +472,7 @@ static u8 scc_udma_filter(ide_drive_t *drive)
472 if ((drive->media != ide_disk) && (mask & 0xE0)) { 472 if ((drive->media != ide_disk) && (mask & 0xE0)) {
473 printk(KERN_INFO "%s: limit %s to UDMA4\n", 473 printk(KERN_INFO "%s: limit %s to UDMA4\n",
474 SCC_PATA_NAME, drive->name); 474 SCC_PATA_NAME, drive->name);
475 mask = 0x1F; 475 mask = ATA_UDMA4;
476 } 476 }
477 477
478 return mask; 478 return mask;
@@ -686,13 +686,10 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif)
686 hwif->drives[0].autotune = IDE_TUNE_AUTO; 686 hwif->drives[0].autotune = IDE_TUNE_AUTO;
687 hwif->drives[1].autotune = IDE_TUNE_AUTO; 687 hwif->drives[1].autotune = IDE_TUNE_AUTO;
688 688
689 if (in_be32((void __iomem *)(hwif->config_data + 0xff0)) & CCKCTRL_ATACLKOEN) { 689 if (in_be32((void __iomem *)(hwif->config_data + 0xff0)) & CCKCTRL_ATACLKOEN)
690 hwif->ultra_mask = 0x7f; /* 133MHz */ 690 hwif->ultra_mask = ATA_UDMA6; /* 133MHz */
691 } else { 691 else
692 hwif->ultra_mask = 0x3f; /* 100MHz */ 692 hwif->ultra_mask = ATA_UDMA5; /* 100MHz */
693 }
694 hwif->mwdma_mask = 0x00;
695 hwif->swdma_mask = 0x00;
696 693
697 /* we support 80c cable only. */ 694 /* we support 80c cable only. */
698 hwif->cbl = ATA_CBL_PATA80; 695 hwif->cbl = ATA_CBL_PATA80;