diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:29:02 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:29:02 -0400 |
commit | 1f27adc2f050836c12deb4d99afe507636537a0b (patch) | |
tree | aeb0b1a0896dd1367174a46d29c7ebc18187a4f9 /drivers/dma/ioat/dma.h | |
parent | 584ec22759c06cdfc189c03a727f20038526245b (diff) |
ioat: move definitions to dma.h
Some of these defines may be useful outside of dma.c and the header is
private so there are no namespace pollution concerns.
Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/ioat/dma.h')
-rw-r--r-- | drivers/dma/ioat/dma.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h index e80e787fe64f..ccb400f5e279 100644 --- a/drivers/dma/ioat/dma.h +++ b/drivers/dma/ioat/dma.h | |||
@@ -43,6 +43,22 @@ enum ioat_interrupt { | |||
43 | #define IOAT_DMA_DCA_ANY_CPU ~0 | 43 | #define IOAT_DMA_DCA_ANY_CPU ~0 |
44 | #define IOAT_WATCHDOG_PERIOD (2 * HZ) | 44 | #define IOAT_WATCHDOG_PERIOD (2 * HZ) |
45 | 45 | ||
46 | #define to_ioat_chan(chan) container_of(chan, struct ioat_dma_chan, common) | ||
47 | #define to_ioatdma_device(dev) container_of(dev, struct ioatdma_device, common) | ||
48 | #define to_ioat_desc(lh) container_of(lh, struct ioat_desc_sw, node) | ||
49 | #define tx_to_ioat_desc(tx) container_of(tx, struct ioat_desc_sw, async_tx) | ||
50 | |||
51 | #define chan_num(ch) ((int)((ch)->reg_base - (ch)->device->reg_base) / 0x80) | ||
52 | |||
53 | #define RESET_DELAY msecs_to_jiffies(100) | ||
54 | #define WATCHDOG_DELAY round_jiffies(msecs_to_jiffies(2000)) | ||
55 | |||
56 | /* | ||
57 | * workaround for IOAT ver.3.0 null descriptor issue | ||
58 | * (channel returns error when size is 0) | ||
59 | */ | ||
60 | #define NULL_DESC_BUFFER_SIZE 1 | ||
61 | |||
46 | 62 | ||
47 | /** | 63 | /** |
48 | * struct ioatdma_device - internal representation of a IOAT device | 64 | * struct ioatdma_device - internal representation of a IOAT device |