Commit b3362f88 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

[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: default avatarJeff Garzik <jeff@garzik.org>
parent 6fc49adb
...@@ -106,6 +106,9 @@ enum { ...@@ -106,6 +106,9 @@ enum {
PIIX_FLAG_AHCI = (1 << 27), /* AHCI possible */ PIIX_FLAG_AHCI = (1 << 27), /* AHCI possible */
PIIX_FLAG_CHECKINTR = (1 << 28), /* make sure PCI INTx enabled */ PIIX_FLAG_CHECKINTR = (1 << 28), /* make sure PCI INTx enabled */
PIIX_PATA_FLAGS = ATA_FLAG_SLAVE_POSS,
PIIX_SATA_FLAGS = ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR,
/* combined mode. if set, PATA is channel 0. /* combined mode. if set, PATA is channel 0.
* if clear, PATA is channel 1. * if clear, PATA is channel 1.
*/ */
...@@ -438,7 +441,7 @@ static struct ata_port_info piix_port_info[] = { ...@@ -438,7 +441,7 @@ static struct ata_port_info piix_port_info[] = {
/* piix_pata_33: 0: PIIX3 or 4 at 33MHz */ /* piix_pata_33: 0: PIIX3 or 4 at 33MHz */
{ {
.sht = &piix_sht, .sht = &piix_sht,
.flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, .flags = PIIX_PATA_FLAGS,
.pio_mask = 0x1f, /* pio0-4 */ .pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */ .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */
.udma_mask = ATA_UDMA_MASK_40C, .udma_mask = ATA_UDMA_MASK_40C,
...@@ -448,7 +451,7 @@ static struct ata_port_info piix_port_info[] = { ...@@ -448,7 +451,7 @@ static struct ata_port_info piix_port_info[] = {
/* ich_pata_33: 1 ICH0 - ICH at 33Mhz*/ /* ich_pata_33: 1 ICH0 - ICH at 33Mhz*/
{ {
.sht = &piix_sht, .sht = &piix_sht,
.flags = ATA_FLAG_SRST | ATA_FLAG_SLAVE_POSS, .flags = PIIX_PATA_FLAGS,
.pio_mask = 0x1f, /* pio 0-4 */ .pio_mask = 0x1f, /* pio 0-4 */
.mwdma_mask = 0x06, /* Check: maybe 0x07 */ .mwdma_mask = 0x06, /* Check: maybe 0x07 */
.udma_mask = ATA_UDMA2, /* UDMA33 */ .udma_mask = ATA_UDMA2, /* UDMA33 */
...@@ -457,7 +460,7 @@ static struct ata_port_info piix_port_info[] = { ...@@ -457,7 +460,7 @@ static struct ata_port_info piix_port_info[] = {
/* ich_pata_66: 2 ICH controllers up to 66MHz */ /* ich_pata_66: 2 ICH controllers up to 66MHz */
{ {
.sht = &piix_sht, .sht = &piix_sht,
.flags = ATA_FLAG_SRST | ATA_FLAG_SLAVE_POSS, .flags = PIIX_PATA_FLAGS,
.pio_mask = 0x1f, /* pio 0-4 */ .pio_mask = 0x1f, /* pio 0-4 */
.mwdma_mask = 0x06, /* MWDMA0 is broken on chip */ .mwdma_mask = 0x06, /* MWDMA0 is broken on chip */
.udma_mask = ATA_UDMA4, .udma_mask = ATA_UDMA4,
...@@ -467,7 +470,7 @@ static struct ata_port_info piix_port_info[] = { ...@@ -467,7 +470,7 @@ static struct ata_port_info piix_port_info[] = {
/* ich_pata_100: 3 */ /* ich_pata_100: 3 */
{ {
.sht = &piix_sht, .sht = &piix_sht,
.flags = ATA_FLAG_SRST | ATA_FLAG_SLAVE_POSS | PIIX_FLAG_CHECKINTR, .flags = PIIX_PATA_FLAGS | PIIX_FLAG_CHECKINTR,
.pio_mask = 0x1f, /* pio0-4 */ .pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x06, /* mwdma1-2 */ .mwdma_mask = 0x06, /* mwdma1-2 */
.udma_mask = ATA_UDMA5, /* udma0-5 */ .udma_mask = ATA_UDMA5, /* udma0-5 */
...@@ -477,7 +480,7 @@ static struct ata_port_info piix_port_info[] = { ...@@ -477,7 +480,7 @@ static struct ata_port_info piix_port_info[] = {
/* ich_pata_133: 4 ICH with full UDMA6 */ /* ich_pata_133: 4 ICH with full UDMA6 */
{ {
.sht = &piix_sht, .sht = &piix_sht,
.flags = ATA_FLAG_SRST | ATA_FLAG_SLAVE_POSS | PIIX_FLAG_CHECKINTR, .flags = PIIX_PATA_FLAGS | PIIX_FLAG_CHECKINTR,
.pio_mask = 0x1f, /* pio 0-4 */ .pio_mask = 0x1f, /* pio 0-4 */
.mwdma_mask = 0x06, /* Check: maybe 0x07 */ .mwdma_mask = 0x06, /* Check: maybe 0x07 */
.udma_mask = ATA_UDMA6, /* UDMA133 */ .udma_mask = ATA_UDMA6, /* UDMA133 */
...@@ -487,8 +490,7 @@ static struct ata_port_info piix_port_info[] = { ...@@ -487,8 +490,7 @@ static struct ata_port_info piix_port_info[] = {
/* ich5_sata: 5 */ /* ich5_sata: 5 */
{ {
.sht = &piix_sht, .sht = &piix_sht,
.flags = ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_IGNORE_PCS,
PIIX_FLAG_IGNORE_PCS,
.pio_mask = 0x1f, /* pio0-4 */ .pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */ .mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = 0x7f, /* udma0-6 */ .udma_mask = 0x7f, /* udma0-6 */
...@@ -498,8 +500,7 @@ static struct ata_port_info piix_port_info[] = { ...@@ -498,8 +500,7 @@ static struct ata_port_info piix_port_info[] = {
/* i6300esb_sata: 6 */ /* i6300esb_sata: 6 */
{ {
.sht = &piix_sht, .sht = &piix_sht,
.flags = ATA_FLAG_SATA | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_IGNORE_PCS,
PIIX_FLAG_CHECKINTR | PIIX_FLAG_IGNORE_PCS,
.pio_mask = 0x1f, /* pio0-4 */ .pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */ .mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = 0x7f, /* udma0-6 */ .udma_mask = 0x7f, /* udma0-6 */
...@@ -509,8 +510,7 @@ static struct ata_port_info piix_port_info[] = { ...@@ -509,8 +510,7 @@ static struct ata_port_info piix_port_info[] = {
/* ich6_sata: 7 */ /* ich6_sata: 7 */
{ {
.sht = &piix_sht, .sht = &piix_sht,
.flags = ATA_FLAG_SATA | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR,
PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR,
.pio_mask = 0x1f, /* pio0-4 */ .pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */ .mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = 0x7f, /* udma0-6 */ .udma_mask = 0x7f, /* udma0-6 */
...@@ -520,8 +520,7 @@ static struct ata_port_info piix_port_info[] = { ...@@ -520,8 +520,7 @@ static struct ata_port_info piix_port_info[] = {
/* ich6_sata_ahci: 8 */ /* ich6_sata_ahci: 8 */
{ {
.sht = &piix_sht, .sht = &piix_sht,
.flags = ATA_FLAG_SATA | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR |
PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR |
PIIX_FLAG_AHCI, PIIX_FLAG_AHCI,
.pio_mask = 0x1f, /* pio0-4 */ .pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */ .mwdma_mask = 0x07, /* mwdma0-2 */
...@@ -532,8 +531,7 @@ static struct ata_port_info piix_port_info[] = { ...@@ -532,8 +531,7 @@ static struct ata_port_info piix_port_info[] = {
/* ich6m_sata_ahci: 9 */ /* ich6m_sata_ahci: 9 */
{ {
.sht = &piix_sht, .sht = &piix_sht,
.flags = ATA_FLAG_SATA | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR |
PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR |
PIIX_FLAG_AHCI, PIIX_FLAG_AHCI,
.pio_mask = 0x1f, /* pio0-4 */ .pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */ .mwdma_mask = 0x07, /* mwdma0-2 */
...@@ -544,8 +542,7 @@ static struct ata_port_info piix_port_info[] = { ...@@ -544,8 +542,7 @@ static struct ata_port_info piix_port_info[] = {
/* ich8_sata_ahci: 10 */ /* ich8_sata_ahci: 10 */
{ {
.sht = &piix_sht, .sht = &piix_sht,
.flags = ATA_FLAG_SATA | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR |
PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR |
PIIX_FLAG_AHCI, PIIX_FLAG_AHCI,
.pio_mask = 0x1f, /* pio0-4 */ .pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */ .mwdma_mask = 0x07, /* mwdma0-2 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment