.init_setup     = init_setup_aec62xx,
                .init_chipset   = init_chipset_aec62xx,
                .init_hwif      = init_hwif_aec62xx,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
                .bootable       = OFF_BOARD,
                .init_setup     = init_setup_aec62xx,
                .init_chipset   = init_chipset_aec62xx,
                .init_hwif      = init_hwif_aec62xx,
-               .channels       = 2,
                .autodma        = NOAUTODMA,
                .bootable       = OFF_BOARD,
                .udma_mask      = 0x1f, /* udma0-4 */
                .init_setup     = init_setup_aec62xx,
                .init_chipset   = init_chipset_aec62xx,
                .init_hwif      = init_hwif_aec62xx,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
                .bootable       = NEVER_BOARD,
                .init_setup     = init_setup_aec6x80,
                .init_chipset   = init_chipset_aec62xx,
                .init_hwif      = init_hwif_aec62xx,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .udma_mask      = 0x3f, /* udma0-5 */
                .init_setup     = init_setup_aec6x80,
                .init_chipset   = init_chipset_aec62xx,
                .init_hwif      = init_hwif_aec62xx,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
                .bootable       = OFF_BOARD,
 
        .init_chipset   = init_chipset_ali15x3,
        .init_hwif      = init_hwif_ali15x3,
        .init_dma       = init_dma_ali15x3,
-       .channels       = 2,
        .autodma        = AUTODMA,
        .bootable       = ON_BOARD,
 };
 
                .name           = name_str,                             \
                .init_chipset   = init_chipset_amd74xx,                 \
                .init_hwif      = init_hwif_amd74xx,                    \
-               .channels       = 2,                                    \
                .autodma        = AUTODMA,                              \
                .enablebits     = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, \
                .bootable       = ON_BOARD,                             \
                .name           = name_str,                             \
                .init_chipset   = init_chipset_amd74xx,                 \
                .init_hwif      = init_hwif_amd74xx,                    \
-               .channels       = 2,                                    \
                .autodma        = AUTODMA,                              \
                .enablebits     = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, \
                .bootable       = ON_BOARD,                             \
 
        {       /* 0 */
                .name           = "ATIIXP",
                .init_hwif      = init_hwif_atiixp,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
                .bootable       = ON_BOARD,
        },{     /* 1 */
                .name           = "SB600_PATA",
                .init_hwif      = init_hwif_atiixp,
-               .channels       = 1,
                .autodma        = AUTODMA,
                .enablebits     = {{0x48,0x01,0x00}, {0x00,0x00,0x00}},
                .bootable       = ON_BOARD,
+               .host_flags     = IDE_HFLAG_SINGLE,
        },
 };
 
 
                .init_setup     = init_setup_cmd64x,
                .init_chipset   = init_chipset_cmd64x,
                .init_hwif      = init_hwif_cmd64x,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x00,0x00,0x00}, {0x51,0x08,0x08}},
                .bootable       = ON_BOARD,
                .init_setup     = init_setup_cmd646,
                .init_chipset   = init_chipset_cmd64x,
                .init_hwif      = init_hwif_cmd64x,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
                .bootable       = ON_BOARD,
                .init_setup     = init_setup_cmd64x,
                .init_chipset   = init_chipset_cmd64x,
                .init_hwif      = init_hwif_cmd64x,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
                .bootable       = ON_BOARD,
                .init_setup     = init_setup_cmd64x,
                .init_chipset   = init_chipset_cmd64x,
                .init_hwif      = init_hwif_cmd64x,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
                .bootable       = ON_BOARD,
 
                .name           = name_str,                     \
                .init_setup_dma = cs5520_init_setup_dma,        \
                .init_hwif      = init_hwif_cs5520,             \
-               .channels       = 2,                            \
                .autodma        = AUTODMA,                      \
                .bootable       = ON_BOARD,                     \
-               .flags          = IDEPCI_FLAG_ISA_PORTS,        \
+               .host_flags     = IDE_HFLAG_ISA_PORTS,          \
        }
 
 static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
 
        .name           = "CS5530",
        .init_chipset   = init_chipset_cs5530,
        .init_hwif      = init_hwif_cs5530,
