]> err.no Git - linux-2.6/blobdiff - include/asm-sh/dma.h
Merge ../scsi-misc-2.6
[linux-2.6] / include / asm-sh / dma.h
index 8e9436093ca826adb2bf7db5df254d8413c0f7cc..e62a6d0ed932cec3631ee42e1d3e51331d09ae23 100644 (file)
 #define __ASM_SH_DMA_H
 #ifdef __KERNEL__
 
-#include <linux/config.h>
 #include <linux/spinlock.h>
 #include <linux/wait.h>
 #include <linux/sysdev.h>
+#include <linux/device.h>
 #include <asm/cpu/dma.h>
 #include <asm/semaphore.h>
 
@@ -54,8 +54,8 @@ enum {
  * DMA channel capabilities / flags
  */
 enum {
-       DMA_CONFIGURED                  = 0x00,
        DMA_TEI_CAPABLE                 = 0x01,
+       DMA_CONFIGURED                  = 0x02,
 };
 
 extern spinlock_t dma_spin_lock;
@@ -74,7 +74,8 @@ struct dma_ops {
 struct dma_channel {
        char dev_id[16];
 
-       unsigned int chan;
+       unsigned int chan;              /* Physical channel number */
+       unsigned int vchan;             /* Virtual channel number */
        unsigned int mode;
        unsigned int count;
 
@@ -91,6 +92,8 @@ struct dma_channel {
 };
 
 struct dma_info {
+       struct platform_device *pdev;
+
        const char *name;
        unsigned int nr_channels;
        unsigned long flags;
@@ -130,7 +133,11 @@ extern void unregister_dmac(struct dma_info *info);
 
 #ifdef CONFIG_SYSFS
 /* arch/sh/drivers/dma/dma-sysfs.c */
-extern int dma_create_sysfs_files(struct dma_channel *);
+extern int dma_create_sysfs_files(struct dma_channel *, struct dma_info *);
+extern void dma_remove_sysfs_files(struct dma_channel *, struct dma_info *);
+#else
+#define dma_create_sysfs_file(channel, info)           do { } while (0)
+#define dma_remove_sysfs_file(channel, info)           do { } while (0)
 #endif
 
 #ifdef CONFIG_PCI