]> err.no Git - linux-2.6/commitdiff
ide: add PIO masks
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 19 Jul 2007 23:11:59 +0000 (01:11 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 19 Jul 2007 23:11:59 +0000 (01:11 +0200)
* Add ATA_PIO[0-6] defines to <linux/ata.h>.

* Add ->pio_mask field to ide_pci_device_t and ide_hwif_t.

* Add PIO masks to host drivers.

<linux/ata.h> change ACK-ed by Jeff Garzik <jeff@garzik.org>.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
43 files changed:
drivers/ide/cris/ide-cris.c
drivers/ide/ide.c
drivers/ide/legacy/ali14xx.c
drivers/ide/legacy/dtc2278.c
drivers/ide/legacy/ht6560b.c
drivers/ide/legacy/qd65xx.c
drivers/ide/legacy/umc8672.c
drivers/ide/mips/au1xxx-ide.c
drivers/ide/pci/aec62xx.c
drivers/ide/pci/alim15x3.c
drivers/ide/pci/amd74xx.c
drivers/ide/pci/atiixp.c
drivers/ide/pci/cmd640.c
drivers/ide/pci/cmd64x.c
drivers/ide/pci/cs5520.c
drivers/ide/pci/cs5530.c
drivers/ide/pci/cs5535.c
drivers/ide/pci/cy82c693.c
drivers/ide/pci/hpt34x.c
drivers/ide/pci/hpt366.c
drivers/ide/pci/it8213.c
drivers/ide/pci/it821x.c
drivers/ide/pci/jmicron.c
drivers/ide/pci/opti621.c
drivers/ide/pci/pdc202xx_new.c
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/piix.c
drivers/ide/pci/sc1200.c
drivers/ide/pci/scc_pata.c
drivers/ide/pci/serverworks.c
drivers/ide/pci/sgiioc4.c
drivers/ide/pci/siimage.c
drivers/ide/pci/sis5513.c
drivers/ide/pci/sl82c105.c
drivers/ide/pci/slc90e66.c
drivers/ide/pci/tc86c001.c
drivers/ide/pci/triflex.c
drivers/ide/pci/via82cxxx.c
drivers/ide/ppc/mpc8xx.c
drivers/ide/ppc/pmac.c
drivers/ide/setup-pci.c
include/linux/ata.h
include/linux/ide.h

index e8cd86e8643312bcf85c72104d89a5d671ced277..9361154ba5c257046e0f4c6e93738c9f6266cb13 100644 (file)
@@ -814,6 +814,7 @@ init_e100_ide (void)
                hwif->dma_host_on = &cris_dma_on;
                hwif->dma_off_quietly = &cris_dma_off;
                hwif->cbl = ATA_CBL_PATA40;
+               hwif->pio_mask = ATA_PIO4,
                hwif->ultra_mask = cris_ultra_mask;
                hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */
                hwif->autodma = 1;
index b442b341d52ef015405f29ff99da6c8d1f9d2384..f3ea5ea41fd41fa1c14777409ad637aed748b3b0 100644 (file)
@@ -457,6 +457,8 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
 
        hwif->host_flags                = tmp_hwif->host_flags;
 
+       hwif->pio_mask                  = tmp_hwif->pio_mask;
+
        hwif->atapi_dma                 = tmp_hwif->atapi_dma;
        hwif->ultra_mask                = tmp_hwif->ultra_mask;
        hwif->mwdma_mask                = tmp_hwif->mwdma_mask;
index d5c7a57b71c1f0b056af59b0ce756f9739aa28cd..9b9c4761cb7df42e542a9bcffc6b358dc7c21f53 100644 (file)
@@ -211,10 +211,12 @@ static int __init ali14xx_probe(void)
        mate = &ide_hwifs[1];
 
        hwif->chipset = ide_ali14xx;
+       hwif->pio_mask = ATA_PIO4;
        hwif->tuneproc = &ali14xx_tune_drive;
        hwif->mate = mate;
 
        mate->chipset = ide_ali14xx;
+       mate->pio_mask = ATA_PIO4;
        mate->tuneproc = &ali14xx_tune_drive;
        mate->mate = hwif;
        mate->channel = 1;
index 8c4c27e5dc109477e4adfd43acbee1c947046d7e..6c01d951d074cacb7ef9c4e4b6fc68f424ec8adc 100644 (file)
@@ -123,6 +123,7 @@ static int __init dtc2278_probe(void)
 
        hwif->serialized = 1;
        hwif->chipset = ide_dtc2278;
+       hwif->pio_mask = ATA_PIO4;
        hwif->tuneproc = &tune_dtc2278;
        hwif->drives[0].no_unmask = 1;
        hwif->drives[1].no_unmask = 1;
index 82ed37df9566a7661f97bf6c436ec17b1090a780..bfaa2025173b30f9a97b1f2b5d985dcfe1d674b3 100644 (file)
@@ -333,12 +333,14 @@ int __init ht6560b_init(void)
 
        hwif->chipset = ide_ht6560b;
        hwif->selectproc = &ht6560b_selectproc;
+       hwif->pio_mask = ATA_PIO5;
        hwif->tuneproc = &tune_ht6560b;
        hwif->serialized = 1;   /* is this needed? */
        hwif->mate = mate;
 
        mate->chipset = ide_ht6560b;
        mate->selectproc = &ht6560b_selectproc;
+       mate->pio_mask = ATA_PIO5;
        mate->tuneproc = &tune_ht6560b;
        mate->serialized = 1;   /* is this needed? */
        mate->mate = hwif;
index 39145102b348590299b8a559caf82c20f37bf7f8..8b87a424094adec1a7be378d2b5b51082b3267a4 100644 (file)
@@ -346,6 +346,7 @@ static void __init qd_setup(ide_hwif_t *hwif, int base, int config,
        hwif->drives[1].drive_data = data1;
        hwif->drives[0].io_32bit =
        hwif->drives[1].io_32bit = 1;
+       hwif->pio_mask = ATA_PIO4;
        hwif->tuneproc = tuneproc;
        probe_hwif_init(hwif);
 }
index caeebd41081ffa3d73f17a28674301bff9d4c841..d2862e638bc516c30f38efb8b58d180cb5c829e0 100644 (file)
@@ -149,10 +149,12 @@ static int __init umc8672_probe(void)
        mate = &ide_hwifs[1];
 
        hwif->chipset = ide_umc8672;
+       hwif->pio_mask = ATA_PIO4;
        hwif->tuneproc = &tune_umc;
        hwif->mate = mate;
 
        mate->chipset = ide_umc8672;
+       mate->pio_mask = ATA_PIO4;
        mate->tuneproc = &tune_umc;
        mate->mate = hwif;
        mate->channel = 1;
index b0d13c34d3102ac38b0dafab94ca31d0f8499ceb..2ba6a054b861bcddccf13a692eb9251d2e694482 100644 (file)
@@ -692,6 +692,8 @@ static int au_ide_probe(struct device *dev)
        hwif->swdma_mask                = 0x0;
 #endif
 
+       hwif->pio_mask = ATA_PIO4;
+
        hwif->noprobe = 0;
        hwif->drives[0].unmask          = 1;
        hwif->drives[1].unmask          = 1;
index 8396d711f23203a6eb06f4877467e1062e9c93f6..74432830abf75980cb0de8d1254518a1939a8d82 100644 (file)
@@ -268,6 +268,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .enablebits     = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
                .bootable       = OFF_BOARD,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x07, /* udma0-2 */
        },{     /* 1 */
                .name           = "AEC6260",
@@ -276,6 +277,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
                .init_hwif      = init_hwif_aec62xx,
                .autodma        = NOAUTODMA,
                .bootable       = OFF_BOARD,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x1f, /* udma0-4 */
        },{     /* 2 */
                .name           = "AEC6260R",
@@ -285,6 +287,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .enablebits     = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
                .bootable       = NEVER_BOARD,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x1f, /* udma0-4 */
        },{     /* 3 */
                .name           = "AEC6280",
@@ -293,6 +296,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
                .init_hwif      = init_hwif_aec62xx,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x3f, /* udma0-5 */
        },{     /* 4 */
                .name           = "AEC6280R",
@@ -302,6 +306,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .enablebits     = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
                .bootable       = OFF_BOARD,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x3f, /* udma0-5 */
        }
 };
