diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-03-04 01:02:41 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-03-08 23:03:25 -0500 |
commit | 57190708f1f52d732d94fa21a8e576302d384d33 (patch) | |
tree | e288959df1d9ed7cb4664ce17b792e065a4d97a1 /include/asm-powerpc/pci.h | |
parent | 9874777016e06ad2df420237963e81389776cb6d (diff) |
[POWERPC] Create and use get_pci_dma_ops()
This allows us to hide pci_dma_ops.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/pci.h')
-rw-r--r-- | include/asm-powerpc/pci.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h index ebf31f1c5915..ce0f13e8eb14 100644 --- a/include/asm-powerpc/pci.h +++ b/include/asm-powerpc/pci.h | |||
@@ -71,17 +71,18 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | |||
71 | #define PCI_DISABLE_MWI | 71 | #define PCI_DISABLE_MWI |
72 | 72 | ||
73 | #ifdef CONFIG_PCI | 73 | #ifdef CONFIG_PCI |
74 | extern struct dma_mapping_ops *pci_dma_ops; | ||
75 | |||
76 | extern void set_pci_dma_ops(struct dma_mapping_ops *dma_ops); | 74 | extern void set_pci_dma_ops(struct dma_mapping_ops *dma_ops); |
75 | extern struct dma_mapping_ops *get_pci_dma_ops(void); | ||
77 | 76 | ||
78 | /* For DAC DMA, we currently don't support it by default, but | 77 | /* For DAC DMA, we currently don't support it by default, but |
79 | * we let 64-bit platforms override this. | 78 | * we let 64-bit platforms override this. |
80 | */ | 79 | */ |
81 | static inline int pci_dac_dma_supported(struct pci_dev *hwdev,u64 mask) | 80 | static inline int pci_dac_dma_supported(struct pci_dev *hwdev,u64 mask) |
82 | { | 81 | { |
83 | if (pci_dma_ops && pci_dma_ops->dac_dma_supported) | 82 | struct dma_mapping_ops *d = get_pci_dma_ops(); |
84 | return pci_dma_ops->dac_dma_supported(&hwdev->dev, mask); | 83 | |
84 | if (d && d->dac_dma_supported) | ||
85 | return d->dac_dma_supported(&hwdev->dev, mask); | ||
85 | return 0; | 86 | return 0; |
86 | } | 87 | } |
87 | 88 | ||
@@ -103,6 +104,7 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
103 | } | 104 | } |
104 | #else /* CONFIG_PCI */ | 105 | #else /* CONFIG_PCI */ |
105 | #define set_pci_dma_ops(d) | 106 | #define set_pci_dma_ops(d) |
107 | #define get_pci_dma_ops() NULL | ||
106 | #endif | 108 | #endif |
107 | 109 | ||
108 | extern int pci_domain_nr(struct pci_bus *bus); | 110 | extern int pci_domain_nr(struct pci_bus *bus); |