aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ioatdma.h
diff options
context:
space:
mode:
authorShannon Nelson <shannon.nelson@intel.com>2007-10-16 04:27:39 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:09 -0400
commit8ab89567da0cea9bae2c1b5dad47b51c424479e4 (patch)
tree95ac8bc77b2e8d9f1dec97f6fd7128760e27561f /drivers/dma/ioatdma.h
parent43d6e369d43ff175e1e0e80caaedb1e53829247c (diff)
I/OAT: Split PCI startup from DMA handling code
Split the general PCI startup from the DMA handling code in order to prepare for adding support for DCA services and future versions of the ioatdma device. [Rusty Russell] Removal of __unsafe() usage. Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/dma/ioatdma.h')
-rw-r--r--drivers/dma/ioatdma.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/dma/ioatdma.h b/drivers/dma/ioatdma.h
index bf4dad70e0f5..0b8ffbde1e61 100644
--- a/drivers/dma/ioatdma.h
+++ b/drivers/dma/ioatdma.h
@@ -31,22 +31,21 @@
31#define IOAT_LOW_COMPLETION_MASK 0xffffffc0 31#define IOAT_LOW_COMPLETION_MASK 0xffffffc0
32 32
33/** 33/**
34 * struct ioat_device - internal representation of a IOAT device 34 * struct ioatdma_device - internal representation of a IOAT device
35 * @pdev: PCI-Express device 35 * @pdev: PCI-Express device
36 * @reg_base: MMIO register space base address 36 * @reg_base: MMIO register space base address
37 * @dma_pool: for allocating DMA descriptors 37 * @dma_pool: for allocating DMA descriptors
38 * @common: embedded struct dma_device 38 * @common: embedded struct dma_device
39 * @msi: Message Signaled Interrupt number 39 * @version: version of ioatdma device
40 */ 40 */
41 41
42struct ioat_device { 42struct ioatdma_device {
43 struct pci_dev *pdev; 43 struct pci_dev *pdev;
44 void __iomem *reg_base; 44 void __iomem *reg_base;
45 struct pci_pool *dma_pool; 45 struct pci_pool *dma_pool;
46 struct pci_pool *completion_pool; 46 struct pci_pool *completion_pool;
47
48 struct dma_device common; 47 struct dma_device common;
49 u8 msi; 48 u8 version;
50}; 49};
51 50
52/** 51/**
@@ -84,7 +83,7 @@ struct ioat_dma_chan {
84 83
85 int pending; 84 int pending;
86 85
87 struct ioat_device *device; 86 struct ioatdma_device *device;
88 struct dma_chan common; 87 struct dma_chan common;
89 88
90 dma_addr_t completion_addr; 89 dma_addr_t completion_addr;
@@ -117,4 +116,13 @@ struct ioat_desc_sw {
117 struct dma_async_tx_descriptor async_tx; 116 struct dma_async_tx_descriptor async_tx;
118}; 117};
119 118
119#if defined(CONFIG_INTEL_IOATDMA) || defined(CONFIG_INTEL_IOATDMA_MODULE)
120struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev,
121 void __iomem *iobase);
122void ioat_dma_remove(struct ioatdma_device *device);
123#else
124#define ioat_dma_probe(pdev, iobase) NULL
125#define ioat_dma_remove(device) do { } while (0)
126#endif
127
120#endif /* IOATDMA_H */ 128#endif /* IOATDMA_H */