]> err.no Git - linux-2.6/blobdiff - include/asm-arm/plat-s3c24xx/dma.h
Merge branch 'for-2.6.25' of git://git.kernel.dk/linux-2.6-block
[linux-2.6] / include / asm-arm / plat-s3c24xx / dma.h
index 421b567fa0195642584a606b19a8e15cc653b380..c78efe316fc80ad351ed2f8e9bd07350ec133adc 100644 (file)
@@ -14,6 +14,7 @@ extern struct sysdev_class dma_sysclass;
 extern struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS];
 
 #define DMA_CH_VALID           (1<<31)
+#define DMA_CH_NEVER           (1<<30)
 
 struct s3c24xx_dma_addr {
        unsigned long           from;
@@ -31,6 +32,7 @@ struct s3c24xx_dma_map {
        struct s3c24xx_dma_addr  hw_addr;
 
        unsigned long            channels[S3C2410_DMA_CHANNELS];
+       unsigned long            channels_rx[S3C2410_DMA_CHANNELS];
 };
 
 struct s3c24xx_dma_selection {
@@ -40,6 +42,41 @@ struct s3c24xx_dma_selection {
 
        void    (*select)(struct s3c2410_dma_chan *chan,
                          struct s3c24xx_dma_map *map);
+
+       void    (*direction)(struct s3c2410_dma_chan *chan,
+                            struct s3c24xx_dma_map *map,
+                            enum s3c2410_dmasrc dir);
 };
 
 extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel);
+
+/* struct s3c24xx_dma_order_ch
+ *
+ * channel map for one of the `enum dma_ch` dma channels. the list
+ * entry contains a set of low-level channel numbers, orred with
+ * DMA_CH_VALID, which are checked in the order in the array.
+*/
+
+struct s3c24xx_dma_order_ch {
+       unsigned int    list[S3C2410_DMA_CHANNELS];     /* list of channels */
+       unsigned int    flags;                          /* flags */
+};
+
+/* struct s3c24xx_dma_order
+ *
+ * information provided by either the core or the board to give the
+ * dma system a hint on how to allocate channels
+*/
+
+struct s3c24xx_dma_order {
+       struct s3c24xx_dma_order_ch     channels[DMACH_MAX];
+};
+
+extern int s3c24xx_dma_order_set(struct s3c24xx_dma_order *map);
+
+/* DMA init code, called from the cpu support code */
+
+extern int s3c2410_dma_init(void);
+
+extern int s3c24xx_dma_init(unsigned int channels, unsigned int irq,
+                           unsigned int stride);