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/serverworks.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/serverworks.c')
-rw-r--r-- | drivers/ide/pci/serverworks.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index 338eee81f021..760e0e3e118e 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
@@ -367,11 +367,6 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif) | |||
367 | hwif->set_dma_mode = &svwks_set_dma_mode; | 367 | hwif->set_dma_mode = &svwks_set_dma_mode; |
368 | hwif->udma_filter = &svwks_udma_filter; | 368 | hwif->udma_filter = &svwks_udma_filter; |
369 | 369 | ||
370 | if (hwif->pci_dev->device != PCI_DEVICE_ID_SERVERWORKS_OSB4IDE) | ||
371 | hwif->ultra_mask = 0x3f; | ||
372 | |||
373 | hwif->mwdma_mask = 0x07; | ||
374 | |||
375 | hwif->drives[0].autotune = 1; | 370 | hwif->drives[0].autotune = 1; |
376 | hwif->drives[1].autotune = 1; | 371 | hwif->drives[1].autotune = 1; |
377 | 372 | ||
@@ -416,6 +411,8 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { | |||
416 | .init_hwif = init_hwif_svwks, | 411 | .init_hwif = init_hwif_svwks, |
417 | .host_flags = IDE_HFLAG_BOOTABLE, | 412 | .host_flags = IDE_HFLAG_BOOTABLE, |
418 | .pio_mask = ATA_PIO4, | 413 | .pio_mask = ATA_PIO4, |
414 | .mwdma_mask = ATA_MWDMA2, | ||
415 | .udma_mask = 0x00, /* UDMA is problematic on OSB4 */ | ||
419 | },{ /* 1 */ | 416 | },{ /* 1 */ |
420 | .name = "SvrWks CSB5", | 417 | .name = "SvrWks CSB5", |
421 | .init_setup = init_setup_svwks, | 418 | .init_setup = init_setup_svwks, |
@@ -423,6 +420,8 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { | |||
423 | .init_hwif = init_hwif_svwks, | 420 | .init_hwif = init_hwif_svwks, |
424 | .host_flags = IDE_HFLAG_BOOTABLE, | 421 | .host_flags = IDE_HFLAG_BOOTABLE, |
425 | .pio_mask = ATA_PIO4, | 422 | .pio_mask = ATA_PIO4, |
423 | .mwdma_mask = ATA_MWDMA2, | ||
424 | .udma_mask = ATA_UDMA5, | ||
426 | },{ /* 2 */ | 425 | },{ /* 2 */ |
427 | .name = "SvrWks CSB6", | 426 | .name = "SvrWks CSB6", |
428 | .init_setup = init_setup_csb6, | 427 | .init_setup = init_setup_csb6, |
@@ -430,6 +429,8 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { | |||
430 | .init_hwif = init_hwif_svwks, | 429 | .init_hwif = init_hwif_svwks, |
431 | .host_flags = IDE_HFLAG_BOOTABLE, | 430 | .host_flags = IDE_HFLAG_BOOTABLE, |
432 | .pio_mask = ATA_PIO4, | 431 | .pio_mask = ATA_PIO4, |
432 | .mwdma_mask = ATA_MWDMA2, | ||
433 | .udma_mask = ATA_UDMA5, | ||
433 | },{ /* 3 */ | 434 | },{ /* 3 */ |
434 | .name = "SvrWks CSB6", | 435 | .name = "SvrWks CSB6", |
435 | .init_setup = init_setup_csb6, | 436 | .init_setup = init_setup_csb6, |
@@ -437,6 +438,8 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { | |||
437 | .init_hwif = init_hwif_svwks, | 438 | .init_hwif = init_hwif_svwks, |
438 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_BOOTABLE, | 439 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_BOOTABLE, |
439 | .pio_mask = ATA_PIO4, | 440 | .pio_mask = ATA_PIO4, |
441 | .mwdma_mask = ATA_MWDMA2, | ||
442 | .udma_mask = ATA_UDMA5, | ||
440 | },{ /* 4 */ | 443 | },{ /* 4 */ |
441 | .name = "SvrWks HT1000", | 444 | .name = "SvrWks HT1000", |
442 | .init_setup = init_setup_svwks, | 445 | .init_setup = init_setup_svwks, |
@@ -444,6 +447,8 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { | |||
444 | .init_hwif = init_hwif_svwks, | 447 | .init_hwif = init_hwif_svwks, |
445 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_BOOTABLE, | 448 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_BOOTABLE, |
446 | .pio_mask = ATA_PIO4, | 449 | .pio_mask = ATA_PIO4, |
450 | .mwdma_mask = ATA_MWDMA2, | ||
451 | .udma_mask = ATA_UDMA5, | ||
447 | } | 452 | } |
448 | }; | 453 | }; |
449 | 454 | ||