diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-07-19 19:11:55 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-07-19 19:11:55 -0400 |
commit | a5d8c5c834d3cabf4b7b477c3f6ee923c25026fc (patch) | |
tree | 19fc04470569a3c2f227d5aac3078a15ac65bb32 /drivers/ide/pci/serverworks.c | |
parent | 2229833c1365346b64357a9263fa724f74f5e376 (diff) |
ide: add ide_pci_device_t.host_flags (take 2)
* Rename ide_pci_device_t.flags to ide_pci_device_t.host_flags
and IDEPCI_FLAG_ISA_PORTS flag to IDE_HFLAG_ISA_PORTS.
* Add IDE_HFLAG_SINGLE flag for single channel devices.
* Convert core code and all IDE PCI drivers to use IDE_HFLAG_SINGLE
and remove no longer needed ide_pci_device_t.channels field.
v2:
* Fix issues noticed by Sergei:
- correct code alignment in scc_pata.c
- s/IDE_HFLAG_SINGLE/~IDE_HFLAG_SINGLE/ in serverworks.c
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/serverworks.c')
-rw-r--r-- | drivers/ide/pci/serverworks.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index ed04e0c8dd4c..809deb92bc11 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
@@ -441,9 +441,12 @@ static int __devinit init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d) | |||
441 | d->bootable = ON_BOARD; | 441 | d->bootable = ON_BOARD; |
442 | } | 442 | } |
443 | 443 | ||
444 | d->channels = ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE || | 444 | if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE || |
445 | dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) && | 445 | dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) && |
446 | (!(PCI_FUNC(dev->devfn) & 1))) ? 1 : 2; | 446 | (!(PCI_FUNC(dev->devfn) & 1))) |
447 | d->host_flags |= IDE_HFLAG_SINGLE; | ||
448 | else | ||
449 | d->host_flags &= ~IDE_HFLAG_SINGLE; | ||
447 | 450 | ||
448 | return ide_setup_pci_device(dev, d); | 451 | return ide_setup_pci_device(dev, d); |
449 | } | 452 | } |
@@ -454,7 +457,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { | |||
454 | .init_setup = init_setup_svwks, | 457 | .init_setup = init_setup_svwks, |
455 | .init_chipset = init_chipset_svwks, | 458 | .init_chipset = init_chipset_svwks, |
456 | .init_hwif = init_hwif_svwks, | 459 | .init_hwif = init_hwif_svwks, |
457 | .channels = 2, | ||
458 | .autodma = AUTODMA, | 460 | .autodma = AUTODMA, |
459 | .bootable = ON_BOARD, | 461 | .bootable = ON_BOARD, |
460 | },{ /* 1 */ | 462 | },{ /* 1 */ |
@@ -462,7 +464,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { | |||
462 | .init_setup = init_setup_svwks, | 464 | .init_setup = init_setup_svwks, |
463 | .init_chipset = init_chipset_svwks, | 465 | .init_chipset = init_chipset_svwks, |
464 | .init_hwif = init_hwif_svwks, | 466 | .init_hwif = init_hwif_svwks, |
465 | .channels = 2, | ||
466 | .autodma = AUTODMA, | 467 | .autodma = AUTODMA, |
467 | .bootable = ON_BOARD, | 468 | .bootable = ON_BOARD, |
468 | },{ /* 2 */ | 469 | },{ /* 2 */ |
@@ -470,7 +471,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { | |||
470 | .init_setup = init_setup_csb6, | 471 | .init_setup = init_setup_csb6, |
471 | .init_chipset = init_chipset_svwks, | 472 | .init_chipset = init_chipset_svwks, |
472 | .init_hwif = init_hwif_svwks, | 473 | .init_hwif = init_hwif_svwks, |
473 | .channels = 2, | ||
474 | .autodma = AUTODMA, | 474 | .autodma = AUTODMA, |
475 | .bootable = ON_BOARD, | 475 | .bootable = ON_BOARD, |
476 | },{ /* 3 */ | 476 | },{ /* 3 */ |
@@ -478,17 +478,17 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { | |||
478 | .init_setup = init_setup_csb6, | 478 | .init_setup = init_setup_csb6, |
479 | .init_chipset = init_chipset_svwks, | 479 | .init_chipset = init_chipset_svwks, |
480 | .init_hwif = init_hwif_svwks, | 480 | .init_hwif = init_hwif_svwks, |
481 | .channels = 1, /* 2 */ | ||
482 | .autodma = AUTODMA, | 481 | .autodma = AUTODMA, |
483 | .bootable = ON_BOARD, | 482 | .bootable = ON_BOARD, |
483 | .host_flags = IDE_HFLAG_SINGLE, | ||
484 | },{ /* 4 */ | 484 | },{ /* 4 */ |
485 | .name = "SvrWks HT1000", | 485 | .name = "SvrWks HT1000", |
486 | .init_setup = init_setup_svwks, | 486 | .init_setup = init_setup_svwks, |
487 | .init_chipset = init_chipset_svwks, | 487 | .init_chipset = init_chipset_svwks, |
488 | .init_hwif = init_hwif_svwks, | 488 | .init_hwif = init_hwif_svwks, |
489 | .channels = 1, /* 2 */ | ||
490 | .autodma = AUTODMA, | 489 | .autodma = AUTODMA, |
491 | .bootable = ON_BOARD, | 490 | .bootable = ON_BOARD, |
491 | .host_flags = IDE_HFLAG_SINGLE, | ||
492 | } | 492 | } |
493 | }; | 493 | }; |
494 | 494 | ||