-       .channels       = 2,
        .autodma        = AUTODMA,
        .bootable       = ON_BOARD,
 };
 
 static ide_pci_device_t cs5535_chipset __devinitdata = {
        .name           = "CS5535",
        .init_hwif      = init_hwif_cs5535,
-       .channels       = 1,
        .autodma        = AUTODMA,
        .bootable       = ON_BOARD,
+       .host_flags     = IDE_HFLAG_SINGLE,
 };
 
 static int __devinit cs5535_init_one(struct pci_dev *dev,
 
        .init_chipset   = init_chipset_cy82c693,
        .init_iops      = init_iops_cy82c693,
        .init_hwif      = init_hwif_cy82c693,
-       .channels       = 1,
        .autodma        = AUTODMA,
        .bootable       = ON_BOARD,
+       .host_flags     = IDE_HFLAG_SINGLE,
 };
 
 static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 
        {       /* 0 */
                .name           = "Unknown",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
        },{     /* 1 */
                .name           = "NS87410",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
                .bootable       = ON_BOARD,
         },{    /* 2 */
                .name           = "SAMURAI",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
        },{     /* 3 */
                .name           = "HT6565",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
        },{     /* 4 */
                .name           = "UM8673F",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = NODMA,
                .bootable       = ON_BOARD,
        },{     /* 5 */
                .name           = "UM8886A",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = NODMA,
                .bootable       = ON_BOARD,
        },{     /* 6 */
                .name           = "UM8886BF",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = NODMA,
                .bootable       = ON_BOARD,
        },{     /* 7 */
                .name           = "HINT_IDE",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
        },{     /* 8 */
                .name           = "VIA_IDE",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = NOAUTODMA,
                .bootable       = ON_BOARD,
        },{     /* 9 */
                .name           = "OPTI621V",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = NOAUTODMA,
                .bootable       = ON_BOARD,
        },{     /* 10 */
                .name           = "VIA8237SATA",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
        },{     /* 11 */
                .name           = "Piccolo0102",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = NOAUTODMA,
                .bootable       = ON_BOARD,
        },{     /* 12 */
                .name           = "Piccolo0103",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = NOAUTODMA,
                .bootable       = ON_BOARD,
        },{     /* 13 */
                .name           = "Piccolo0105",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = NOAUTODMA,
                .bootable       = ON_BOARD,
        },{     /* 14 */
                .name           = "Revolution",
                .init_hwif      = init_hwif_generic,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
        }
 
        .name           = "HPT34X",
        .init_chipset   = init_chipset_hpt34x,
        .init_hwif      = init_hwif_hpt34x,
