summaryrefslogtreecommitdiff
path: root/drivers/dma/ioatdma.h
diff options
context:
space:
mode:
authorShannon Nelson <shannon.nelson@intel.com>2007-10-16 01:27:39 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 09:43:09 -0700
commit8ab89567da0cea9bae2c1b5dad47b51c424479e4 (patch)
tree95ac8bc77b2e8d9f1dec97f6fd7128760e27561f /drivers/dma/ioatdma.h
parent43d6e369d43ff175e1e0e80caaedb1e53829247c (diff)
downloadlwn-8ab89567da0cea9bae2c1b5dad47b51c424479e4.tar.gz
lwn-8ab89567da0cea9bae2c1b5dad47b51c424479e4.zip
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 @@
#define IOAT_LOW_COMPLETION_MASK 0xffffffc0
/**
- * struct ioat_device - internal representation of a IOAT device
+ * struct ioatdma_device - internal representation of a IOAT device
* @pdev: PCI-Express device
* @reg_base: MMIO register space base address
* @dma_pool: for allocating DMA descriptors
* @common: embedded struct dma_device
- * @msi: Message Signaled Interrupt number
+ * @version: version of ioatdma device
*/
-struct ioat_device {
+struct ioatdma_device {
struct pci_dev *pdev;
void __iomem *reg_base;
struct pci_pool *dma_pool;
struct pci_pool *completion_pool;
-
struct dma_device common;
- u8 msi;
+ u8 version;
};
/**
@@ -84,7 +83,7 @@ struct ioat_dma_chan {
int pending;
- struct ioat_device *device;
+ struct ioatdma_device *device;
struct dma_chan common;
dma_addr_t completion_addr;
@@ -117,4 +116,13 @@ struct ioat_desc_sw {
struct dma_async_tx_descriptor async_tx;
};
+#if defined(CONFIG_INTEL_IOATDMA) || defined(CONFIG_INTEL_IOATDMA_MODULE)
+struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev,
+ void __iomem *iobase);
+void ioat_dma_remove(struct ioatdma_device *device);
+#else
+#define ioat_dma_probe(pdev, iobase) NULL
+#define ioat_dma_remove(device) do { } while (0)
+#endif
+
#endif /* IOATDMA_H */