aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/common/it8152.c27
-rw-r--r--arch/arm/include/asm/dma-mapping.h8
-rw-r--r--arch/arm/mach-ixp4xx/common-pci.c26
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/hardware.h5
-rw-r--r--arch/arm/mach-pxa/include/mach/hardware.h1
5 files changed, 8 insertions, 59 deletions
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
index 2793447621c3..ee1d3b85eb65 100644
--- a/arch/arm/common/it8152.c
+++ b/arch/arm/common/it8152.c
@@ -272,33 +272,6 @@ int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
272 ((dma_addr + size - PHYS_OFFSET) >= SZ_64M); 272 ((dma_addr + size - PHYS_OFFSET) >= SZ_64M);
273} 273}
274 274
275/*
276 * We override these so we properly do dmabounce otherwise drivers
277 * are able to set the dma_mask to 0xffffffff and we can no longer
278 * trap bounces. :(
279 *
280 * We just return true on everyhing except for < 64MB in which case
281 * we will fail miseralby and die since we can't handle that case.
282 */
283int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
284{
285 dev_dbg(&dev->dev, "%s: %llx\n", __func__, mask);
286 if (mask >= PHYS_OFFSET + SZ_64M - 1)
287 return 0;
288
289 return -EIO;
290}
291
292int
293pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
294{
295 dev_dbg(&dev->dev, "%s: %llx\n", __func__, mask);
296 if (mask >= PHYS_OFFSET + SZ_64M - 1)
297 return 0;
298
299 return -EIO;
300}
301
302int __init it8152_pci_setup(int nr, struct pci_sys_data *sys) 275int __init it8152_pci_setup(int nr, struct pci_sys_data *sys)
303{ 276{
304 it8152_io.start = IT8152_IO_BASE + 0x12000; 277 it8152_io.start = IT8152_IO_BASE + 0x12000;
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index 256ee1c9f51a..69ce0727edb5 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -128,6 +128,14 @@ static inline int dma_supported(struct device *dev, u64 mask)
128 128
129static inline int dma_set_mask(struct device *dev, u64 dma_mask) 129static inline int dma_set_mask(struct device *dev, u64 dma_mask)
130{ 130{
131#ifdef CONFIG_DMABOUNCE
132 if (dev->archdata.dmabounce) {
133 if (dma_mask >= ISA_DMA_THRESHOLD)
134 return 0;
135 else
136 return -EIO;
137 }
138#endif
131 if (!dev->dma_mask || !dma_supported(dev, dma_mask)) 139 if (!dev->dma_mask || !dma_supported(dev, dma_mask))
132 return -EIO; 140 return -EIO;
133 141
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index c4a01594c761..e3181534c7f9 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -502,32 +502,6 @@ struct pci_bus * __devinit ixp4xx_scan_bus(int nr, struct pci_sys_data *sys)
502 return pci_scan_bus(sys->busnr, &ixp4xx_ops, sys); 502 return pci_scan_bus(sys->busnr, &ixp4xx_ops, sys);
503} 503}
504 504
505/*
506 * We override these so we properly do dmabounce otherwise drivers
507 * are able to set the dma_mask to 0xffffffff and we can no longer
508 * trap bounces. :(
509 *
510 * We just return true on everyhing except for < 64MB in which case
511 * we will fail miseralby and die since we can't handle that case.
512 */
513int
514pci_set_dma_mask(struct pci_dev *dev, u64 mask)
515{
516 if (mask >= SZ_64M - 1 )
517 return 0;
518
519 return -EIO;
520}
521
522int
523pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
524{
525 if (mask >= SZ_64M - 1 )
526 return 0;
527
528 return -EIO;
529}
530
531EXPORT_SYMBOL(ixp4xx_pci_read); 505EXPORT_SYMBOL(ixp4xx_pci_read);
532EXPORT_SYMBOL(ixp4xx_pci_write); 506EXPORT_SYMBOL(ixp4xx_pci_write);
533 507
diff --git a/arch/arm/mach-ixp4xx/include/mach/hardware.h b/arch/arm/mach-ixp4xx/include/mach/hardware.h
index f9d1c43e4a54..f91ca6d4fbe8 100644
--- a/arch/arm/mach-ixp4xx/include/mach/hardware.h
+++ b/arch/arm/mach-ixp4xx/include/mach/hardware.h
@@ -26,11 +26,6 @@
26#define PCIBIOS_MAX_MEM 0x4BFFFFFF 26#define PCIBIOS_MAX_MEM 0x4BFFFFFF
27#endif 27#endif
28 28
29/*
30 * We override the standard dma-mask routines for bouncing.
31 */
32#define HAVE_ARCH_PCI_SET_DMA_MASK
33
34#define pcibios_assign_all_busses() 1 29#define pcibios_assign_all_busses() 1
35 30
36/* Register locations and bits */ 31/* Register locations and bits */
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h
index e741bf1bfb2d..7515757d6911 100644
--- a/arch/arm/mach-pxa/include/mach/hardware.h
+++ b/arch/arm/mach-pxa/include/mach/hardware.h
@@ -314,7 +314,6 @@ extern unsigned long get_clock_tick_rate(void);
314#define PCIBIOS_MIN_IO 0 314#define PCIBIOS_MIN_IO 0
315#define PCIBIOS_MIN_MEM 0 315#define PCIBIOS_MIN_MEM 0
316#define pcibios_assign_all_busses() 1 316#define pcibios_assign_all_busses() 1
317#define HAVE_ARCH_PCI_SET_DMA_MASK 1
318#endif 317#endif
319 318
320 319