index a0c43a91b0f33fae4a323c475d0018bcc8fa98c5..5511c86733dc6162649b2f66462049f20b49ecc5 100644 (file)
@@ -818,6 +818,7 @@ static ide_pci_device_t ali15x3_chipset __devinitdata = {
        .init_dma       = init_dma_ali15x3,
        .autodma        = AUTODMA,
        .bootable       = ON_BOARD,
+       .pio_mask       = ATA_PIO5,
 };
 
 /**
index 5ed1d485fc7e1a852762af61b1a77c9312ea1ad7..06c15a6a3e7dc2267da146ce7b1570196ef2574c 100644 (file)
@@ -453,6 +453,7 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
                .bootable       = ON_BOARD,                             \
                .host_flags     = IDE_HFLAG_PIO_NO_BLACKLIST            \
                                | IDE_HFLAG_PIO_NO_DOWNGRADE,           \
+               .pio_mask       = ATA_PIO5,                             \
        }
 
 #define DECLARE_NV_DEV(name_str)                                       \
@@ -465,6 +466,7 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
                .bootable       = ON_BOARD,                             \
                .host_flags     = IDE_HFLAG_PIO_NO_BLACKLIST            \
                                | IDE_HFLAG_PIO_NO_DOWNGRADE,           \
+               .pio_mask       = ATA_PIO5,                             \
        }
 
 static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
index a4740e4776fd53049913815b89f30e36f79bbd8c..1725aa402d98cdb37000f4f3bfc4cddac5a3efb4 100644 (file)
@@ -294,6 +294,7 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
                .autodma        = AUTODMA,
                .enablebits     = {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
                .bootable       = ON_BOARD,
+               .pio_mask       = ATA_PIO4,
        },{     /* 1 */
                .name           = "SB600_PATA",
                .init_hwif      = init_hwif_atiixp,
