diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-07 13:45:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-07 13:45:22 -0500 |
commit | 8995b161eb142b843094dd614b80e4cce1d66352 (patch) | |
tree | ffd9988879441d5ec45ab96b2e06f4fcb1210158 /arch/arm/mach-ixp4xx/common-pci.c | |
parent | cc918c7ab7da017bfaf9661420bb5c462e057cfb (diff) | |
parent | fe5dd7c73d328b255286b6b65ca19dd34447f709 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Diffstat (limited to 'arch/arm/mach-ixp4xx/common-pci.c')
-rw-r--r-- | arch/arm/mach-ixp4xx/common-pci.c | 23 |
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 | */ | ||
350 | void __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 | |||
344 | void __init ixp4xx_pci_preinit(void) | 367 | void __init ixp4xx_pci_preinit(void) |
345 | { | 368 | { |
346 | unsigned long processor_id; | 369 | unsigned long processor_id; |