ide: add IDE_HFLAG_DTC2278 host flag
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:28 +0000 (12:46 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:28 +0000 (12:46 +0100)
Add IDE_HFLAG_DTC2278 host flag and use it instead of ide_dtc2278
chipset type in ide_init_port().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/dtc2278.c
drivers/ide/ide-probe.c
include/linux/ide.h

index 689b2e493413412a235202ee5eb742a78440a082..c6b138122981b7474b5f3f1381f4e798da9fb132 100644 (file)
@@ -100,7 +100,8 @@ static const struct ide_port_info dtc2278_port_info __initdata = {
                                  IDE_HFLAG_IO_32BIT |
                                  /* disallow ->io_32bit changes */
                                  IDE_HFLAG_NO_IO_32BIT |
-                                 IDE_HFLAG_NO_DMA,
+                                 IDE_HFLAG_NO_DMA |
+                                 IDE_HFLAG_DTC2278,
        .pio_mask               = ATA_PIO4,
 };
 
index 75b79cc963390d9d2aec356e4538edda00625ea7..62270f474681820852cbd6ef9dfde7595cc65d3d 100644 (file)
@@ -1061,7 +1061,7 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
                hwif->tp_ops = d->tp_ops;
 
        /* ->set_pio_mode for DTC2278 is currently limited to port 0 */
-       if (hwif->chipset != ide_dtc2278 || hwif->channel == 0)
+       if ((hwif->host_flags & IDE_HFLAG_DTC2278) == 0 || hwif->channel == 0)
                hwif->port_ops = d->port_ops;
 
        hwif->swdma_mask = d->swdma_mask;
index 901d323c7bbe4056af3361ffc1fc3563174b4b95..732a05f3de089d59aab5aa0039d61e75a720c86f 100644 (file)
@@ -1325,6 +1325,8 @@ enum {
        IDE_HFLAG_ERROR_STOPS_FIFO      = (1 << 19),
        /* serialize ports */
        IDE_HFLAG_SERIALIZE             = (1 << 20),
+       /* host is DTC2278 */
+       IDE_HFLAG_DTC2278               = (1 << 21),
        /* host is TRM290 */
        IDE_HFLAG_TRM290                = (1 << 23),
        /* use 32-bit I/O ops */