@@ -301,6 +302,7 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
                .enablebits     = {{0x48,0x01,0x00}, {0x00,0x00,0x00}},
                .bootable       = ON_BOARD,
                .host_flags     = IDE_HFLAG_SINGLE,
+               .pio_mask       = ATA_PIO4,
        },
 };
 
index 335482981a92408efa20abef01f053eaa79c9868..9689494efa24a8673ba39aedb6b9c0bcb8916ad1 100644 (file)
@@ -766,6 +766,7 @@ int __init ide_probe_for_cmd640x (void)
               cmd_hwif0->name, 'a' + cmd640_chip_version - 1, bus_type, cfr);
        cmd_hwif0->chipset = ide_cmd640;
 #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
+       cmd_hwif0->pio_mask = ATA_PIO5;
        cmd_hwif0->tuneproc = &cmd640_tune_drive;
 #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
 
@@ -821,6 +822,7 @@ int __init ide_probe_for_cmd640x (void)
                cmd_hwif1->mate = cmd_hwif0;
                cmd_hwif1->channel = 1;
 #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
+               cmd_hwif1->pio_mask = ATA_PIO5;
                cmd_hwif1->tuneproc = &cmd640_tune_drive;
 #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
        }
index 9cf969b61bf250dedfde1fd31b4360c70126fff5..19633c5aba15190925b6872d03293fe7e5475e88 100644 (file)
@@ -622,6 +622,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .enablebits     = {{0x00,0x00,0x00}, {0x51,0x08,0x08}},
                .bootable       = ON_BOARD,
+               .pio_mask       = ATA_PIO5,
                .udma_mask      = 0x00, /* no udma */
        },{     /* 1 */
                .name           = "CMD646",
@@ -631,6 +632,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .enablebits     = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
                .bootable       = ON_BOARD,
+               .pio_mask       = ATA_PIO5,
                .udma_mask      = 0x07, /* udma0-2 */
        },{     /* 2 */
                .name           = "CMD648",
@@ -640,6 +642,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .enablebits     = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
                .bootable       = ON_BOARD,
+               .pio_mask       = ATA_PIO5,
                .udma_mask      = 0x1f, /* udma0-4 */
        },{     /* 3 */
                .name           = "CMD649",
@@ -649,6 +652,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .enablebits     = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
                .bootable       = ON_BOARD,
+               .pio_mask       = ATA_PIO5,
                .udma_mask      = 0x3f, /* udma0-5 */
        }
 };
