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-v850/v850e2_cache.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-v850/v850e2_cache.h')
-rw-r--r-- | include/asm-v850/v850e2_cache.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/include/asm-v850/v850e2_cache.h b/include/asm-v850/v850e2_cache.h new file mode 100644 index 000000000000..61acda1023e8 --- /dev/null +++ b/include/asm-v850/v850e2_cache.h | |||
@@ -0,0 +1,74 @@ | |||
1 | /* | ||
2 | * include/asm-v850/v850e2_cache_cache.h -- Cache control for V850E2 | ||
3 | * cache memories | ||
4 | * | ||
5 | * Copyright (C) 2003 NEC Electronics Corporation | ||
6 | * Copyright (C) 2003 Miles Bader <miles@gnu.org> | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General | ||
9 | * Public License. See the file COPYING in the main directory of this | ||
10 | * archive for more details. | ||
11 | * | ||
12 | * Written by Miles Bader <miles@gnu.org> | ||
13 | */ | ||
14 | |||
15 | #ifndef __V850_V850E2_CACHE_H__ | ||
16 | #define __V850_V850E2_CACHE_H__ | ||
17 | |||
18 | #include <asm/types.h> | ||
19 | |||
20 | |||
21 | /* Cache control registers. */ | ||
22 | |||
23 | /* Bus Transaction Control */ | ||
24 | #define V850E2_CACHE_BTSC_ADDR 0xFFFFF070 | ||
25 | #define V850E2_CACHE_BTSC (*(volatile u16 *)V850E2_CACHE_BTSC_ADDR) | ||
26 | #define V850E2_CACHE_BTSC_ICM 0x0001 /* icache enable */ | ||
27 | #define V850E2_CACHE_BTSC_DCM0 0x0004 /* dcache enable, bit 0 */ | ||
28 | #define V850E2_CACHE_BTSC_DCM1 0x0008 /* dcache enable, bit 1 */ | ||
29 | #define V850E2_CACHE_BTSC_DCM_WT /* write-through */ \ | ||
30 | V850E2_CACHE_BTSC_DCM0 | ||
31 | #ifdef CONFIG_V850E2_V850E2S | ||
32 | # define V850E2_CACHE_BTSC_DCM_WB_NO_ALLOC /* write-back, non-alloc */ \ | ||
33 | V850E2_CACHE_BTSC_DCM1 | ||
34 | # define V850E2_CACHE_BTSC_DCM_WB_ALLOC /* write-back, non-alloc */ \ | ||
35 | (V850E2_CACHE_BTSC_DCM1 | V850E2_CACHE_BTSC_DCM0) | ||
36 | # define V850E2_CACHE_BTSC_ISEQ 0x0010 /* icache `address sequence mode' */ | ||
37 | # define V850E2_CACHE_BTSC_DSEQ 0x0020 /* dcache `address sequence mode' */ | ||
38 | # define V850E2_CACHE_BTSC_IRFC 0x0030 | ||
39 | # define V850E2_CACHE_BTSC_ILCD 0x4000 | ||
40 | # define V850E2_CACHE_BTSC_VABE 0x8000 | ||
41 | #endif /* CONFIG_V850E2_V850E2S */ | ||
42 | |||
43 | /* Cache operation start address register (low-bits). */ | ||
44 | #define V850E2_CACHE_CADL_ADDR 0xFFFFF074 | ||
45 | #define V850E2_CACHE_CADL (*(volatile u16 *)V850E2_CACHE_CADL_ADDR) | ||
46 | /* Cache operation start address register (high-bits). */ | ||
47 | #define V850E2_CACHE_CADH_ADDR 0xFFFFF076 | ||
48 | #define V850E2_CACHE_CADH (*(volatile u16 *)V850E2_CACHE_CADH_ADDR) | ||
49 | /* Cache operation count register. */ | ||
50 | #define V850E2_CACHE_CCNT_ADDR 0xFFFFF078 | ||
51 | #define V850E2_CACHE_CCNT (*(volatile u16 *)V850E2_CACHE_CCNT_ADDR) | ||
52 | /* Cache operation specification register. */ | ||
53 | #define V850E2_CACHE_COPR_ADDR 0xFFFFF07A | ||
54 | #define V850E2_CACHE_COPR (*(volatile u16 *)V850E2_CACHE_COPR_ADDR) | ||
55 | #define V850E2_CACHE_COPR_STRT 0x0001 /* start cache operation */ | ||
56 | #define V850E2_CACHE_COPR_LBSL 0x0100 /* 0 = icache, 1 = dcache */ | ||
57 | #define V850E2_CACHE_COPR_WSLE 0x0200 /* operate on cache way */ | ||
58 | #define V850E2_CACHE_COPR_WSL(way) ((way) * 0x0400) /* way select */ | ||
59 | #define V850E2_CACHE_COPR_CFC(op) ((op) * 0x1000) /* cache function code */ | ||
60 | |||
61 | |||
62 | /* Size of a cache line in bytes. */ | ||
63 | #define V850E2_CACHE_LINE_SIZE_BITS 4 | ||
64 | #define V850E2_CACHE_LINE_SIZE (1 << V850E2_CACHE_LINE_SIZE_BITS) | ||
65 | |||
66 | /* The size of each cache `way' in lines. */ | ||
67 | #define V850E2_CACHE_WAY_SIZE 256 | ||
68 | |||
69 | |||
70 | /* For <asm/cache.h> */ | ||
71 | #define L1_CACHE_BYTES V850E2_CACHE_LINE_SIZE | ||
72 | |||
73 | |||
74 | #endif /* __V850_V850E2_CACHE_H__ */ | ||