summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ks8695/include
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-10-31 17:07:16 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-11-23 13:53:54 +0100
commitef1baed8870d1eebb0c08d9a466e703f1a21b484 (patch)
treedb1f7d3b5ee8d34e4778bfae66c86ff33e10ca0a /arch/arm/mach-ks8695/include
parentARM: dma-mapping: simplify page_to_dma() and __pfn_to_bus() (diff)
downloadlinux-ef1baed8870d1eebb0c08d9a466e703f1a21b484.tar.xz
linux-ef1baed8870d1eebb0c08d9a466e703f1a21b484.zip
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/mach-ks8695/include')
-rw-r--r--arch/arm/mach-ks8695/include/mach/memory.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-ks8695/include/mach/memory.h b/arch/arm/mach-ks8695/include/mach/memory.h
index 76e5308685a4..ffa19aae6e05 100644
--- a/arch/arm/mach-ks8695/include/mach/memory.h
+++ b/arch/arm/mach-ks8695/include/mach/memory.h
@@ -41,6 +41,13 @@ extern struct bus_type platform_bus_type;
__dma = __dma - PHYS_OFFSET + KS8695_PCIMEM_PA; \
__dma; })
+#define __arch_dma_to_page(dev, x) \
+ ({ dma_addr_t __dma = x; \
+ if (!is_lbus_device(dev)) \
+ __dma += PHYS_OFFSET - KS8695_PCIMEM_PA; \
+ phys_to_page(__dma); \
+ })
+
#endif
#endif