2 * linux/include/asm-arm/arch-iop80310/memory.h
5 #ifndef __ASM_ARCH_MEMORY_H
6 #define __ASM_ARCH_MEMORY_H
8 #include <linux/config.h>
9 #include <asm/arch/iop310.h>
10 #include <asm/arch/iop321.h>
15 #define TASK_SIZE (0xbf000000UL)
16 #define TASK_SIZE_26 (0x04000000UL)
19 * This decides where the kernel will search for a free chunk of vm
20 * space during mmap's.
22 #define TASK_UNMAPPED_BASE (0x40000000)
27 #define PAGE_OFFSET (0xc0000000UL)
30 * Physical DRAM offset.
32 #define PHYS_OFFSET (0xa0000000UL)
35 * physical vs virtual ram conversion
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)
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.
49 #define __virt_to_bus__is_a_macro
50 #define __bus_to_virt__is_a_macro
52 #ifdef CONFIG_ARCH_IOP310
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)))
57 #elif defined(CONFIG_ARCH_IOP321)
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)))
64 /* boot mem allocate global pointer for MU circular queues QBAR */
65 #ifdef CONFIG_IOP3XX_MU
69 #define PFN_TO_NID(addr) (0)