ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-arm / arch-iop3xx / memory.h
1 /*
2  * linux/include/asm-arm/arch-iop80310/memory.h
3  */
4
5 #ifndef __ASM_ARCH_MEMORY_H
6 #define __ASM_ARCH_MEMORY_H
7
8 #include <linux/config.h>
9 #include <asm/arch/iop310.h>
10 #include <asm/arch/iop321.h>
11
12 /*
13  * Task size: 3GB
14  */
15 #define TASK_SIZE       (0xbf000000UL)
16 #define TASK_SIZE_26    (0x04000000UL)
17
18 /*
19  * This decides where the kernel will search for a free chunk of vm
20  * space during mmap's.
21  */
22 #define TASK_UNMAPPED_BASE (0x40000000)
23
24 /*
25  * Page offset: 3GB
26  */
27 #define PAGE_OFFSET     (0xc0000000UL)
28
29 /*
30  * Physical DRAM offset.
31  */
32 #define PHYS_OFFSET     (0xa0000000UL)
33
34 /*
35  * physical vs virtual ram conversion
36  */
37 #define __virt_to_phys__is_a_macro
38 #define __phys_to_virt__is_a_macro
39 #define __virt_to_phys(x)       ((x) - PAGE_OFFSET + PHYS_OFFSET)
40 #define __phys_to_virt(x)       ((x) - PHYS_OFFSET + PAGE_OFFSET)
41
42 /*
43  * Virtual view <-> DMA view memory address translations
44  * virt_to_bus: Used to translate the virtual address to an
45  *              address suitable to be passed to set_dma_addr
46  * bus_to_virt: Used to convert an address for DMA operations
47  *              to an address that the kernel can use.
48  */
49 #define __virt_to_bus__is_a_macro
50 #define __bus_to_virt__is_a_macro
51
52 #ifdef CONFIG_ARCH_IOP310
53
54 #define __virt_to_bus(x)        (((__virt_to_phys(x)) & ~(*IOP310_SIATVR)) | ((*IOP310_SIABAR) & 0xfffffff0))
55 #define __bus_to_virt(x)    (__phys_to_virt(((x) & ~(*IOP310_SIALR)) | ( *IOP310_SIATVR)))
56
57 #elif defined(CONFIG_ARCH_IOP321)
58
59 #define __virt_to_bus(x)        (((__virt_to_phys(x)) & ~(*IOP321_IATVR2)) | ((*IOP321_IABAR2) & 0xfffffff0))
60 #define __bus_to_virt(x)    (__phys_to_virt(((x) & ~(*IOP321_IALR2)) | ( *IOP321_IATVR2)))
61
62 #endif
63
64 /* boot mem allocate global pointer for MU circular queues QBAR */
65 #ifdef CONFIG_IOP3XX_MU
66 extern void *mu_mem;
67 #endif
68
69 #define PFN_TO_NID(addr)        (0)
70
71 #endif