-       .channels       = 2,
        .autodma        = NOAUTODMA,
        .bootable       = NEVER_BOARD,
        .extra          = 16
 
                 * to both functions -- really stupid design decision... :-(
                 * Bit 4 is for the primary channel, bit 5 for the secondary.
                 */
-               d->channels = 1;
+               d->host_flags |= IDE_HFLAG_SINGLE;
                d->enablebits[0].mask = d->enablebits[0].val = 0x10;
 
                d->udma_mask = HPT366_ALLOW_ATA66_3 ?
                .init_chipset   = init_chipset_hpt366,
                .init_hwif      = init_hwif_hpt366,
                .init_dma       = init_dma_hpt366,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
                .bootable       = OFF_BOARD,
                .init_chipset   = init_chipset_hpt366,
                .init_hwif      = init_hwif_hpt366,
                .init_dma       = init_dma_hpt366,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
                .udma_mask      = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f,
                .init_chipset   = init_chipset_hpt366,
                .init_hwif      = init_hwif_hpt366,
                .init_dma       = init_dma_hpt366,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
                .udma_mask      = HPT302_ALLOW_ATA133_6 ? 0x7f : 0x3f,
                .init_chipset   = init_chipset_hpt366,
                .init_hwif      = init_hwif_hpt366,
                .init_dma       = init_dma_hpt366,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
                .udma_mask      = HPT371_ALLOW_ATA133_6 ? 0x7f : 0x3f,
                .init_chipset   = init_chipset_hpt366,
                .init_hwif      = init_hwif_hpt366,
                .init_dma       = init_dma_hpt366,
-               .channels       = 2,    /* 4 */
                .autodma        = AUTODMA,
                .enablebits     = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
                .udma_mask      = 0x3f,
                .init_chipset   = init_chipset_hpt366,
                .init_hwif      = init_hwif_hpt366,
                .init_dma       = init_dma_hpt366,
-               .channels       = 2,    /* 4 */
                .autodma        = AUTODMA,
                .enablebits     = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
                .udma_mask      = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f,
 
        {                                               \
                .name           = name_str,             \
                .init_hwif      = init_hwif_it8213,     \
-               .channels       = 1,                    \
                .autodma        = AUTODMA,              \
                .enablebits     = {{0x41,0x80,0x80}}, \
                .bootable       = ON_BOARD,             \
+               .host_flags     = IDE_HFLAG_SINGLE,     \
        }
 
 static ide_pci_device_t it8213_chipsets[] __devinitdata = {
 
                .name           = name_str,             \
                .init_chipset   = init_chipset_it821x,  \
                .init_hwif      = init_hwif_it821x,     \
-               .channels       = 2,                    \
                .autodma        = AUTODMA,              \
                .bootable       = ON_BOARD,             \
                .fixup          = it821x_fixups         \
 
        {                                               \
                .name           = name_str,             \
                .init_hwif      = init_hwif_jmicron,    \
-               .channels       = 2,                    \
                .autodma        = AUTODMA,              \
                .bootable       = ON_BOARD,             \
                .enablebits     = { {0x40, 1, 1}, {0x40, 0x10, 0x10} }, \
 
        .init_iops      = init_iops_ns87415,
 #endif
        .init_hwif      = init_hwif_ns87415,
-       .channels       = 2,
        .autodma        = AUTODMA,
        .bootable       = ON_BOARD,
 };
 
        {       /* 0 */
                .name           = "OPTI621",
                .init_hwif      = init_hwif_opti621,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
                .bootable       = ON_BOARD,
        },{     /* 1 */
                .name           = "OPTI621X",
                .init_hwif      = init_hwif_opti621,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
                .bootable       = ON_BOARD,
 
                .init_setup     = init_setup_pdcnew,
                .init_chipset   = init_chipset_pdcnew,
                .init_hwif      = init_hwif_pdc202new,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .udma_mask      = 0x3f, /* udma0-5 */
                .init_setup     = init_setup_pdcnew,
                .init_chipset   = init_chipset_pdcnew,
                .init_hwif      = init_hwif_pdc202new,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .udma_mask      = 0x7f, /* udma0-6*/
                .init_setup     = init_setup_pdc20270,
                .init_chipset   = init_chipset_pdcnew,
                .init_hwif      = init_hwif_pdc202new,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .udma_mask      = 0x3f, /* udma0-5 */
                .init_setup     = init_setup_pdcnew,
                .init_chipset   = init_chipset_pdcnew,
                .init_hwif      = init_hwif_pdc202new,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .udma_mask      = 0x7f, /* udma0-6*/
                .init_setup     = init_setup_pdcnew,
                .init_chipset   = init_chipset_pdcnew,
                .init_hwif      = init_hwif_pdc202new,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .udma_mask      = 0x7f, /* udma0-6*/
                .init_setup     = init_setup_pdc20276,
                .init_chipset   = init_chipset_pdcnew,
                .init_hwif      = init_hwif_pdc202new,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .udma_mask      = 0x7f, /* udma0-6*/
                .init_setup     = init_setup_pdcnew,
                .init_chipset   = init_chipset_pdcnew,
                .init_hwif      = init_hwif_pdc202new,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .udma_mask      = 0x7f, /* udma0-6*/
 
                .init_chipset   = init_chipset_pdc202xx,
                .init_hwif      = init_hwif_pdc202xx,
                .init_dma       = init_dma_pdc202xx,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .extra          = 16,
                .init_chipset   = init_chipset_pdc202xx,
                .init_hwif      = init_hwif_pdc202xx,
                .init_dma       = init_dma_pdc202xx,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .extra          = 48,
                .init_chipset   = init_chipset_pdc202xx,
                .init_hwif      = init_hwif_pdc202xx,
                .init_dma       = init_dma_pdc202xx,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .extra          = 48,
                .init_chipset   = init_chipset_pdc202xx,
                .init_hwif      = init_hwif_pdc202xx,
                .init_dma       = init_dma_pdc202xx,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .extra          = 48,
                .init_chipset   = init_chipset_pdc202xx,
                .init_hwif      = init_hwif_pdc202xx,
                .init_dma       = init_dma_pdc202xx,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = OFF_BOARD,
                .extra          = 48,
 
                .name           = name_str,             \
                .init_chipset   = init_chipset_piix,    \
                .init_hwif      = init_hwif_piix,       \
-               .channels       = 2,                    \
                .autodma        = AUTODMA,              \
                .enablebits     = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
                .bootable       = ON_BOARD,             \
                 */
                .name           = "MPIIX",
                .init_hwif      = init_hwif_piix,
-               .channels       = 2,
                .autodma        = NODMA,
                .enablebits     = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}},
                .bootable       = ON_BOARD,
-               .flags          = IDEPCI_FLAG_ISA_PORTS
+               .host_flags     = IDE_HFLAG_ISA_PORTS,
        },
 
        /*  3 */ DECLARE_PIIX_DEV("PIIX3", 0x00),       /* no udma */
 
 static ide_pci_device_t rz1000_chipset __devinitdata = {
        .name           = "RZ100x",
        .init_hwif      = init_hwif_rz1000,
-       .channels       = 2,
        .autodma        = NODMA,
        .bootable       = ON_BOARD,
 };
 
 static ide_pci_device_t sc1200_chipset __devinitdata = {
        .name           = "SC1200",
        .init_hwif      = init_hwif_sc1200,
-       .channels       = 2,
        .autodma        = AUTODMA,
        .bootable       = ON_BOARD,
 };
 
       .init_setup      = init_setup_scc,               \
       .init_iops       = init_iops_scc,                \
       .init_hwif       = init_hwif_scc,                \
