aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/pci.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-11-11 01:25:02 -0500
committerPaul Mackerras <paulus@samba.org>2006-12-04 04:38:40 -0500
commit12d04eef927bf61328af2c7cbe756c96f98ac3bf (patch)
tree18865369100e9059c7e883dec93ea67f7b52a287 /include/asm-powerpc/pci.h
parent7c719871ff4d5f15b71f0138d08b758281b58631 (diff)
[POWERPC] Refactor 64 bits DMA operations
This patch completely refactors DMA operations for 64 bits powerpc. 32 bits is untouched for now. We use the new dev_archdata structure to add the dma operations pointer and associated data to struct device. While at it, we also add the OF node pointer and numa node. In the future, we might want to look into merging that with pci_dn as well. The old vio, pci-iommu and pci-direct DMA ops are gone. They are now replaced by a set of generic iommu and direct DMA ops (non PCI specific) that can be used by bus types. The toplevel implementation is now inline. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/pci.h')
-rw-r--r--include/asm-powerpc/pci.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h
index c77286051496..16f13319c769 100644
--- a/include/asm-powerpc/pci.h
+++ b/include/asm-powerpc/pci.h
@@ -70,15 +70,15 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
70 */ 70 */
71#define PCI_DISABLE_MWI 71#define PCI_DISABLE_MWI
72 72
73extern struct dma_mapping_ops pci_dma_ops; 73extern struct dma_mapping_ops *pci_dma_ops;
74 74
75/* For DAC DMA, we currently don't support it by default, but 75/* For DAC DMA, we currently don't support it by default, but
76 * we let 64-bit platforms override this. 76 * we let 64-bit platforms override this.
77 */ 77 */
78static inline int pci_dac_dma_supported(struct pci_dev *hwdev,u64 mask) 78static inline int pci_dac_dma_supported(struct pci_dev *hwdev,u64 mask)
79{ 79{
80 if (pci_dma_ops.dac_dma_supported) 80 if (pci_dma_ops && pci_dma_ops->dac_dma_supported)
81 return pci_dma_ops.dac_dma_supported(&hwdev->dev, mask); 81 return pci_dma_ops->dac_dma_supported(&hwdev->dev, mask);
82 return 0; 82 return 0;
83} 83}
84 84
@@ -210,6 +210,8 @@ extern int remap_bus_range(struct pci_bus *bus);
210extern void pcibios_fixup_device_resources(struct pci_dev *dev, 210extern void pcibios_fixup_device_resources(struct pci_dev *dev,
211 struct pci_bus *bus); 211 struct pci_bus *bus);
212 212
213extern void pcibios_setup_new_device(struct pci_dev *dev);
214
213extern void pcibios_claim_one_bus(struct pci_bus *b); 215extern void pcibios_claim_one_bus(struct pci_bus *b);
214 216
215extern struct pci_controller *init_phb_dynamic(struct device_node *dn); 217extern struct pci_controller *init_phb_dynamic(struct device_node *dn);