summaryrefslogtreecommitdiffstats
path: root/include/asm-alpha/dma.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
commit78c388aed2b7184182c08428db1de6c872d815f5 (patch)
tree4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /include/asm-alpha/dma.h
parenteb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff)
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'include/asm-alpha/dma.h')
-rw-r--r--include/asm-alpha/dma.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asm-alpha/dma.h b/include/asm-alpha/dma.h
index 2f14838dd..f16bdc6de 100644
--- a/include/asm-alpha/dma.h
+++ b/include/asm-alpha/dma.h
@@ -20,6 +20,7 @@
#include <linux/config.h>
#include <asm/io.h>
+#include <asm/spinlock.h>
#define dma_outb outb
#define dma_inb inb
@@ -172,6 +173,20 @@
#define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */
#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)
{