aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/cmd64x.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/cmd64x.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/cmd64x.c')
-rw-r--r--drivers/ide/pci/cmd64x.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index 360ca32a0f7e..0ad57c497b0d 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -517,9 +517,6 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
517 if (!hwif->dma_base) 517 if (!hwif->dma_base)
518 return; 518 return;
519 519
520 hwif->mwdma_mask = 0x07;
521 hwif->ultra_mask = hwif->cds->udma_mask;
522
523 /* 520 /*
524 * UltraDMA only supported on PCI646U and PCI646U2, which 521 * UltraDMA only supported on PCI646U and PCI646U2, which
525 * correspond to revisions 0x03, 0x05 and 0x07 respectively. 522 * correspond to revisions 0x03, 0x05 and 0x07 respectively.
@@ -586,6 +583,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
586 .enablebits = {{0x00,0x00,0x00}, {0x51,0x08,0x08}}, 583 .enablebits = {{0x00,0x00,0x00}, {0x51,0x08,0x08}},
587 .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE, 584 .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
588 .pio_mask = ATA_PIO5, 585 .pio_mask = ATA_PIO5,
586 .mwdma_mask = ATA_MWDMA2,
589 .udma_mask = 0x00, /* no udma */ 587 .udma_mask = 0x00, /* no udma */
590 },{ /* 1 */ 588 },{ /* 1 */
591 .name = "CMD646", 589 .name = "CMD646",
@@ -595,7 +593,8 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
595 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 593 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
596 .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE, 594 .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
597 .pio_mask = ATA_PIO5, 595 .pio_mask = ATA_PIO5,
598 .udma_mask = 0x07, /* udma0-2 */ 596 .mwdma_mask = ATA_MWDMA2,
597 .udma_mask = ATA_UDMA2,
599 },{ /* 2 */ 598 },{ /* 2 */
600 .name = "CMD648", 599 .name = "CMD648",
601 .init_setup = init_setup_cmd64x, 600 .init_setup = init_setup_cmd64x,
@@ -604,7 +603,8 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
604 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 603 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
605 .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE, 604 .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
606 .pio_mask = ATA_PIO5, 605 .pio_mask = ATA_PIO5,
607 .udma_mask = 0x1f, /* udma0-4 */ 606 .mwdma_mask = ATA_MWDMA2,
607 .udma_mask = ATA_UDMA4,
608 },{ /* 3 */ 608 },{ /* 3 */
609 .name = "CMD649", 609 .name = "CMD649",
610 .init_setup = init_setup_cmd64x, 610 .init_setup = init_setup_cmd64x,
@@ -613,7 +613,8 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
613 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 613 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
614 .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE, 614 .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
615 .pio_mask = ATA_PIO5, 615 .pio_mask = ATA_PIO5,
616 .udma_mask = 0x3f, /* udma0-5 */ 616 .mwdma_mask = ATA_MWDMA2,
617 .udma_mask = ATA_UDMA5,
617 } 618 }
618}; 619};
619 620