aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/arm/icside.c2
-rw-r--r--drivers/ide/arm/rapide.c2
-rw-r--r--drivers/ide/cris/ide-cris.c2
-rw-r--r--drivers/ide/h8300/ide-h8300.c2
-rw-r--r--drivers/ide/ide-dma.c8
-rw-r--r--drivers/ide/ide.c5
-rw-r--r--drivers/ide/legacy/buddha.c2
-rw-r--r--drivers/ide/legacy/gayle.c2
-rw-r--r--drivers/ide/legacy/macide.c2
-rw-r--r--drivers/ide/legacy/q40ide.c2
-rw-r--r--drivers/ide/mips/au1xxx-ide.c3
-rw-r--r--drivers/ide/mips/swarm.c2
-rw-r--r--drivers/ide/pci/sgiioc4.c2
-rw-r--r--drivers/ide/pci/siimage.c3
-rw-r--r--drivers/ide/ppc/pmac.c2
-rw-r--r--drivers/ide/ppc/scc_pata.c2
-rw-r--r--include/linux/ide.h2
17 files changed, 23 insertions, 22 deletions
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
index 8a1c27f28692..61ce40d52f5f 100644
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -556,7 +556,7 @@ icside_setup(void __iomem *base, struct cardinfo *info, struct expansion_card *e
556 * Ensure we're using MMIO 556 * Ensure we're using MMIO
557 */ 557 */
558 default_hwif_mmiops(hwif); 558 default_hwif_mmiops(hwif);
559 hwif->mmio = 2; 559 hwif->mmio = 1;
560 560
561 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { 561 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
562 hwif->hw.io_ports[i] = port; 562 hwif->hw.io_ports[i] = port;
diff --git a/drivers/ide/arm/rapide.c b/drivers/ide/arm/rapide.c
index 3058217767d6..9c6c49fdd2b1 100644
--- a/drivers/ide/arm/rapide.c
+++ b/drivers/ide/arm/rapide.c
@@ -46,7 +46,7 @@ rapide_locate_hwif(void __iomem *base, void __iomem *ctrl, unsigned int sz, int
46 hwif->hw.io_ports[IDE_CONTROL_OFFSET] = (unsigned long)ctrl; 46 hwif->hw.io_ports[IDE_CONTROL_OFFSET] = (unsigned long)ctrl;
47 hwif->io_ports[IDE_CONTROL_OFFSET] = (unsigned long)ctrl; 47 hwif->io_ports[IDE_CONTROL_OFFSET] = (unsigned long)ctrl;
48 hwif->hw.irq = hwif->irq = irq; 48 hwif->hw.irq = hwif->irq = irq;
49 hwif->mmio = 2; 49 hwif->mmio = 1;
50 default_hwif_mmiops(hwif); 50 default_hwif_mmiops(hwif);
51 51
52 return hwif; 52 return hwif;
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c
index 7afb715b86e5..24281176b4dc 100644
--- a/drivers/ide/cris/ide-cris.c
+++ b/drivers/ide/cris/ide-cris.c
@@ -795,7 +795,7 @@ init_e100_ide (void)
795 0, 0, cris_ide_ack_intr, 795 0, 0, cris_ide_ack_intr,
796 ide_default_irq(0)); 796 ide_default_irq(0));
797 ide_register_hw(&hw, &hwif); 797 ide_register_hw(&hw, &hwif);
798 hwif->mmio = 2; 798 hwif->mmio = 1;
799 hwif->chipset = ide_etrax100; 799 hwif->chipset = ide_etrax100;
800 hwif->tuneproc = &tune_cris_ide; 800 hwif->tuneproc = &tune_cris_ide;
801 hwif->speedproc = &speed_cris_ide; 801 hwif->speedproc = &speed_cris_ide;
diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c
index c45bfb825a37..88750a300337 100644
--- a/drivers/ide/h8300/ide-h8300.c
+++ b/drivers/ide/h8300/ide-h8300.c
@@ -76,7 +76,7 @@ static inline void hwif_setup(ide_hwif_t *hwif)
76{ 76{
77 default_hwif_iops(hwif); 77 default_hwif_iops(hwif);
78 78
79 hwif->mmio = 2; 79 hwif->mmio = 1;
80 hwif->OUTW = mm_outw; 80 hwif->OUTW = mm_outw;
81 hwif->OUTSW = mm_outsw; 81 hwif->OUTSW = mm_outsw;
82 hwif->INW = mm_inw; 82 hwif->INW = mm_inw;
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index b7b663ee7343..1a288e5307d3 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -565,7 +565,7 @@ int ide_dma_setup(ide_drive_t *drive)
565 } 565 }
566 566
567 /* PRD table */ 567 /* PRD table */
568 if (hwif->mmio == 2) 568 if (hwif->mmio)
569 writel(hwif->dmatable_dma, (void __iomem *)hwif->dma_prdtable); 569 writel(hwif->dmatable_dma, (void __iomem *)hwif->dma_prdtable);
570 else 570 else
571 outl(hwif->dmatable_dma, hwif->dma_prdtable); 571 outl(hwif->dmatable_dma, hwif->dma_prdtable);
@@ -815,7 +815,7 @@ int ide_release_dma(ide_hwif_t *hwif)
815{ 815{
816 ide_release_dma_engine(hwif); 816 ide_release_dma_engine(hwif);
817 817
818 if (hwif->mmio == 2) 818 if (hwif->mmio)
819 return 1; 819 return 1;
820 else 820 else
821 return ide_release_iomio_dma(hwif); 821 return ide_release_iomio_dma(hwif);
@@ -884,9 +884,9 @@ static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base, unsigned int port
884 884
885static int ide_dma_iobase(ide_hwif_t *hwif, unsigned long base, unsigned int ports) 885static int ide_dma_iobase(ide_hwif_t *hwif, unsigned long base, unsigned int ports)
886{ 886{
887 if (hwif->mmio == 2) 887 if (hwif->mmio)
888 return ide_mapped_mmio_dma(hwif, base,ports); 888 return ide_mapped_mmio_dma(hwif, base,ports);
889 BUG_ON(hwif->mmio == 1); 889
890 return ide_iomio_dma(hwif, base, ports); 890 return ide_iomio_dma(hwif, base, ports);
891} 891}
892 892
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 92ab39d5bc25..fbc6d39ace68 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -389,9 +389,8 @@ int ide_hwif_request_regions(ide_hwif_t *hwif)
389 unsigned long addr; 389 unsigned long addr;
390 unsigned int i; 390 unsigned int i;
391 391
392 if (hwif->mmio == 2) 392 if (hwif->mmio)
393 return 0; 393 return 0;
394 BUG_ON(hwif->mmio == 1);
395 addr = hwif->io_ports[IDE_CONTROL_OFFSET]; 394 addr = hwif->io_ports[IDE_CONTROL_OFFSET];
396 if (addr && !hwif_request_region(hwif, addr, 1)) 395 if (addr && !hwif_request_region(hwif, addr, 1))
397 goto control_region_busy; 396 goto control_region_busy;
@@ -438,7 +437,7 @@ void ide_hwif_release_regions(ide_hwif_t *hwif)
438{ 437{
439 u32 i = 0; 438 u32 i = 0;
440 439
441 if (hwif->mmio == 2) 440 if (hwif->mmio)
442 return; 441 return;
443 if (hwif->io_ports[IDE_CONTROL_OFFSET]) 442 if (hwif->io_ports[IDE_CONTROL_OFFSET])
444 release_region(hwif->io_ports[IDE_CONTROL_OFFSET], 1); 443 release_region(hwif->io_ports[IDE_CONTROL_OFFSET], 1);
diff --git a/drivers/ide/legacy/buddha.c b/drivers/ide/legacy/buddha.c
index 0391a3122878..1ed224a01f79 100644
--- a/drivers/ide/legacy/buddha.c
+++ b/drivers/ide/legacy/buddha.c
@@ -215,7 +215,7 @@ fail_base2:
215 215
216 index = ide_register_hw(&hw, &hwif); 216 index = ide_register_hw(&hw, &hwif);
217 if (index != -1) { 217 if (index != -1) {
218 hwif->mmio = 2; 218 hwif->mmio = 1;
219 printk("ide%d: ", index); 219 printk("ide%d: ", index);
220 switch(type) { 220 switch(type) {
221 case BOARD_BUDDHA: 221 case BOARD_BUDDHA:
diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c
index 64d42619ab06..dcfadbbf55d8 100644
--- a/drivers/ide/legacy/gayle.c
+++ b/drivers/ide/legacy/gayle.c
@@ -167,7 +167,7 @@ found:
167 167
168 index = ide_register_hw(&hw, &hwif); 168 index = ide_register_hw(&hw, &hwif);
169 if (index != -1) { 169 if (index != -1) {
170 hwif->mmio = 2; 170 hwif->mmio = 1;
171 switch (i) { 171 switch (i) {
172 case 0: 172 case 0:
173 printk("ide%d: Gayle IDE interface (A%d style)\n", index, 173 printk("ide%d: Gayle IDE interface (A%d style)\n", index,
diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c
index b1730d7e414c..4c0079ad52ac 100644
--- a/drivers/ide/legacy/macide.c
+++ b/drivers/ide/legacy/macide.c
@@ -141,7 +141,7 @@ void macide_init(void)
141 } 141 }
142 142
143 if (index != -1) { 143 if (index != -1) {
144 hwif->mmio = 2; 144 hwif->mmio = 1;
145 if (macintosh_config->ide_type == MAC_IDE_QUADRA) 145 if (macintosh_config->ide_type == MAC_IDE_QUADRA)
146 printk(KERN_INFO "ide%d: Macintosh Quadra IDE interface\n", index); 146 printk(KERN_INFO "ide%d: Macintosh Quadra IDE interface\n", index);
147 else if (macintosh_config->ide_type == MAC_IDE_PB) 147 else if (macintosh_config->ide_type == MAC_IDE_PB)
diff --git a/drivers/ide/legacy/q40ide.c b/drivers/ide/legacy/q40ide.c
index 434a94faa3b7..74f08124eabb 100644
--- a/drivers/ide/legacy/q40ide.c
+++ b/drivers/ide/legacy/q40ide.c
@@ -145,7 +145,7 @@ void q40ide_init(void)
145 index = ide_register_hw(&hw, &hwif); 145 index = ide_register_hw(&hw, &hwif);
146 // **FIXME** 146 // **FIXME**
147 if (index != -1) 147 if (index != -1)
148 hwif->mmio = 2; 148 hwif->mmio = 1;
149 } 149 }
150} 150}
151 151
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index 3c4f71afeeba..b431b990426d 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -708,7 +708,8 @@ static int au_ide_probe(struct device *dev)
708 708
709 /* hold should be on in all cases */ 709 /* hold should be on in all cases */
710 hwif->hold = 1; 710 hwif->hold = 1;
711 hwif->mmio = 2; 711
712 hwif->mmio = 1;
712 713
713 /* If the user has selected DDMA assisted copies, 714 /* If the user has selected DDMA assisted copies,
714 then set up a few local I/O function entry points 715 then set up a few local I/O function entry points
diff --git a/drivers/ide/mips/swarm.c b/drivers/ide/mips/swarm.c
index 09c9e7936b0d..81fa06851b27 100644
--- a/drivers/ide/mips/swarm.c
+++ b/drivers/ide/mips/swarm.c
@@ -115,7 +115,7 @@ static int __devinit swarm_ide_probe(struct device *dev)
115 /* Setup MMIO ops. */ 115 /* Setup MMIO ops. */
116 default_hwif_mmiops(hwif); 116 default_hwif_mmiops(hwif);
117 /* Prevent resource map manipulation. */ 117 /* Prevent resource map manipulation. */
118 hwif->mmio = 2; 118 hwif->mmio = 1;
119 hwif->noprobe = 0; 119 hwif->noprobe = 0;
120 120
121 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) 121 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++)
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
index 2af8a71e688e..083c7afe1162 100644
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -593,7 +593,7 @@ static int sgiioc4_ide_dma_setup(ide_drive_t *drive)
593static void __devinit 593static void __devinit
594ide_init_sgiioc4(ide_hwif_t * hwif) 594ide_init_sgiioc4(ide_hwif_t * hwif)
595{ 595{
596 hwif->mmio = 2; 596 hwif->mmio = 1;
597 hwif->autodma = 1; 597 hwif->autodma = 1;
598 hwif->atapi_dma = 1; 598 hwif->atapi_dma = 1;
599 hwif->ultra_mask = 0x0; /* Disable Ultra DMA */ 599 hwif->ultra_mask = 0x0; /* Disable Ultra DMA */
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index 505878cc21ea..40e992af0005 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -888,7 +888,8 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif)
888 base = (unsigned long) addr; 888 base = (unsigned long) addr;
889 889
890 hwif->dma_base = base + (ch ? 0x08 : 0x00); 890 hwif->dma_base = base + (ch ? 0x08 : 0x00);
891 hwif->mmio = 2; 891
892 hwif->mmio = 1;
892} 893}
893 894
894static int is_dev_seagate_sata(ide_drive_t *drive) 895static int is_dev_seagate_sata(ide_drive_t *drive)
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index d8ea23710bf0..c547c76533d5 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -1237,7 +1237,7 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
1237 hwif->OUTBSYNC = pmac_outbsync; 1237 hwif->OUTBSYNC = pmac_outbsync;
1238 1238
1239 /* Tell common code _not_ to mess with resources */ 1239 /* Tell common code _not_ to mess with resources */
1240 hwif->mmio = 2; 1240 hwif->mmio = 1;
1241 hwif->hwif_data = pmif; 1241 hwif->hwif_data = pmif;
1242 pmac_ide_init_hwif_ports(&hwif->hw, pmif->regbase, 0, &hwif->irq); 1242 pmac_ide_init_hwif_ports(&hwif->hw, pmif->regbase, 0, &hwif->irq);
1243 memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports)); 1243 memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports));
diff --git a/drivers/ide/ppc/scc_pata.c b/drivers/ide/ppc/scc_pata.c
index de9110803745..f05117e8fdb9 100644
--- a/drivers/ide/ppc/scc_pata.c
+++ b/drivers/ide/ppc/scc_pata.c
@@ -668,7 +668,7 @@ static void __devinit init_mmio_iops_scc(ide_hwif_t *hwif)
668 hwif->irq = hwif->pci_dev->irq; 668 hwif->irq = hwif->pci_dev->irq;
669 hwif->dma_base = dma_base; 669 hwif->dma_base = dma_base;
670 hwif->config_data = ports->ctl; 670 hwif->config_data = ports->ctl;
671 hwif->mmio = 2; 671 hwif->mmio = 1;
672} 672}
673 673
674/** 674/**
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 4f88fb99a053..579a8521de63 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -772,7 +772,6 @@ typedef struct hwif_s {
772 unsigned int cursg; 772 unsigned int cursg;
773 unsigned int cursg_ofs; 773 unsigned int cursg_ofs;
774 774
775 int mmio; /* hosts iomio (0) or custom (2) select */
776 int rqsize; /* max sectors per request */ 775 int rqsize; /* max sectors per request */
777 int irq; /* our irq number */ 776 int irq; /* our irq number */
778 777
@@ -804,6 +803,7 @@ typedef struct hwif_s {
804 unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ 803 unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */
805 unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */ 804 unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */
806 unsigned err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */ 805 unsigned err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */
806 unsigned mmio : 1; /* host uses MMIO */
807 807
808 struct device gendev; 808 struct device gendev;
809 struct completion gendev_rel_comp; /* To deal with device release() */ 809 struct completion gendev_rel_comp; /* To deal with device release() */