2 * linux/include/asm-arm/arch-mx1ads/memory.h
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2002 Shane Nay (shane@minirl.com)
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __ASM_ARCH_MMU_H
22 #define __ASM_ARCH_MMU_H
27 #define TASK_SIZE (0xc0000000UL)
28 #define TASK_SIZE_26 (0x04000000UL)
31 * This decides where the kernel will search for a free chunk of vm
32 * space during mmap's.
34 #define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
40 * This should be hot-swapable with a CONFIG_MX1ADS_SDRAM
41 * or something similar, so we can swap between SRAM and
42 * SDRAM running kernel.
45 #ifdef CONFIG_ARCH_MX1ADS_SRAM
46 #define PAGE_OFFSET (0xc0000000UL)
47 #define PHYS_OFFSET (0x12000000UL)
49 #define PAGE_OFFSET (0xc0000000UL)
50 #define PHYS_OFFSET (0x08000000UL)
54 * On mx1, the sdram/sram is contiguous
56 #define __virt_to_phys__is_a_macro
57 #define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
58 #define __phys_to_virt__is_a_macro
59 #define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
62 * Virtual view <-> DMA view memory address translations
63 * virt_to_bus: Used to translate the virtual address to an
64 * address suitable to be passed to set_dma_addr
65 * bus_to_virt: Used to convert an address for DMA operations
66 * to an address that the kernel can use.
68 #define __virt_to_bus__is_a_macro
69 #define __virt_to_bus(x) (x - PAGE_OFFSET + PHYS_OFFSET)
70 #define __bus_to_virt__is_a_macro
71 #define __bus_to_virt(x) (x - PHYS_OFFSET + PAGE_OFFSET)