clean
[linux-2.4.21-pre4.git] / include / asm-ppc / dma.h
1 /*
2  * BK Id: SCCS/s.dma.h 1.15 06/06/02 21:50:42 mporter
3  */
4 /*
5  * linux/include/asm/dma.h: Defines for using and allocating dma channels.
6  * Written by Hennus Bergman, 1992.
7  * High DMA channel support & info by Hannu Savolainen
8  * and John Boyd, Nov. 1992.
9  * Changes for ppc sound by Christoph Nadig
10  *
11  * Moved most code (ISA-specific) to asm/ppc_isa_dma.h so that 4xx could have
12  * a common API - armin Feb, 02
13  */
14
15 #ifdef __KERNEL__
16
17 #include <linux/config.h>
18 #include <asm/io.h>
19
20 /*
21  * Note: Adapted for PowerPC by Gary Thomas
22  * Modified by Cort Dougan <cort@cs.nmt.edu>
23  *
24  * None of this really applies for Power Macintoshes.  There is
25  * basically just enough here to get kernel/dma.c to compile.
26  *
27  * There may be some comments or restrictions made here which are
28  * not valid for the PReP platform.  Take what you read
29  * with a grain of salt.
30  */
31
32
33 #ifndef _ASM_DMA_H
34 #define _ASM_DMA_H
35
36 /* The maximum address that we can perform a DMA transfer to on this platform */
37 /* Doesn't really apply... */
38 #define MAX_DMA_ADDRESS         0xFFFFFFFF
39
40 /* in arch/ppc/kernel/setup.c -- Cort */
41 extern unsigned long DMA_MODE_WRITE, DMA_MODE_READ;
42 extern unsigned long ISA_DMA_THRESHOLD;
43
44 #ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER
45 #define dma_outb        outb_p
46 #else
47 #define dma_outb        outb
48 #endif
49
50 #define dma_inb         inb
51
52 #if defined(CONFIG_PPC4xx_DMA)
53 #include <asm/ppc4xx_dma.h>
54 #else
55 #include <asm/ppc_isa_dma.h>
56 #endif
57
58 #ifndef MAX_DMA_CHANNELS
59 #define MAX_DMA_CHANNELS        8
60 #endif
61 #ifdef CONFIG_PCI
62 extern int isa_dma_bridge_buggy;
63 #else
64 #define isa_dma_bridge_buggy    (0)
65 #endif
66
67
68 #endif /* _ASM_DMA_H */
69 #endif /* __KERNEL__ */