Go to the documentation of this file.
5 #ifndef __ASM_ARCH_MEMORY_H
6 #define __ASM_ARCH_MEMORY_H
11 #define PLAT_PHYS_OFFSET UL(0x10000000)
21 #if defined(CONFIG_ARCH_OMAP15XX) && !defined(__ASSEMBLER__)
27 #define OMAP1510_LB_OFFSET UL(0x30000000)
29 #define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET)
30 #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET)
31 #define is_lbus_device(dev) (cpu_is_omap15xx() && dev && (strncmp(dev_name(dev), "ohci", 4) == 0))
33 #define __arch_pfn_to_dma(dev, pfn) \
34 ({ dma_addr_t __dma = __pfn_to_phys(pfn); \
35 if (is_lbus_device(dev)) \
36 __dma = __dma - PHYS_OFFSET + OMAP1510_LB_OFFSET; \
39 #define __arch_dma_to_pfn(dev, addr) \
40 ({ dma_addr_t __dma = addr; \
41 if (is_lbus_device(dev)) \
42 __dma += PHYS_OFFSET - OMAP1510_LB_OFFSET; \
43 __phys_to_pfn(__dma); \
46 #define __arch_dma_to_virt(dev, addr) ({ (void *) (is_lbus_device(dev) ? \
47 lbus_to_virt(addr) : \
48 __phys_to_virt(addr)); })
50 #define __arch_virt_to_dma(dev, addr) ({ unsigned long __addr = (unsigned long)(addr); \
51 (dma_addr_t) (is_lbus_device(dev) ? \
52 virt_to_lbus(__addr) : \
53 __virt_to_phys(__addr)); })