index ee10e48d7cef6f35a20980f9ba1648ba5e4e5920..bccedf9b8b28c7160895398b21902a97b86c9c67 100644 (file)
@@ -197,6 +197,7 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif)
                .autodma        = AUTODMA,                      \
                .bootable       = ON_BOARD,                     \
                .host_flags     = IDE_HFLAG_ISA_PORTS,          \
+               .pio_mask       = ATA_PIO4,                     \
        }
 
 static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
index a75c14a9318285138ab88b3d2a6e2d99149f4be2..acaf71fd4c09b0feaacd53e6af3caaee03b3634c 100644 (file)
@@ -343,6 +343,7 @@ static ide_pci_device_t cs5530_chipset __devinitdata = {
        .init_hwif      = init_hwif_cs5530,
        .autodma        = AUTODMA,
        .bootable       = ON_BOARD,
+       .pio_mask       = ATA_PIO4,
 };
 
 static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id)
index 0bff4005292a4ccf48d49879ce4d48885a45d0fe..ce44e38390aa9e8bec5232ba1f9304f191dc6c07 100644 (file)
@@ -231,6 +231,7 @@ static ide_pci_device_t cs5535_chipset __devinitdata = {
        .autodma        = AUTODMA,
        .bootable       = ON_BOARD,
        .host_flags     = IDE_HFLAG_SINGLE,
+       .pio_mask       = ATA_PIO4,
 };
 
 static int __devinit cs5535_init_one(struct pci_dev *dev,
index cb7c18187e3c7acd3a916cc7f31a7062950af870..daa36fcbc8ef4e6ae995dbbcda8966762cd53264 100644 (file)
@@ -486,6 +486,7 @@ static ide_pci_device_t cy82c693_chipset __devinitdata = {
        .autodma        = AUTODMA,
        .bootable       = ON_BOARD,
        .host_flags     = IDE_HFLAG_SINGLE,
+       .pio_mask       = ATA_PIO4,
 };
 
 static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id)
index 2e4591303f4feb945f2a7f385268d88e4b969477..19778c5fe711f7951e8f36e2bd2a3e87dd925a16 100644 (file)
@@ -177,7 +177,8 @@ static ide_pci_device_t hpt34x_chipset __devinitdata = {
        .init_hwif      = init_hwif_hpt34x,
        .autodma        = NOAUTODMA,
        .bootable       = NEVER_BOARD,
-       .extra          = 16
+       .extra          = 16,
+       .pio_mask       = ATA_PIO5,
 };
 
 static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
index 0a3fe9471eb62143dfb7df20cb1c6b15cc180e44..2cd74c345a6c7bd3e3c63acca8e1ba0084859e29 100644 (file)
@@ -1549,7 +1549,8 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .enablebits     = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
                .bootable       = OFF_BOARD,
-               .extra          = 240
+               .extra          = 240,
+               .pio_mask       = ATA_PIO4,
        },{     /* 1 */
                .name           = "HPT372A",
                .init_setup     = init_setup_hpt372a,
@@ -1560,7 +1561,8 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
                .enablebits     = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
                .udma_mask      = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f,
                .bootable       = OFF_BOARD,
-               .extra          = 240
+               .extra          = 240,
+               .pio_mask       = ATA_PIO4,
        },{     /* 2 */
                .name           = "HPT302",
                .init_setup     = init_setup_hpt302,
@@ -1571,7 +1573,8 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
                .enablebits     = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
                .udma_mask      = HPT302_ALLOW_ATA133_6 ? 0x7f : 0x3f,
                .bootable       = OFF_BOARD,
-               .extra          = 240
+               .extra          = 240,
+               .pio_mask       = ATA_PIO4,
        },{     /* 3 */
                .name           = "HPT371",
                .init_setup     = init_setup_hpt371,
@@ -1582,7 +1585,8 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
                .enablebits     = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
                .udma_mask      = HPT371_ALLOW_ATA133_6 ? 0x7f : 0x3f,
                .bootable       = OFF_BOARD,
-               .extra          = 240
+               .extra          = 240,
+               .pio_mask       = ATA_PIO4,
        },{     /* 4 */
                .name           = "HPT374",
                .init_setup     = init_setup_hpt374,
@@ -1593,7 +1597,8 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
                .enablebits     = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
                .udma_mask      = 0x3f,
                .bootable       = OFF_BOARD,
-               .extra          = 240
+               .extra          = 240,
+               .pio_mask       = ATA_PIO4,
        },{     /* 5 */
                .name           = "HPT372N",
                .init_setup     = init_setup_hpt372n,
@@ -1604,7 +1609,8 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
                .enablebits     = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
                .udma_mask      = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f,
                .bootable       = OFF_BOARD,
-               .extra          = 240
+               .extra          = 240,
+               .pio_mask       = ATA_PIO4,
        }
 };
 
