diff options
Diffstat (limited to 'arch/powerpc/kernel/ibmebus.c')
-rw-r--r-- | arch/powerpc/kernel/ibmebus.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index a06362223f8d..64299d28f364 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c | |||
@@ -79,20 +79,21 @@ static void ibmebus_free_coherent(struct device *dev, | |||
79 | kfree(vaddr); | 79 | kfree(vaddr); |
80 | } | 80 | } |
81 | 81 | ||
82 | static dma_addr_t ibmebus_map_single(struct device *dev, | 82 | static dma_addr_t ibmebus_map_page(struct device *dev, |
83 | void *ptr, | 83 | struct page *page, |
84 | size_t size, | 84 | unsigned long offset, |
85 | enum dma_data_direction direction, | 85 | size_t size, |
86 | struct dma_attrs *attrs) | 86 | enum dma_data_direction direction, |
87 | struct dma_attrs *attrs) | ||
87 | { | 88 | { |
88 | return (dma_addr_t)(ptr); | 89 | return (dma_addr_t)(page_address(page) + offset); |
89 | } | 90 | } |
90 | 91 | ||
91 | static void ibmebus_unmap_single(struct device *dev, | 92 | static void ibmebus_unmap_page(struct device *dev, |
92 | dma_addr_t dma_addr, | 93 | dma_addr_t dma_addr, |
93 | size_t size, | 94 | size_t size, |
94 | enum dma_data_direction direction, | 95 | enum dma_data_direction direction, |
95 | struct dma_attrs *attrs) | 96 | struct dma_attrs *attrs) |
96 | { | 97 | { |
97 | return; | 98 | return; |
98 | } | 99 | } |
@@ -129,11 +130,11 @@ static int ibmebus_dma_supported(struct device *dev, u64 mask) | |||
129 | static struct dma_mapping_ops ibmebus_dma_ops = { | 130 | static struct dma_mapping_ops ibmebus_dma_ops = { |
130 | .alloc_coherent = ibmebus_alloc_coherent, | 131 | .alloc_coherent = ibmebus_alloc_coherent, |
131 | .free_coherent = ibmebus_free_coherent, | 132 | .free_coherent = ibmebus_free_coherent, |
132 | .map_single = ibmebus_map_single, | ||
133 | .unmap_single = ibmebus_unmap_single, | ||
134 | .map_sg = ibmebus_map_sg, | 133 | .map_sg = ibmebus_map_sg, |
135 | .unmap_sg = ibmebus_unmap_sg, | 134 | .unmap_sg = ibmebus_unmap_sg, |
136 | .dma_supported = ibmebus_dma_supported, | 135 | .dma_supported = ibmebus_dma_supported, |
136 | .map_page = ibmebus_map_page, | ||
137 | .unmap_page = ibmebus_unmap_page, | ||
137 | }; | 138 | }; |
138 | 139 | ||
139 | static int ibmebus_match_path(struct device *dev, void *data) | 140 | static int ibmebus_match_path(struct device *dev, void *data) |