|
From: Steve L. <slo...@us...> - 2001-08-23 17:10:46
|
Update of /cvsroot/linux-mips/linux/include/asm-mips
In directory usw-pr-cvs1:/tmp/cvs-serv24086/include/asm-mips
Modified Files:
au1000_dma.h
Log Message:
Renamed the Au1000 dma functions to not collide with kernel/dma.c.
Also, /proc/dma will show the output from kernel/dma.c:get_dma_list(),
not the Au1000 dma list. To fix requires a change to fs/proc/proc_misc.c.
Index: au1000_dma.h
===================================================================
RCS file: /cvsroot/linux-mips/linux/include/asm-mips/au1000_dma.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** au1000_dma.h 2001/08/17 22:53:26 1.1
--- au1000_dma.h 2001/08/23 17:10:44 1.2
***************
*** 40,44 ****
#include <asm/system.h>
! #define MAX_AU1000_DMA_CHANNELS 8
/* DMA Channel Base Addresses */
--- 40,44 ----
#include <asm/system.h>
! #define NUM_AU1000_DMA_CHANNELS 8
/* DMA Channel Base Addresses */
***************
*** 113,127 ****
/* These are in arch/mips/au1000/common/dma.c */
! extern int request_dma(int dev_id, const char * dev_str); // reserve a channel
! extern void free_dma(unsigned int dmanr); // release a channel
! extern void dump_dma_channel(unsigned int dmanr); // dump DMA channel registers
! extern struct dma_chan * get_dma_chan (unsigned int dmanr);
! extern spinlock_t dma_spin_lock;
static __inline__ unsigned long claim_dma_lock(void)
{
unsigned long flags;
! spin_lock_irqsave(&dma_spin_lock, flags);
return flags;
}
--- 113,137 ----
/* These are in arch/mips/au1000/common/dma.c */
! extern struct dma_chan au1000_dma_table[];
! extern int request_au1000_dma(int dev_id, const char * dev_str);
! extern void free_au1000_dma(unsigned int dmanr);
! extern int au1000_dma_read_proc (char *buf, char **start, off_t fpos,
! int length, int *eof, void *data);
! extern void dump_au1000_dma_channel(unsigned int dmanr);
! extern spinlock_t au1000_dma_spin_lock;
+ static __inline__ struct dma_chan *
+ get_dma_chan (unsigned int dmanr)
+ {
+ if (dmanr > NUM_AU1000_DMA_CHANNELS || au1000_dma_table[dmanr].dev_id < 0)
+ return NULL;
+ return &au1000_dma_table[dmanr];
+ }
+
static __inline__ unsigned long claim_dma_lock(void)
{
unsigned long flags;
! spin_lock_irqsave(&au1000_dma_spin_lock, flags);
return flags;
}
***************
*** 129,133 ****
static __inline__ void release_dma_lock(unsigned long flags)
{
! spin_unlock_irqrestore(&dma_spin_lock, flags);
}
--- 139,143 ----
static __inline__ void release_dma_lock(unsigned long flags)
{
! spin_unlock_irqrestore(&au1000_dma_spin_lock, flags);
}
|