aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/mach-ip22
diff options
context:
space:
mode:
authorFranck Bui-Huu <fbuihuu@gmail.com>2007-06-04 11:46:31 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-07-10 12:32:57 -0400
commit09bb9ce15f6e0daba70b7e6978f233ffe2d356eb (patch)
treed2b69fa3c61744da997251eb4a2a1ccab9bdc4e0 /include/asm-mips/mach-ip22
parent69ed25b895b01216b392b60ad3b99d1274e1afa8 (diff)
[MIPS] Allow generic spaces.h to be included by platform specific ones
Before this patch, when a platform needed to customize one constant in spaces.h, they need to redefine all of them. Now they can just redefine one constant and include the generic file header at the end: #include <asm/mach-generic/spaces.h> This patch doesn't allow to redefine CAC_BASE, IO_BASE and UNCAC_BASE for 32 bits platforms because there's no need to do so. This will avoid some macro duplications. It's important specially if we'll add complex macros. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> delete mode 100644 include/asm-mips/mach-ip32/spaces.h
Diffstat (limited to 'include/asm-mips/mach-ip22')
-rw-r--r--include/asm-mips/mach-ip22/spaces.h33
1 files changed, 3 insertions, 30 deletions
diff --git a/include/asm-mips/mach-ip22/spaces.h b/include/asm-mips/mach-ip22/spaces.h
index ab20c026fd19..7f9fa6f66059 100644
--- a/include/asm-mips/mach-ip22/spaces.h
+++ b/include/asm-mips/mach-ip22/spaces.h
@@ -11,44 +11,17 @@
11#define _ASM_MACH_IP22_SPACES_H 11#define _ASM_MACH_IP22_SPACES_H
12 12
13 13
14#ifdef CONFIG_32BIT
15
16#define CAC_BASE 0x80000000
17#define IO_BASE 0xa0000000
18#define UNCAC_BASE 0xa0000000
19#define MAP_BASE 0xc0000000
20
21/*
22 * This handles the memory map.
23 * We handle pages at KSEG0 for kernels with 32 bit address space.
24 */
25#define PAGE_OFFSET 0x80000000UL
26
27/*
28 * Memory above this physical address will be considered highmem.
29 */
30#ifndef HIGHMEM_START
31#define HIGHMEM_START 0x20000000UL
32#endif
33
34#endif /* CONFIG_32BIT */
35
36#ifdef CONFIG_64BIT 14#ifdef CONFIG_64BIT
37#define PAGE_OFFSET 0xffffffff80000000UL
38 15
39#ifndef HIGHMEM_START 16#define PAGE_OFFSET 0xffffffff80000000UL
40#define HIGHMEM_START (1UL << 59UL)
41#endif
42 17
43#define CAC_BASE 0xffffffff80000000 18#define CAC_BASE 0xffffffff80000000
44#define IO_BASE 0xffffffffa0000000 19#define IO_BASE 0xffffffffa0000000
45#define UNCAC_BASE 0xffffffffa0000000 20#define UNCAC_BASE 0xffffffffa0000000
46#define MAP_BASE 0xc000000000000000 21#define MAP_BASE 0xc000000000000000
47 22
48#define TO_PHYS(x) ( ((x) & TO_PHYS_MASK))
49#define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK))
50#define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK))
51
52#endif /* CONFIG_64BIT */ 23#endif /* CONFIG_64BIT */
53 24
25#include <asm/mach-generic/spaces.h>
26
54#endif /* __ASM_MACH_IP22_SPACES_H */ 27#endif /* __ASM_MACH_IP22_SPACES_H */