summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-10-31 16:07:16 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-11-23 12:53:54 +0000
commitef1baed8870d1eebb0c08d9a466e703f1a21b484 (patch)
treedb1f7d3b5ee8d34e4778bfae66c86ff33e10ca0a /arch/arm/plat-omap
parent1c4a4f48a14861a567c8861355bc8252da3a003f (diff)
downloadlinux-ef1baed8870d1eebb0c08d9a466e703f1a21b484.tar.bz2
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/plat-omap')
-rw-r--r--arch/arm/plat-omap/include/mach/memory.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/mach/memory.h b/arch/arm/plat-omap/include/mach/memory.h
index 9ad41dc484c1..3325f7b49eaa 100644
--- a/arch/arm/plat-omap/include/mach/memory.h
+++ b/arch/arm/plat-omap/include/mach/memory.h
@@ -68,6 +68,13 @@
__dma = __dma - PHYS_OFFSET + OMAP1510_LB_OFFSET; \
__dma; })
+#define __arch_dma_to_page(dev, addr) \
+ ({ dma_addr_t __dma = addr; \
+ if (is_lbus_device(dev)) \
+ __dma += PHYS_OFFSET - OMAP1510_LB_OFFSET; \
+ phys_to_page(__dma); \
+ })
+
#define __arch_dma_to_virt(dev, addr) ({ (void *) (is_lbus_device(dev) ? \
lbus_to_virt(addr) : \
__phys_to_virt(addr)); })