summaryrefslogtreecommitdiffstats
path: root/include/asm-ia64/pci.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
commit482368b1a8e45430672c58c9a42e7d2004367126 (patch)
treece2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /include/asm-ia64/pci.h
parente4d0251c6f56ab2e191afb70f80f382793e23f74 (diff)
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'include/asm-ia64/pci.h')
-rw-r--r--include/asm-ia64/pci.h34
1 files changed, 28 insertions, 6 deletions
diff --git a/include/asm-ia64/pci.h b/include/asm-ia64/pci.h
index bb3e4fb21..de50f98f0 100644
--- a/include/asm-ia64/pci.h
+++ b/include/asm-ia64/pci.h
@@ -55,8 +55,10 @@ extern void pci_free_consistent (struct pci_dev *hwdev, size_t size,
* until either pci_unmap_single or pci_dma_sync_single is performed.
*/
extern inline dma_addr_t
-pci_map_single (struct pci_dev *hwdev, void *ptr, size_t size)
+pci_map_single (struct pci_dev *hwdev, void *ptr, size_t size, int direction)
{
+ if (direction == PCI_DMA_NONE)
+ BUG();
return virt_to_bus(ptr);
}
@@ -69,8 +71,10 @@ pci_map_single (struct pci_dev *hwdev, void *ptr, size_t size)
* whatever the device wrote there.
*/
extern inline void
-pci_unmap_single (struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size)
+pci_unmap_single (struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size, int direction)
{
+ if (direction == PCI_DMA_NONE)
+ BUG();
/* Nothing to do */
}
@@ -91,8 +95,10 @@ pci_unmap_single (struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size)
* the same here.
*/
extern inline int
-pci_map_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nents)
+pci_map_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction)
{
+ if (direction == PCI_DMA_NONE)
+ BUG();
return nents;
}
@@ -102,8 +108,10 @@ pci_map_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nents)
* pci_unmap_single() above.
*/
extern inline void
-pci_unmap_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nents)
+pci_unmap_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction)
{
+ if (direction == PCI_DMA_NONE)
+ BUG();
/* Nothing to do */
}
@@ -118,8 +126,10 @@ pci_unmap_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nents)
* device again owns the buffer.
*/
extern inline void
-pci_dma_sync_single (struct pci_dev *hwdev, dma_addr_t dma_handle, size_t size)
+pci_dma_sync_single (struct pci_dev *hwdev, dma_addr_t dma_handle, size_t size, int direction)
{
+ if (direction == PCI_DMA_NONE)
+ BUG();
/* Nothing to do */
}
@@ -131,11 +141,23 @@ pci_dma_sync_single (struct pci_dev *hwdev, dma_addr_t dma_handle, size_t size)
* same rules and usage.
*/
extern inline void
-pci_dma_sync_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nelems)
+pci_dma_sync_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction)
{
+ if (direction == PCI_DMA_NONE)
+ BUG();
/* Nothing to do */
}
+/* Return whether the given PCI device DMA address mask can
+ * be supported properly. For example, if your device can
+ * only drive the low 24-bits during PCI bus mastering, then
+ * you would pass 0x00ffffff as the mask to this function.
+ */
+extern inline int pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask)
+{
+ return 1;
+}
+
/* These macros should be used after a pci_map_sg call has been done
* to get bus addresses of each of the SG entries and their lengths.
* You should only work with the number of sg entries pci_map_sg