diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-10-31 12:07:16 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-11-23 07:53:54 -0500 |
commit | ef1baed8870d1eebb0c08d9a466e703f1a21b484 (patch) | |
tree | db1f7d3b5ee8d34e4778bfae66c86ff33e10ca0a /arch/arm/include | |
parent | 1c4a4f48a14861a567c8861355bc8252da3a003f (diff) |
ARM: dma-mapping: provide dma_to_page()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-By: Jamie Iles <jamie@jamieiles.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/dma-mapping.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 5d78eb163953..f06d80c22748 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -20,6 +20,11 @@ static inline dma_addr_t page_to_dma(struct device *dev, struct page *page) | |||
20 | return (dma_addr_t)__pfn_to_bus(page_to_pfn(page)); | 20 | return (dma_addr_t)__pfn_to_bus(page_to_pfn(page)); |
21 | } | 21 | } |
22 | 22 | ||
23 | static inline struct page *dma_to_page(struct device *dev, dma_addr_t addr) | ||
24 | { | ||
25 | return pfn_to_page(__bus_to_pfn(addr)); | ||
26 | } | ||
27 | |||
23 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) | 28 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) |
24 | { | 29 | { |
25 | return (void *)__bus_to_virt(addr); | 30 | return (void *)__bus_to_virt(addr); |
@@ -35,6 +40,11 @@ static inline dma_addr_t page_to_dma(struct device *dev, struct page *page) | |||
35 | return __arch_page_to_dma(dev, page); | 40 | return __arch_page_to_dma(dev, page); |
36 | } | 41 | } |
37 | 42 | ||
43 | static inline struct page *dma_to_page(struct device *dev, dma_addr_t addr) | ||
44 | { | ||
45 | return __arch_dma_to_page(dev, addr); | ||
46 | } | ||
47 | |||
38 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) | 48 | static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) |
39 | { | 49 | { |
40 | return __arch_dma_to_virt(dev, addr); | 50 | return __arch_dma_to_virt(dev, addr); |