diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
commit | 78c388aed2b7184182c08428db1de6c872d815f5 (patch) | |
tree | 4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /include/asm-ppc/dma.h | |
parent | eb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff) |
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'include/asm-ppc/dma.h')
-rw-r--r-- | include/asm-ppc/dma.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asm-ppc/dma.h b/include/asm-ppc/dma.h index bd55a65da..8560c7d88 100644 --- a/include/asm-ppc/dma.h +++ b/include/asm-ppc/dma.h @@ -8,6 +8,8 @@ #include <linux/config.h> #include <asm/io.h> +#include <asm/spinlock.h> +#include <asm/system.h> /* * Note: Adapted for PowerPC by Gary Thomas @@ -203,6 +205,20 @@ extern long ppc_cs4232_dma, ppc_cs4232_dma2; #define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */ +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; +} + +static __inline__ void release_dma_lock(unsigned long flags) +{ + spin_unlock_irqrestore(&dma_spin_lock, flags); +} + /* enable/disable a specific DMA channel */ static __inline__ void enable_dma(unsigned int dmanr) { |