diff options
author | Tejun Heo <htejun@gmail.com> | 2006-11-10 04:08:10 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-01 22:45:55 -0500 |
commit | b3362f88a8f938fb700fdedf074ec222cba7cf83 (patch) | |
tree | d3b2db62c6abdfb441c1b463592be438c16de522 /drivers/ata/ata_piix.c | |
parent | 6fc49adb9417b9c793e8f88d485387bb89ceb733 (diff) |
[PATCH] ata_piix: clean up port flags
* move common flags into PIIX_PATA_FLAGS and PIIX_SATA_FLAGS
* kill unnecessary ATA_FLAG_SRST
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/ata_piix.c')
-rw-r--r-- | drivers/ata/ata_piix.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 14b726b9f985..90ac33a7bdc7 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -106,6 +106,9 @@ enum { | |||
106 | PIIX_FLAG_AHCI = (1 << 27), /* AHCI possible */ | 106 | PIIX_FLAG_AHCI = (1 << 27), /* AHCI possible */ |
107 | PIIX_FLAG_CHECKINTR = (1 << 28), /* make sure PCI INTx enabled */ | 107 | PIIX_FLAG_CHECKINTR = (1 << 28), /* make sure PCI INTx enabled */ |
108 | 108 | ||
109 | PIIX_PATA_FLAGS = ATA_FLAG_SLAVE_POSS, | ||
110 | PIIX_SATA_FLAGS = ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR, | ||
111 | |||
109 | /* combined mode. if set, PATA is channel 0. | 112 | /* combined mode. if set, PATA is channel 0. |
110 | * if clear, PATA is channel 1. | 113 | * if clear, PATA is channel 1. |
111 | */ | 114 | */ |
@@ -438,7 +441,7 @@ static struct ata_port_info piix_port_info[] = { | |||
438 | /* piix_pata_33: 0: PIIX3 or 4 at 33MHz */ | 441 | /* piix_pata_33: 0: PIIX3 or 4 at 33MHz */ |
439 | { | 442 | { |
440 | .sht = &piix_sht, | 443 | .sht = &piix_sht, |
441 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, | 444 | .flags = PIIX_PATA_FLAGS, |
442 | .pio_mask = 0x1f, /* pio0-4 */ | 445 | .pio_mask = 0x1f, /* pio0-4 */ |
443 | .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */ | 446 | .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */ |
444 | .udma_mask = ATA_UDMA_MASK_40C, | 447 | .udma_mask = ATA_UDMA_MASK_40C, |
@@ -448,7 +451,7 @@ static struct ata_port_info piix_port_info[] = { | |||
448 | /* ich_pata_33: 1 ICH0 - ICH at 33Mhz*/ | 451 | /* ich_pata_33: 1 ICH0 - ICH at 33Mhz*/ |
449 | { | 452 | { |
450 | .sht = &piix_sht, | 453 | .sht = &piix_sht, |
451 | .flags = ATA_FLAG_SRST | ATA_FLAG_SLAVE_POSS, | 454 | .flags = PIIX_PATA_FLAGS, |
452 | .pio_mask = 0x1f, /* pio 0-4 */ | 455 | .pio_mask = 0x1f, /* pio 0-4 */ |
453 | .mwdma_mask = 0x06, /* Check: maybe 0x07 */ | 456 | .mwdma_mask = 0x06, /* Check: maybe 0x07 */ |
454 | .udma_mask = ATA_UDMA2, /* UDMA33 */ | 457 | .udma_mask = ATA_UDMA2, /* UDMA33 */ |
@@ -457,7 +460,7 @@ static struct ata_port_info piix_port_info[] = { | |||
457 | /* ich_pata_66: 2 ICH controllers up to 66MHz */ | 460 | /* ich_pata_66: 2 ICH controllers up to 66MHz */ |
458 | { | 461 | { |
459 | .sht = &piix_sht, | 462 | .sht = &piix_sht, |
460 | .flags = ATA_FLAG_SRST | ATA_FLAG_SLAVE_POSS, | 463 | .flags = PIIX_PATA_FLAGS, |
461 | .pio_mask = 0x1f, /* pio 0-4 */ | 464 | .pio_mask = 0x1f, /* pio 0-4 */ |
462 | .mwdma_mask = 0x06, /* MWDMA0 is broken on chip */ | 465 | .mwdma_mask = 0x06, /* MWDMA0 is broken on chip */ |
463 | .udma_mask = ATA_UDMA4, | 466 | .udma_mask = ATA_UDMA4, |
@@ -467,7 +470,7 @@ static struct ata_port_info piix_port_info[] = { | |||
467 | /* ich_pata_100: 3 */ | 470 | /* ich_pata_100: 3 */ |
468 | { | 471 | { |
469 | .sht = &piix_sht, | 472 | .sht = &piix_sht, |
470 | .flags = ATA_FLAG_SRST | ATA_FLAG_SLAVE_POSS | PIIX_FLAG_CHECKINTR, | 473 | .flags = PIIX_PATA_FLAGS | PIIX_FLAG_CHECKINTR, |
471 | .pio_mask = 0x1f, /* pio0-4 */ | 474 | .pio_mask = 0x1f, /* pio0-4 */ |
472 | .mwdma_mask = 0x06, /* mwdma1-2 */ | 475 | .mwdma_mask = 0x06, /* mwdma1-2 */ |
473 | .udma_mask = ATA_UDMA5, /* udma0-5 */ | 476 | .udma_mask = ATA_UDMA5, /* udma0-5 */ |
@@ -477,7 +480,7 @@ static struct ata_port_info piix_port_info[] = { | |||
477 | /* ich_pata_133: 4 ICH with full UDMA6 */ | 480 | /* ich_pata_133: 4 ICH with full UDMA6 */ |
478 | { | 481 | { |
479 | .sht = &piix_sht, | 482 | .sht = &piix_sht, |
480 | .flags = ATA_FLAG_SRST | ATA_FLAG_SLAVE_POSS | PIIX_FLAG_CHECKINTR, | 483 | .flags = PIIX_PATA_FLAGS | PIIX_FLAG_CHECKINTR, |
481 | .pio_mask = 0x1f, /* pio 0-4 */ | 484 | .pio_mask = 0x1f, /* pio 0-4 */ |
482 | .mwdma_mask = 0x06, /* Check: maybe 0x07 */ | 485 | .mwdma_mask = 0x06, /* Check: maybe 0x07 */ |
483 | .udma_mask = ATA_UDMA6, /* UDMA133 */ | 486 | .udma_mask = ATA_UDMA6, /* UDMA133 */ |
@@ -487,8 +490,7 @@ static struct ata_port_info piix_port_info[] = { | |||
487 | /* ich5_sata: 5 */ | 490 | /* ich5_sata: 5 */ |
488 | { | 491 | { |
489 | .sht = &piix_sht, | 492 | .sht = &piix_sht, |
490 | .flags = ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR | | 493 | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_IGNORE_PCS, |
491 | PIIX_FLAG_IGNORE_PCS, | ||
492 | .pio_mask = 0x1f, /* pio0-4 */ | 494 | .pio_mask = 0x1f, /* pio0-4 */ |
493 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 495 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
494 | .udma_mask = 0x7f, /* udma0-6 */ | 496 | .udma_mask = 0x7f, /* udma0-6 */ |
@@ -498,8 +500,7 @@ static struct ata_port_info piix_port_info[] = { | |||
498 | /* i6300esb_sata: 6 */ | 500 | /* i6300esb_sata: 6 */ |
499 | { | 501 | { |
500 | .sht = &piix_sht, | 502 | .sht = &piix_sht, |
501 | .flags = ATA_FLAG_SATA | | 503 | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_IGNORE_PCS, |
502 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_IGNORE_PCS, | ||
503 | .pio_mask = 0x1f, /* pio0-4 */ | 504 | .pio_mask = 0x1f, /* pio0-4 */ |
504 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 505 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
505 | .udma_mask = 0x7f, /* udma0-6 */ | 506 | .udma_mask = 0x7f, /* udma0-6 */ |
@@ -509,8 +510,7 @@ static struct ata_port_info piix_port_info[] = { | |||
509 | /* ich6_sata: 7 */ | 510 | /* ich6_sata: 7 */ |
510 | { | 511 | { |
511 | .sht = &piix_sht, | 512 | .sht = &piix_sht, |
512 | .flags = ATA_FLAG_SATA | | 513 | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR, |
513 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR, | ||
514 | .pio_mask = 0x1f, /* pio0-4 */ | 514 | .pio_mask = 0x1f, /* pio0-4 */ |
515 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 515 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
516 | .udma_mask = 0x7f, /* udma0-6 */ | 516 | .udma_mask = 0x7f, /* udma0-6 */ |
@@ -520,8 +520,7 @@ static struct ata_port_info piix_port_info[] = { | |||
520 | /* ich6_sata_ahci: 8 */ | 520 | /* ich6_sata_ahci: 8 */ |
521 | { | 521 | { |
522 | .sht = &piix_sht, | 522 | .sht = &piix_sht, |
523 | .flags = ATA_FLAG_SATA | | 523 | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR | |
524 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | | ||
525 | PIIX_FLAG_AHCI, | 524 | PIIX_FLAG_AHCI, |
526 | .pio_mask = 0x1f, /* pio0-4 */ | 525 | .pio_mask = 0x1f, /* pio0-4 */ |
527 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 526 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
@@ -532,8 +531,7 @@ static struct ata_port_info piix_port_info[] = { | |||
532 | /* ich6m_sata_ahci: 9 */ | 531 | /* ich6m_sata_ahci: 9 */ |
533 | { | 532 | { |
534 | .sht = &piix_sht, | 533 | .sht = &piix_sht, |
535 | .flags = ATA_FLAG_SATA | | 534 | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR | |
536 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | | ||
537 | PIIX_FLAG_AHCI, | 535 | PIIX_FLAG_AHCI, |
538 | .pio_mask = 0x1f, /* pio0-4 */ | 536 | .pio_mask = 0x1f, /* pio0-4 */ |
539 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 537 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
@@ -544,8 +542,7 @@ static struct ata_port_info piix_port_info[] = { | |||
544 | /* ich8_sata_ahci: 10 */ | 542 | /* ich8_sata_ahci: 10 */ |
545 | { | 543 | { |
546 | .sht = &piix_sht, | 544 | .sht = &piix_sht, |
547 | .flags = ATA_FLAG_SATA | | 545 | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR | |
548 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | | ||
549 | PIIX_FLAG_AHCI, | 546 | PIIX_FLAG_AHCI, |
550 | .pio_mask = 0x1f, /* pio0-4 */ | 547 | .pio_mask = 0x1f, /* pio0-4 */ |
551 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 548 | .mwdma_mask = 0x07, /* mwdma0-2 */ |