This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / include / asm-arm / arch-ixp4xx / dma.h
1 /*
2  * include/asm-arm/arch-ixp4xx/dma.h
3  *
4  * Copyright (C) 2001-2004 MontaVista Software, Inc.
5  *
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.
9  *
10  */
11 #ifndef __ASM_ARCH_DMA_H
12 #define __ASM_ARCH_DMA_H
13
14 #include <linux/config.h>
15 #include <linux/device.h>
16 #include <linux/pci.h>
17 #include <asm/page.h>
18 #include <asm/sizes.h>
19 #include <asm/hardware.h>
20
21 #define MAX_DMA_ADDRESS         (PAGE_OFFSET + SZ_64M)
22
23 /* No DMA */
24 #define MAX_DMA_CHANNELS        0
25
26 /*
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.
31  */
32 static inline void __arch_adjust_zones(int node, unsigned long *zone_size, 
33         unsigned long *zhole_size) 
34 {
35         unsigned int sz = SZ_64M >> PAGE_SHIFT;
36
37         /*
38          * Only adjust if > 64M on current system
39          */
40         if (node || (zone_size[0] <= sz))
41                 return;
42
43         zone_size[1] = zone_size[0] - sz;
44         zone_size[0] = sz;
45         zhole_size[1] = zhole_size[0];
46         zhole_size[0] = 0;
47 }
48
49 #define arch_adjust_zones(node, size, holes) \
50         __arch_adjust_zones(node, size, holes)
51
52 #endif /* _ASM_ARCH_DMA_H */