diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-19 00:30:07 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-19 00:30:07 +0200 |
commit | 5f8b6c34854a966fe5eb7241fde0419d47d5d408 (patch) | |
tree | 052afd508d9cd314f503d938182db55355f1b392 /drivers/ide/pci/pdc202xx_new.c | |
parent | pdc202xx_old: remove broken SWDMA support (diff) | |
download | linux-5f8b6c34854a966fe5eb7241fde0419d47d5d408.tar.xz linux-5f8b6c34854a966fe5eb7241fde0419d47d5d408.zip |
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/pdc202xx_new.c')
-rw-r--r-- | drivers/ide/pci/pdc202xx_new.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index 24efda25c034..a3443fce40f1 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c @@ -482,9 +482,6 @@ static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif) if (hwif->dma_base == 0) return; - hwif->ultra_mask = hwif->cds->udma_mask; - hwif->mwdma_mask = 0x07; - if (hwif->cbl != ATA_CBL_PATA40_SHORT) hwif->cbl = pdcnew_cable_detect(hwif); } @@ -553,7 +550,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { .init_hwif = init_hwif_pdc202new, .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, .pio_mask = ATA_PIO4, - .udma_mask = 0x3f, /* udma0-5 */ + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA5, },{ /* 1 */ .name = "PDC20269", .init_setup = init_setup_pdcnew, @@ -561,7 +559,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { .init_hwif = init_hwif_pdc202new, .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, .pio_mask = ATA_PIO4, - .udma_mask = 0x7f, /* udma0-6*/ + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA6, },{ /* 2 */ .name = "PDC20270", .init_setup = init_setup_pdc20270, @@ -569,7 +568,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { .init_hwif = init_hwif_pdc202new, .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, .pio_mask = ATA_PIO4, - .udma_mask = 0x3f, /* udma0-5 */ + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA5, },{ /* 3 */ .name = "PDC20271", .init_setup = init_setup_pdcnew, @@ -577,7 +577,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { .init_hwif = init_hwif_pdc202new, .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, .pio_mask = ATA_PIO4, - .udma_mask = 0x7f, /* udma0-6*/ + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA6, },{ /* 4 */ .name = "PDC20275", .init_setup = init_setup_pdcnew, @@ -585,7 +586,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { .init_hwif = init_hwif_pdc202new, .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, .pio_mask = ATA_PIO4, - .udma_mask = 0x7f, /* udma0-6*/ + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA6, },{ /* 5 */ .name = "PDC20276", .init_setup = init_setup_pdc20276, @@ -593,7 +595,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { .init_hwif = init_hwif_pdc202new, .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, .pio_mask = ATA_PIO4, - .udma_mask = 0x7f, /* udma0-6*/ + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA6, },{ /* 6 */ .name = "PDC20277", .init_setup = init_setup_pdcnew, @@ -601,7 +604,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { .init_hwif = init_hwif_pdc202new, .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, .pio_mask = ATA_PIO4, - .udma_mask = 0x7f, /* udma0-6*/ + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA6, } }; |