diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-10-20 13:20:21 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-12-15 00:14:59 -0500 |
commit | 00d2460454676344a55a03f03fa284ad69325592 (patch) | |
tree | 7885d8dcdeb1ffc026bc4888e1074ce7b8133c7a /arch/blackfin/include/asm/dma.h | |
parent | c6feb7682885f732a264ef589ee44edb1a3d45f2 (diff) |
Blackfin: unify DMA masks
Every Blackfin variant has the same DMA bit masks, so avoid duplicating
them over and over in each mach header.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/include/asm/dma.h')
-rw-r--r-- | arch/blackfin/include/asm/dma.h | 69 |
1 files changed, 49 insertions, 20 deletions
diff --git a/arch/blackfin/include/asm/dma.h b/arch/blackfin/include/asm/dma.h index e3c0dfa73d1b..5eb29502bbe4 100644 --- a/arch/blackfin/include/asm/dma.h +++ b/arch/blackfin/include/asm/dma.h | |||
@@ -16,36 +16,65 @@ | |||
16 | 16 | ||
17 | #define MAX_DMA_ADDRESS PAGE_OFFSET | 17 | #define MAX_DMA_ADDRESS PAGE_OFFSET |
18 | 18 | ||
19 | /***************************************************************************** | 19 | /* DMA_CONFIG Masks */ |
20 | * Generic DMA Declarations | 20 | #define DMAEN 0x0001 /* DMA Channel Enable */ |
21 | * | 21 | #define WNR 0x0002 /* Channel Direction (W/R*) */ |
22 | ****************************************************************************/ | 22 | #define WDSIZE_8 0x0000 /* Transfer Word Size = 8 */ |
23 | #define WDSIZE_16 0x0004 /* Transfer Word Size = 16 */ | ||
24 | #define WDSIZE_32 0x0008 /* Transfer Word Size = 32 */ | ||
25 | #define DMA2D 0x0010 /* DMA Mode (2D/1D*) */ | ||
26 | #define RESTART 0x0020 /* DMA Buffer Clear */ | ||
27 | #define DI_SEL 0x0040 /* Data Interrupt Timing Select */ | ||
28 | #define DI_EN 0x0080 /* Data Interrupt Enable */ | ||
29 | #define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */ | ||
30 | #define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */ | ||
31 | #define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */ | ||
32 | #define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */ | ||
33 | #define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */ | ||
34 | #define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */ | ||
35 | #define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */ | ||
36 | #define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */ | ||
37 | #define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */ | ||
38 | #define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */ | ||
39 | #define NDSIZE 0x0f00 /* Next Descriptor Size */ | ||
40 | #define DMAFLOW 0x7000 /* Flow Control */ | ||
41 | #define DMAFLOW_STOP 0x0000 /* Stop Mode */ | ||
42 | #define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */ | ||
43 | #define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */ | ||
44 | #define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */ | ||
45 | #define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */ | ||
46 | |||
47 | /* DMA_IRQ_STATUS Masks */ | ||
48 | #define DMA_DONE 0x0001 /* DMA Completion Interrupt Status */ | ||
49 | #define DMA_ERR 0x0002 /* DMA Error Interrupt Status */ | ||
50 | #define DFETCH 0x0004 /* DMA Descriptor Fetch Indicator */ | ||
51 | #define DMA_RUN 0x0008 /* DMA Channel Running Indicator */ | ||
23 | 52 | ||
24 | /*------------------------- | 53 | /*------------------------- |
25 | * config reg bits value | 54 | * config reg bits value |
26 | *-------------------------*/ | 55 | *-------------------------*/ |
27 | #define DATA_SIZE_8 0 | 56 | #define DATA_SIZE_8 0 |
28 | #define DATA_SIZE_16 1 | 57 | #define DATA_SIZE_16 1 |
29 | #define DATA_SIZE_32 2 | 58 | #define DATA_SIZE_32 2 |
30 | 59 | ||
31 | #define DMA_FLOW_STOP 0 | 60 | #define DMA_FLOW_STOP 0 |
32 | #define DMA_FLOW_AUTO 1 | 61 | #define DMA_FLOW_AUTO 1 |
33 | #define DMA_FLOW_ARRAY 4 | 62 | #define DMA_FLOW_ARRAY 4 |
34 | #define DMA_FLOW_SMALL 6 | 63 | #define DMA_FLOW_SMALL 6 |
35 | #define DMA_FLOW_LARGE 7 | 64 | #define DMA_FLOW_LARGE 7 |
36 | 65 | ||
37 | #define DIMENSION_LINEAR 0 | 66 | #define DIMENSION_LINEAR 0 |
38 | #define DIMENSION_2D 1 | 67 | #define DIMENSION_2D 1 |
39 | 68 | ||
40 | #define DIR_READ 0 | 69 | #define DIR_READ 0 |
41 | #define DIR_WRITE 1 | 70 | #define DIR_WRITE 1 |
42 | 71 | ||
43 | #define INTR_DISABLE 0 | 72 | #define INTR_DISABLE 0 |
44 | #define INTR_ON_BUF 2 | 73 | #define INTR_ON_BUF 2 |
45 | #define INTR_ON_ROW 3 | 74 | #define INTR_ON_ROW 3 |
46 | 75 | ||
47 | #define DMA_NOSYNC_KEEP_DMA_BUF 0 | 76 | #define DMA_NOSYNC_KEEP_DMA_BUF 0 |
48 | #define DMA_SYNC_RESTART 1 | 77 | #define DMA_SYNC_RESTART 1 |
49 | 78 | ||
50 | struct dmasg { | 79 | struct dmasg { |
51 | void *next_desc_addr; | 80 | void *next_desc_addr; |