|
@@ -49,3 +49,75 @@
|
|
#ifdef CONFIG_BF60x
|
|
#ifdef CONFIG_BF60x
|
|
#define INTR_ON_PERI 1
|
|
#define INTR_ON_PERI 1
|
|
#endif
|
|
#endif
|
|
|
|
+#define INTR_ON_BUF 2
|
|
|
|
+#define INTR_ON_ROW 3
|
|
|
|
+
|
|
|
|
+#define DMA_NOSYNC_KEEP_DMA_BUF 0
|
|
|
|
+#define DMA_SYNC_RESTART 1
|
|
|
|
+
|
|
|
|
+#ifdef DMA_MMR_SIZE_32
|
|
|
|
+#define DMA_MMR_SIZE_TYPE long
|
|
|
|
+#define DMA_MMR_READ bfin_read32
|
|
|
|
+#define DMA_MMR_WRITE bfin_write32
|
|
|
|
+#else
|
|
|
|
+#define DMA_MMR_SIZE_TYPE short
|
|
|
|
+#define DMA_MMR_READ bfin_read16
|
|
|
|
+#define DMA_MMR_WRITE bfin_write16
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+struct dma_desc_array {
|
|
|
|
+ unsigned long start_addr;
|
|
|
|
+ unsigned DMA_MMR_SIZE_TYPE cfg;
|
|
|
|
+ unsigned DMA_MMR_SIZE_TYPE x_count;
|
|
|
|
+ DMA_MMR_SIZE_TYPE x_modify;
|
|
|
|
+} __attribute__((packed));
|
|
|
|
+
|
|
|
|
+struct dmasg {
|
|
|
|
+ void *next_desc_addr;
|
|
|
|
+ unsigned long start_addr;
|
|
|
|
+ unsigned DMA_MMR_SIZE_TYPE cfg;
|
|
|
|
+ unsigned DMA_MMR_SIZE_TYPE x_count;
|
|
|
|
+ DMA_MMR_SIZE_TYPE x_modify;
|
|
|
|
+ unsigned DMA_MMR_SIZE_TYPE y_count;
|
|
|
|
+ DMA_MMR_SIZE_TYPE y_modify;
|
|
|
|
+} __attribute__((packed));
|
|
|
|
+
|
|
|
|
+struct dma_register {
|
|
|
|
+ void *next_desc_ptr; /* DMA Next Descriptor Pointer register */
|
|
|
|
+ unsigned long start_addr; /* DMA Start address register */
|
|
|
|
+#ifdef CONFIG_BF60x
|
|
|
|
+ unsigned long cfg; /* DMA Configuration register */
|
|
|
|
+
|
|
|
|
+ unsigned long x_count; /* DMA x_count register */
|
|
|
|
+
|
|
|
|
+ long x_modify; /* DMA x_modify register */
|
|
|
|
+
|
|
|
|
+ unsigned long y_count; /* DMA y_count register */
|
|
|
|
+
|
|
|
|
+ long y_modify; /* DMA y_modify register */
|
|
|
|
+
|
|
|
|
+ unsigned long reserved;
|
|
|
|
+ unsigned long reserved2;
|
|
|
|
+
|
|
|
|
+ void *curr_desc_ptr; /* DMA Current Descriptor Pointer
|
|
|
|
+ register */
|
|
|
|
+ void *prev_desc_ptr; /* DMA previous initial Descriptor Pointer
|
|
|
|
+ register */
|
|
|
|
+ unsigned long curr_addr_ptr; /* DMA Current Address Pointer
|
|
|
|
+ register */
|
|
|
|
+ unsigned long irq_status; /* DMA irq status register */
|
|
|
|
+
|
|
|
|
+ unsigned long curr_x_count; /* DMA Current x-count register */
|
|
|
|
+
|
|
|
|
+ unsigned long curr_y_count; /* DMA Current y-count register */
|
|
|
|
+
|
|
|
|
+ unsigned long reserved3;
|
|
|
|
+
|
|
|
|
+ unsigned long bw_limit_count; /* DMA band width limit count register */
|
|
|
|
+ unsigned long curr_bw_limit_count; /* DMA Current band width limit
|
|
|
|
+ count register */
|
|
|
|
+ unsigned long bw_monitor_count; /* DMA band width limit count register */
|
|
|
|
+ unsigned long curr_bw_monitor_count; /* DMA Current band width limit
|
|
|
|
+ count register */
|
|
|
|
+#else
|
|
|
|
+ unsigned short cfg; /* DMA Configuration register */
|