index d8425a2499bf48515bf5d541b1f564d904dee54b..95dbed7e6022b839ebc5467bbb31e82909ecfa71 100644 (file)
@@ -276,6 +276,7 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif)
                .enablebits     = {{0x41,0x80,0x80}}, \
                .bootable       = ON_BOARD,             \
                .host_flags     = IDE_HFLAG_SINGLE,     \
+               .pio_mask       = ATA_PIO4,             \
        }
 
 static ide_pci_device_t it8213_chipsets[] __devinitdata = {
index 790233db017b087a9152a95f30500a87c425514c..9286c99e2ff02b8cc26ade3d428b8c942982f4df 100644 (file)
@@ -720,7 +720,8 @@ static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev, const cha
                .init_hwif      = init_hwif_it821x,     \
                .autodma        = AUTODMA,              \
                .bootable       = ON_BOARD,             \
-               .fixup          = it821x_fixups         \
+               .fixup          = it821x_fixups,        \
+               .pio_mask       = ATA_PIO4,             \
        }
 
 static ide_pci_device_t it821x_chipsets[] __devinitdata = {
index 57d3d4186b3fcd1225646e12693a41a48587a5b2..d7ce9dd8de1645528c008b2421e37bc2c0f91241 100644 (file)
@@ -180,6 +180,7 @@ fallback:
                .autodma        = AUTODMA,              \
                .bootable       = ON_BOARD,             \
                .enablebits     = { {0x40, 1, 1}, {0x40, 0x10, 0x10} }, \
+               .pio_mask       = ATA_PIO5,             \
        }
 
 static ide_pci_device_t jmicron_chipsets[] __devinitdata = {
index 1802ad0927eb00fcea737dd63edccdf7466b3527..3a2bb2723515a469ba06e3fae912e3e6ad549bc3 100644 (file)
@@ -353,12 +353,14 @@ static ide_pci_device_t opti621_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .enablebits     = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
                .bootable       = ON_BOARD,
+               .pio_mask       = ATA_PIO3,
        },{     /* 1 */
                .name           = "OPTI621X",
                .init_hwif      = init_hwif_opti621,
                .autodma        = AUTODMA,
                .enablebits     = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
                .bootable       = ON_BOARD,
+               .pio_mask       = ATA_PIO3,
        }
 };
 
index a8a01b4ab607a2c158b4db54b00678d0fdd8dd42..8a66a2871b3a019c68e7a22900defadcc094190c 100644 (file)
@@ -568,6 +568,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
                .init_hwif      = init_hwif_pdc202new,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x3f, /* udma0-5 */
        },{     /* 1 */
                .name           = "PDC20269",
@@ -576,6 +577,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
                .init_hwif      = init_hwif_pdc202new,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x7f, /* udma0-6*/
        },{     /* 2 */
                .name           = "PDC20270",
@@ -584,6 +586,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
                .init_hwif      = init_hwif_pdc202new,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x3f, /* udma0-5 */
        },{     /* 3 */
                .name           = "PDC20271",
@@ -592,6 +595,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
                .init_hwif      = init_hwif_pdc202new,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x7f, /* udma0-6*/
        },{     /* 4 */
                .name           = "PDC20275",
@@ -600,6 +604,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
                .init_hwif      = init_hwif_pdc202new,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x7f, /* udma0-6*/
        },{     /* 5 */
                .name           = "PDC20276",
@@ -608,6 +613,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
                .init_hwif      = init_hwif_pdc202new,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x7f, /* udma0-6*/
        },{     /* 6 */
                .name           = "PDC20277",
@@ -616,6 +622,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
                .init_hwif      = init_hwif_pdc202new,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x7f, /* udma0-6*/
        }
 };
