ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-arm / arch-omap / memory.h
1 /*
2  * linux/include/asm-arm/arch-omap/memory.h
3  *
4  * Memory map for OMAP-1510 and 1610
5  *
6  * Copyright (C) 2000 RidgeRun, Inc.
7  * Author: Greg Lonnon <glonnon@ridgerun.com>
8  *
9  * This file was derived from linux/include/asm-arm/arch-intergrator/memory.h
10  * Copyright (C) 1999 ARM Limited
11  *
12  * This program is free software; you can redistribute it and/or modify it
13  * under the terms of the GNU General Public License as published by the
14  * Free Software Foundation; either version 2 of the License, or (at your
15  * option) any later version.
16  *
17  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
18  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
20  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  * You should have received a copy of the  GNU General Public License along
29  * with this program; if not, write  to the Free Software Foundation, Inc.,
30  * 675 Mass Ave, Cambridge, MA 02139, USA.
31  */
32
33 #ifndef __ASM_ARCH_MMU_H
34 #define __ASM_ARCH_MMU_H
35
36 /*
37  * Task size: 3GB
38  */
39 #define TASK_SIZE               (0xbf000000UL)
40 #define TASK_SIZE_26            (0x04000000UL)
41
42 /*
43  * This decides where the kernel will search for a free chunk of vm
44  * space during mmap's.
45  */
46 #define TASK_UNMAPPED_BASE      (0x40000000)
47
48 /*
49  * Page offset: 3GB
50  */
51 #define PAGE_OFFSET             (0xC0000000UL)
52 #define PHYS_OFFSET             (0x10000000UL)
53
54 /*
55  * OMAP-1510 Local Bus address offset
56  */
57 #define OMAP1510_LB_OFFSET      (0x30000000UL)
58
59 /*
60  * The DRAM is contiguous.
61  */
62 #define __virt_to_phys__is_a_macro
63 #define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
64 #define __phys_to_virt__is_a_macro
65 #define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
66
67 /*
68  * Conversion between SDRAM and fake PCI bus, used by USB
69  * NOTE: Physical address must be converted to Local Bus address
70  *       on OMAP-1510 only
71  */
72 #define __virt_to_bus__is_a_macro
73 #define __bus_to_virt__is_a_macro
74
75 /*
76  * Bus address is physical address, except for OMAP-1510 Local Bus.
77  */
78 #define __virt_to_bus(x)        __virt_to_phys(x)
79 #define __bus_to_virt(x)        __phys_to_virt(x)
80
81 /*
82  * OMAP-1510 bus address is translated into a Local Bus address if the
83  * OMAP bus type is lbus. See dmadev_uses_omap_lbus().
84  */
85 #ifdef CONFIG_ARCH_OMAP1510
86 #define bus_to_lbus(x)  ((x) + (OMAP1510_LB_OFFSET - PHYS_OFFSET))
87 #define lbus_to_bus(x)  ((x) - (OMAP1510_LB_OFFSET - PHYS_OFFSET))
88 #endif
89
90 #define PHYS_TO_NID(addr) (0)
91 #endif
92