aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/dma.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-01-17 01:14:09 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-17 02:15:27 -0500
commit0d831770b154a057562236e8cf50905c8f1ae1b0 (patch)
treedc25902b29b09838f2fe32e47be53c951a2fa67e /include/asm-sh/dma.h
parent0025835cf20e07056b8521b8c1d7d0bfe07e81f1 (diff)
[PATCH] sh: DMA updates
This extends the current SH DMA API somewhat to support a proper virtual channel abstraction, and also works to represent this through the driver model by giving each DMAC its own platform device. There's also a few other minor changes to support a few new CPU subtypes, and make TEI generation for the SH DMAC configurable. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-sh/dma.h')
-rw-r--r--include/asm-sh/dma.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/asm-sh/dma.h b/include/asm-sh/dma.h
index 8e9436093ca..a118a0d4305 100644
--- a/include/asm-sh/dma.h
+++ b/include/asm-sh/dma.h
@@ -15,6 +15,7 @@
15#include <linux/spinlock.h> 15#include <linux/spinlock.h>
16#include <linux/wait.h> 16#include <linux/wait.h>
17#include <linux/sysdev.h> 17#include <linux/sysdev.h>
18#include <linux/device.h>
18#include <asm/cpu/dma.h> 19#include <asm/cpu/dma.h>
19#include <asm/semaphore.h> 20#include <asm/semaphore.h>
20 21
@@ -54,8 +55,8 @@ enum {
54 * DMA channel capabilities / flags 55 * DMA channel capabilities / flags
55 */ 56 */
56enum { 57enum {
57 DMA_CONFIGURED = 0x00,
58 DMA_TEI_CAPABLE = 0x01, 58 DMA_TEI_CAPABLE = 0x01,
59 DMA_CONFIGURED = 0x02,
59}; 60};
60 61
61extern spinlock_t dma_spin_lock; 62extern spinlock_t dma_spin_lock;
@@ -74,7 +75,8 @@ struct dma_ops {
74struct dma_channel { 75struct dma_channel {
75 char dev_id[16]; 76 char dev_id[16];
76 77
77 unsigned int chan; 78 unsigned int chan; /* Physical channel number */
79 unsigned int vchan; /* Virtual channel number */
78 unsigned int mode; 80 unsigned int mode;
79 unsigned int count; 81 unsigned int count;
80 82
@@ -91,6 +93,8 @@ struct dma_channel {
91}; 93};
92 94
93struct dma_info { 95struct dma_info {
96 struct platform_device *pdev;
97
94 const char *name; 98 const char *name;
95 unsigned int nr_channels; 99 unsigned int nr_channels;
96 unsigned long flags; 100 unsigned long flags;
@@ -130,7 +134,11 @@ extern void unregister_dmac(struct dma_info *info);
130 134
131#ifdef CONFIG_SYSFS 135#ifdef CONFIG_SYSFS
132/* arch/sh/drivers/dma/dma-sysfs.c */ 136/* arch/sh/drivers/dma/dma-sysfs.c */
133extern int dma_create_sysfs_files(struct dma_channel *); 137extern int dma_create_sysfs_files(struct dma_channel *, struct dma_info *);
138extern void dma_remove_sysfs_files(struct dma_channel *, struct dma_info *);
139#else
140#define dma_create_sysfs_file(channel, info) do { } while (0)
141#define dma_remove_sysfs_file(channel, info) do { } while (0)
134#endif 142#endif
135 143
136#ifdef CONFIG_PCI 144#ifdef CONFIG_PCI