index 3a6882d4aa644a36ecfc5c8bac27ce16f14621f0..fbcb0bb9c956c1498473ccd8ec70c958af5f305a 100644 (file)
@@ -444,6 +444,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .extra          = 16,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x07, /* udma0-2 */
        },{     /* 1 */
                .name           = "PDC20262",
@@ -454,6 +455,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .extra          = 48,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x1f, /* udma0-4 */
        },{     /* 2 */
                .name           = "PDC20263",
@@ -464,6 +466,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .extra          = 48,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x1f, /* udma0-4 */
        },{     /* 3 */
                .name           = "PDC20265",
@@ -474,6 +477,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .extra          = 48,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x3f, /* udma0-5 */
        },{     /* 4 */
                .name           = "PDC20267",
@@ -484,6 +488,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .extra          = 48,
+               .pio_mask       = ATA_PIO4,
                .udma_mask      = 0x3f, /* udma0-5 */
        }
 };
index 41a3612c61074c7f57834376f8751fb2085ef402..4f69cd067e5ec3b8a1705bd58a5bb72fcb5099d5 100644 (file)
@@ -498,6 +498,7 @@ static void __devinit init_hwif_piix(ide_hwif_t *hwif)
                .autodma        = AUTODMA,              \
                .enablebits     = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
                .bootable       = ON_BOARD,             \
+               .pio_mask       = ATA_PIO4,             \
                .udma_mask      = udma,                 \
        }
 
@@ -517,6 +518,7 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
                .enablebits     = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}},
                .bootable       = ON_BOARD,
                .host_flags     = IDE_HFLAG_ISA_PORTS,
+               .pio_mask       = ATA_PIO4,
        },
 
        /*  3 */ DECLARE_PIIX_DEV("PIIX3", 0x00),       /* no udma */
index 98e1a2bd9501c591f3a357c27dead6a9818005da..9bdc9694d50dc10e4356372fb96ac816b17e9adb 100644 (file)
@@ -438,6 +438,7 @@ static ide_pci_device_t sc1200_chipset __devinitdata = {
        .init_hwif      = init_hwif_sc1200,
        .autodma        = AUTODMA,
        .bootable       = ON_BOARD,
+       .pio_mask       = ATA_PIO4,
 };
 
 static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
index 2c76355b92e8ca34e18b5be9962c6d13c3b7d5d5..f668d235e6be25a2a91de82dd18d052ad08b1887 100644 (file)
@@ -775,6 +775,7 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif)
       .autodma = AUTODMA,                              \
       .bootable        = ON_BOARD,                             \
       .host_flags      = IDE_HFLAG_SINGLE,             \
+      .pio_mask                = ATA_PIO4,                     \
   }
 
 static ide_pci_device_t scc_chipsets[] __devinitdata = {
index 1fe29d9e68fa5c6c57b4abb7e1473c965cf4e493..9fead2e7d4c88363a993d510aaa16225bbd917ef 100644 (file)
@@ -451,6 +451,7 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
                .init_hwif      = init_hwif_svwks,
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
+               .pio_mask       = ATA_PIO4,
        },{     /* 1 */
                .name           = "SvrWks CSB5",
                .init_setup     = init_setup_svwks,
@@ -458,6 +459,7 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
                .init_hwif      = init_hwif_svwks,
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
+               .pio_mask       = ATA_PIO4,
        },{     /* 2 */
                .name           = "SvrWks CSB6",
                .init_setup     = init_setup_csb6,
@@ -465,6 +467,7 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
                .init_hwif      = init_hwif_svwks,
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
+               .pio_mask       = ATA_PIO4,
        },{     /* 3 */
                .name           = "SvrWks CSB6",
                .init_setup     = init_setup_csb6,
@@ -473,6 +476,7 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
                .host_flags     = IDE_HFLAG_SINGLE,
+               .pio_mask       = ATA_PIO4,
        },{     /* 4 */
                .name           = "SvrWks HT1000",
                .init_setup     = init_setup_svwks,
@@ -481,6 +485,7 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
                .host_flags     = IDE_HFLAG_SINGLE,
+               .pio_mask       = ATA_PIO4,
        }
 };
 
index ed983b56b4e2a4b5c12217250182c322df430f5f..57145767c3df8f50b457fcfea99b0609454d6758 100644 (file)
@@ -586,6 +586,7 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
        hwif->ultra_mask = 0x0; /* Disable Ultra DMA */
        hwif->mwdma_mask = 0x2; /* Multimode-2 DMA  */
        hwif->swdma_mask = 0x2;
+       hwif->pio_mask = 0x00;
        hwif->tuneproc = NULL;  /* Sets timing for PIO mode */
        hwif->speedproc = NULL; /* Sets timing for DMA &/or PIO modes */
        hwif->selectproc = NULL;/* Use the default routine to select drive */
index 63a8a93d63d67f32e9d838551a6ce795d188cb17..50f6d172ef7715dc8371933af223ced8d02a8384 100644 (file)
@@ -959,6 +959,7 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif)
                .fixup          = siimage_fixup,        \
                .autodma        = AUTODMA,              \
                .bootable       = ON_BOARD,             \
+               .pio_mask       = ATA_PIO4,             \
        }
 
 static ide_pci_device_t siimage_chipsets[] __devinitdata = {
index 3c4693695ca38855d745b04d3ce50b471689e953..63fbb79e8178d7800642a3656c712faa5d0fc2b5 100644 (file)
@@ -881,6 +881,7 @@ static ide_pci_device_t sis5513_chipset __devinitdata = {
        .autodma        = NOAUTODMA,
        .enablebits     = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
        .bootable       = ON_BOARD,
+       .pio_mask       = ATA_PIO4,
 };
 
 static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id)
index 4e8f32e643a60bf43107bfdd78fb223e932d201d..0947cab0059570b346a6409ea434c87ec8d0c8a8 100644 (file)
@@ -456,6 +456,7 @@ static ide_pci_device_t sl82c105_chipset __devinitdata = {
        .autodma        = NOAUTODMA,
        .enablebits     = {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
        .bootable       = ON_BOARD,
+       .pio_mask       = ATA_PIO5,
 };
 
 static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id)
index 562747fbee392812f2ab980397868ffc318e1ff1..8e655f2db5cb6936bc78c223e2fdfca7652b4897 100644 (file)
@@ -217,6 +217,7 @@ static ide_pci_device_t slc90e66_chipset __devinitdata = {
        .autodma        = AUTODMA,
        .enablebits     = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
        .bootable       = ON_BOARD,
+       .pio_mask       = ATA_PIO4,
 };
 
 static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_device_id *id)
index 2479a19f0094040dc0c4a90e010c232774e1f587..ec79bacc30c2fadf7bdd4d1914abdc1b361257fc 100644 (file)
@@ -251,6 +251,7 @@ static ide_pci_device_t tc86c001_chipset __devinitdata = {
        .autodma        = AUTODMA,
        .bootable       = OFF_BOARD,
        .host_flags     = IDE_HFLAG_SINGLE,
+       .pio_mask       = ATA_PIO4,
 };
 
 static int __devinit tc86c001_init_one(struct pci_dev *dev,
index f8fef905baccdea965b6782e276f9760a2d89880..024bbfae0429d5b0cbcaa0595ec0b6b5958846c0 100644 (file)
@@ -132,6 +132,7 @@ static ide_pci_device_t triflex_device __devinitdata = {
        .autodma        = AUTODMA,
        .enablebits     = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
        .bootable       = ON_BOARD,
+       .pio_mask       = ATA_PIO4,
 };
 
 static int __devinit triflex_init_one(struct pci_dev *dev, 
index b107ee3588f79750220344648af1b8eabcdabf54..581316f9581d0ff4be734449c4111ebc0d0e72e7 100644 (file)
@@ -503,6 +503,7 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
                .bootable       = ON_BOARD,
                .host_flags     = IDE_HFLAG_PIO_NO_BLACKLIST
                                | IDE_HFLAG_PIO_NO_DOWNGRADE,
+               .pio_mask       = ATA_PIO5,
        },{     /* 1 */
                .name           = "VP_IDE",
                .init_chipset   = init_chipset_via82cxxx,
@@ -512,6 +513,7 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
                .bootable       = ON_BOARD,
                .host_flags     = IDE_HFLAG_PIO_NO_BLACKLIST
                                | IDE_HFLAG_PIO_NO_DOWNGRADE,
+               .pio_mask       = ATA_PIO5,
        }
 };
 
