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.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index 9795da270e3a..6e3462ed5306 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -341,6 +341,29 @@ int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
341 return (dev->bus == &pci_bus_type ) && ((dma_addr + size) >= SZ_64M); 341 return (dev->bus == &pci_bus_type ) && ((dma_addr + size) >= SZ_64M);
342} 342}
343 343
344/*
345 * Only first 64MB of memory can be accessed via PCI.
346 * We use GFP_DMA to allocate safe buffers to do map/unmap.
347 * This is really ugly and we need a better way of specifying
348 * DMA-capable regions of memory.
349 */
350void __init ixp4xx_adjust_zones(int node, unsigned long *zone_size,
351 unsigned long *zhole_size)
352{
353 unsigned int sz = SZ_64M >> PAGE_SHIFT;
354
355 /*
356 * Only adjust if > 64M on current system
357 */
358 if (node || (zone_size[0] <= sz))
359 return;
360
361 zone_size[1] = zone_size[0] - sz;
362 zone_size[0] = sz;
363 zhole_size[1] = zhole_size[0];
364 zhole_size[0] = 0;
365}
366
344void __init ixp4xx_pci_preinit(void) 367void __init ixp4xx_pci_preinit(void)
345{ 368{
346 unsigned long processor_id; 369 unsigned long processor_id;