diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-15 15:21:49 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-15 15:21:49 -0400 |
commit | 135721446144af005109c25eeacca4fdddcd9a66 (patch) | |
tree | b3bbcc431492930cfc095b36e73ca9e6fa038878 /drivers/ide | |
parent | ed4af48fd660176680da905817f6e40d51436e4c (diff) |
ide: remove ->mmio flag from ide_hwif_t
Since scc_pata host driver no longer uses IDE PCI layer / ide_dma_setup()
and all other ->mmio users set also IDE_HFLAG_MMIO host flag we can safely
remove ->mmio flag.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/arm/palm_bk3710.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-dma.c | 2 | ||||
-rw-r--r-- | drivers/ide/pci/scc_pata.c | 1 | ||||
-rw-r--r-- | drivers/ide/pci/siimage.c | 25 | ||||
-rw-r--r-- | drivers/ide/setup-pci.c | 4 |
5 files changed, 16 insertions, 17 deletions
diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c index 74a05dc6d1e6..3839f5722985 100644 --- a/drivers/ide/arm/palm_bk3710.c +++ b/drivers/ide/arm/palm_bk3710.c | |||
@@ -405,7 +405,6 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev) | |||
405 | ide_init_port_data(hwif, i); | 405 | ide_init_port_data(hwif, i); |
406 | ide_init_port_hw(hwif, &hw); | 406 | ide_init_port_hw(hwif, &hw); |
407 | 407 | ||
408 | hwif->mmio = 1; | ||
409 | default_hwif_mmiops(hwif); | 408 | default_hwif_mmiops(hwif); |
410 | 409 | ||
411 | idx[0] = i; | 410 | idx[0] = i; |
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 174f4704614c..7ee44f86bc54 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -463,7 +463,7 @@ int ide_dma_setup(ide_drive_t *drive) | |||
463 | } | 463 | } |
464 | 464 | ||
465 | /* PRD table */ | 465 | /* PRD table */ |
466 | if (hwif->mmio) | 466 | if (hwif->host_flags & IDE_HFLAG_MMIO) |
467 | writel(hwif->dmatable_dma, | 467 | writel(hwif->dmatable_dma, |
468 | (void __iomem *)(hwif->dma_base + ATA_DMA_TABLE_OFS)); | 468 | (void __iomem *)(hwif->dma_base + ATA_DMA_TABLE_OFS)); |
469 | else | 469 | else |
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index 37e8cfcabb4b..133053c7a480 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c | |||
@@ -793,7 +793,6 @@ static void __devinit init_mmio_iops_scc(ide_hwif_t *hwif) | |||
793 | 793 | ||
794 | hwif->dma_base = dma_base; | 794 | hwif->dma_base = dma_base; |
795 | hwif->config_data = ports->ctl; | 795 | hwif->config_data = ports->ctl; |
796 | hwif->mmio = 1; | ||
797 | } | 796 | } |
798 | 797 | ||
799 | /** | 798 | /** |
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 0006b9e58567..b75e9bb390a7 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -94,7 +94,7 @@ static unsigned long siimage_selreg(ide_hwif_t *hwif, int r) | |||
94 | unsigned long base = (unsigned long)hwif->hwif_data; | 94 | unsigned long base = (unsigned long)hwif->hwif_data; |
95 | 95 | ||
96 | base += 0xA0 + r; | 96 | base += 0xA0 + r; |
97 | if (hwif->mmio) | 97 | if (hwif->host_flags & IDE_HFLAG_MMIO) |
98 | base += hwif->channel << 6; | 98 | base += hwif->channel << 6; |
99 | else | 99 | else |
100 | base += hwif->channel << 4; | 100 | base += hwif->channel << 4; |
@@ -117,7 +117,7 @@ static inline unsigned long siimage_seldev(ide_drive_t *drive, int r) | |||
117 | unsigned long base = (unsigned long)hwif->hwif_data; | 117 | unsigned long base = (unsigned long)hwif->hwif_data; |
118 | 118 | ||
119 | base += 0xA0 + r; | 119 | base += 0xA0 + r; |
120 | if (hwif->mmio) | 120 | if (hwif->host_flags & IDE_HFLAG_MMIO) |
121 | base += hwif->channel << 6; | 121 | base += hwif->channel << 6; |
122 | else | 122 | else |
123 | base += hwif->channel << 4; | 123 | base += hwif->channel << 4; |
@@ -190,7 +190,9 @@ static u8 sil_pata_udma_filter(ide_drive_t *drive) | |||
190 | unsigned long base = (unsigned long)hwif->hwif_data; | 190 | unsigned long base = (unsigned long)hwif->hwif_data; |
191 | u8 scsc, mask = 0; | 191 | u8 scsc, mask = 0; |
192 | 192 | ||
193 | scsc = sil_ioread8(dev, base + (hwif->mmio ? 0x4A : 0x8A)); | 193 | base += (hwif->host_flags & IDE_HFLAG_MMIO) ? 0x4A : 0x8A; |
194 | |||
195 | scsc = sil_ioread8(dev, base); | ||
194 | 196 | ||
195 | switch (scsc & 0x30) { | 197 | switch (scsc & 0x30) { |
196 | case 0x10: /* 133 */ | 198 | case 0x10: /* 133 */ |
@@ -238,8 +240,9 @@ static void sil_set_pio_mode(ide_drive_t *drive, u8 pio) | |||
238 | unsigned long tfaddr = siimage_selreg(hwif, 0x02); | 240 | unsigned long tfaddr = siimage_selreg(hwif, 0x02); |
239 | unsigned long base = (unsigned long)hwif->hwif_data; | 241 | unsigned long base = (unsigned long)hwif->hwif_data; |
240 | u8 tf_pio = pio; | 242 | u8 tf_pio = pio; |
241 | u8 addr_mask = hwif->channel ? (hwif->mmio ? 0xF4 : 0x84) | 243 | u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; |
242 | : (hwif->mmio ? 0xB4 : 0x80); | 244 | u8 addr_mask = hwif->channel ? (mmio ? 0xF4 : 0x84) |
245 | : (mmio ? 0xB4 : 0x80); | ||
243 | u8 mode = 0; | 246 | u8 mode = 0; |
244 | u8 unit = drive->select.b.unit; | 247 | u8 unit = drive->select.b.unit; |
245 | 248 | ||
@@ -290,13 +293,13 @@ static void sil_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
290 | u16 ultra = 0, multi = 0; | 293 | u16 ultra = 0, multi = 0; |
291 | u8 mode = 0, unit = drive->select.b.unit; | 294 | u8 mode = 0, unit = drive->select.b.unit; |
292 | unsigned long base = (unsigned long)hwif->hwif_data; | 295 | unsigned long base = (unsigned long)hwif->hwif_data; |
293 | u8 scsc = 0, addr_mask = hwif->channel ? | 296 | u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; |
294 | (hwif->mmio ? 0xF4 : 0x84) : | 297 | u8 scsc = 0, addr_mask = hwif->channel ? (mmio ? 0xF4 : 0x84) |
295 | (hwif->mmio ? 0xB4 : 0x80); | 298 | : (mmio ? 0xB4 : 0x80); |
296 | unsigned long ma = siimage_seldev(drive, 0x08); | 299 | unsigned long ma = siimage_seldev(drive, 0x08); |
297 | unsigned long ua = siimage_seldev(drive, 0x0C); | 300 | unsigned long ua = siimage_seldev(drive, 0x0C); |
298 | 301 | ||
299 | scsc = sil_ioread8 (dev, base + (hwif->mmio ? 0x4A : 0x8A)); | 302 | scsc = sil_ioread8 (dev, base + (mmio ? 0x4A : 0x8A)); |
300 | mode = sil_ioread8 (dev, base + addr_mask); | 303 | mode = sil_ioread8 (dev, base + addr_mask); |
301 | multi = sil_ioread16(dev, ma); | 304 | multi = sil_ioread16(dev, ma); |
302 | ultra = sil_ioread16(dev, ua); | 305 | ultra = sil_ioread16(dev, ua); |
@@ -391,7 +394,7 @@ static int siimage_mmio_dma_test_irq(ide_drive_t *drive) | |||
391 | 394 | ||
392 | static int siimage_dma_test_irq(ide_drive_t *drive) | 395 | static int siimage_dma_test_irq(ide_drive_t *drive) |
393 | { | 396 | { |
394 | if (drive->hwif->mmio) | 397 | if (drive->hwif->host_flags & IDE_HFLAG_MMIO) |
395 | return siimage_mmio_dma_test_irq(drive); | 398 | return siimage_mmio_dma_test_irq(drive); |
396 | else | 399 | else |
397 | return siimage_io_dma_test_irq(drive); | 400 | return siimage_io_dma_test_irq(drive); |
@@ -640,8 +643,6 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) | |||
640 | hwif->irq = dev->irq; | 643 | hwif->irq = dev->irq; |
641 | 644 | ||
642 | hwif->dma_base = (unsigned long)addr + (ch ? 0x08 : 0x00); | 645 | hwif->dma_base = (unsigned long)addr + (ch ? 0x08 : 0x00); |
643 | |||
644 | hwif->mmio = 1; | ||
645 | } | 646 | } |
646 | 647 | ||
647 | static int is_dev_seagate_sata(ide_drive_t *drive) | 648 | static int is_dev_seagate_sata(ide_drive_t *drive) |
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 5171601fb255..abcfb1739d4d 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -87,7 +87,7 @@ unsigned long ide_pci_dma_base(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
87 | unsigned long dma_base = 0; | 87 | unsigned long dma_base = 0; |
88 | u8 dma_stat = 0; | 88 | u8 dma_stat = 0; |
89 | 89 | ||
90 | if (hwif->mmio) | 90 | if (hwif->host_flags & IDE_HFLAG_MMIO) |
91 | return hwif->dma_base; | 91 | return hwif->dma_base; |
92 | 92 | ||
93 | if (hwif->mate && hwif->mate->dma_base) { | 93 | if (hwif->mate && hwif->mate->dma_base) { |
@@ -374,7 +374,7 @@ int ide_hwif_setup_dma(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
374 | if (base == 0 || ide_pci_set_master(dev, d->name) < 0) | 374 | if (base == 0 || ide_pci_set_master(dev, d->name) < 0) |
375 | return -1; | 375 | return -1; |
376 | 376 | ||
377 | if (hwif->mmio) | 377 | if (hwif->host_flags & IDE_HFLAG_MMIO) |
378 | printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name); | 378 | printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name); |
379 | else | 379 | else |
380 | printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n", | 380 | printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n", |