GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / arm / plat-brcm / include / mach / memory.h
blob13ca71bbe3b91c243e7114b512f0a593dafe96ac
1 /*
2 * Platform memory layout definitions
4 * Note: due to dependencies in common architecture code
5 * some mappings go in other header files.
6 */
7 #ifndef __ASM_ARCH_MEMORY_H
8 #define __ASM_ARCH_MEMORY_H
11 * Main memory base address and size
12 * are defined from the board-level configuration file
15 #ifndef PHYS_OFFSET
16 #define PHYS_OFFSET UL(CONFIG_DRAM_BASE)
17 #endif
22 * DMA memory
24 * The PCIe-to-AXI mapping (PAX) has a window of 128 MB alighed at 1MB
25 * we should make the DMA-able DRAM at least this large.
26 * Will need to use CONSISTENT_BASE and CONSISTENT_SIZE macros
27 * to program the PAX inbound mapping registers.
29 #define CONSISTENT_DMA_SIZE SZ_128M
31 /* 2nd physical memory window */
32 #define PHYS_OFFSET2 0x80000000
34 #if !defined(__ASSEMBLY__) && defined(CONFIG_ZONE_DMA)
35 extern void bcm47xx_adjust_zones(unsigned long *size, unsigned long *hole);
36 #define arch_adjust_zones(size, hole) \
37 bcm47xx_adjust_zones(size, hole)
39 #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_128M - 1)
40 #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_128M)
41 #endif
43 #ifdef CONFIG_SPARSEMEM
45 #define MAX_PHYSMEM_BITS 32
46 #define SECTION_SIZE_BITS 27
48 /* bank page offsets */
49 #define PAGE_OFFSET1 (PAGE_OFFSET + SZ_128M)
51 #define __phys_to_virt(phys) \
52 ((phys) >= PHYS_OFFSET2 ? (phys) - PHYS_OFFSET2 + PAGE_OFFSET1 : \
53 (phys) + PAGE_OFFSET)
55 #define __virt_to_phys(virt) \
56 ((virt) >= PAGE_OFFSET1 ? (virt) - PAGE_OFFSET1 + PHYS_OFFSET2 : \
57 (virt) - PAGE_OFFSET)
59 #else
60 #define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
61 #define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
62 #endif
65 #endif