diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-sh/addrspace.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-sh/addrspace.h')
-rw-r--r-- | include/asm-sh/addrspace.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/asm-sh/addrspace.h b/include/asm-sh/addrspace.h new file mode 100644 index 000000000000..dbb05d1a26d1 --- /dev/null +++ b/include/asm-sh/addrspace.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 1999 by Kaz Kojima | ||
7 | * | ||
8 | * Defitions for the address spaces of the SH CPUs. | ||
9 | */ | ||
10 | #ifndef __ASM_SH_ADDRSPACE_H | ||
11 | #define __ASM_SH_ADDRSPACE_H | ||
12 | #ifdef __KERNEL__ | ||
13 | |||
14 | #include <asm/cpu/addrspace.h> | ||
15 | |||
16 | /* Memory segments (32bit Priviledged mode addresses) */ | ||
17 | #define P0SEG 0x00000000 | ||
18 | #define P1SEG 0x80000000 | ||
19 | #define P2SEG 0xa0000000 | ||
20 | #define P3SEG 0xc0000000 | ||
21 | #define P4SEG 0xe0000000 | ||
22 | |||
23 | /* Returns the privileged segment base of a given address */ | ||
24 | #define PXSEG(a) (((unsigned long)(a)) & 0xe0000000) | ||
25 | |||
26 | /* Returns the physical address of a PnSEG (n=1,2) address */ | ||
27 | #define PHYSADDR(a) (((unsigned long)(a)) & 0x1fffffff) | ||
28 | |||
29 | /* | ||
30 | * Map an address to a certain privileged segment | ||
31 | */ | ||
32 | #define P1SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P1SEG)) | ||
33 | #define P2SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P2SEG)) | ||
34 | #define P3SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P3SEG)) | ||
35 | #define P4SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P4SEG)) | ||
36 | |||
37 | #endif /* __KERNEL__ */ | ||
38 | #endif /* __ASM_SH_ADDRSPACE_H */ | ||