ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-arm / arch-nexuspci / memory.h
1 /*
2  * linux/include/asm-arm/arch-nexuspci/memory.h
3  *
4  * Copyright (c) 1997, 1998, 2000 FutureTV Labs Ltd.
5  * Copyright (c) 1999 Russell King
6  *
7  */
8 #ifndef __ASM_ARCH_MMU_H
9 #define __ASM_ARCH_MMU_H
10
11 /*
12  * Task size: 3GB
13  */
14 #define TASK_SIZE       (0xbf000000UL)
15 #define TASK_SIZE_26    (0x04000000UL)
16
17 /*
18  * This decides where the kernel will search for a free chunk of vm
19  * space during mmap's.
20  */
21 #define TASK_UNMAPPED_BASE (0x40000000)
22
23 /*
24  * Page offset: 3GB
25  */
26 #define PAGE_OFFSET     (0xc0000000UL)
27 #define PHYS_OFFSET     (0x40000000UL)
28 #define BUS_OFFSET      (0xe0000000UL)
29
30 /*
31  * DRAM is contiguous
32  */
33 #define __virt_to_phys(vpage) ((unsigned long)(vpage) - PAGE_OFFSET + PHYS_OFFSET)
34 #define __phys_to_virt(ppage) ((unsigned long)(ppage) + PAGE_OFFSET - PHYS_OFFSET)
35 #define __virt_to_phys__is_a_macro
36 #define __phys_to_virt__is_a_macro
37
38 /*
39  * On the PCI bus the DRAM appears at address 0xe0000000
40  */
41 #define __virt_to_bus__is_a_macro
42 #define __virt_to_bus(x) ((unsigned long)(x) - PAGE_OFFSET + BUS_OFFSET)
43 #define __bus_to_virt__is_a_macro
44 #define __bus_to_virt(x) ((unsigned long)(x) + PAGE_OFFSET - BUS_OFFSET)
45
46 #endif