-      .channels        = 1,                                    \
       .autodma = AUTODMA,                              \
       .bootable        = ON_BOARD,                             \
+      .host_flags      = IDE_HFLAG_SINGLE,             \
   }
 
 static ide_pci_device_t scc_chipsets[] __devinitdata = {
 
                        d->bootable = ON_BOARD;
        }
 
-       d->channels = ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE ||
-                       dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) &&
-                      (!(PCI_FUNC(dev->devfn) & 1))) ? 1 : 2;
+       if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE ||
+           dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) &&
+           (!(PCI_FUNC(dev->devfn) & 1)))
+               d->host_flags |= IDE_HFLAG_SINGLE;
+       else
+               d->host_flags &= ~IDE_HFLAG_SINGLE;
 
        return ide_setup_pci_device(dev, d);
 }
                .init_setup     = init_setup_svwks,
                .init_chipset   = init_chipset_svwks,
                .init_hwif      = init_hwif_svwks,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
        },{     /* 1 */
                .init_setup     = init_setup_svwks,
                .init_chipset   = init_chipset_svwks,
                .init_hwif      = init_hwif_svwks,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
        },{     /* 2 */
                .init_setup     = init_setup_csb6,
                .init_chipset   = init_chipset_svwks,
                .init_hwif      = init_hwif_svwks,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
        },{     /* 3 */
                .init_setup     = init_setup_csb6,
                .init_chipset   = init_chipset_svwks,
                .init_hwif      = init_hwif_svwks,
-               .channels       = 1,    /* 2 */
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
+               .host_flags     = IDE_HFLAG_SINGLE,
        },{     /* 4 */
                .name           = "SvrWks HT1000",
                .init_setup     = init_setup_svwks,
                .init_chipset   = init_chipset_svwks,
                .init_hwif      = init_hwif_svwks,
-               .channels       = 1,    /* 2 */
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
+               .host_flags     = IDE_HFLAG_SINGLE,
        }
 };
 
 
         .name = "SGIIOC4",
         .init_hwif = ide_init_sgiioc4,
         .init_dma = ide_dma_sgiioc4,
-        .channels = 1,
         .autodma = AUTODMA,
         /* SGI IOC4 doesn't have enablebits. */
         .bootable = ON_BOARD,
+        .host_flags = IDE_HFLAG_SINGLE,
 };
 
 int
 
                .init_iops      = init_iops_siimage,    \
                .init_hwif      = init_hwif_siimage,    \
                .fixup          = siimage_fixup,        \
-               .channels       = 2,                    \
                .autodma        = AUTODMA,              \
                .bootable       = ON_BOARD,             \
        }
 
        .name           = "SIS5513",
        .init_chipset   = init_chipset_sis5513,
        .init_hwif      = init_hwif_sis5513,
