patch-2_6_7-vs1_9_1_12
[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  * Physical DRAM offset.
14  */
15 #define PHYS_OFFSET     (0xa0000000UL)
16
17 /*
18  * Virtual view <-> DMA view memory address translations
19  * virt_to_bus: Used to translate the virtual address to an
20  *              address suitable to be passed to set_dma_addr
21  * bus_to_virt: Used to convert an address for DMA operations
22  *              to an address that the kernel can use.
23  */
24 #ifdef CONFIG_ARCH_IOP310
25
26 #define __virt_to_bus(x)        (((__virt_to_phys(x)) & ~(*IOP310_SIATVR)) | ((*IOP310_SIABAR) & 0xfffffff0))
27 #define __bus_to_virt(x)    (__phys_to_virt(((x) & ~(*IOP310_SIALR)) | ( *IOP310_SIATVR)))
28
29 #elif defined(CONFIG_ARCH_IOP321)
30
31 #define __virt_to_bus(x)        (((__virt_to_phys(x)) & ~(*IOP321_IATVR2)) | ((*IOP321_IABAR2) & 0xfffffff0))
32 #define __bus_to_virt(x)    (__phys_to_virt(((x) & ~(*IOP321_IALR2)) | ( *IOP321_IATVR2)))
33
34 #endif
35
36 /* boot mem allocate global pointer for MU circular queues QBAR */
37 #ifdef CONFIG_IOP3XX_MU
38 extern void *mu_mem;
39 #endif
40
41 #define PFN_TO_NID(addr)        (0)
42
43 #endif