2 * include/asm-arm/arch-ixp4xx/dma.h
4 * Copyright (C) 2001-2004 MontaVista Software, Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 #ifndef __ASM_ARCH_DMA_H
12 #define __ASM_ARCH_DMA_H
14 #include <linux/config.h>
15 #include <linux/device.h>
16 #include <linux/pci.h>
18 #include <asm/sizes.h>
19 #include <asm/hardware.h>
21 #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M)
24 #define MAX_DMA_CHANNELS 0
27 * Only first 64MB of memory can be accessed via PCI.
28 * We use GFP_DMA to allocate safe buffers to do map/unmap.
29 * This is really ugly and we need a better way of specifying
30 * DMA-capable regions of memory.
32 static inline void __arch_adjust_zones(int node, unsigned long *zone_size,
33 unsigned long *zhole_size)
35 unsigned int sz = SZ_64M >> PAGE_SHIFT;
38 * Only adjust if > 64M on current system
40 if (node || (zone_size[0] <= sz))
43 zone_size[1] = zone_size[0] - sz;
45 zhole_size[1] = zhole_size[0];
49 #define arch_adjust_zones(node, size, holes) \
50 __arch_adjust_zones(node, size, holes)
52 #endif /* _ASM_ARCH_DMA_H */