aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/memory.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-08-10 07:10:49 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-08-10 07:10:49 -0400
commit98ed7d4b1a4eebc1ac25929b6968673bef4d54c3 (patch)
treeb9c0e29f20666f433d346c80b557ef0f055336eb /arch/arm/include/asm/memory.h
parent492c71dd545a54dc62df8780bd8d233d771748df (diff)
[ARM] dma-mapping: improve type-safeness of DMA translations
OMAP at least gets the return type(s) for the DMA translation functions wrong, which can lead to subtle errors. Avoid this by moving the DMA translation functions to asm/dma-mapping.h, and converting them to inline functions. Fix the OMAP DMA translation macros to use the correct argument and result types. Also, remove the unnecessary casts in dmabounce.c. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/memory.h')
-rw-r--r--arch/arm/include/asm/memory.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 7bcd69a9a88c..bf7c737c9226 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -314,20 +314,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
314#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) 314#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
315 315
316/* 316/*
317 * Optional device DMA address remapping. Do _not_ use directly!
318 * We should really eliminate virt_to_bus() here - it's deprecated.
319 */
320#ifndef __arch_page_to_dma
321#define page_to_dma(dev, page) ((dma_addr_t)__virt_to_bus((unsigned long)page_address(page)))
322#define dma_to_virt(dev, addr) ((void *)__bus_to_virt(addr))
323#define virt_to_dma(dev, addr) ((dma_addr_t)__virt_to_bus((unsigned long)(addr)))
324#else
325#define page_to_dma(dev, page) (__arch_page_to_dma(dev, page))
326#define dma_to_virt(dev, addr) (__arch_dma_to_virt(dev, addr))
327#define virt_to_dma(dev, addr) (__arch_virt_to_dma(dev, addr))
328#endif
329
330/*
331 * Optional coherency support. Currently used only by selected 317 * Optional coherency support. Currently used only by selected
332 * Intel XSC3-based systems. 318 * Intel XSC3-based systems.
333 */ 319 */