-       .channels       = 2,
        .autodma        = NOAUTODMA,
        .enablebits     = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
        .bootable       = ON_BOARD,
 
        .name           = "W82C105",
        .init_chipset   = init_chipset_sl82c105,
        .init_hwif      = init_hwif_sl82c105,
-       .channels       = 2,
        .autodma        = NOAUTODMA,
        .enablebits     = {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
        .bootable       = ON_BOARD,
 
 static ide_pci_device_t slc90e66_chipset __devinitdata = {
        .name           = "SLC90E66",
        .init_hwif      = init_hwif_slc90e66,
-       .channels       = 2,
        .autodma        = AUTODMA,
        .enablebits     = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
        .bootable       = ON_BOARD,
 
        .name           = "TC86C001",
        .init_chipset   = init_chipset_tc86c001,
        .init_hwif      = init_hwif_tc86c001,
-       .channels       = 1,
        .autodma        = AUTODMA,
-       .bootable       = OFF_BOARD
+       .bootable       = OFF_BOARD,
+       .host_flags     = IDE_HFLAG_SINGLE,
 };
 
 static int __devinit tc86c001_init_one(struct pci_dev *dev,
 
 static ide_pci_device_t triflex_device __devinitdata = {
        .name           = "TRIFLEX",
        .init_hwif      = init_hwif_triflex,
-       .channels       = 2,
        .autodma        = AUTODMA,
        .enablebits     = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
        .bootable       = ON_BOARD,
 
 static ide_pci_device_t trm290_chipset __devinitdata = {
        .name           = "TRM290",
        .init_hwif      = init_hwif_trm290,
-       .channels       = 2,
        .autodma        = NOAUTODMA,
        .bootable       = ON_BOARD,
 };
 
                .name           = "VP_IDE",
                .init_chipset   = init_chipset_via82cxxx,
                .init_hwif      = init_hwif_via82cxxx,
-               .channels       = 2,
                .autodma        = NOAUTODMA,
                .enablebits     = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
                .bootable       = ON_BOARD
                .name           = "VP_IDE",
                .init_chipset   = init_chipset_via82cxxx,
                .init_hwif      = init_hwif_via82cxxx,
-               .channels       = 2,
                .autodma        = AUTODMA,
                .enablebits     = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
                .bootable       = ON_BOARD,
 
        unsigned long ctl = 0, base = 0;
        ide_hwif_t *hwif;
 
-       if ((d->flags & IDEPCI_FLAG_ISA_PORTS) == 0) {
+       if ((d->host_flags & IDE_HFLAG_ISA_PORTS) == 0) {
                /*  Possibly we should fail if these checks report true */
                ide_pci_check_iomem(dev, d, 2*port);
                ide_pci_check_iomem(dev, d, 2*port+1);
  
 void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, ata_index_t *index)
 {
-       int port;
+       int channels = (d->host_flags & IDE_HFLAG_SINGLE) ? 1 : 2, port;
        int at_least_one_hwif_enabled = 0;
        ide_hwif_t *hwif, *mate = NULL;
        u8 tmp;
         * Set up the IDE ports
         */
         
-       for (port = 0; port <= 1; ++port) {
+       for (port = 0; port < channels; ++port) {
                ide_pci_enablebit_t *e = &(d->enablebits[port]);
        
                if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) ||
                    (tmp & e->mask) != e->val))
                        continue;       /* port not enabled */
 
-               if (d->channels <= port)
-                       break;
-       
                if ((hwif = ide_hwif_configure(dev, d, mate, port, pciirq)) == NULL)
                        continue;
 
 
 
 enum {
        /* Uses ISA control ports not PCI ones. */
-       IDEPCI_FLAG_ISA_PORTS           = (1 << 0),
+       IDE_HFLAG_ISA_PORTS             = (1 << 0),
+       IDE_HFLAG_SINGLE                = (1 << 1),
 };
 
 typedef struct ide_pci_device_s {
        void                    (*init_hwif)(ide_hwif_t *);
        void                    (*init_dma)(ide_hwif_t *, unsigned long);
        void                    (*fixup)(ide_hwif_t *);
-       u8                      channels;
        u8                      autodma;
        ide_pci_enablebit_t     enablebits[2];
        u8                      bootable;
        unsigned int            extra;
        struct ide_pci_device_s *next;
-       u8                      flags;
+       u8                      host_flags;
        u8                      udma_mask;
 } ide_pci_device_t;