aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-07-19 19:11:55 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-07-19 19:11:55 -0400
commita5d8c5c834d3cabf4b7b477c3f6ee923c25026fc (patch)
tree19fc04470569a3c2f227d5aac3078a15ac65bb32 /drivers
parent2229833c1365346b64357a9263fa724f74f5e376 (diff)
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: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/pci/aec62xx.c5
-rw-r--r--drivers/ide/pci/alim15x3.c1
-rw-r--r--drivers/ide/pci/amd74xx.c2
-rw-r--r--drivers/ide/pci/atiixp.c3
-rw-r--r--drivers/ide/pci/cmd64x.c4
-rw-r--r--drivers/ide/pci/cs5520.c3
-rw-r--r--drivers/ide/pci/cs5530.c1
-rw-r--r--drivers/ide/pci/cs5535.c2
-rw-r--r--drivers/ide/pci/cy82c693.c2
-rw-r--r--drivers/ide/pci/generic.c15
-rw-r--r--drivers/ide/pci/hpt34x.c1
-rw-r--r--drivers/ide/pci/hpt366.c8
-rw-r--r--drivers/ide/pci/it8213.c2
-rw-r--r--drivers/ide/pci/it821x.c1
-rw-r--r--drivers/ide/pci/jmicron.c1
-rw-r--r--drivers/ide/pci/ns87415.c1
-rw-r--r--drivers/ide/pci/opti621.c2
-rw-r--r--drivers/ide/pci/pdc202xx_new.c7
-rw-r--r--drivers/ide/pci/pdc202xx_old.c5
-rw-r--r--drivers/ide/pci/piix.c4
-rw-r--r--drivers/ide/pci/rz1000.c1
-rw-r--r--drivers/ide/pci/sc1200.c1
-rw-r--r--drivers/ide/pci/scc_pata.c2
-rw-r--r--drivers/ide/pci/serverworks.c16
-rw-r--r--drivers/ide/pci/sgiioc4.c2
-rw-r--r--drivers/ide/pci/siimage.c1
-rw-r--r--drivers/ide/pci/sis5513.c1
-rw-r--r--drivers/ide/pci/sl82c105.c1
-rw-r--r--drivers/ide/pci/slc90e66.c1
-rw-r--r--drivers/ide/pci/tc86c001.c4
-rw-r--r--drivers/ide/pci/triflex.c1
-rw-r--r--drivers/ide/pci/trm290.c1
-rw-r--r--drivers/ide/pci/via82cxxx.c2
-rw-r--r--drivers/ide/setup-pci.c9
34 files changed, 22 insertions, 91 deletions
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c
index 6d18fef558bd..f8ac91c22e64 100644
--- a/drivers/ide/pci/aec62xx.c
+++ b/drivers/ide/pci/aec62xx.c
@@ -265,7 +265,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
265 .init_setup = init_setup_aec62xx, 265 .init_setup = init_setup_aec62xx,
266 .init_chipset = init_chipset_aec62xx, 266 .init_chipset = init_chipset_aec62xx,
267 .init_hwif = init_hwif_aec62xx, 267 .init_hwif = init_hwif_aec62xx,
268 .channels = 2,
269 .autodma = AUTODMA, 268 .autodma = AUTODMA,
270 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, 269 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
271 .bootable = OFF_BOARD, 270 .bootable = OFF_BOARD,
@@ -275,7 +274,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
275 .init_setup = init_setup_aec62xx, 274 .init_setup = init_setup_aec62xx,
276 .init_chipset = init_chipset_aec62xx, 275 .init_chipset = init_chipset_aec62xx,
277 .init_hwif = init_hwif_aec62xx, 276 .init_hwif = init_hwif_aec62xx,
278 .channels = 2,
279 .autodma = NOAUTODMA, 277 .autodma = NOAUTODMA,
280 .bootable = OFF_BOARD, 278 .bootable = OFF_BOARD,
281 .udma_mask = 0x1f, /* udma0-4 */ 279 .udma_mask = 0x1f, /* udma0-4 */
@@ -284,7 +282,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
284 .init_setup = init_setup_aec62xx, 282 .init_setup = init_setup_aec62xx,
285 .init_chipset = init_chipset_aec62xx, 283 .init_chipset = init_chipset_aec62xx,
286 .init_hwif = init_hwif_aec62xx, 284 .init_hwif = init_hwif_aec62xx,
287 .channels = 2,
288 .autodma = AUTODMA, 285 .autodma = AUTODMA,
289 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, 286 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
290 .bootable = NEVER_BOARD, 287 .bootable = NEVER_BOARD,
@@ -294,7 +291,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
294 .init_setup = init_setup_aec6x80, 291 .init_setup = init_setup_aec6x80,
295 .init_chipset = init_chipset_aec62xx, 292 .init_chipset = init_chipset_aec62xx,
296 .init_hwif = init_hwif_aec62xx, 293 .init_hwif = init_hwif_aec62xx,
297 .channels = 2,
298 .autodma = AUTODMA, 294 .autodma = AUTODMA,
299 .bootable = OFF_BOARD, 295 .bootable = OFF_BOARD,
300 .udma_mask = 0x3f, /* udma0-5 */ 296 .udma_mask = 0x3f, /* udma0-5 */
@@ -303,7 +299,6 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
303 .init_setup = init_setup_aec6x80, 299 .init_setup = init_setup_aec6x80,
304 .init_chipset = init_chipset_aec62xx, 300 .init_chipset = init_chipset_aec62xx,
305 .init_hwif = init_hwif_aec62xx, 301 .init_hwif = init_hwif_aec62xx,
306 .channels = 2,
307 .autodma = AUTODMA, 302 .autodma = AUTODMA,
308 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, 303 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
309 .bootable = OFF_BOARD, 304 .bootable = OFF_BOARD,
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
index ba0fb92b0417..1012da6e8a42 100644
--- a/drivers/ide/pci/alim15x3.c
+++ b/drivers/ide/pci/alim15x3.c
@@ -817,7 +817,6 @@ static ide_pci_device_t ali15x3_chipset __devinitdata = {
817 .init_chipset = init_chipset_ali15x3, 817 .init_chipset = init_chipset_ali15x3,
818 .init_hwif = init_hwif_ali15x3, 818 .init_hwif = init_hwif_ali15x3,
819 .init_dma = init_dma_ali15x3, 819 .init_dma = init_dma_ali15x3,
820 .channels = 2,
821 .autodma = AUTODMA, 820 .autodma = AUTODMA,
822 .bootable = ON_BOARD, 821 .bootable = ON_BOARD,
823}; 822};
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c
index 8d30b99a54d8..9c3ea90aeb8b 100644
--- a/drivers/ide/pci/amd74xx.c
+++ b/drivers/ide/pci/amd74xx.c
@@ -448,7 +448,6 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
448 .name = name_str, \ 448 .name = name_str, \
449 .init_chipset = init_chipset_amd74xx, \ 449 .init_chipset = init_chipset_amd74xx, \
450 .init_hwif = init_hwif_amd74xx, \ 450 .init_hwif = init_hwif_amd74xx, \
451 .channels = 2, \
452 .autodma = AUTODMA, \ 451 .autodma = AUTODMA, \
453 .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, \ 452 .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, \
454 .bootable = ON_BOARD, \ 453 .bootable = ON_BOARD, \
@@ -459,7 +458,6 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
459 .name = name_str, \ 458 .name = name_str, \
460 .init_chipset = init_chipset_amd74xx, \ 459 .init_chipset = init_chipset_amd74xx, \
461 .init_hwif = init_hwif_amd74xx, \ 460 .init_hwif = init_hwif_amd74xx, \
462 .channels = 2, \
463 .autodma = AUTODMA, \ 461 .autodma = AUTODMA, \
464 .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, \ 462 .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, \
465 .bootable = ON_BOARD, \ 463 .bootable = ON_BOARD, \
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c
index bfdf086f4525..078adbe250d2 100644
--- a/drivers/ide/pci/atiixp.c
+++ b/drivers/ide/pci/atiixp.c
@@ -291,17 +291,16 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
291 { /* 0 */ 291 { /* 0 */
292 .name = "ATIIXP", 292 .name = "ATIIXP",
293 .init_hwif = init_hwif_atiixp, 293 .init_hwif = init_hwif_atiixp,
294 .channels = 2,
295 .autodma = AUTODMA, 294 .autodma = AUTODMA,
296 .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, 295 .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
297 .bootable = ON_BOARD, 296 .bootable = ON_BOARD,
298 },{ /* 1 */ 297 },{ /* 1 */
299 .name = "SB600_PATA", 298 .name = "SB600_PATA",
300 .init_hwif = init_hwif_atiixp, 299 .init_hwif = init_hwif_atiixp,
301 .channels = 1,
302 .autodma = AUTODMA, 300 .autodma = AUTODMA,
303 .enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}}, 301 .enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}},
304 .bootable = ON_BOARD, 302 .bootable = ON_BOARD,
303 .host_flags = IDE_HFLAG_SINGLE,
305 }, 304 },
306}; 305};
307 306
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index 5171e94facdc..8150a023dd7a 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -617,7 +617,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
617 .init_setup = init_setup_cmd64x, 617 .init_setup = init_setup_cmd64x,
618 .init_chipset = init_chipset_cmd64x, 618 .init_chipset = init_chipset_cmd64x,
619 .init_hwif = init_hwif_cmd64x, 619 .init_hwif = init_hwif_cmd64x,
620 .channels = 2,
621 .autodma = AUTODMA, 620 .autodma = AUTODMA,
622 .enablebits = {{0x00,0x00,0x00}, {0x51,0x08,0x08}}, 621 .enablebits = {{0x00,0x00,0x00}, {0x51,0x08,0x08}},
623 .bootable = ON_BOARD, 622 .bootable = ON_BOARD,
@@ -627,7 +626,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
627 .init_setup = init_setup_cmd646, 626 .init_setup = init_setup_cmd646,
628 .init_chipset = init_chipset_cmd64x, 627 .init_chipset = init_chipset_cmd64x,
629 .init_hwif = init_hwif_cmd64x, 628 .init_hwif = init_hwif_cmd64x,
630 .channels = 2,
631 .autodma = AUTODMA, 629 .autodma = AUTODMA,
632 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 630 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
633 .bootable = ON_BOARD, 631 .bootable = ON_BOARD,
@@ -637,7 +635,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
637 .init_setup = init_setup_cmd64x, 635 .init_setup = init_setup_cmd64x,
638 .init_chipset = init_chipset_cmd64x, 636 .init_chipset = init_chipset_cmd64x,
639 .init_hwif = init_hwif_cmd64x, 637 .init_hwif = init_hwif_cmd64x,
640 .channels = 2,
641 .autodma = AUTODMA, 638 .autodma = AUTODMA,
642 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 639 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
643 .bootable = ON_BOARD, 640 .bootable = ON_BOARD,
@@ -647,7 +644,6 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
647 .init_setup = init_setup_cmd64x, 644 .init_setup = init_setup_cmd64x,
648 .init_chipset = init_chipset_cmd64x, 645 .init_chipset = init_chipset_cmd64x,
649 .init_hwif = init_hwif_cmd64x, 646 .init_hwif = init_hwif_cmd64x,
650 .channels = 2,
651 .autodma = AUTODMA, 647 .autodma = AUTODMA,
652 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 648 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
653 .bootable = ON_BOARD, 649 .bootable = ON_BOARD,
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index 3b88a3a56116..5539a25eae99 100644
--- a/drivers/ide/pci/cs5520.c
+++ b/drivers/ide/pci/cs5520.c
@@ -194,10 +194,9 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif)
194 .name = name_str, \ 194 .name = name_str, \
195 .init_setup_dma = cs5520_init_setup_dma, \ 195 .init_setup_dma = cs5520_init_setup_dma, \
196 .init_hwif = init_hwif_cs5520, \ 196 .init_hwif = init_hwif_cs5520, \
197 .channels = 2, \
198 .autodma = AUTODMA, \ 197 .autodma = AUTODMA, \
199 .bootable = ON_BOARD, \ 198 .bootable = ON_BOARD, \
200 .flags = IDEPCI_FLAG_ISA_PORTS, \ 199 .host_flags = IDE_HFLAG_ISA_PORTS, \
201 } 200 }
202 201
203static ide_pci_device_t cyrix_chipsets[] __devinitdata = { 202static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c
index b5c00d15a704..643d66cc6729 100644
--- a/drivers/ide/pci/cs5530.c
+++ b/drivers/ide/pci/cs5530.c
@@ -341,7 +341,6 @@ static ide_pci_device_t cs5530_chipset __devinitdata = {
341 .name = "CS5530", 341 .name = "CS5530",
342 .init_chipset = init_chipset_cs5530, 342 .init_chipset = init_chipset_cs5530,
343 .init_hwif = init_hwif_cs5530, 343 .init_hwif = init_hwif_cs5530,
344 .channels = 2,
345 .autodma = AUTODMA, 344 .autodma = AUTODMA,
346 .bootable = ON_BOARD, 345 .bootable = ON_BOARD,
347}; 346};
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c
index 10f61f38243c..503979372144 100644
--- a/drivers/ide/pci/cs5535.c
+++ b/drivers/ide/pci/cs5535.c
@@ -228,9 +228,9 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif)
228static ide_pci_device_t cs5535_chipset __devinitdata = { 228static ide_pci_device_t cs5535_chipset __devinitdata = {
229 .name = "CS5535", 229 .name = "CS5535",
230 .init_hwif = init_hwif_cs5535, 230 .init_hwif = init_hwif_cs5535,
231 .channels = 1,
232 .autodma = AUTODMA, 231 .autodma = AUTODMA,
233 .bootable = ON_BOARD, 232 .bootable = ON_BOARD,
233 .host_flags = IDE_HFLAG_SINGLE,
234}; 234};
235 235
236static int __devinit cs5535_init_one(struct pci_dev *dev, 236static int __devinit cs5535_init_one(struct pci_dev *dev,
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c
index 103b9db97853..995b72563613 100644
--- a/drivers/ide/pci/cy82c693.c
+++ b/drivers/ide/pci/cy82c693.c
@@ -483,9 +483,9 @@ static ide_pci_device_t cy82c693_chipset __devinitdata = {
483 .init_chipset = init_chipset_cy82c693, 483 .init_chipset = init_chipset_cy82c693,
484 .init_iops = init_iops_cy82c693, 484 .init_iops = init_iops_cy82c693,
485 .init_hwif = init_hwif_cy82c693, 485 .init_hwif = init_hwif_cy82c693,
486 .channels = 1,
487 .autodma = AUTODMA, 486 .autodma = AUTODMA,
488 .bootable = ON_BOARD, 487 .bootable = ON_BOARD,
488 .host_flags = IDE_HFLAG_SINGLE,
489}; 489};
490 490
491static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id) 491static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id)
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c
index 0d51a11e81da..48caa468b762 100644
--- a/drivers/ide/pci/generic.c
+++ b/drivers/ide/pci/generic.c
@@ -95,92 +95,77 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
95 { /* 0 */ 95 { /* 0 */
96 .name = "Unknown", 96 .name = "Unknown",
97 .init_hwif = init_hwif_generic, 97 .init_hwif = init_hwif_generic,
98 .channels = 2,
99 .autodma = AUTODMA, 98 .autodma = AUTODMA,
100 .bootable = ON_BOARD, 99 .bootable = ON_BOARD,
101 },{ /* 1 */ 100 },{ /* 1 */
102 .name = "NS87410", 101 .name = "NS87410",
103 .init_hwif = init_hwif_generic, 102 .init_hwif = init_hwif_generic,
104 .channels = 2,
105 .autodma = AUTODMA, 103 .autodma = AUTODMA,
106 .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, 104 .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
107 .bootable = ON_BOARD, 105 .bootable = ON_BOARD,
108 },{ /* 2 */ 106 },{ /* 2 */
109 .name = "SAMURAI", 107 .name = "SAMURAI",
110 .init_hwif = init_hwif_generic, 108 .init_hwif = init_hwif_generic,
111 .channels = 2,
112 .autodma = AUTODMA, 109 .autodma = AUTODMA,
113 .bootable = ON_BOARD, 110 .bootable = ON_BOARD,
114 },{ /* 3 */ 111 },{ /* 3 */
115 .name = "HT6565", 112 .name = "HT6565",
116 .init_hwif = init_hwif_generic, 113 .init_hwif = init_hwif_generic,
117 .channels = 2,
118 .autodma = AUTODMA, 114 .autodma = AUTODMA,
119 .bootable = ON_BOARD, 115 .bootable = ON_BOARD,
120 },{ /* 4 */ 116 },{ /* 4 */
121 .name = "UM8673F", 117 .name = "UM8673F",
122 .init_hwif = init_hwif_generic, 118 .init_hwif = init_hwif_generic,
123 .channels = 2,
124 .autodma = NODMA, 119 .autodma = NODMA,
125 .bootable = ON_BOARD, 120 .bootable = ON_BOARD,
126 },{ /* 5 */ 121 },{ /* 5 */
127 .name = "UM8886A", 122 .name = "UM8886A",
128 .init_hwif = init_hwif_generic, 123 .init_hwif = init_hwif_generic,
129 .channels = 2,
130 .autodma = NODMA, 124 .autodma = NODMA,
131 .bootable = ON_BOARD, 125 .bootable = ON_BOARD,
132 },{ /* 6 */ 126 },{ /* 6 */
133 .name = "UM8886BF", 127 .name = "UM8886BF",
134 .init_hwif = init_hwif_generic, 128 .init_hwif = init_hwif_generic,
135 .channels = 2,
136 .autodma = NODMA, 129 .autodma = NODMA,
137 .bootable = ON_BOARD, 130 .bootable = ON_BOARD,
138 },{ /* 7 */ 131 },{ /* 7 */
139 .name = "HINT_IDE", 132 .name = "HINT_IDE",
140 .init_hwif = init_hwif_generic, 133 .init_hwif = init_hwif_generic,
141 .channels = 2,
142 .autodma = AUTODMA, 134 .autodma = AUTODMA,
143 .bootable = ON_BOARD, 135 .bootable = ON_BOARD,
144 },{ /* 8 */ 136 },{ /* 8 */
145 .name = "VIA_IDE", 137 .name = "VIA_IDE",
146 .init_hwif = init_hwif_generic, 138 .init_hwif = init_hwif_generic,
147 .channels = 2,
148 .autodma = NOAUTODMA, 139 .autodma = NOAUTODMA,
149 .bootable = ON_BOARD, 140 .bootable = ON_BOARD,
150 },{ /* 9 */ 141 },{ /* 9 */
151 .name = "OPTI621V", 142 .name = "OPTI621V",
152 .init_hwif = init_hwif_generic, 143 .init_hwif = init_hwif_generic,
153 .channels = 2,
154 .autodma = NOAUTODMA, 144 .autodma = NOAUTODMA,
155 .bootable = ON_BOARD, 145 .bootable = ON_BOARD,
156 },{ /* 10 */ 146 },{ /* 10 */
157 .name = "VIA8237SATA", 147 .name = "VIA8237SATA",
158 .init_hwif = init_hwif_generic, 148 .init_hwif = init_hwif_generic,
159 .channels = 2,
160 .autodma = AUTODMA, 149 .autodma = AUTODMA,
161 .bootable = OFF_BOARD, 150 .bootable = OFF_BOARD,
162 },{ /* 11 */ 151 },{ /* 11 */
163 .name = "Piccolo0102", 152 .name = "Piccolo0102",
164 .init_hwif = init_hwif_generic, 153 .init_hwif = init_hwif_generic,
165 .channels = 2,
166 .autodma = NOAUTODMA, 154 .autodma = NOAUTODMA,
167 .bootable = ON_BOARD, 155 .bootable = ON_BOARD,
168 },{ /* 12 */ 156 },{ /* 12 */
169 .name = "Piccolo0103", 157 .name = "Piccolo0103",
170 .init_hwif = init_hwif_generic, 158 .init_hwif = init_hwif_generic,
171 .channels = 2,
172 .autodma = NOAUTODMA, 159 .autodma = NOAUTODMA,
173 .bootable = ON_BOARD, 160 .bootable = ON_BOARD,
174 },{ /* 13 */ 161 },{ /* 13 */
175 .name = "Piccolo0105", 162 .name = "Piccolo0105",
176 .init_hwif = init_hwif_generic, 163 .init_hwif = init_hwif_generic,
177 .channels = 2,
178 .autodma = NOAUTODMA, 164 .autodma = NOAUTODMA,
179 .bootable = ON_BOARD, 165 .bootable = ON_BOARD,
180 },{ /* 14 */ 166 },{ /* 14 */
181 .name = "Revolution", 167 .name = "Revolution",
182 .init_hwif = init_hwif_generic, 168 .init_hwif = init_hwif_generic,
183 .channels = 2,
184 .autodma = AUTODMA, 169 .autodma = AUTODMA,
185 .bootable = OFF_BOARD, 170 .bootable = OFF_BOARD,
186 } 171 }
diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c
index 64f19743b127..6d2ef0ee0f2b 100644
--- a/drivers/ide/pci/hpt34x.c
+++ b/drivers/ide/pci/hpt34x.c
@@ -175,7 +175,6 @@ static ide_pci_device_t hpt34x_chipset __devinitdata = {
175 .name = "HPT34X", 175 .name = "HPT34X",
176 .init_chipset = init_chipset_hpt34x, 176 .init_chipset = init_chipset_hpt34x,
177 .init_hwif = init_hwif_hpt34x, 177 .init_hwif = init_hwif_hpt34x,
178 .channels = 2,
179 .autodma = NOAUTODMA, 178 .autodma = NOAUTODMA,
180 .bootable = NEVER_BOARD, 179 .bootable = NEVER_BOARD,
181 .extra = 16 180 .extra = 16
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index 81853d740aee..182346a04f36 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -1483,7 +1483,7 @@ static int __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d)
1483 * to both functions -- really stupid design decision... :-( 1483 * to both functions -- really stupid design decision... :-(
1484 * Bit 4 is for the primary channel, bit 5 for the secondary. 1484 * Bit 4 is for the primary channel, bit 5 for the secondary.
1485 */ 1485 */
1486 d->channels = 1; 1486 d->host_flags |= IDE_HFLAG_SINGLE;
1487 d->enablebits[0].mask = d->enablebits[0].val = 0x10; 1487 d->enablebits[0].mask = d->enablebits[0].val = 0x10;
1488 1488
1489 d->udma_mask = HPT366_ALLOW_ATA66_3 ? 1489 d->udma_mask = HPT366_ALLOW_ATA66_3 ?
@@ -1546,7 +1546,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1546 .init_chipset = init_chipset_hpt366, 1546 .init_chipset = init_chipset_hpt366,
1547 .init_hwif = init_hwif_hpt366, 1547 .init_hwif = init_hwif_hpt366,
1548 .init_dma = init_dma_hpt366, 1548 .init_dma = init_dma_hpt366,
1549 .channels = 2,
1550 .autodma = AUTODMA, 1549 .autodma = AUTODMA,
1551 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1550 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1552 .bootable = OFF_BOARD, 1551 .bootable = OFF_BOARD,
@@ -1557,7 +1556,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1557 .init_chipset = init_chipset_hpt366, 1556 .init_chipset = init_chipset_hpt366,
1558 .init_hwif = init_hwif_hpt366, 1557 .init_hwif = init_hwif_hpt366,
1559 .init_dma = init_dma_hpt366, 1558 .init_dma = init_dma_hpt366,
1560 .channels = 2,
1561 .autodma = AUTODMA, 1559 .autodma = AUTODMA,
1562 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1560 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1563 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1561 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f,
@@ -1569,7 +1567,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1569 .init_chipset = init_chipset_hpt366, 1567 .init_chipset = init_chipset_hpt366,
1570 .init_hwif = init_hwif_hpt366, 1568 .init_hwif = init_hwif_hpt366,
1571 .init_dma = init_dma_hpt366, 1569 .init_dma = init_dma_hpt366,
1572 .channels = 2,
1573 .autodma = AUTODMA, 1570 .autodma = AUTODMA,
1574 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1571 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1575 .udma_mask = HPT302_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1572 .udma_mask = HPT302_ALLOW_ATA133_6 ? 0x7f : 0x3f,
@@ -1581,7 +1578,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1581 .init_chipset = init_chipset_hpt366, 1578 .init_chipset = init_chipset_hpt366,
1582 .init_hwif = init_hwif_hpt366, 1579 .init_hwif = init_hwif_hpt366,
1583 .init_dma = init_dma_hpt366, 1580 .init_dma = init_dma_hpt366,
1584 .channels = 2,
1585 .autodma = AUTODMA, 1581 .autodma = AUTODMA,
1586 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1582 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1587 .udma_mask = HPT371_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1583 .udma_mask = HPT371_ALLOW_ATA133_6 ? 0x7f : 0x3f,
@@ -1593,7 +1589,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1593 .init_chipset = init_chipset_hpt366, 1589 .init_chipset = init_chipset_hpt366,
1594 .init_hwif = init_hwif_hpt366, 1590 .init_hwif = init_hwif_hpt366,
1595 .init_dma = init_dma_hpt366, 1591 .init_dma = init_dma_hpt366,
1596 .channels = 2, /* 4 */
1597 .autodma = AUTODMA, 1592 .autodma = AUTODMA,
1598 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1593 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1599 .udma_mask = 0x3f, 1594 .udma_mask = 0x3f,
@@ -1605,7 +1600,6 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1605 .init_chipset = init_chipset_hpt366, 1600 .init_chipset = init_chipset_hpt366,
1606 .init_hwif = init_hwif_hpt366, 1601 .init_hwif = init_hwif_hpt366,
1607 .init_dma = init_dma_hpt366, 1602 .init_dma = init_dma_hpt366,
1608 .channels = 2, /* 4 */
1609 .autodma = AUTODMA, 1603 .autodma = AUTODMA,
1610 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1604 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1611 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1605 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f,
diff --git a/drivers/ide/pci/it8213.c b/drivers/ide/pci/it8213.c
index ff48c23e571e..684b0ec79f41 100644
--- a/drivers/ide/pci/it8213.c
+++ b/drivers/ide/pci/it8213.c
@@ -272,10 +272,10 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif)
272 { \ 272 { \
273 .name = name_str, \ 273 .name = name_str, \
274 .init_hwif = init_hwif_it8213, \ 274 .init_hwif = init_hwif_it8213, \
275 .channels = 1, \
276 .autodma = AUTODMA, \ 275 .autodma = AUTODMA, \
277 .enablebits = {{0x41,0x80,0x80}}, \ 276 .enablebits = {{0x41,0x80,0x80}}, \
278 .bootable = ON_BOARD, \ 277 .bootable = ON_BOARD, \
278 .host_flags = IDE_HFLAG_SINGLE, \
279 } 279 }
280 280
281static ide_pci_device_t it8213_chipsets[] __devinitdata = { 281static ide_pci_device_t it8213_chipsets[] __devinitdata = {
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c
index 8197b653ba1e..faccb2d4af43 100644
--- a/drivers/ide/pci/it821x.c
+++ b/drivers/ide/pci/it821x.c
@@ -718,7 +718,6 @@ static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev, const cha
718 .name = name_str, \ 718 .name = name_str, \
719 .init_chipset = init_chipset_it821x, \ 719 .init_chipset = init_chipset_it821x, \
720 .init_hwif = init_hwif_it821x, \ 720 .init_hwif = init_hwif_it821x, \
721 .channels = 2, \
722 .autodma = AUTODMA, \ 721 .autodma = AUTODMA, \
723 .bootable = ON_BOARD, \ 722 .bootable = ON_BOARD, \
724 .fixup = it821x_fixups \ 723 .fixup = it821x_fixups \
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c
index a6008f63e71e..0edb9cd45854 100644
--- a/drivers/ide/pci/jmicron.c
+++ b/drivers/ide/pci/jmicron.c
@@ -177,7 +177,6 @@ fallback:
177 { \ 177 { \
178 .name = name_str, \ 178 .name = name_str, \
179 .init_hwif = init_hwif_jmicron, \ 179 .init_hwif = init_hwif_jmicron, \
180 .channels = 2, \
181 .autodma = AUTODMA, \ 180 .autodma = AUTODMA, \
182 .bootable = ON_BOARD, \ 181 .bootable = ON_BOARD, \
183 .enablebits = { {0x40, 1, 1}, {0x40, 0x10, 0x10} }, \ 182 .enablebits = { {0x40, 1, 1}, {0x40, 0x10, 0x10} }, \
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c
index b310c4f51077..09941f37d635 100644
--- a/drivers/ide/pci/ns87415.c
+++ b/drivers/ide/pci/ns87415.c
@@ -281,7 +281,6 @@ static ide_pci_device_t ns87415_chipset __devinitdata = {
281 .init_iops = init_iops_ns87415, 281 .init_iops = init_iops_ns87415,
282#endif 282#endif
283 .init_hwif = init_hwif_ns87415, 283 .init_hwif = init_hwif_ns87415,
284 .channels = 2,
285 .autodma = AUTODMA, 284 .autodma = AUTODMA,
286 .bootable = ON_BOARD, 285 .bootable = ON_BOARD,
287}; 286};
diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c
index aede7eee9246..78d7adf2d0b0 100644
--- a/drivers/ide/pci/opti621.c
+++ b/drivers/ide/pci/opti621.c
@@ -350,14 +350,12 @@ static ide_pci_device_t opti621_chipsets[] __devinitdata = {
350 { /* 0 */ 350 { /* 0 */
351 .name = "OPTI621", 351 .name = "OPTI621",
352 .init_hwif = init_hwif_opti621, 352 .init_hwif = init_hwif_opti621,
353 .channels = 2,
354 .autodma = AUTODMA, 353 .autodma = AUTODMA,
355 .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, 354 .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
356 .bootable = ON_BOARD, 355 .bootable = ON_BOARD,
357 },{ /* 1 */ 356 },{ /* 1 */
358 .name = "OPTI621X", 357 .name = "OPTI621X",
359 .init_hwif = init_hwif_opti621, 358 .init_hwif = init_hwif_opti621,
360 .channels = 2,
361 .autodma = AUTODMA, 359 .autodma = AUTODMA,
362 .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, 360 .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
363 .bootable = ON_BOARD, 361 .bootable = ON_BOARD,
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
index 06c5e93d37a2..f8508d9cccd3 100644
--- a/drivers/ide/pci/pdc202xx_new.c
+++ b/drivers/ide/pci/pdc202xx_new.c
@@ -566,7 +566,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
566 .init_setup = init_setup_pdcnew, 566 .init_setup = init_setup_pdcnew,
567 .init_chipset = init_chipset_pdcnew, 567 .init_chipset = init_chipset_pdcnew,
568 .init_hwif = init_hwif_pdc202new, 568 .init_hwif = init_hwif_pdc202new,
569 .channels = 2,
570 .autodma = AUTODMA, 569 .autodma = AUTODMA,
571 .bootable = OFF_BOARD, 570 .bootable = OFF_BOARD,
572 .udma_mask = 0x3f, /* udma0-5 */ 571 .udma_mask = 0x3f, /* udma0-5 */
@@ -575,7 +574,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
575 .init_setup = init_setup_pdcnew, 574 .init_setup = init_setup_pdcnew,
576 .init_chipset = init_chipset_pdcnew, 575 .init_chipset = init_chipset_pdcnew,
577 .init_hwif = init_hwif_pdc202new, 576 .init_hwif = init_hwif_pdc202new,
578 .channels = 2,
579 .autodma = AUTODMA, 577 .autodma = AUTODMA,
580 .bootable = OFF_BOARD, 578 .bootable = OFF_BOARD,
581 .udma_mask = 0x7f, /* udma0-6*/ 579 .udma_mask = 0x7f, /* udma0-6*/
@@ -584,7 +582,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
584 .init_setup = init_setup_pdc20270, 582 .init_setup = init_setup_pdc20270,
585 .init_chipset = init_chipset_pdcnew, 583 .init_chipset = init_chipset_pdcnew,
586 .init_hwif = init_hwif_pdc202new, 584 .init_hwif = init_hwif_pdc202new,
587 .channels = 2,
588 .autodma = AUTODMA, 585 .autodma = AUTODMA,
589 .bootable = OFF_BOARD, 586 .bootable = OFF_BOARD,
590 .udma_mask = 0x3f, /* udma0-5 */ 587 .udma_mask = 0x3f, /* udma0-5 */
@@ -593,7 +590,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
593 .init_setup = init_setup_pdcnew, 590 .init_setup = init_setup_pdcnew,
594 .init_chipset = init_chipset_pdcnew, 591 .init_chipset = init_chipset_pdcnew,
595 .init_hwif = init_hwif_pdc202new, 592 .init_hwif = init_hwif_pdc202new,
596 .channels = 2,
597 .autodma = AUTODMA, 593 .autodma = AUTODMA,
598 .bootable = OFF_BOARD, 594 .bootable = OFF_BOARD,
599 .udma_mask = 0x7f, /* udma0-6*/ 595 .udma_mask = 0x7f, /* udma0-6*/
@@ -602,7 +598,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
602 .init_setup = init_setup_pdcnew, 598 .init_setup = init_setup_pdcnew,
603 .init_chipset = init_chipset_pdcnew, 599 .init_chipset = init_chipset_pdcnew,
604 .init_hwif = init_hwif_pdc202new, 600 .init_hwif = init_hwif_pdc202new,
605 .channels = 2,
606 .autodma = AUTODMA, 601 .autodma = AUTODMA,
607 .bootable = OFF_BOARD, 602 .bootable = OFF_BOARD,
608 .udma_mask = 0x7f, /* udma0-6*/ 603 .udma_mask = 0x7f, /* udma0-6*/
@@ -611,7 +606,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
611 .init_setup = init_setup_pdc20276, 606 .init_setup = init_setup_pdc20276,
612 .init_chipset = init_chipset_pdcnew, 607 .init_chipset = init_chipset_pdcnew,
613 .init_hwif = init_hwif_pdc202new, 608 .init_hwif = init_hwif_pdc202new,
614 .channels = 2,
615 .autodma = AUTODMA, 609 .autodma = AUTODMA,
616 .bootable = OFF_BOARD, 610 .bootable = OFF_BOARD,
617 .udma_mask = 0x7f, /* udma0-6*/ 611 .udma_mask = 0x7f, /* udma0-6*/
@@ -620,7 +614,6 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
620 .init_setup = init_setup_pdcnew, 614 .init_setup = init_setup_pdcnew,
621 .init_chipset = init_chipset_pdcnew, 615 .init_chipset = init_chipset_pdcnew,
622 .init_hwif = init_hwif_pdc202new, 616 .init_hwif = init_hwif_pdc202new,
623 .channels = 2,
624 .autodma = AUTODMA, 617 .autodma = AUTODMA,
625 .bootable = OFF_BOARD, 618 .bootable = OFF_BOARD,
626 .udma_mask = 0x7f, /* udma0-6*/ 619 .udma_mask = 0x7f, /* udma0-6*/
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index 25cebfe18ddd..eb4e4a61d06e 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -441,7 +441,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
441 .init_chipset = init_chipset_pdc202xx, 441 .init_chipset = init_chipset_pdc202xx,
442 .init_hwif = init_hwif_pdc202xx, 442 .init_hwif = init_hwif_pdc202xx,
443 .init_dma = init_dma_pdc202xx, 443 .init_dma = init_dma_pdc202xx,
444 .channels = 2,
445 .autodma = AUTODMA, 444 .autodma = AUTODMA,
446 .bootable = OFF_BOARD, 445 .bootable = OFF_BOARD,
447 .extra = 16, 446 .extra = 16,
@@ -452,7 +451,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
452 .init_chipset = init_chipset_pdc202xx, 451 .init_chipset = init_chipset_pdc202xx,
453 .init_hwif = init_hwif_pdc202xx, 452 .init_hwif = init_hwif_pdc202xx,
454 .init_dma = init_dma_pdc202xx, 453 .init_dma = init_dma_pdc202xx,
455 .channels = 2,
456 .autodma = AUTODMA, 454 .autodma = AUTODMA,
457 .bootable = OFF_BOARD, 455 .bootable = OFF_BOARD,
458 .extra = 48, 456 .extra = 48,
@@ -463,7 +461,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
463 .init_chipset = init_chipset_pdc202xx, 461 .init_chipset = init_chipset_pdc202xx,
464 .init_hwif = init_hwif_pdc202xx, 462 .init_hwif = init_hwif_pdc202xx,
465 .init_dma = init_dma_pdc202xx, 463 .init_dma = init_dma_pdc202xx,
466 .channels = 2,
467 .autodma = AUTODMA, 464 .autodma = AUTODMA,
468 .bootable = OFF_BOARD, 465 .bootable = OFF_BOARD,
469 .extra = 48, 466 .extra = 48,
@@ -474,7 +471,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
474 .init_chipset = init_chipset_pdc202xx, 471 .init_chipset = init_chipset_pdc202xx,
475 .init_hwif = init_hwif_pdc202xx, 472 .init_hwif = init_hwif_pdc202xx,
476 .init_dma = init_dma_pdc202xx, 473 .init_dma = init_dma_pdc202xx,
477 .channels = 2,
478 .autodma = AUTODMA, 474 .autodma = AUTODMA,
479 .bootable = OFF_BOARD, 475 .bootable = OFF_BOARD,
480 .extra = 48, 476 .extra = 48,
@@ -485,7 +481,6 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
485 .init_chipset = init_chipset_pdc202xx, 481 .init_chipset = init_chipset_pdc202xx,
486 .init_hwif = init_hwif_pdc202xx, 482 .init_hwif = init_hwif_pdc202xx,
487 .init_dma = init_dma_pdc202xx, 483 .init_dma = init_dma_pdc202xx,
488 .channels = 2,
489 .autodma = AUTODMA, 484 .autodma = AUTODMA,
490 .bootable = OFF_BOARD, 485 .bootable = OFF_BOARD,
491 .extra = 48, 486 .extra = 48,
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c
index 1372c35be035..a4f88d25b16d 100644
--- a/drivers/ide/pci/piix.c
+++ b/drivers/ide/pci/piix.c
@@ -495,7 +495,6 @@ static void __devinit init_hwif_piix(ide_hwif_t *hwif)
495 .name = name_str, \ 495 .name = name_str, \
496 .init_chipset = init_chipset_piix, \ 496 .init_chipset = init_chipset_piix, \
497 .init_hwif = init_hwif_piix, \ 497 .init_hwif = init_hwif_piix, \
498 .channels = 2, \
499 .autodma = AUTODMA, \ 498 .autodma = AUTODMA, \
500 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \ 499 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
501 .bootable = ON_BOARD, \ 500 .bootable = ON_BOARD, \
@@ -514,11 +513,10 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
514 */ 513 */
515 .name = "MPIIX", 514 .name = "MPIIX",
516 .init_hwif = init_hwif_piix, 515 .init_hwif = init_hwif_piix,
517 .channels = 2,
518 .autodma = NODMA, 516 .autodma = NODMA,
519 .enablebits = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}}, 517 .enablebits = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}},
520 .bootable = ON_BOARD, 518 .bootable = ON_BOARD,
521 .flags = IDEPCI_FLAG_ISA_PORTS 519 .host_flags = IDE_HFLAG_ISA_PORTS,
522 }, 520 },
523 521
524 /* 3 */ DECLARE_PIIX_DEV("PIIX3", 0x00), /* no udma */ 522 /* 3 */ DECLARE_PIIX_DEV("PIIX3", 0x00), /* no udma */
diff --git a/drivers/ide/pci/rz1000.c b/drivers/ide/pci/rz1000.c
index f8c954690142..10e1ae7a4a02 100644
--- a/drivers/ide/pci/rz1000.c
+++ b/drivers/ide/pci/rz1000.c
@@ -52,7 +52,6 @@ static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif)
52static ide_pci_device_t rz1000_chipset __devinitdata = { 52static ide_pci_device_t rz1000_chipset __devinitdata = {
53 .name = "RZ100x", 53 .name = "RZ100x",
54 .init_hwif = init_hwif_rz1000, 54 .init_hwif = init_hwif_rz1000,
55 .channels = 2,
56 .autodma = NODMA, 55 .autodma = NODMA,
57 .bootable = ON_BOARD, 56 .bootable = ON_BOARD,
58}; 57};
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c
index 523363c93794..7dbc44cc722a 100644
--- a/drivers/ide/pci/sc1200.c
+++ b/drivers/ide/pci/sc1200.c
@@ -471,7 +471,6 @@ static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif)
471static ide_pci_device_t sc1200_chipset __devinitdata = { 471static ide_pci_device_t sc1200_chipset __devinitdata = {
472 .name = "SC1200", 472 .name = "SC1200",
473 .init_hwif = init_hwif_sc1200, 473 .init_hwif = init_hwif_sc1200,
474 .channels = 2,
475 .autodma = AUTODMA, 474 .autodma = AUTODMA,
476 .bootable = ON_BOARD, 475 .bootable = ON_BOARD,
477}; 476};
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index fd4b1a24ecab..a1954d1c2879 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -772,9 +772,9 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif)
772 .init_setup = init_setup_scc, \ 772 .init_setup = init_setup_scc, \
773 .init_iops = init_iops_scc, \ 773 .init_iops = init_iops_scc, \
774 .init_hwif = init_hwif_scc, \ 774 .init_hwif = init_hwif_scc, \
775 .channels = 1, \
776 .autodma = AUTODMA, \ 775 .autodma = AUTODMA, \
777 .bootable = ON_BOARD, \ 776 .bootable = ON_BOARD, \
777 .host_flags = IDE_HFLAG_SINGLE, \
778 } 778 }
779 779
780static ide_pci_device_t scc_chipsets[] __devinitdata = { 780static ide_pci_device_t scc_chipsets[] __devinitdata = {
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
index ed04e0c8dd4c..809deb92bc11 100644
--- a/drivers/ide/pci/serverworks.c
+++ b/drivers/ide/pci/serverworks.c
@@ -441,9 +441,12 @@ static int __devinit init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
441 d->bootable = ON_BOARD; 441 d->bootable = ON_BOARD;
442 } 442 }
443 443
444 d->channels = ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE || 444 if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE ||
445 dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) && 445 dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) &&
446 (!(PCI_FUNC(dev->devfn) & 1))) ? 1 : 2; 446 (!(PCI_FUNC(dev->devfn) & 1)))
447 d->host_flags |= IDE_HFLAG_SINGLE;
448 else
449 d->host_flags &= ~IDE_HFLAG_SINGLE;
447 450
448 return ide_setup_pci_device(dev, d); 451 return ide_setup_pci_device(dev, d);
449} 452}
@@ -454,7 +457,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
454 .init_setup = init_setup_svwks, 457 .init_setup = init_setup_svwks,
455 .init_chipset = init_chipset_svwks, 458 .init_chipset = init_chipset_svwks,
456 .init_hwif = init_hwif_svwks, 459 .init_hwif = init_hwif_svwks,
457 .channels = 2,
458 .autodma = AUTODMA, 460 .autodma = AUTODMA,
459 .bootable = ON_BOARD, 461 .bootable = ON_BOARD,
460 },{ /* 1 */ 462 },{ /* 1 */
@@ -462,7 +464,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
462 .init_setup = init_setup_svwks, 464 .init_setup = init_setup_svwks,
463 .init_chipset = init_chipset_svwks, 465 .init_chipset = init_chipset_svwks,
464 .init_hwif = init_hwif_svwks, 466 .init_hwif = init_hwif_svwks,
465 .channels = 2,
466 .autodma = AUTODMA, 467 .autodma = AUTODMA,
467 .bootable = ON_BOARD, 468 .bootable = ON_BOARD,
468 },{ /* 2 */ 469 },{ /* 2 */
@@ -470,7 +471,6 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
470 .init_setup = init_setup_csb6, 471 .init_setup = init_setup_csb6,
471 .init_chipset = init_chipset_svwks, 472 .init_chipset = init_chipset_svwks,
472 .init_hwif = init_hwif_svwks, 473 .init_hwif = init_hwif_svwks,
473 .channels = 2,
474 .autodma = AUTODMA, 474 .autodma = AUTODMA,
475 .bootable = ON_BOARD, 475 .bootable = ON_BOARD,
476 },{ /* 3 */ 476 },{ /* 3 */
@@ -478,17 +478,17 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
478 .init_setup = init_setup_csb6, 478 .init_setup = init_setup_csb6,
479 .init_chipset = init_chipset_svwks, 479 .init_chipset = init_chipset_svwks,
480 .init_hwif = init_hwif_svwks, 480 .init_hwif = init_hwif_svwks,
481 .channels = 1, /* 2 */
482 .autodma = AUTODMA, 481 .autodma = AUTODMA,
483 .bootable = ON_BOARD, 482 .bootable = ON_BOARD,
483 .host_flags = IDE_HFLAG_SINGLE,
484 },{ /* 4 */ 484 },{ /* 4 */
485 .name = "SvrWks HT1000", 485 .name = "SvrWks HT1000",
486 .init_setup = init_setup_svwks, 486 .init_setup = init_setup_svwks,
487 .init_chipset = init_chipset_svwks, 487 .init_chipset = init_chipset_svwks,
488 .init_hwif = init_hwif_svwks, 488 .init_hwif = init_hwif_svwks,
489 .channels = 1, /* 2 */
490 .autodma = AUTODMA, 489 .autodma = AUTODMA,
491 .bootable = ON_BOARD, 490 .bootable = ON_BOARD,
491 .host_flags = IDE_HFLAG_SINGLE,
492 } 492 }
493}; 493};
494 494
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
index d396b2929ed8..ed983b56b4e2 100644
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -724,10 +724,10 @@ static ide_pci_device_t sgiioc4_chipset __devinitdata = {
724 .name = "SGIIOC4", 724 .name = "SGIIOC4",
725 .init_hwif = ide_init_sgiioc4, 725 .init_hwif = ide_init_sgiioc4,
726 .init_dma = ide_dma_sgiioc4, 726 .init_dma = ide_dma_sgiioc4,
727 .channels = 1,
728 .autodma = AUTODMA, 727 .autodma = AUTODMA,
729 /* SGI IOC4 doesn't have enablebits. */ 728 /* SGI IOC4 doesn't have enablebits. */
730 .bootable = ON_BOARD, 729 .bootable = ON_BOARD,
730 .host_flags = IDE_HFLAG_SINGLE,
731}; 731};
732 732
733int 733int
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index 5304fc5c616a..47b9b94afe05 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -957,7 +957,6 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif)
957 .init_iops = init_iops_siimage, \ 957 .init_iops = init_iops_siimage, \
958 .init_hwif = init_hwif_siimage, \ 958 .init_hwif = init_hwif_siimage, \
959 .fixup = siimage_fixup, \ 959 .fixup = siimage_fixup, \
960 .channels = 2, \
961 .autodma = AUTODMA, \ 960 .autodma = AUTODMA, \
962 .bootable = ON_BOARD, \ 961 .bootable = ON_BOARD, \
963 } 962 }
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index 756a9b6eb462..bbc502087578 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -878,7 +878,6 @@ static ide_pci_device_t sis5513_chipset __devinitdata = {
878 .name = "SIS5513", 878 .name = "SIS5513",
879 .init_chipset = init_chipset_sis5513, 879 .init_chipset = init_chipset_sis5513,
880 .init_hwif = init_hwif_sis5513, 880 .init_hwif = init_hwif_sis5513,
881 .channels = 2,
882 .autodma = NOAUTODMA, 881 .autodma = NOAUTODMA,
883 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, 882 .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
884 .bootable = ON_BOARD, 883 .bootable = ON_BOARD,
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c
index f2156ee7e2bd..f4637d29aaf5 100644
--- a/drivers/ide/pci/sl82c105.c
+++ b/drivers/ide/pci/sl82c105.c
@@ -453,7 +453,6 @@ static ide_pci_device_t sl82c105_chipset __devinitdata = {
453 .name = "W82C105", 453 .name = "W82C105",
454 .init_chipset = init_chipset_sl82c105, 454 .init_chipset = init_chipset_sl82c105,
455 .init_hwif = init_hwif_sl82c105, 455 .init_hwif = init_hwif_sl82c105,
456 .channels = 2,
457 .autodma = NOAUTODMA, 456 .autodma = NOAUTODMA,
458 .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}}, 457 .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
459 .bootable = ON_BOARD, 458 .bootable = ON_BOARD,
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c
index 575dbbd8b482..115bcaefc8ee 100644
--- a/drivers/ide/pci/slc90e66.c
+++ b/drivers/ide/pci/slc90e66.c
@@ -214,7 +214,6 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
214static ide_pci_device_t slc90e66_chipset __devinitdata = { 214static ide_pci_device_t slc90e66_chipset __devinitdata = {
215 .name = "SLC90E66", 215 .name = "SLC90E66",
216 .init_hwif = init_hwif_slc90e66, 216 .init_hwif = init_hwif_slc90e66,
217 .channels = 2,
218 .autodma = AUTODMA, 217 .autodma = AUTODMA,
219 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, 218 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
220 .bootable = ON_BOARD, 219 .bootable = ON_BOARD,
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c
index 8de1f8e22494..1d40b0820f50 100644
--- a/drivers/ide/pci/tc86c001.c
+++ b/drivers/ide/pci/tc86c001.c
@@ -248,9 +248,9 @@ static ide_pci_device_t tc86c001_chipset __devinitdata = {
248 .name = "TC86C001", 248 .name = "TC86C001",
249 .init_chipset = init_chipset_tc86c001, 249 .init_chipset = init_chipset_tc86c001,
250 .init_hwif = init_hwif_tc86c001, 250 .init_hwif = init_hwif_tc86c001,
251 .channels = 1,
252 .autodma = AUTODMA, 251 .autodma = AUTODMA,
253 .bootable = OFF_BOARD 252 .bootable = OFF_BOARD,
253 .host_flags = IDE_HFLAG_SINGLE,
254}; 254};
255 255
256static int __devinit tc86c001_init_one(struct pci_dev *dev, 256static int __devinit tc86c001_init_one(struct pci_dev *dev,
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c
index 35e8c612638f..801314fe3524 100644
--- a/drivers/ide/pci/triflex.c
+++ b/drivers/ide/pci/triflex.c
@@ -129,7 +129,6 @@ static void __devinit init_hwif_triflex(ide_hwif_t *hwif)
129static ide_pci_device_t triflex_device __devinitdata = { 129static ide_pci_device_t triflex_device __devinitdata = {
130 .name = "TRIFLEX", 130 .name = "TRIFLEX",
131 .init_hwif = init_hwif_triflex, 131 .init_hwif = init_hwif_triflex,
132 .channels = 2,
133 .autodma = AUTODMA, 132 .autodma = AUTODMA,
134 .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, 133 .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
135 .bootable = ON_BOARD, 134 .bootable = ON_BOARD,
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c
index cbb1b11119a5..dc4f4e298e00 100644
--- a/drivers/ide/pci/trm290.c
+++ b/drivers/ide/pci/trm290.c
@@ -327,7 +327,6 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
327static ide_pci_device_t trm290_chipset __devinitdata = { 327static ide_pci_device_t trm290_chipset __devinitdata = {
328 .name = "TRM290", 328 .name = "TRM290",
329 .init_hwif = init_hwif_trm290, 329 .init_hwif = init_hwif_trm290,
330 .channels = 2,
331 .autodma = NOAUTODMA, 330 .autodma = NOAUTODMA,
332 .bootable = ON_BOARD, 331 .bootable = ON_BOARD,
333}; 332};
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index 27e92fb9f95e..bfc9b67f8c92 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -498,7 +498,6 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
498 .name = "VP_IDE", 498 .name = "VP_IDE",
499 .init_chipset = init_chipset_via82cxxx, 499 .init_chipset = init_chipset_via82cxxx,
500 .init_hwif = init_hwif_via82cxxx, 500 .init_hwif = init_hwif_via82cxxx,
501 .channels = 2,
502 .autodma = NOAUTODMA, 501 .autodma = NOAUTODMA,
503 .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, 502 .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
504 .bootable = ON_BOARD 503 .bootable = ON_BOARD
@@ -506,7 +505,6 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
506 .name = "VP_IDE", 505 .name = "VP_IDE",
507 .init_chipset = init_chipset_via82cxxx, 506 .init_chipset = init_chipset_via82cxxx,
508 .init_hwif = init_hwif_via82cxxx, 507 .init_hwif = init_hwif_via82cxxx,
509 .channels = 2,
510 .autodma = AUTODMA, 508 .autodma = AUTODMA,
511 .enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, 509 .enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
512 .bootable = ON_BOARD, 510 .bootable = ON_BOARD,
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index c88d33225cf9..bfe1f4e59597 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -407,7 +407,7 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d,
407 unsigned long ctl = 0, base = 0; 407 unsigned long ctl = 0, base = 0;
408 ide_hwif_t *hwif; 408 ide_hwif_t *hwif;
409 409
410 if ((d->flags & IDEPCI_FLAG_ISA_PORTS) == 0) { 410 if ((d->host_flags & IDE_HFLAG_ISA_PORTS) == 0) {
411 /* Possibly we should fail if these checks report true */ 411 /* Possibly we should fail if these checks report true */
412 ide_pci_check_iomem(dev, d, 2*port); 412 ide_pci_check_iomem(dev, d, 2*port);
413 ide_pci_check_iomem(dev, d, 2*port+1); 413 ide_pci_check_iomem(dev, d, 2*port+1);
@@ -571,7 +571,7 @@ out:
571 571
572void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, ata_index_t *index) 572void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, ata_index_t *index)
573{ 573{
574 int port; 574 int channels = (d->host_flags & IDE_HFLAG_SINGLE) ? 1 : 2, port;
575 int at_least_one_hwif_enabled = 0; 575 int at_least_one_hwif_enabled = 0;
576 ide_hwif_t *hwif, *mate = NULL; 576 ide_hwif_t *hwif, *mate = NULL;
577 u8 tmp; 577 u8 tmp;
@@ -582,16 +582,13 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a
582 * Set up the IDE ports 582 * Set up the IDE ports
583 */ 583 */
584 584
585 for (port = 0; port <= 1; ++port) { 585 for (port = 0; port < channels; ++port) {
586 ide_pci_enablebit_t *e = &(d->enablebits[port]); 586 ide_pci_enablebit_t *e = &(d->enablebits[port]);
587 587
588 if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) || 588 if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) ||
589 (tmp & e->mask) != e->val)) 589 (tmp & e->mask) != e->val))
590 continue; /* port not enabled */ 590 continue; /* port not enabled */
591 591
592 if (d->channels <= port)
593 break;
594
595 if ((hwif = ide_hwif_configure(dev, d, mate, port, pciirq)) == NULL) 592 if ((hwif = ide_hwif_configure(dev, d, mate, port, pciirq)) == NULL)
596 continue; 593 continue;
597 594