ide: add ide_pci_device_t.host_flags (take 2)

* Rename ide_pci_device_t.flags to ide_pci_device_t.host_flags
  and IDEPCI_FLAG_ISA_PORTS flag to IDE_HFLAG_ISA_PORTS.

* Add IDE_HFLAG_SINGLE flag for single channel devices.

* Convert core code and all IDE PCI drivers to use IDE_HFLAG_SINGLE
  and remove no longer needed ide_pci_device_t.channels field.

v2:
* Fix issues noticed by Sergei:
  - correct code alignment in scc_pata.c
  - s/IDE_HFLAG_SINGLE/~IDE_HFLAG_SINGLE/ in serverworks.c
Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 2229833c
...@@ -265,7 +265,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { ...@@ -265,7 +265,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
.init_setup = init_setup_aec62xx, .init_setup = init_setup_aec62xx,
.init_chipset = init_chipset_aec62xx, .init_chipset = init_chipset_aec62xx,
.init_hwif = init_hwif_aec62xx, .init_hwif = init_hwif_aec62xx,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
...@@ -275,7 +274,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { ...@@ -275,7 +274,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
.init_setup = init_setup_aec62xx, .init_setup = init_setup_aec62xx,
.init_chipset = init_chipset_aec62xx, .init_chipset = init_chipset_aec62xx,
.init_hwif = init_hwif_aec62xx, .init_hwif = init_hwif_aec62xx,
.channels = 2,
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.udma_mask = 0x1f, /* udma0-4 */ .udma_mask = 0x1f, /* udma0-4 */
...@@ -284,7 +282,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { ...@@ -284,7 +282,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
.init_setup = init_setup_aec62xx, .init_setup = init_setup_aec62xx,
.init_chipset = init_chipset_aec62xx, .init_chipset = init_chipset_aec62xx,
.init_hwif = init_hwif_aec62xx, .init_hwif = init_hwif_aec62xx,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
.bootable = NEVER_BOARD, .bootable = NEVER_BOARD,
...@@ -294,7 +291,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { ...@@ -294,7 +291,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
.init_setup = init_setup_aec6x80, .init_setup = init_setup_aec6x80,
.init_chipset = init_chipset_aec62xx, .init_chipset = init_chipset_aec62xx,
.init_hwif = init_hwif_aec62xx, .init_hwif = init_hwif_aec62xx,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.udma_mask = 0x3f, /* udma0-5 */ .udma_mask = 0x3f, /* udma0-5 */
...@@ -303,7 +299,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { ...@@ -303,7 +299,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
.init_setup = init_setup_aec6x80, .init_setup = init_setup_aec6x80,
.init_chipset = init_chipset_aec62xx, .init_chipset = init_chipset_aec62xx,
.init_hwif = init_hwif_aec62xx, .init_hwif = init_hwif_aec62xx,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
......
...@@ -817,7 +817,6 @@ static ide_pci_device_t ali15x3_chipset __devinitdata = { ...@@ -817,7 +817,6 @@ static ide_pci_device_t ali15x3_chipset __devinitdata = {
.init_chipset = init_chipset_ali15x3, .init_chipset = init_chipset_ali15x3,
.init_hwif = init_hwif_ali15x3, .init_hwif = init_hwif_ali15x3,
.init_dma = init_dma_ali15x3, .init_dma = init_dma_ali15x3,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
}; };
......
...@@ -448,7 +448,6 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif) ...@@ -448,7 +448,6 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
.name = name_str, \ .name = name_str, \
.init_chipset = init_chipset_amd74xx, \ .init_chipset = init_chipset_amd74xx, \
.init_hwif = init_hwif_amd74xx, \ .init_hwif = init_hwif_amd74xx, \
.channels = 2, \
.autodma = AUTODMA, \ .autodma = AUTODMA, \
.enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, \ .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, \
.bootable = ON_BOARD, \ .bootable = ON_BOARD, \
...@@ -459,7 +458,6 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif) ...@@ -459,7 +458,6 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
.name = name_str, \ .name = name_str, \
.init_chipset = init_chipset_amd74xx, \ .init_chipset = init_chipset_amd74xx, \
.init_hwif = init_hwif_amd74xx, \ .init_hwif = init_hwif_amd74xx, \
.channels = 2, \
.autodma = AUTODMA, \ .autodma = AUTODMA, \
.enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, \ .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, \
.bootable = ON_BOARD, \ .bootable = ON_BOARD, \
......
...@@ -291,17 +291,16 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = { ...@@ -291,17 +291,16 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
{ /* 0 */ { /* 0 */
.name = "ATIIXP", .name = "ATIIXP",
.init_hwif = init_hwif_atiixp, .init_hwif = init_hwif_atiixp,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 1 */ },{ /* 1 */
.name = "SB600_PATA", .name = "SB600_PATA",
.init_hwif = init_hwif_atiixp, .init_hwif = init_hwif_atiixp,
.channels = 1,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}}, .enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
.host_flags = IDE_HFLAG_SINGLE,
}, },
}; };
......
...@@ -617,7 +617,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = { ...@@ -617,7 +617,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.init_setup = init_setup_cmd64x, .init_setup = init_setup_cmd64x,
.init_chipset = init_chipset_cmd64x, .init_chipset = init_chipset_cmd64x,
.init_hwif = init_hwif_cmd64x, .init_hwif = init_hwif_cmd64x,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x00,0x00,0x00}, {0x51,0x08,0x08}}, .enablebits = {{0x00,0x00,0x00}, {0x51,0x08,0x08}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
...@@ -627,7 +626,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = { ...@@ -627,7 +626,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.init_setup = init_setup_cmd646, .init_setup = init_setup_cmd646,
.init_chipset = init_chipset_cmd64x, .init_chipset = init_chipset_cmd64x,
.init_hwif = init_hwif_cmd64x, .init_hwif = init_hwif_cmd64x,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
...@@ -637,7 +635,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = { ...@@ -637,7 +635,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.init_setup = init_setup_cmd64x, .init_setup = init_setup_cmd64x,
.init_chipset = init_chipset_cmd64x, .init_chipset = init_chipset_cmd64x,
.init_hwif = init_hwif_cmd64x, .init_hwif = init_hwif_cmd64x,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
...@@ -647,7 +644,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = { ...@@ -647,7 +644,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.init_setup = init_setup_cmd64x, .init_setup = init_setup_cmd64x,
.init_chipset = init_chipset_cmd64x, .init_chipset = init_chipset_cmd64x,
.init_hwif = init_hwif_cmd64x, .init_hwif = init_hwif_cmd64x,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
......
...@@ -194,10 +194,9 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif) ...@@ -194,10 +194,9 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif)
.name = name_str, \ .name = name_str, \
.init_setup_dma = cs5520_init_setup_dma, \ .init_setup_dma = cs5520_init_setup_dma, \
.init_hwif = init_hwif_cs5520, \ .init_hwif = init_hwif_cs5520, \
.channels = 2, \
.autodma = AUTODMA, \ .autodma = AUTODMA, \
.bootable = ON_BOARD, \ .bootable = ON_BOARD, \
.flags = IDEPCI_FLAG_ISA_PORTS, \ .host_flags = IDE_HFLAG_ISA_PORTS, \
} }
static ide_pci_device_t cyrix_chipsets[] __devinitdata = { static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
......
...@@ -341,7 +341,6 @@ static ide_pci_device_t cs5530_chipset __devinitdata = { ...@@ -341,7 +341,6 @@ static ide_pci_device_t cs5530_chipset __devinitdata = {
.name = "CS5530", .name = "CS5530",
.init_chipset = init_chipset_cs5530, .init_chipset = init_chipset_cs5530,
.init_hwif = init_hwif_cs5530, .init_hwif = init_hwif_cs5530,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
}; };
......
...@@ -228,9 +228,9 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif) ...@@ -228,9 +228,9 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif)
static ide_pci_device_t cs5535_chipset __devinitdata = { static ide_pci_device_t cs5535_chipset __devinitdata = {
.name = "CS5535", .name = "CS5535",
.init_hwif = init_hwif_cs5535, .init_hwif = init_hwif_cs5535,
.channels = 1,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
.host_flags = IDE_HFLAG_SINGLE,
}; };
static int __devinit cs5535_init_one(struct pci_dev *dev, static int __devinit cs5535_init_one(struct pci_dev *dev,
......
...@@ -483,9 +483,9 @@ static ide_pci_device_t cy82c693_chipset __devinitdata = { ...@@ -483,9 +483,9 @@ static ide_pci_device_t cy82c693_chipset __devinitdata = {
.init_chipset = init_chipset_cy82c693, .init_chipset = init_chipset_cy82c693,
.init_iops = init_iops_cy82c693, .init_iops = init_iops_cy82c693,
.init_hwif = init_hwif_cy82c693, .init_hwif = init_hwif_cy82c693,
.channels = 1,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
.host_flags = IDE_HFLAG_SINGLE,
}; };
static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id)
......
...@@ -95,92 +95,77 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -95,92 +95,77 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.name = "Unknown", .name = "Unknown",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 1 */ },{ /* 1 */
.name = "NS87410", .name = "NS87410",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 2 */ },{ /* 2 */
.name = "SAMURAI", .name = "SAMURAI",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 3 */ },{ /* 3 */
.name = "HT6565", .name = "HT6565",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 4 */ },{ /* 4 */
.name = "UM8673F", .name = "UM8673F",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = NODMA, .autodma = NODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 5 */ },{ /* 5 */
.name = "UM8886A", .name = "UM8886A",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = NODMA, .autodma = NODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 6 */ },{ /* 6 */
.name = "UM8886BF", .name = "UM8886BF",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = NODMA, .autodma = NODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 7 */ },{ /* 7 */
.name = "HINT_IDE", .name = "HINT_IDE",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 8 */ },{ /* 8 */
.name = "VIA_IDE", .name = "VIA_IDE",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 9 */ },{ /* 9 */
.name = "OPTI621V", .name = "OPTI621V",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 10 */ },{ /* 10 */
.name = "VIA8237SATA", .name = "VIA8237SATA",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
},{ /* 11 */ },{ /* 11 */
.name = "Piccolo0102", .name = "Piccolo0102",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 12 */ },{ /* 12 */
.name = "Piccolo0103", .name = "Piccolo0103",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 13 */ },{ /* 13 */
.name = "Piccolo0105", .name = "Piccolo0105",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 14 */ },{ /* 14 */
.name = "Revolution", .name = "Revolution",
.init_hwif = init_hwif_generic, .init_hwif = init_hwif_generic,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
} }
......
...@@ -175,7 +175,6 @@ static ide_pci_device_t hpt34x_chipset __devinitdata = { ...@@ -175,7 +175,6 @@ static ide_pci_device_t hpt34x_chipset __devinitdata = {
.name = "HPT34X", .name = "HPT34X",
.init_chipset = init_chipset_hpt34x, .init_chipset = init_chipset_hpt34x,
.init_hwif = init_hwif_hpt34x, .init_hwif = init_hwif_hpt34x,
.channels = 2,
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.bootable = NEVER_BOARD, .bootable = NEVER_BOARD,
.extra = 16 .extra = 16
......
...@@ -1483,7 +1483,7 @@ static int __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d) ...@@ -1483,7 +1483,7 @@ static int __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d)
* to both functions -- really stupid design decision... :-( * to both functions -- really stupid design decision... :-(
* Bit 4 is for the primary channel, bit 5 for the secondary. * 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->enablebits[0].mask = d->enablebits[0].val = 0x10;
d->udma_mask = HPT366_ALLOW_ATA66_3 ? d->udma_mask = HPT366_ALLOW_ATA66_3 ?
...@@ -1546,7 +1546,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = { ...@@ -1546,7 +1546,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
.init_chipset = init_chipset_hpt366, .init_chipset = init_chipset_hpt366,
.init_hwif = init_hwif_hpt366, .init_hwif = init_hwif_hpt366,
.init_dma = init_dma_hpt366, .init_dma = init_dma_hpt366,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
...@@ -1557,7 +1556,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = { ...@@ -1557,7 +1556,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
.init_chipset = init_chipset_hpt366, .init_chipset = init_chipset_hpt366,
.init_hwif = init_hwif_hpt366, .init_hwif = init_hwif_hpt366,
.init_dma = init_dma_hpt366, .init_dma = init_dma_hpt366,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
.udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f, .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f,
...@@ -1569,7 +1567,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = { ...@@ -1569,7 +1567,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
.init_chipset = init_chipset_hpt366, .init_chipset = init_chipset_hpt366,
.init_hwif = init_hwif_hpt366, .init_hwif = init_hwif_hpt366,
.init_dma = init_dma_hpt366, .init_dma = init_dma_hpt366,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
.udma_mask = HPT302_ALLOW_ATA133_6 ? 0x7f : 0x3f, .udma_mask = HPT302_ALLOW_ATA133_6 ? 0x7f : 0x3f,
...@@ -1581,7 +1578,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = { ...@@ -1581,7 +1578,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
.init_chipset = init_chipset_hpt366, .init_chipset = init_chipset_hpt366,
.init_hwif = init_hwif_hpt366, .init_hwif = init_hwif_hpt366,
.init_dma = init_dma_hpt366, .init_dma = init_dma_hpt366,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
.udma_mask = HPT371_ALLOW_ATA133_6 ? 0x7f : 0x3f, .udma_mask = HPT371_ALLOW_ATA133_6 ? 0x7f : 0x3f,
...@@ -1593,7 +1589,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = { ...@@ -1593,7 +1589,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
.init_chipset = init_chipset_hpt366, .init_chipset = init_chipset_hpt366,
.init_hwif = init_hwif_hpt366, .init_hwif = init_hwif_hpt366,
.init_dma = init_dma_hpt366, .init_dma = init_dma_hpt366,
.channels = 2, /* 4 */
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
.udma_mask = 0x3f, .udma_mask = 0x3f,
...@@ -1605,7 +1600,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = { ...@@ -1605,7 +1600,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
.init_chipset = init_chipset_hpt366, .init_chipset = init_chipset_hpt366,
.init_hwif = init_hwif_hpt366, .init_hwif = init_hwif_hpt366,
.init_dma = init_dma_hpt366, .init_dma = init_dma_hpt366,
.channels = 2, /* 4 */
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
.udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f, .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f,
......
...@@ -272,10 +272,10 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif) ...@@ -272,10 +272,10 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif)
{ \ { \
.name = name_str, \ .name = name_str, \
.init_hwif = init_hwif_it8213, \ .init_hwif = init_hwif_it8213, \
.channels = 1, \
.autodma = AUTODMA, \ .autodma = AUTODMA, \
.enablebits = {{0x41,0x80,0x80}}, \ .enablebits = {{0x41,0x80,0x80}}, \
.bootable = ON_BOARD, \ .bootable = ON_BOARD, \
.host_flags = IDE_HFLAG_SINGLE, \
} }
static ide_pci_device_t it8213_chipsets[] __devinitdata = { static ide_pci_device_t it8213_chipsets[] __devinitdata = {
......
...@@ -718,7 +718,6 @@ static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev, const cha ...@@ -718,7 +718,6 @@ static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev, const cha
.name = name_str, \ .name = name_str, \
.init_chipset = init_chipset_it821x, \ .init_chipset = init_chipset_it821x, \
.init_hwif = init_hwif_it821x, \ .init_hwif = init_hwif_it821x, \
.channels = 2, \
.autodma = AUTODMA, \ .autodma = AUTODMA, \
.bootable = ON_BOARD, \ .bootable = ON_BOARD, \
.fixup = it821x_fixups \ .fixup = it821x_fixups \
......
...@@ -177,7 +177,6 @@ static void __devinit init_hwif_jmicron(ide_hwif_t *hwif) ...@@ -177,7 +177,6 @@ static void __devinit init_hwif_jmicron(ide_hwif_t *hwif)
{ \ { \
.name = name_str, \ .name = name_str, \
.init_hwif = init_hwif_jmicron, \ .init_hwif = init_hwif_jmicron, \
.channels = 2, \
.autodma = AUTODMA, \ .autodma = AUTODMA, \
.bootable = ON_BOARD, \ .bootable = ON_BOARD, \
.enablebits = { {0x40, 1, 1}, {0x40, 0x10, 0x10} }, \ .enablebits = { {0x40, 1, 1}, {0x40, 0x10, 0x10} }, \
......
...@@ -281,7 +281,6 @@ static ide_pci_device_t ns87415_chipset __devinitdata = { ...@@ -281,7 +281,6 @@ static ide_pci_device_t ns87415_chipset __devinitdata = {
.init_iops = init_iops_ns87415, .init_iops = init_iops_ns87415,
#endif #endif
.init_hwif = init_hwif_ns87415, .init_hwif = init_hwif_ns87415,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
}; };
......
...@@ -350,14 +350,12 @@ static ide_pci_device_t opti621_chipsets[] __devinitdata = { ...@@ -350,14 +350,12 @@ static ide_pci_device_t opti621_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.name = "OPTI621", .name = "OPTI621",
.init_hwif = init_hwif_opti621, .init_hwif = init_hwif_opti621,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 1 */ },{ /* 1 */
.name = "OPTI621X", .name = "OPTI621X",
.init_hwif = init_hwif_opti621, .init_hwif = init_hwif_opti621,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
......
...@@ -566,7 +566,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -566,7 +566,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
.init_setup = init_setup_pdcnew, .init_setup = init_setup_pdcnew,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
.init_hwif = init_hwif_pdc202new, .init_hwif = init_hwif_pdc202new,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.udma_mask = 0x3f, /* udma0-5 */ .udma_mask = 0x3f, /* udma0-5 */
...@@ -575,7 +574,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -575,7 +574,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
.init_setup = init_setup_pdcnew, .init_setup = init_setup_pdcnew,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
.init_hwif = init_hwif_pdc202new, .init_hwif = init_hwif_pdc202new,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.udma_mask = 0x7f, /* udma0-6*/ .udma_mask = 0x7f, /* udma0-6*/
...@@ -584,7 +582,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -584,7 +582,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
.init_setup = init_setup_pdc20270, .init_setup = init_setup_pdc20270,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
.init_hwif = init_hwif_pdc202new, .init_hwif = init_hwif_pdc202new,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.udma_mask = 0x3f, /* udma0-5 */ .udma_mask = 0x3f, /* udma0-5 */
...@@ -593,7 +590,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -593,7 +590,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
.init_setup = init_setup_pdcnew, .init_setup = init_setup_pdcnew,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
.init_hwif = init_hwif_pdc202new, .init_hwif = init_hwif_pdc202new,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.udma_mask = 0x7f, /* udma0-6*/ .udma_mask = 0x7f, /* udma0-6*/
...@@ -602,7 +598,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -602,7 +598,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
.init_setup = init_setup_pdcnew, .init_setup = init_setup_pdcnew,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
.init_hwif = init_hwif_pdc202new, .init_hwif = init_hwif_pdc202new,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.udma_mask = 0x7f, /* udma0-6*/ .udma_mask = 0x7f, /* udma0-6*/
...@@ -611,7 +606,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -611,7 +606,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
.init_setup = init_setup_pdc20276, .init_setup = init_setup_pdc20276,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
.init_hwif = init_hwif_pdc202new, .init_hwif = init_hwif_pdc202new,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.udma_mask = 0x7f, /* udma0-6*/ .udma_mask = 0x7f, /* udma0-6*/
...@@ -620,7 +614,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -620,7 +614,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
.init_setup = init_setup_pdcnew, .init_setup = init_setup_pdcnew,
.init_chipset = init_chipset_pdcnew, .init_chipset = init_chipset_pdcnew,
.init_hwif = init_hwif_pdc202new, .init_hwif = init_hwif_pdc202new,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.udma_mask = 0x7f, /* udma0-6*/ .udma_mask = 0x7f, /* udma0-6*/
......
...@@ -441,7 +441,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { ...@@ -441,7 +441,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
.init_chipset = init_chipset_pdc202xx, .init_chipset = init_chipset_pdc202xx,
.init_hwif = init_hwif_pdc202xx, .init_hwif = init_hwif_pdc202xx,
.init_dma = init_dma_pdc202xx, .init_dma = init_dma_pdc202xx,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.extra = 16, .extra = 16,
...@@ -452,7 +451,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { ...@@ -452,7 +451,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
.init_chipset = init_chipset_pdc202xx, .init_chipset = init_chipset_pdc202xx,
.init_hwif = init_hwif_pdc202xx, .init_hwif = init_hwif_pdc202xx,
.init_dma = init_dma_pdc202xx, .init_dma = init_dma_pdc202xx,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.extra = 48, .extra = 48,
...@@ -463,7 +461,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { ...@@ -463,7 +461,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
.init_chipset = init_chipset_pdc202xx, .init_chipset = init_chipset_pdc202xx,
.init_hwif = init_hwif_pdc202xx, .init_hwif = init_hwif_pdc202xx,
.init_dma = init_dma_pdc202xx, .init_dma = init_dma_pdc202xx,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.extra = 48, .extra = 48,
...@@ -474,7 +471,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { ...@@ -474,7 +471,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
.init_chipset = init_chipset_pdc202xx, .init_chipset = init_chipset_pdc202xx,
.init_hwif = init_hwif_pdc202xx, .init_hwif = init_hwif_pdc202xx,
.init_dma = init_dma_pdc202xx, .init_dma = init_dma_pdc202xx,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.extra = 48, .extra = 48,
...@@ -485,7 +481,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { ...@@ -485,7 +481,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
.init_chipset = init_chipset_pdc202xx, .init_chipset = init_chipset_pdc202xx,
.init_hwif = init_hwif_pdc202xx, .init_hwif = init_hwif_pdc202xx,
.init_dma = init_dma_pdc202xx, .init_dma = init_dma_pdc202xx,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD, .bootable = OFF_BOARD,
.extra = 48, .extra = 48,
......
...@@ -495,7 +495,6 @@ static void __devinit init_hwif_piix(ide_hwif_t *hwif) ...@@ -495,7 +495,6 @@ static void __devinit init_hwif_piix(ide_hwif_t *hwif)
.name = name_str, \ .name = name_str, \
.init_chipset = init_chipset_piix, \ .init_chipset = init_chipset_piix, \
.init_hwif = init_hwif_piix, \ .init_hwif = init_hwif_piix, \
.channels = 2, \
.autodma = AUTODMA, \ .autodma = AUTODMA, \
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \ .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
.bootable = ON_BOARD, \ .bootable = ON_BOARD, \
...@@ -514,11 +513,10 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = { ...@@ -514,11 +513,10 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
*/ */
.name = "MPIIX", .name = "MPIIX",
.init_hwif = init_hwif_piix, .init_hwif = init_hwif_piix,
.channels = 2,
.autodma = NODMA, .autodma = NODMA,
.enablebits = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}}, .enablebits = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
.flags = IDEPCI_FLAG_ISA_PORTS .host_flags = IDE_HFLAG_ISA_PORTS,
}, },
/* 3 */ DECLARE_PIIX_DEV("PIIX3", 0x00), /* no udma */ /* 3 */ DECLARE_PIIX_DEV("PIIX3", 0x00), /* no udma */
......
...@@ -52,7 +52,6 @@ static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif) ...@@ -52,7 +52,6 @@ static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif)
static ide_pci_device_t rz1000_chipset __devinitdata = { static ide_pci_device_t rz1000_chipset __devinitdata = {
.name = "RZ100x", .name = "RZ100x",
.init_hwif = init_hwif_rz1000, .init_hwif = init_hwif_rz1000,
.channels = 2,
.autodma = NODMA, .autodma = NODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
}; };
......
...@@ -471,7 +471,6 @@ static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif) ...@@ -471,7 +471,6 @@ static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif)
static ide_pci_device_t sc1200_chipset __devinitdata = { static ide_pci_device_t sc1200_chipset __devinitdata = {
.name = "SC1200", .name = "SC1200",
.init_hwif = init_hwif_sc1200, .init_hwif = init_hwif_sc1200,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
}; };
......
...@@ -772,9 +772,9 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif) ...@@ -772,9 +772,9 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif)
.init_setup = init_setup_scc, \ .init_setup = init_setup_scc, \
.init_iops = init_iops_scc, \ .init_iops = init_iops_scc, \
.init_hwif = init_hwif_scc, \ .init_hwif = init_hwif_scc, \
.channels = 1, \
.autodma = AUTODMA, \ .autodma = AUTODMA, \
.bootable = ON_BOARD, \ .bootable = ON_BOARD, \
.host_flags = IDE_HFLAG_SINGLE, \
} }
static ide_pci_device_t scc_chipsets[] __devinitdata = { static ide_pci_device_t scc_chipsets[] __devinitdata = {
......
...@@ -441,9 +441,12 @@ static int __devinit init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d) ...@@ -441,9 +441,12 @@ static int __devinit init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
d->bootable = ON_BOARD; d->bootable = ON_BOARD;
} }
d->channels = ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE || if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE ||
dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) && dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) &&
(!(PCI_FUNC(dev->devfn) & 1))) ? 1 : 2; (!(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); return ide_setup_pci_device(dev, d);
} }
...@@ -454,7 +457,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { ...@@ -454,7 +457,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
.init_setup = init_setup_svwks, .init_setup = init_setup_svwks,
.init_chipset = init_chipset_svwks, .init_chipset = init_chipset_svwks,
.init_hwif = init_hwif_svwks, .init_hwif = init_hwif_svwks,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 1 */ },{ /* 1 */
...@@ -462,7 +464,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { ...@@ -462,7 +464,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
.init_setup = init_setup_svwks, .init_setup = init_setup_svwks,
.init_chipset = init_chipset_svwks, .init_chipset = init_chipset_svwks,
.init_hwif = init_hwif_svwks, .init_hwif = init_hwif_svwks,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 2 */ },{ /* 2 */
...@@ -470,7 +471,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { ...@@ -470,7 +471,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
.init_setup = init_setup_csb6, .init_setup = init_setup_csb6,
.init_chipset = init_chipset_svwks, .init_chipset = init_chipset_svwks,
.init_hwif = init_hwif_svwks, .init_hwif = init_hwif_svwks,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
},{ /* 3 */ },{ /* 3 */
...@@ -478,17 +478,17 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { ...@@ -478,17 +478,17 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
.init_setup = init_setup_csb6, .init_setup = init_setup_csb6,
.init_chipset = init_chipset_svwks, .init_chipset = init_chipset_svwks,
.init_hwif = init_hwif_svwks, .init_hwif = init_hwif_svwks,
.channels = 1, /* 2 */
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
.host_flags = IDE_HFLAG_SINGLE,
},{ /* 4 */ },{ /* 4 */
.name = "SvrWks HT1000", .name = "SvrWks HT1000",
.init_setup = init_setup_svwks, .init_setup = init_setup_svwks,
.init_chipset = init_chipset_svwks, .init_chipset = init_chipset_svwks,
.init_hwif = init_hwif_svwks, .init_hwif = init_hwif_svwks,
.channels = 1, /* 2 */
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
.host_flags = IDE_HFLAG_SINGLE,
} }
}; };
......
...@@ -724,10 +724,10 @@ static ide_pci_device_t sgiioc4_chipset __devinitdata = { ...@@ -724,10 +724,10 @@ static ide_pci_device_t sgiioc4_chipset __devinitdata = {
.name = "SGIIOC4", .name = "SGIIOC4",
.init_hwif = ide_init_sgiioc4, .init_hwif = ide_init_sgiioc4,
.init_dma = ide_dma_sgiioc4, .init_dma = ide_dma_sgiioc4,
.channels = 1,
.autodma = AUTODMA, .autodma = AUTODMA,
/* SGI IOC4 doesn't have enablebits. */ /* SGI IOC4 doesn't have enablebits. */
.bootable = ON_BOARD, .bootable = ON_BOARD,
.host_flags = IDE_HFLAG_SINGLE,
}; };
int int
......
...@@ -957,7 +957,6 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif) ...@@ -957,7 +957,6 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif)
.init_iops = init_iops_siimage, \ .init_iops = init_iops_siimage, \
.init_hwif = init_hwif_siimage, \ .init_hwif = init_hwif_siimage, \
.fixup = siimage_fixup, \ .fixup = siimage_fixup, \
.channels = 2, \
.autodma = AUTODMA, \ .autodma = AUTODMA, \
.bootable = ON_BOARD, \ .bootable = ON_BOARD, \
} }
......
...@@ -878,7 +878,6 @@ static ide_pci_device_t sis5513_chipset __devinitdata = { ...@@ -878,7 +878,6 @@ static ide_pci_device_t sis5513_chipset __devinitdata = {
.name = "SIS5513", .name = "SIS5513",
.init_chipset = init_chipset_sis5513, .init_chipset = init_chipset_sis5513,
.init_hwif = init_hwif_sis5513, .init_hwif = init_hwif_sis5513,
.channels = 2,
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
......
...@@ -453,7 +453,6 @@ static ide_pci_device_t sl82c105_chipset __devinitdata = { ...@@ -453,7 +453,6 @@ static ide_pci_device_t sl82c105_chipset __devinitdata = {
.name = "W82C105", .name = "W82C105",
.init_chipset = init_chipset_sl82c105, .init_chipset = init_chipset_sl82c105,
.init_hwif = init_hwif_sl82c105, .init_hwif = init_hwif_sl82c105,
.channels = 2,
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}}, .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
......
...@@ -214,7 +214,6 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) ...@@ -214,7 +214,6 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
static ide_pci_device_t slc90e66_chipset __devinitdata = { static ide_pci_device_t slc90e66_chipset __devinitdata = {
.name = "SLC90E66", .name = "SLC90E66",
.init_hwif = init_hwif_slc90e66, .init_hwif = init_hwif_slc90e66,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
......
...@@ -248,9 +248,9 @@ static ide_pci_device_t tc86c001_chipset __devinitdata = { ...@@ -248,9 +248,9 @@ static ide_pci_device_t tc86c001_chipset __devinitdata = {
.name = "TC86C001", .name = "TC86C001",
.init_chipset = init_chipset_tc86c001, .init_chipset = init_chipset_tc86c001,
.init_hwif = init_hwif_tc86c001, .init_hwif = init_hwif_tc86c001,
.channels = 1,
.autodma = AUTODMA, .autodma = AUTODMA,
.bootable = OFF_BOARD .bootable = OFF_BOARD,
.host_flags = IDE_HFLAG_SINGLE,
}; };
static int __devinit tc86c001_init_one(struct pci_dev *dev, static int __devinit tc86c001_init_one(struct pci_dev *dev,
......
...@@ -129,7 +129,6 @@ static void __devinit init_hwif_triflex(ide_hwif_t *hwif) ...@@ -129,7 +129,6 @@ static void __devinit init_hwif_triflex(ide_hwif_t *hwif)
static ide_pci_device_t triflex_device __devinitdata = { static ide_pci_device_t triflex_device __devinitdata = {
.name = "TRIFLEX", .name = "TRIFLEX",
.init_hwif = init_hwif_triflex, .init_hwif = init_hwif_triflex,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
......
...@@ -327,7 +327,6 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif) ...@@ -327,7 +327,6 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
static ide_pci_device_t trm290_chipset __devinitdata = { static ide_pci_device_t trm290_chipset __devinitdata = {
.name = "TRM290", .name = "TRM290",
.init_hwif = init_hwif_trm290, .init_hwif = init_hwif_trm290,
.channels = 2,
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.bootable = ON_BOARD, .bootable = ON_BOARD,
}; };
......
...@@ -498,7 +498,6 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = { ...@@ -498,7 +498,6 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
.name = "VP_IDE", .name = "VP_IDE",
.init_chipset = init_chipset_via82cxxx, .init_chipset = init_chipset_via82cxxx,
.init_hwif = init_hwif_via82cxxx, .init_hwif = init_hwif_via82cxxx,
.channels = 2,
.autodma = NOAUTODMA, .autodma = NOAUTODMA,
.enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
.bootable = ON_BOARD .bootable = ON_BOARD
...@@ -506,7 +505,6 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = { ...@@ -506,7 +505,6 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
.name = "VP_IDE", .name = "VP_IDE",
.init_chipset = init_chipset_via82cxxx, .init_chipset = init_chipset_via82cxxx,
.init_hwif = init_hwif_via82cxxx, .init_hwif = init_hwif_via82cxxx,
.channels = 2,
.autodma = AUTODMA, .autodma = AUTODMA,
.enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, .enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
......
...@@ -407,7 +407,7 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d, ...@@ -407,7 +407,7 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d,
unsigned long ctl = 0, base = 0; unsigned long ctl = 0, base = 0;
ide_hwif_t *hwif; 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 */ /* 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);
ide_pci_check_iomem(dev, d, 2*port+1); ide_pci_check_iomem(dev, d, 2*port+1);
...@@ -571,7 +571,7 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, in ...@@ -571,7 +571,7 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, in
void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, ata_index_t *index) 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; int at_least_one_hwif_enabled = 0;
ide_hwif_t *hwif, *mate = NULL; ide_hwif_t *hwif, *mate = NULL;
u8 tmp; u8 tmp;
...@@ -582,16 +582,13 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a ...@@ -582,16 +582,13 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a
* Set up the IDE ports * 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]); ide_pci_enablebit_t *e = &(d->enablebits[port]);
if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) || if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) ||
(tmp & e->mask) != e->val)) (tmp & e->mask) != e->val))
continue; /* port not enabled */ continue; /* port not enabled */
if (d->channels <= port)
break;
if ((hwif = ide_hwif_configure(dev, d, mate, port, pciirq)) == NULL) if ((hwif = ide_hwif_configure(dev, d, mate, port, pciirq)) == NULL)
continue; continue;
......
...@@ -1244,7 +1244,8 @@ typedef struct ide_pci_enablebit_s { ...@@ -1244,7 +1244,8 @@ typedef struct ide_pci_enablebit_s {
enum { enum {
/* Uses ISA control ports not PCI ones. */ /* 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 { typedef struct ide_pci_device_s {
...@@ -1256,13 +1257,12 @@ typedef struct ide_pci_device_s { ...@@ -1256,13 +1257,12 @@ typedef struct ide_pci_device_s {
void (*init_hwif)(ide_hwif_t *); void (*init_hwif)(ide_hwif_t *);
void (*init_dma)(ide_hwif_t *, unsigned long); void (*init_dma)(ide_hwif_t *, unsigned long);
void (*fixup)(ide_hwif_t *); void (*fixup)(ide_hwif_t *);
u8 channels;
u8 autodma; u8 autodma;
ide_pci_enablebit_t enablebits[2]; ide_pci_enablebit_t enablebits[2];
u8 bootable; u8 bootable;
unsigned int extra; unsigned int extra;
struct ide_pci_device_s *next; struct ide_pci_device_s *next;
u8 flags; u8 host_flags;
u8 udma_mask; u8 udma_mask;
} ide_pci_device_t; } ide_pci_device_t;
......
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