diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-18 18:30:07 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-18 18:30:07 -0400 |
commit | 5f8b6c34854a966fe5eb7241fde0419d47d5d408 (patch) | |
tree | 052afd508d9cd314f503d938182db55355f1b392 /drivers/ide/pci/pdc202xx_new.c | |
parent | 9adf768a398745c539623210502b521e671c59d7 (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/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) | |||
482 | if (hwif->dma_base == 0) | 482 | if (hwif->dma_base == 0) |
483 | return; | 483 | return; |
484 | 484 | ||
485 | hwif->ultra_mask = hwif->cds->udma_mask; | ||
486 | hwif->mwdma_mask = 0x07; | ||
487 | |||
488 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 485 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
489 | hwif->cbl = pdcnew_cable_detect(hwif); | 486 | hwif->cbl = pdcnew_cable_detect(hwif); |
490 | } | 487 | } |
@@ -553,7 +550,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
553 | .init_hwif = init_hwif_pdc202new, | 550 | .init_hwif = init_hwif_pdc202new, |
554 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, | 551 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, |
555 | .pio_mask = ATA_PIO4, | 552 | .pio_mask = ATA_PIO4, |
556 | .udma_mask = 0x3f, /* udma0-5 */ | 553 | .mwdma_mask = ATA_MWDMA2, |
554 | .udma_mask = ATA_UDMA5, | ||
557 | },{ /* 1 */ | 555 | },{ /* 1 */ |
558 | .name = "PDC20269", | 556 | .name = "PDC20269", |
559 | .init_setup = init_setup_pdcnew, | 557 | .init_setup = init_setup_pdcnew, |
@@ -561,7 +559,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
561 | .init_hwif = init_hwif_pdc202new, | 559 | .init_hwif = init_hwif_pdc202new, |
562 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, | 560 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, |
563 | .pio_mask = ATA_PIO4, | 561 | .pio_mask = ATA_PIO4, |
564 | .udma_mask = 0x7f, /* udma0-6*/ | 562 | .mwdma_mask = ATA_MWDMA2, |
563 | .udma_mask = ATA_UDMA6, | ||
565 | },{ /* 2 */ | 564 | },{ /* 2 */ |
566 | .name = "PDC20270", | 565 | .name = "PDC20270", |
567 | .init_setup = init_setup_pdc20270, | 566 | .init_setup = init_setup_pdc20270, |
@@ -569,7 +568,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
569 | .init_hwif = init_hwif_pdc202new, | 568 | .init_hwif = init_hwif_pdc202new, |
570 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, | 569 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, |
571 | .pio_mask = ATA_PIO4, | 570 | .pio_mask = ATA_PIO4, |
572 | .udma_mask = 0x3f, /* udma0-5 */ | 571 | .mwdma_mask = ATA_MWDMA2, |
572 | .udma_mask = ATA_UDMA5, | ||
573 | },{ /* 3 */ | 573 | },{ /* 3 */ |
574 | .name = "PDC20271", | 574 | .name = "PDC20271", |
575 | .init_setup = init_setup_pdcnew, | 575 | .init_setup = init_setup_pdcnew, |
@@ -577,7 +577,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
577 | .init_hwif = init_hwif_pdc202new, | 577 | .init_hwif = init_hwif_pdc202new, |
578 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, | 578 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, |
579 | .pio_mask = ATA_PIO4, | 579 | .pio_mask = ATA_PIO4, |
580 | .udma_mask = 0x7f, /* udma0-6*/ | 580 | .mwdma_mask = ATA_MWDMA2, |
581 | .udma_mask = ATA_UDMA6, | ||
581 | },{ /* 4 */ | 582 | },{ /* 4 */ |
582 | .name = "PDC20275", | 583 | .name = "PDC20275", |
583 | .init_setup = init_setup_pdcnew, | 584 | .init_setup = init_setup_pdcnew, |
@@ -585,7 +586,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
585 | .init_hwif = init_hwif_pdc202new, | 586 | .init_hwif = init_hwif_pdc202new, |
586 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, | 587 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, |
587 | .pio_mask = ATA_PIO4, | 588 | .pio_mask = ATA_PIO4, |
588 | .udma_mask = 0x7f, /* udma0-6*/ | 589 | .mwdma_mask = ATA_MWDMA2, |
590 | .udma_mask = ATA_UDMA6, | ||
589 | },{ /* 5 */ | 591 | },{ /* 5 */ |
590 | .name = "PDC20276", | 592 | .name = "PDC20276", |
591 | .init_setup = init_setup_pdc20276, | 593 | .init_setup = init_setup_pdc20276, |
@@ -593,7 +595,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
593 | .init_hwif = init_hwif_pdc202new, | 595 | .init_hwif = init_hwif_pdc202new, |
594 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, | 596 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, |
595 | .pio_mask = ATA_PIO4, | 597 | .pio_mask = ATA_PIO4, |
596 | .udma_mask = 0x7f, /* udma0-6*/ | 598 | .mwdma_mask = ATA_MWDMA2, |
599 | .udma_mask = ATA_UDMA6, | ||
597 | },{ /* 6 */ | 600 | },{ /* 6 */ |
598 | .name = "PDC20277", | 601 | .name = "PDC20277", |
599 | .init_setup = init_setup_pdcnew, | 602 | .init_setup = init_setup_pdcnew, |
@@ -601,7 +604,8 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
601 | .init_hwif = init_hwif_pdc202new, | 604 | .init_hwif = init_hwif_pdc202new, |
602 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, | 605 | .host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_OFF_BOARD, |
603 | .pio_mask = ATA_PIO4, | 606 | .pio_mask = ATA_PIO4, |
604 | .udma_mask = 0x7f, /* udma0-6*/ | 607 | .mwdma_mask = ATA_MWDMA2, |
608 | .udma_mask = ATA_UDMA6, | ||
605 | } | 609 | } |
606 | }; | 610 | }; |
607 | 611 | ||