aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/common-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ixp4xx/common-pci.c')
-rw-r--r--arch/arm/mach-ixp4xx/common-pci.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index e9a589395723..e2e98bbb6413 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -316,6 +316,11 @@ static int abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *r
316} 316}
317 317
318 318
319static int ixp4xx_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
320{
321 return (dma_addr + size) >= SZ_64M;
322}
323
319/* 324/*
320 * Setup DMA mask to 64MB on PCI devices. Ignore all other devices. 325 * Setup DMA mask to 64MB on PCI devices. Ignore all other devices.
321 */ 326 */
@@ -324,7 +329,7 @@ static int ixp4xx_pci_platform_notify(struct device *dev)
324 if(dev->bus == &pci_bus_type) { 329 if(dev->bus == &pci_bus_type) {
325 *dev->dma_mask = SZ_64M - 1; 330 *dev->dma_mask = SZ_64M - 1;
326 dev->coherent_dma_mask = SZ_64M - 1; 331 dev->coherent_dma_mask = SZ_64M - 1;
327 dmabounce_register_dev(dev, 2048, 4096); 332 dmabounce_register_dev(dev, 2048, 4096, ixp4xx_needs_bounce);
328 } 333 }
329 return 0; 334 return 0;
330} 335}
@@ -337,11 +342,6 @@ static int ixp4xx_pci_platform_notify_remove(struct device *dev)
337 return 0; 342 return 0;
338} 343}
339 344
340int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
341{
342 return (dev->bus == &pci_bus_type ) && ((dma_addr + size) >= SZ_64M);
343}
344
345void __init ixp4xx_pci_preinit(void) 345void __init ixp4xx_pci_preinit(void)
346{ 346{
347 unsigned long cpuid = read_cpuid_id(); 347 unsigned long cpuid = read_cpuid_id();