summaryrefslogtreecommitdiff
path: root/drivers/ide/pci/cmd64x.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 00:30:07 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 00:30:07 +0200
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)
if (!hwif->dma_base)
return;
- hwif->mwdma_mask = 0x07;
- hwif->ultra_mask = hwif->cds->udma_mask;
-
/*
* UltraDMA only supported on PCI646U and PCI646U2, which
* correspond to revisions 0x03, 0x05 and 0x07 respectively.
@@ -586,6 +583,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.enablebits = {{0x00,0x00,0x00}, {0x51,0x08,0x08}},
.host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO5,
+ .mwdma_mask = ATA_MWDMA2,
.udma_mask = 0x00, /* no udma */
},{ /* 1 */
.name = "CMD646",
@@ -595,7 +593,8 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
.host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO5,
- .udma_mask = 0x07, /* udma0-2 */
+ .mwdma_mask = ATA_MWDMA2,
+ .udma_mask = ATA_UDMA2,
},{ /* 2 */
.name = "CMD648",
.init_setup = init_setup_cmd64x,
@@ -604,7 +603,8 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
.host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO5,
- .udma_mask = 0x1f, /* udma0-4 */
+ .mwdma_mask = ATA_MWDMA2,
+ .udma_mask = ATA_UDMA4,
},{ /* 3 */
.name = "CMD649",
.init_setup = init_setup_cmd64x,
@@ -613,7 +613,8 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
.host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO5,
- .udma_mask = 0x3f, /* udma0-5 */
+ .mwdma_mask = ATA_MWDMA2,
+ .udma_mask = ATA_UDMA5,
}
};