diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 00:00:07 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 00:00:07 -0400 |
| commit | dcded10f6dce10411b16134ce9cc87bfdf75c13f (patch) | |
| tree | da6d0face147072c9eadc8a01af4e49958769138 /include/linux/intel_mid_dma.h | |
| parent | 9e0ba741aabdf129d561e62d207c75146adef5e8 (diff) | |
| parent | b0ebeb9c09cb5b84bb2f33927c84c7648845fcec (diff) | |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (30 commits)
DMAENGINE: at_hdmac: locking fixlet
DMAENGINE: pch_dma: kill another usage of __raw_{read|write}l
dma: dmatest: fix potential sign bug
ioat2: catch and recover from broken vtd configurations v6
DMAENGINE: add runtime slave control to COH 901 318 v3
DMAENGINE: add runtime slave config to DMA40 v3
DMAENGINE: generic slave channel control v3
dmaengine: Driver for Topcliff PCH DMA controller
intel_mid: Add Mrst & Mfld DMA Drivers
drivers/dma: Eliminate a NULL pointer dereference
dma/timb_dma: compile warning on 32 bit
DMAENGINE: ste_dma40: support older silicon
DMAENGINE: ste_dma40: support disabling physical channels
DMAENGINE: ste_dma40: no disabled phy channels on ux500
DMAENGINE: ste_dma40: fix suspend bug
DMAENGINE: ste_dma40: add DB8500 memcpy channels
DMAENGINE: ste_dma40: no flow control on memcpy
DMAENGINE: ste_dma40: arch updates for LCLA and LCPA
DMAENGINE: ste_dma40: allocate LCLA dynamically
DMAENGINE: ste_dma40: no premature stop
...
Fix up trivial conflicts in arch/arm/mach-ux500/devices-db8500.c
Diffstat (limited to 'include/linux/intel_mid_dma.h')
| -rw-r--r-- | include/linux/intel_mid_dma.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/include/linux/intel_mid_dma.h b/include/linux/intel_mid_dma.h new file mode 100644 index 000000000000..d9d08b6269b6 --- /dev/null +++ b/include/linux/intel_mid_dma.h | |||
| @@ -0,0 +1,86 @@ | |||
| 1 | /* | ||
| 2 | * intel_mid_dma.h - Intel MID DMA Drivers | ||
| 3 | * | ||
| 4 | * Copyright (C) 2008-10 Intel Corp | ||
| 5 | * Author: Vinod Koul <vinod.koul@intel.com> | ||
| 6 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; version 2 of the License. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, but | ||
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License along | ||
| 18 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 19 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | ||
| 20 | * | ||
| 21 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 22 | * | ||
| 23 | * | ||
| 24 | */ | ||
| 25 | #ifndef __INTEL_MID_DMA_H__ | ||
| 26 | #define __INTEL_MID_DMA_H__ | ||
| 27 | |||
| 28 | #include <linux/dmaengine.h> | ||
| 29 | |||
| 30 | /*DMA transaction width, src and dstn width would be same | ||
| 31 | The DMA length must be width aligned, | ||
| 32 | for 32 bit width the length must be 32 bit (4bytes) aligned only*/ | ||
| 33 | enum intel_mid_dma_width { | ||
| 34 | LNW_DMA_WIDTH_8BIT = 0x0, | ||
| 35 | LNW_DMA_WIDTH_16BIT = 0x1, | ||
| 36 | LNW_DMA_WIDTH_32BIT = 0x2, | ||
| 37 | }; | ||
| 38 | |||
| 39 | /*DMA mode configurations*/ | ||
| 40 | enum intel_mid_dma_mode { | ||
| 41 | LNW_DMA_PER_TO_MEM = 0, /*periphral to memory configuration*/ | ||
| 42 | LNW_DMA_MEM_TO_PER, /*memory to periphral configuration*/ | ||
| 43 | LNW_DMA_MEM_TO_MEM, /*mem to mem confg (testing only)*/ | ||
| 44 | }; | ||
| 45 | |||
| 46 | /*DMA handshaking*/ | ||
| 47 | enum intel_mid_dma_hs_mode { | ||
| 48 | LNW_DMA_HW_HS = 0, /*HW Handshaking only*/ | ||
| 49 | LNW_DMA_SW_HS = 1, /*SW Handshaking not recommended*/ | ||
| 50 | }; | ||
| 51 | |||
| 52 | /*Burst size configuration*/ | ||
| 53 | enum intel_mid_dma_msize { | ||
| 54 | LNW_DMA_MSIZE_1 = 0x0, | ||
| 55 | LNW_DMA_MSIZE_4 = 0x1, | ||
| 56 | LNW_DMA_MSIZE_8 = 0x2, | ||
| 57 | LNW_DMA_MSIZE_16 = 0x3, | ||
| 58 | LNW_DMA_MSIZE_32 = 0x4, | ||
| 59 | LNW_DMA_MSIZE_64 = 0x5, | ||
| 60 | }; | ||
| 61 | |||
| 62 | /** | ||
| 63 | * struct intel_mid_dma_slave - DMA slave structure | ||
| 64 | * | ||
| 65 | * @dirn: DMA trf direction | ||
| 66 | * @src_width: tx register width | ||
| 67 | * @dst_width: rx register width | ||
| 68 | * @hs_mode: HW/SW handshaking mode | ||
| 69 | * @cfg_mode: DMA data transfer mode (per-per/mem-per/mem-mem) | ||
| 70 | * @src_msize: Source DMA burst size | ||
| 71 | * @dst_msize: Dst DMA burst size | ||
| 72 | * @device_instance: DMA peripheral device instance, we can have multiple | ||
| 73 | * peripheral device connected to single DMAC | ||
| 74 | */ | ||
| 75 | struct intel_mid_dma_slave { | ||
| 76 | enum dma_data_direction dirn; | ||
| 77 | enum intel_mid_dma_width src_width; /*width of DMA src txn*/ | ||
| 78 | enum intel_mid_dma_width dst_width; /*width of DMA dst txn*/ | ||
| 79 | enum intel_mid_dma_hs_mode hs_mode; /*handshaking*/ | ||
| 80 | enum intel_mid_dma_mode cfg_mode; /*mode configuration*/ | ||
| 81 | enum intel_mid_dma_msize src_msize; /*size if src burst*/ | ||
| 82 | enum intel_mid_dma_msize dst_msize; /*size of dst burst*/ | ||
| 83 | unsigned int device_instance; /*0, 1 for periphral instance*/ | ||
| 84 | }; | ||
| 85 | |||
| 86 | #endif /*__INTEL_MID_DMA_H__*/ | ||
