aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/dma.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-12-08 10:58:50 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-12-08 10:58:50 -0500
commit1df8130278c4543555fea697e5714fbac300b899 (patch)
treecf9ed1b4b76fcdaa9d61ff3dea2e9cbd6396a9e1 /arch/arm/include/asm/dma.h
parentf40b121d983dfc53bde882aadec7f2f0bbcbd1c2 (diff)
[ARM] dma: remove dmach_t typedef
Remove a pointless integer typedef. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/dma.h')
-rw-r--r--arch/arm/include/asm/dma.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
index df5638f3643a..c5557a650d1d 100644
--- a/arch/arm/include/asm/dma.h
+++ b/arch/arm/include/asm/dma.h
@@ -19,8 +19,6 @@
19#include <asm/system.h> 19#include <asm/system.h>
20#include <asm/scatterlist.h> 20#include <asm/scatterlist.h>
21 21
22typedef unsigned int dmach_t;
23
24#include <mach/isa-dma.h> 22#include <mach/isa-dma.h>
25 23
26/* 24/*
@@ -52,44 +50,44 @@ static inline void release_dma_lock(unsigned long flags)
52/* Clear the 'DMA Pointer Flip Flop'. 50/* Clear the 'DMA Pointer Flip Flop'.
53 * Write 0 for LSB/MSB, 1 for MSB/LSB access. 51 * Write 0 for LSB/MSB, 1 for MSB/LSB access.
54 */ 52 */
55#define clear_dma_ff(channel) 53#define clear_dma_ff(chan)
56 54
57/* Set only the page register bits of the transfer address. 55/* Set only the page register bits of the transfer address.
58 * 56 *
59 * NOTE: This is an architecture specific function, and should 57 * NOTE: This is an architecture specific function, and should
60 * be hidden from the drivers 58 * be hidden from the drivers
61 */ 59 */
62extern void set_dma_page(dmach_t channel, char pagenr); 60extern void set_dma_page(unsigned int chan, char pagenr);
63 61
64/* Request a DMA channel 62/* Request a DMA channel
65 * 63 *
66 * Some architectures may need to do allocate an interrupt 64 * Some architectures may need to do allocate an interrupt
67 */ 65 */
68extern int request_dma(dmach_t channel, const char * device_id); 66extern int request_dma(unsigned int chan, const char * device_id);
69 67
70/* Free a DMA channel 68/* Free a DMA channel
71 * 69 *
72 * Some architectures may need to do free an interrupt 70 * Some architectures may need to do free an interrupt
73 */ 71 */
74extern void free_dma(dmach_t channel); 72extern void free_dma(unsigned int chan);
75 73
76/* Enable DMA for this channel 74/* Enable DMA for this channel
77 * 75 *
78 * On some architectures, this may have other side effects like 76 * On some architectures, this may have other side effects like
79 * enabling an interrupt and setting the DMA registers. 77 * enabling an interrupt and setting the DMA registers.
80 */ 78 */
81extern void enable_dma(dmach_t channel); 79extern void enable_dma(unsigned int chan);
82 80
83/* Disable DMA for this channel 81/* Disable DMA for this channel
84 * 82 *
85 * On some architectures, this may have other side effects like 83 * On some architectures, this may have other side effects like
86 * disabling an interrupt or whatever. 84 * disabling an interrupt or whatever.
87 */ 85 */
88extern void disable_dma(dmach_t channel); 86extern void disable_dma(unsigned int chan);
89 87
90/* Test whether the specified channel has an active DMA transfer 88/* Test whether the specified channel has an active DMA transfer
91 */ 89 */
92extern int dma_channel_active(dmach_t channel); 90extern int dma_channel_active(unsigned int chan);
93 91
94/* Set the DMA scatter gather list for this channel 92/* Set the DMA scatter gather list for this channel
95 * 93 *
@@ -97,7 +95,7 @@ extern int dma_channel_active(dmach_t channel);
97 * especially since some DMA architectures don't update the 95 * especially since some DMA architectures don't update the
98 * DMA address immediately, but defer it to the enable_dma(). 96 * DMA address immediately, but defer it to the enable_dma().
99 */ 97 */
100extern void set_dma_sg(dmach_t channel, struct scatterlist *sg, int nr_sg); 98extern void set_dma_sg(unsigned int chan, struct scatterlist *sg, int nr_sg);
101 99
102/* Set the DMA address for this channel 100/* Set the DMA address for this channel
103 * 101 *
@@ -105,9 +103,9 @@ extern void set_dma_sg(dmach_t channel, struct scatterlist *sg, int nr_sg);
105 * especially since some DMA architectures don't update the 103 * especially since some DMA architectures don't update the
106 * DMA address immediately, but defer it to the enable_dma(). 104 * DMA address immediately, but defer it to the enable_dma().
107 */ 105 */
108extern void __set_dma_addr(dmach_t channel, void *addr); 106extern void __set_dma_addr(unsigned int chan, void *addr);
109#define set_dma_addr(channel, addr) \ 107#define set_dma_addr(chan, addr) \
110 __set_dma_addr(channel, bus_to_virt(addr)) 108 __set_dma_addr(chan, bus_to_virt(addr))
111 109
112/* Set the DMA byte count for this channel 110/* Set the DMA byte count for this channel
113 * 111 *
@@ -115,7 +113,7 @@ extern void __set_dma_addr(dmach_t channel, void *addr);
115 * especially since some DMA architectures don't update the 113 * especially since some DMA architectures don't update the
116 * DMA count immediately, but defer it to the enable_dma(). 114 * DMA count immediately, but defer it to the enable_dma().
117 */ 115 */
118extern void set_dma_count(dmach_t channel, unsigned long count); 116extern void set_dma_count(unsigned int chan, unsigned long count);
119 117
120/* Set the transfer direction for this channel 118/* Set the transfer direction for this channel
121 * 119 *
@@ -124,11 +122,11 @@ extern void set_dma_count(dmach_t channel, unsigned long count);
124 * DMA transfer direction immediately, but defer it to the 122 * DMA transfer direction immediately, but defer it to the
125 * enable_dma(). 123 * enable_dma().
126 */ 124 */
127extern void set_dma_mode(dmach_t channel, dmamode_t mode); 125extern void set_dma_mode(unsigned int chan, dmamode_t mode);
128 126
129/* Set the transfer speed for this channel 127/* Set the transfer speed for this channel
130 */ 128 */
131extern void set_dma_speed(dmach_t channel, int cycle_ns); 129extern void set_dma_speed(unsigned int chan, int cycle_ns);
132 130
133/* Get DMA residue count. After a DMA transfer, this 131/* Get DMA residue count. After a DMA transfer, this
134 * should return zero. Reading this while a DMA transfer is 132 * should return zero. Reading this while a DMA transfer is
@@ -136,7 +134,7 @@ extern void set_dma_speed(dmach_t channel, int cycle_ns);
136 * If called before the channel has been used, it may return 1. 134 * If called before the channel has been used, it may return 1.
137 * Otherwise, it returns the number of _bytes_ left to transfer. 135 * Otherwise, it returns the number of _bytes_ left to transfer.
138 */ 136 */
139extern int get_dma_residue(dmach_t channel); 137extern int get_dma_residue(unsigned int chan);
140 138
141#ifndef NO_DMA 139#ifndef NO_DMA
142#define NO_DMA 255 140#define NO_DMA 255