diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-03-10 18:23:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:42 -0500 |
commit | 6e6c70e6910d21443ab0f894bab52b9ea653ef27 (patch) | |
tree | 8bb1288bb28480ac8ef83dbe6da24584194e1520 /arch/powerpc | |
parent | 6a1961f49ee8d7339ea2454443dfc0460e0b2748 (diff) |
dma-mapping: powerpc: use generic pci_set_dma_mask and pci_set_consistent_dma_mask
This converts powerpc to use the generic pci_set_dma_mask and
pci_set_consistent_dma_mask (drivers/pci/pci.c).
The generic pci_set_dma_mask does what powerpc's pci_set_dma_mask does.
Unlike powerpc's pci_set_consistent_dma_mask, the gneric
pci_set_consistent_dma_mask sets only coherent_dma_mask. It doesn't work
for powerpc? pci_set_consistent_dma_mask API should set only
coherent_dma_mask?
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/dma-mapping.h | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 15 |
2 files changed, 0 insertions, 18 deletions
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h index 80a973bb9e71..c85ef230135b 100644 --- a/arch/powerpc/include/asm/dma-mapping.h +++ b/arch/powerpc/include/asm/dma-mapping.h | |||
@@ -127,9 +127,6 @@ static inline int dma_supported(struct device *dev, u64 mask) | |||
127 | return dma_ops->dma_supported(dev, mask); | 127 | return dma_ops->dma_supported(dev, mask); |
128 | } | 128 | } |
129 | 129 | ||
130 | /* We have our own implementation of pci_set_dma_mask() */ | ||
131 | #define HAVE_ARCH_PCI_SET_DMA_MASK | ||
132 | |||
133 | static inline int dma_set_mask(struct device *dev, u64 dma_mask) | 130 | static inline int dma_set_mask(struct device *dev, u64 dma_mask) |
134 | { | 131 | { |
135 | struct dma_map_ops *dma_ops = get_dma_ops(dev); | 132 | struct dma_map_ops *dma_ops = get_dma_ops(dev); |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 2597f9545d8a..f3c42ce516e7 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -63,21 +63,6 @@ struct dma_map_ops *get_pci_dma_ops(void) | |||
63 | } | 63 | } |
64 | EXPORT_SYMBOL(get_pci_dma_ops); | 64 | EXPORT_SYMBOL(get_pci_dma_ops); |
65 | 65 | ||
66 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask) | ||
67 | { | ||
68 | return dma_set_mask(&dev->dev, mask); | ||
69 | } | ||
70 | |||
71 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | ||
72 | { | ||
73 | int rc; | ||
74 | |||
75 | rc = dma_set_mask(&dev->dev, mask); | ||
76 | dev->dev.coherent_dma_mask = dev->dma_mask; | ||
77 | |||
78 | return rc; | ||
79 | } | ||
80 | |||
81 | struct pci_controller *pcibios_alloc_controller(struct device_node *dev) | 66 | struct pci_controller *pcibios_alloc_controller(struct device_node *dev) |
82 | { | 67 | { |
83 | struct pci_controller *phb; | 68 | struct pci_controller *phb; |