index f3789c0e6cc99bc20beb4851499f34fb90083c01..8859fe2f5ac2ec6e0a5f1d17c00c8eddac9997d9 100644 (file)
@@ -316,6 +316,7 @@ m8xx_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
        }
 
        /* register routine to tune PIO mode */
+       ide_hwifs[data_port].pio_mask = ATA_PIO4;
        ide_hwifs[data_port].tuneproc = m8xx_ide_tuneproc;
 
        hw->ack_intr = (ide_ack_intr_t *) ide_interrupt_ack;
@@ -402,6 +403,7 @@ void m8xx_ide_init_hwif_ports (hw_regs_t *hw,
        }
 
        /* register routine to tune PIO mode */
+       ide_hwifs[data_port].pio_mask = ATA_PIO4;
        ide_hwifs[data_port].tuneproc = m8xx_ide_tuneproc;
 
        hw->ack_intr = (ide_ack_intr_t *) ide_interrupt_ack;
index debaa8823f517073b64b0e7f96877ae43a80d377..33630ad3e7944aaffd5e05858062bed59cbb6a32 100644 (file)
@@ -1248,6 +1248,7 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
        hwif->cbl = pmif->cable_80 ? ATA_CBL_PATA80 : ATA_CBL_PATA40;
        hwif->drives[0].unmask = 1;
        hwif->drives[1].unmask = 1;
+       hwif->pio_mask = ATA_PIO4;
        hwif->tuneproc = pmac_ide_tuneproc;
        if (pmif->kind == controller_un_ata6
            || pmif->kind == controller_k2_ata6
index e9f3267456e2925f5cf9e7ebf34fda1aee411382..f9e455cc80923fb7248af8c2fa27b66160c9f970 100644 (file)
@@ -614,6 +614,7 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a
                        ide_hwif_setup_dma(dev, d, hwif);
 bypass_legacy_dma:
                hwif->host_flags = d->host_flags;
+               hwif->pio_mask = d->pio_mask;
 
                if (d->init_hwif)
                        /* Call chipset-specific routine
index b5a20162af325094a61edf2417b7a3a6a7c66b1f..23a22df039d8c64664b9f85582e16594a600b16a 100644 (file)
@@ -64,6 +64,15 @@ enum {
        ATA_ID_PROD_LEN         = 40,
 
        ATA_PCI_CTL_OFS         = 2,
+
+       ATA_PIO0                = (1 << 0),
+       ATA_PIO1                = ATA_PIO0 | (1 << 1),
+       ATA_PIO2                = ATA_PIO1 | (1 << 2),
+       ATA_PIO3                = ATA_PIO2 | (1 << 3),
+       ATA_PIO4                = ATA_PIO3 | (1 << 4),
+       ATA_PIO5                = ATA_PIO4 | (1 << 5),
+       ATA_PIO6                = ATA_PIO5 | (1 << 6),
+
        ATA_UDMA0               = (1 << 0),
        ATA_UDMA1               = ATA_UDMA0 | (1 << 1),
        ATA_UDMA2               = ATA_UDMA1 | (1 << 2),
index 9f72f6e0c9549e284349e057e564ab15c0e060e5..5f5daad8bc541acbd9877b558a471b422aa816c4 100644 (file)
@@ -683,6 +683,8 @@ typedef struct hwif_s {
 
        u8 host_flags;
 
+       u8 pio_mask;
+
        u8 atapi_dma;   /* host supports atapi_dma */
        u8 ultra_mask;
        u8 mwdma_mask;
@@ -1270,6 +1272,7 @@ typedef struct ide_pci_device_s {
        unsigned int            extra;
        struct ide_pci_device_s *next;
        u8                      host_flags;
+       u8                      pio_mask;
        u8                      udma_mask;
 } ide_pci_device_t;