1919#include <asm/system.h>
2020#include <asm/scatterlist.h>
2121
22- typedef unsigned int dmach_t ;
23-
2422#include <mach/isa-dma.h>
2523
2624/*
@@ -52,70 +50,70 @@ static inline void release_dma_lock(unsigned long flags)
5250/* Clear the 'DMA Pointer Flip Flop'.
5351 * Write 0 for LSB/MSB, 1 for MSB/LSB access.
5452 */
55- #define clear_dma_ff (channel )
53+ #define clear_dma_ff (chan )
5654
5755/* Set only the page register bits of the transfer address.
5856 *
5957 * NOTE: This is an architecture specific function, and should
6058 * be hidden from the drivers
6159 */
62- extern void set_dma_page (dmach_t channel , char pagenr );
60+ extern void set_dma_page (unsigned int chan , char pagenr );
6361
6462/* Request a DMA channel
6563 *
6664 * Some architectures may need to do allocate an interrupt
6765 */
68- extern int request_dma (dmach_t channel , const char * device_id );
66+ extern int request_dma (unsigned int chan , const char * device_id );
6967
7068/* Free a DMA channel
7169 *
7270 * Some architectures may need to do free an interrupt
7371 */
74- extern void free_dma (dmach_t channel );
72+ extern void free_dma (unsigned int chan );
7573
7674/* Enable DMA for this channel
7775 *
7876 * On some architectures, this may have other side effects like
7977 * enabling an interrupt and setting the DMA registers.
8078 */
81- extern void enable_dma (dmach_t channel );
79+ extern void enable_dma (unsigned int chan );
8280
8381/* Disable DMA for this channel
8482 *
8583 * On some architectures, this may have other side effects like
8684 * disabling an interrupt or whatever.
8785 */
88- extern void disable_dma (dmach_t channel );
86+ extern void disable_dma (unsigned int chan );
8987
9088/* Test whether the specified channel has an active DMA transfer
9189 */
92- extern int dma_channel_active (dmach_t channel );
90+ extern int dma_channel_active (unsigned int chan );
9391
9492/* Set the DMA scatter gather list for this channel
9593 *
9694 * This should not be called if a DMA channel is enabled,
9795 * especially since some DMA architectures don't update the
9896 * DMA address immediately, but defer it to the enable_dma().
9997 */
100- extern void set_dma_sg (dmach_t channel , struct scatterlist * sg , int nr_sg );
98+ extern void set_dma_sg (unsigned int chan , struct scatterlist * sg , int nr_sg );
10199
102100/* Set the DMA address for this channel
103101 *
104102 * This should not be called if a DMA channel is enabled,
105103 * especially since some DMA architectures don't update the
106104 * DMA address immediately, but defer it to the enable_dma().
107105 */
108- extern void __set_dma_addr (dmach_t channel , void * addr );
109- #define set_dma_addr (channel , addr ) \
110- __set_dma_addr(channel , bus_to_virt(addr))
106+ extern void __set_dma_addr (unsigned int chan , void * addr );
107+ #define set_dma_addr (chan , addr ) \
108+ __set_dma_addr(chan , bus_to_virt(addr))
111109
112110/* Set the DMA byte count for this channel
113111 *
114112 * This should not be called if a DMA channel is enabled,
115113 * especially since some DMA architectures don't update the
116114 * DMA count immediately, but defer it to the enable_dma().
117115 */
118- extern void set_dma_count (dmach_t channel , unsigned long count );
116+ extern void set_dma_count (unsigned int chan , unsigned long count );
119117
120118/* Set the transfer direction for this channel
121119 *
@@ -124,19 +122,19 @@ extern void set_dma_count(dmach_t channel, unsigned long count);
124122 * DMA transfer direction immediately, but defer it to the
125123 * enable_dma().
126124 */
127- extern void set_dma_mode (dmach_t channel , dmamode_t mode );
125+ extern void set_dma_mode (unsigned int chan , dmamode_t mode );
128126
129127/* Set the transfer speed for this channel
130128 */
131- extern void set_dma_speed (dmach_t channel , int cycle_ns );
129+ extern void set_dma_speed (unsigned int chan , int cycle_ns );
132130
133131/* Get DMA residue count. After a DMA transfer, this
134132 * should return zero. Reading this while a DMA transfer is
135133 * still in progress will return unpredictable results.
136134 * If called before the channel has been used, it may return 1.
137135 * Otherwise, it returns the number of _bytes_ left to transfer.
138136 */
139- extern int get_dma_residue (dmach_t channel );
137+ extern int get_dma_residue (unsigned int chan );
140138
141139#ifndef NO_DMA
142140#define NO_DMA 255
0 commit comments