blob: cbd7ae64bcc97a217cfe10338f4aabee2ab8c48f [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/include/asm-arm/arch-ebsa285/memory.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Changelog:
11 * 20-Oct-1996 RMK Created
12 * 31-Dec-1997 RMK Fixed definitions to reduce warnings.
13 * 17-May-1998 DAG Added __virt_to_bus and __bus_to_virt functions.
14 * 21-Nov-1998 RMK Changed __virt_to_bus and __bus_to_virt to macros.
15 * 21-Mar-1999 RMK Added PAGE_OFFSET for co285 architecture.
16 * Renamed to memory.h
17 * Moved PAGE_OFFSET and TASK_SIZE here
18 */
19#ifndef __ASM_ARCH_MEMORY_H
20#define __ASM_ARCH_MEMORY_H
21
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
23#if defined(CONFIG_FOOTBRIDGE_ADDIN)
24/*
25 * If we may be using add-in footbridge mode, then we must
26 * use the out-of-line translation that makes use of the
27 * PCI BAR
28 */
29#ifndef __ASSEMBLY__
30extern unsigned long __virt_to_bus(unsigned long);
31extern unsigned long __bus_to_virt(unsigned long);
32#endif
33
34#elif defined(CONFIG_FOOTBRIDGE_HOST)
35
36#define __virt_to_bus(x) ((x) - 0xe0000000)
37#define __bus_to_virt(x) ((x) + 0xe0000000)
38
39#else
40
41#error "Undefined footbridge mode"
42
43#endif
44
45#if defined(CONFIG_ARCH_FOOTBRIDGE)
46
47/* Task size and page offset at 3GB */
Nicolas Pitref09b9972005-10-29 21:44:55 +010048#define TASK_SIZE UL(0xbf000000)
49#define PAGE_OFFSET UL(0xc0000000)
Linus Torvalds1da177e2005-04-16 15:20:36 -070050
Russell King74d02fb2006-04-04 21:47:43 +010051/*
52 * Cache flushing area.
53 */
54#define FLUSH_BASE 0xf9000000
55
Linus Torvalds1da177e2005-04-16 15:20:36 -070056#elif defined(CONFIG_ARCH_CO285)
57
58/* Task size and page offset at 1.5GB */
Nicolas Pitref09b9972005-10-29 21:44:55 +010059#define TASK_SIZE UL(0x5f000000)
60#define PAGE_OFFSET UL(0x60000000)
Linus Torvalds1da177e2005-04-16 15:20:36 -070061
Russell King74d02fb2006-04-04 21:47:43 +010062/*
63 * Cache flushing area.
64 */
65#define FLUSH_BASE 0x7e000000
66
Linus Torvalds1da177e2005-04-16 15:20:36 -070067#else
68
69#error "Undefined footbridge architecture"
70
71#endif
72
73/*
74 * Physical DRAM offset.
75 */
Nicolas Pitref09b9972005-10-29 21:44:55 +010076#define PHYS_OFFSET UL(0x00000000)
Linus Torvalds1da177e2005-04-16 15:20:36 -070077
78/*
79 * This decides where the kernel will search for a free chunk of vm
80 * space during mmap's.
81 */
82#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
83
Russell King74d02fb2006-04-04 21:47:43 +010084#define FLUSH_BASE_PHYS 0x50000000
85
Linus Torvalds1da177e2005-04-16 15:20:36 -070086#endif