patch-2.1.132 linux/include/asm-arm/dma.h
Next file: linux/include/asm-arm/ecard.h
Previous file: linux/include/asm-arm/dec21285.h
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Thu Dec 17 09:05:43 1998
- Orig file:
v2.1.131/linux/include/asm-arm/dma.h
- Orig date:
Tue Apr 14 14:29:25 1998
diff -u --recursive --new-file v2.1.131/linux/include/asm-arm/dma.h linux/include/asm-arm/dma.h
@@ -4,6 +4,7 @@
typedef unsigned int dmach_t;
#include <asm/irq.h>
+#include <asm/spinlock.h>
#include <asm/arch/dma.h>
typedef struct {
@@ -13,6 +14,20 @@
extern const char dma_str[];
+extern spinlock_t dma_spin_lock;
+
+extern __inline__ unsigned long claim_dma_lock(void)
+{
+ unsigned long flags;
+ spin_lock_irqsave(&dma_spin_lock, flags);
+ return flags;
+}
+
+extern __inline__ void release_dma_lock(unsigned long flags)
+{
+ spin_unlock_irqrestore(&dma_spin_lock, flags);
+}
+
/* Clear the 'DMA Pointer Flip Flop'.
* Write 0 for LSB/MSB, 1 for MSB/LSB access.
*
@@ -26,7 +41,7 @@
* NOTE: This is an architecture specific function, and should
* be hidden from the drivers
*/
-static __inline__ void set_dma_page(dmach_t channel, char pagenr)
+extern __inline__ void set_dma_page(dmach_t channel, char pagenr)
{
printk(dma_str, "set_dma_page", channel);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov