diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2013-01-22 06:59:30 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-02-01 04:00:22 -0500 |
commit | 7034228792cc561e79ff8600f02884bd4c80e287 (patch) | |
tree | 89b77af37d087d9de236fc5d21f60bf552d0a2c6 /arch/mips/include/asm | |
parent | 405ab01c70e18058d9c01a1256769a61fc65413e (diff) |
MIPS: Whitespace cleanup.
Having received another series of whitespace patches I decided to do this
once and for all rather than dealing with this kind of patches trickling
in forever.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm')
310 files changed, 8303 insertions, 8303 deletions
diff --git a/arch/mips/include/asm/abi.h b/arch/mips/include/asm/abi.h index 9252d9b50e59..909bb6984866 100644 --- a/arch/mips/include/asm/abi.h +++ b/arch/mips/include/asm/abi.h | |||
@@ -14,12 +14,12 @@ | |||
14 | 14 | ||
15 | struct mips_abi { | 15 | struct mips_abi { |
16 | int (* const setup_frame)(void *sig_return, struct k_sigaction *ka, | 16 | int (* const setup_frame)(void *sig_return, struct k_sigaction *ka, |
17 | struct pt_regs *regs, int signr, | 17 | struct pt_regs *regs, int signr, |
18 | sigset_t *set); | 18 | sigset_t *set); |
19 | const unsigned long signal_return_offset; | 19 | const unsigned long signal_return_offset; |
20 | int (* const setup_rt_frame)(void *sig_return, struct k_sigaction *ka, | 20 | int (* const setup_rt_frame)(void *sig_return, struct k_sigaction *ka, |
21 | struct pt_regs *regs, int signr, | 21 | struct pt_regs *regs, int signr, |
22 | sigset_t *set, siginfo_t *info); | 22 | sigset_t *set, siginfo_t *info); |
23 | const unsigned long rt_signal_return_offset; | 23 | const unsigned long rt_signal_return_offset; |
24 | const unsigned long restart; | 24 | const unsigned long restart; |
25 | }; | 25 | }; |
diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h index 569f80aacbd2..13d61c002e4f 100644 --- a/arch/mips/include/asm/addrspace.h +++ b/arch/mips/include/asm/addrspace.h | |||
@@ -51,14 +51,14 @@ | |||
51 | * Returns the physical address of a CKSEGx / XKPHYS address | 51 | * Returns the physical address of a CKSEGx / XKPHYS address |
52 | */ | 52 | */ |
53 | #define CPHYSADDR(a) ((_ACAST32_(a)) & 0x1fffffff) | 53 | #define CPHYSADDR(a) ((_ACAST32_(a)) & 0x1fffffff) |
54 | #define XPHYSADDR(a) ((_ACAST64_(a)) & \ | 54 | #define XPHYSADDR(a) ((_ACAST64_(a)) & \ |
55 | _CONST64_(0x000000ffffffffff)) | 55 | _CONST64_(0x000000ffffffffff)) |
56 | 56 | ||
57 | #ifdef CONFIG_64BIT | 57 | #ifdef CONFIG_64BIT |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Memory segments (64bit kernel mode addresses) | 60 | * Memory segments (64bit kernel mode addresses) |
61 | * The compatibility segments use the full 64-bit sign extended value. Note | 61 | * The compatibility segments use the full 64-bit sign extended value. Note |
62 | * the R8000 doesn't have them so don't reference these in generic MIPS code. | 62 | * the R8000 doesn't have them so don't reference these in generic MIPS code. |
63 | */ | 63 | */ |
64 | #define XKUSEG _CONST64_(0x0000000000000000) | 64 | #define XKUSEG _CONST64_(0x0000000000000000) |
@@ -131,7 +131,7 @@ | |||
131 | 131 | ||
132 | /* | 132 | /* |
133 | * The ultimate limited of the 64-bit MIPS architecture: 2 bits for selecting | 133 | * The ultimate limited of the 64-bit MIPS architecture: 2 bits for selecting |
134 | * the region, 3 bits for the CCA mode. This leaves 59 bits of which the | 134 | * the region, 3 bits for the CCA mode. This leaves 59 bits of which the |
135 | * R8000 implements most with its 48-bit physical address space. | 135 | * R8000 implements most with its 48-bit physical address space. |
136 | */ | 136 | */ |
137 | #define TO_PHYS_MASK _CONST64_(0x07ffffffffffffff) /* 2^^59 - 1 */ | 137 | #define TO_PHYS_MASK _CONST64_(0x07ffffffffffffff) /* 2^^59 - 1 */ |
diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h index 608cfcfbb3ea..164a21e65b42 100644 --- a/arch/mips/include/asm/asm.h +++ b/arch/mips/include/asm/asm.h | |||
@@ -33,12 +33,12 @@ | |||
33 | * Not used for the kernel but here seems to be the right place. | 33 | * Not used for the kernel but here seems to be the right place. |
34 | */ | 34 | */ |
35 | #ifdef __PIC__ | 35 | #ifdef __PIC__ |
36 | #define CPRESTORE(register) \ | 36 | #define CPRESTORE(register) \ |
37 | .cprestore register | 37 | .cprestore register |
38 | #define CPADD(register) \ | 38 | #define CPADD(register) \ |
39 | .cpadd register | 39 | .cpadd register |
40 | #define CPLOAD(register) \ | 40 | #define CPLOAD(register) \ |
41 | .cpload register | 41 | .cpload register |
42 | #else | 42 | #else |
43 | #define CPRESTORE(register) | 43 | #define CPRESTORE(register) |
44 | #define CPADD(register) | 44 | #define CPADD(register) |
@@ -48,35 +48,35 @@ | |||
48 | /* | 48 | /* |
49 | * LEAF - declare leaf routine | 49 | * LEAF - declare leaf routine |
50 | */ | 50 | */ |
51 | #define LEAF(symbol) \ | 51 | #define LEAF(symbol) \ |
52 | .globl symbol; \ | 52 | .globl symbol; \ |
53 | .align 2; \ | 53 | .align 2; \ |
54 | .type symbol, @function; \ | 54 | .type symbol, @function; \ |
55 | .ent symbol, 0; \ | 55 | .ent symbol, 0; \ |
56 | symbol: .frame sp, 0, ra | 56 | symbol: .frame sp, 0, ra |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * NESTED - declare nested routine entry point | 59 | * NESTED - declare nested routine entry point |
60 | */ | 60 | */ |
61 | #define NESTED(symbol, framesize, rpc) \ | 61 | #define NESTED(symbol, framesize, rpc) \ |
62 | .globl symbol; \ | 62 | .globl symbol; \ |
63 | .align 2; \ | 63 | .align 2; \ |
64 | .type symbol, @function; \ | 64 | .type symbol, @function; \ |
65 | .ent symbol, 0; \ | 65 | .ent symbol, 0; \ |
66 | symbol: .frame sp, framesize, rpc | 66 | symbol: .frame sp, framesize, rpc |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * END - mark end of function | 69 | * END - mark end of function |
70 | */ | 70 | */ |
71 | #define END(function) \ | 71 | #define END(function) \ |
72 | .end function; \ | 72 | .end function; \ |
73 | .size function, .-function | 73 | .size function, .-function |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * EXPORT - export definition of symbol | 76 | * EXPORT - export definition of symbol |
77 | */ | 77 | */ |
78 | #define EXPORT(symbol) \ | 78 | #define EXPORT(symbol) \ |
79 | .globl symbol; \ | 79 | .globl symbol; \ |
80 | symbol: | 80 | symbol: |
81 | 81 | ||
82 | /* | 82 | /* |
@@ -90,16 +90,16 @@ symbol: | |||
90 | /* | 90 | /* |
91 | * ABS - export absolute symbol | 91 | * ABS - export absolute symbol |
92 | */ | 92 | */ |
93 | #define ABS(symbol,value) \ | 93 | #define ABS(symbol,value) \ |
94 | .globl symbol; \ | 94 | .globl symbol; \ |
95 | symbol = value | 95 | symbol = value |
96 | 96 | ||
97 | #define PANIC(msg) \ | 97 | #define PANIC(msg) \ |
98 | .set push; \ | 98 | .set push; \ |
99 | .set reorder; \ | 99 | .set reorder; \ |
100 | PTR_LA a0, 8f; \ | 100 | PTR_LA a0, 8f; \ |
101 | jal panic; \ | 101 | jal panic; \ |
102 | 9: b 9b; \ | 102 | 9: b 9b; \ |
103 | .set pop; \ | 103 | .set pop; \ |
104 | TEXT(msg) | 104 | TEXT(msg) |
105 | 105 | ||
@@ -107,31 +107,31 @@ symbol = value | |||
107 | * Print formatted string | 107 | * Print formatted string |
108 | */ | 108 | */ |
109 | #ifdef CONFIG_PRINTK | 109 | #ifdef CONFIG_PRINTK |
110 | #define PRINT(string) \ | 110 | #define PRINT(string) \ |
111 | .set push; \ | 111 | .set push; \ |
112 | .set reorder; \ | 112 | .set reorder; \ |
113 | PTR_LA a0, 8f; \ | 113 | PTR_LA a0, 8f; \ |
114 | jal printk; \ | 114 | jal printk; \ |
115 | .set pop; \ | 115 | .set pop; \ |
116 | TEXT(string) | 116 | TEXT(string) |
117 | #else | 117 | #else |
118 | #define PRINT(string) | 118 | #define PRINT(string) |
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | #define TEXT(msg) \ | 121 | #define TEXT(msg) \ |
122 | .pushsection .data; \ | 122 | .pushsection .data; \ |
123 | 8: .asciiz msg; \ | 123 | 8: .asciiz msg; \ |
124 | .popsection; | 124 | .popsection; |
125 | 125 | ||
126 | /* | 126 | /* |
127 | * Build text tables | 127 | * Build text tables |
128 | */ | 128 | */ |
129 | #define TTABLE(string) \ | 129 | #define TTABLE(string) \ |
130 | .pushsection .text; \ | 130 | .pushsection .text; \ |
131 | .word 1f; \ | 131 | .word 1f; \ |
132 | .popsection \ | 132 | .popsection \ |
133 | .pushsection .data; \ | 133 | .pushsection .data; \ |
134 | 1: .asciiz string; \ | 134 | 1: .asciiz string; \ |
135 | .popsection | 135 | .popsection |
136 | 136 | ||
137 | /* | 137 | /* |
@@ -143,13 +143,13 @@ symbol = value | |||
143 | */ | 143 | */ |
144 | #ifdef CONFIG_CPU_HAS_PREFETCH | 144 | #ifdef CONFIG_CPU_HAS_PREFETCH |
145 | 145 | ||
146 | #define PREF(hint,addr) \ | 146 | #define PREF(hint,addr) \ |
147 | .set push; \ | 147 | .set push; \ |
148 | .set mips4; \ | 148 | .set mips4; \ |
149 | pref hint, addr; \ | 149 | pref hint, addr; \ |
150 | .set pop | 150 | .set pop |
151 | 151 | ||
152 | #define PREFX(hint,addr) \ | 152 | #define PREFX(hint,addr) \ |
153 | .set push; \ | 153 | .set push; \ |
154 | .set mips4; \ | 154 | .set mips4; \ |
155 | prefx hint, addr; \ | 155 | prefx hint, addr; \ |
@@ -166,42 +166,42 @@ symbol = value | |||
166 | * MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs. | 166 | * MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs. |
167 | */ | 167 | */ |
168 | #if (_MIPS_ISA == _MIPS_ISA_MIPS1) | 168 | #if (_MIPS_ISA == _MIPS_ISA_MIPS1) |
169 | #define MOVN(rd, rs, rt) \ | 169 | #define MOVN(rd, rs, rt) \ |
170 | .set push; \ | 170 | .set push; \ |
171 | .set reorder; \ | 171 | .set reorder; \ |
172 | beqz rt, 9f; \ | 172 | beqz rt, 9f; \ |
173 | move rd, rs; \ | 173 | move rd, rs; \ |
174 | .set pop; \ | 174 | .set pop; \ |
175 | 9: | 175 | 9: |
176 | #define MOVZ(rd, rs, rt) \ | 176 | #define MOVZ(rd, rs, rt) \ |
177 | .set push; \ | 177 | .set push; \ |
178 | .set reorder; \ | 178 | .set reorder; \ |
179 | bnez rt, 9f; \ | 179 | bnez rt, 9f; \ |
180 | move rd, rs; \ | 180 | move rd, rs; \ |
181 | .set pop; \ | 181 | .set pop; \ |
182 | 9: | 182 | 9: |
183 | #endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */ | 183 | #endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */ |
184 | #if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) | 184 | #if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) |
185 | #define MOVN(rd, rs, rt) \ | 185 | #define MOVN(rd, rs, rt) \ |
186 | .set push; \ | 186 | .set push; \ |
187 | .set noreorder; \ | 187 | .set noreorder; \ |
188 | bnezl rt, 9f; \ | 188 | bnezl rt, 9f; \ |
189 | move rd, rs; \ | 189 | move rd, rs; \ |
190 | .set pop; \ | 190 | .set pop; \ |
191 | 9: | 191 | 9: |
192 | #define MOVZ(rd, rs, rt) \ | 192 | #define MOVZ(rd, rs, rt) \ |
193 | .set push; \ | 193 | .set push; \ |
194 | .set noreorder; \ | 194 | .set noreorder; \ |
195 | beqzl rt, 9f; \ | 195 | beqzl rt, 9f; \ |
196 | move rd, rs; \ | 196 | move rd, rs; \ |
197 | .set pop; \ | 197 | .set pop; \ |
198 | 9: | 198 | 9: |
199 | #endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */ | 199 | #endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */ |
200 | #if (_MIPS_ISA == _MIPS_ISA_MIPS4 ) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \ | 200 | #if (_MIPS_ISA == _MIPS_ISA_MIPS4 ) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \ |
201 | (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64) | 201 | (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64) |
202 | #define MOVN(rd, rs, rt) \ | 202 | #define MOVN(rd, rs, rt) \ |
203 | movn rd, rs, rt | 203 | movn rd, rs, rt |
204 | #define MOVZ(rd, rs, rt) \ | 204 | #define MOVZ(rd, rs, rt) \ |
205 | movz rd, rs, rt | 205 | movz rd, rs, rt |
206 | #endif /* MIPS IV, MIPS V, MIPS32 or MIPS64 */ | 206 | #endif /* MIPS IV, MIPS V, MIPS32 or MIPS64 */ |
207 | 207 | ||
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h index 01cc6ba64831..08b607969a16 100644 --- a/arch/mips/include/asm/atomic.h +++ b/arch/mips/include/asm/atomic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Atomic operations that C can't guarantee us. Useful for | 2 | * Atomic operations that C can't guarantee us. Useful for |
3 | * resource counting etc.. | 3 | * resource counting etc.. |
4 | * | 4 | * |
5 | * But use these as seldom as possible since they are much more slower | 5 | * But use these as seldom as possible since they are much more slower |
@@ -21,7 +21,7 @@ | |||
21 | #include <asm/cmpxchg.h> | 21 | #include <asm/cmpxchg.h> |
22 | #include <asm/war.h> | 22 | #include <asm/war.h> |
23 | 23 | ||
24 | #define ATOMIC_INIT(i) { (i) } | 24 | #define ATOMIC_INIT(i) { (i) } |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * atomic_read - read atomic variable | 27 | * atomic_read - read atomic variable |
diff --git a/arch/mips/include/asm/barrier.h b/arch/mips/include/asm/barrier.h index f7fdc24e972d..314ab5532019 100644 --- a/arch/mips/include/asm/barrier.h +++ b/arch/mips/include/asm/barrier.h | |||
@@ -18,7 +18,7 @@ | |||
18 | * over this barrier. All reads preceding this primitive are guaranteed | 18 | * over this barrier. All reads preceding this primitive are guaranteed |
19 | * to access memory (but not necessarily other CPUs' caches) before any | 19 | * to access memory (but not necessarily other CPUs' caches) before any |
20 | * reads following this primitive that depend on the data return by | 20 | * reads following this primitive that depend on the data return by |
21 | * any of the preceding reads. This primitive is much lighter weight than | 21 | * any of the preceding reads. This primitive is much lighter weight than |
22 | * rmb() on most CPUs, and is never heavier weight than is | 22 | * rmb() on most CPUs, and is never heavier weight than is |
23 | * rmb(). | 23 | * rmb(). |
24 | * | 24 | * |
@@ -43,7 +43,7 @@ | |||
43 | * </programlisting> | 43 | * </programlisting> |
44 | * | 44 | * |
45 | * because the read of "*q" depends on the read of "p" and these | 45 | * because the read of "*q" depends on the read of "p" and these |
46 | * two reads are separated by a read_barrier_depends(). However, | 46 | * two reads are separated by a read_barrier_depends(). However, |
47 | * the following code, with the same initial values for "a" and "b": | 47 | * the following code, with the same initial values for "a" and "b": |
48 | * | 48 | * |
49 | * <programlisting> | 49 | * <programlisting> |
@@ -57,7 +57,7 @@ | |||
57 | * </programlisting> | 57 | * </programlisting> |
58 | * | 58 | * |
59 | * does not enforce ordering, since there is no data dependency between | 59 | * does not enforce ordering, since there is no data dependency between |
60 | * the read of "a" and the read of "b". Therefore, on some CPUs, such | 60 | * the read of "a" and the read of "b". Therefore, on some CPUs, such |
61 | * as Alpha, "y" could be set to 3 and "x" to 0. Use rmb() | 61 | * as Alpha, "y" could be set to 3 and "x" to 0. Use rmb() |
62 | * in cases like this where there are no data dependencies. | 62 | * in cases like this where there are no data dependencies. |
63 | */ | 63 | */ |
@@ -92,7 +92,7 @@ | |||
92 | : "memory") | 92 | : "memory") |
93 | #ifdef CONFIG_CPU_CAVIUM_OCTEON | 93 | #ifdef CONFIG_CPU_CAVIUM_OCTEON |
94 | # define OCTEON_SYNCW_STR ".set push\n.set arch=octeon\nsyncw\nsyncw\n.set pop\n" | 94 | # define OCTEON_SYNCW_STR ".set push\n.set arch=octeon\nsyncw\nsyncw\n.set pop\n" |
95 | # define __syncw() __asm__ __volatile__(OCTEON_SYNCW_STR : : : "memory") | 95 | # define __syncw() __asm__ __volatile__(OCTEON_SYNCW_STR : : : "memory") |
96 | 96 | ||
97 | # define fast_wmb() __syncw() | 97 | # define fast_wmb() __syncw() |
98 | # define fast_rmb() barrier() | 98 | # define fast_rmb() barrier() |
@@ -158,7 +158,7 @@ | |||
158 | #endif | 158 | #endif |
159 | 159 | ||
160 | #if defined(CONFIG_WEAK_REORDERING_BEYOND_LLSC) && defined(CONFIG_SMP) | 160 | #if defined(CONFIG_WEAK_REORDERING_BEYOND_LLSC) && defined(CONFIG_SMP) |
161 | #define __WEAK_LLSC_MB " sync \n" | 161 | #define __WEAK_LLSC_MB " sync \n" |
162 | #else | 162 | #else |
163 | #define __WEAK_LLSC_MB " \n" | 163 | #define __WEAK_LLSC_MB " \n" |
164 | #endif | 164 | #endif |
diff --git a/arch/mips/include/asm/bcache.h b/arch/mips/include/asm/bcache.h index 0ba9d6ef76a7..8c34484cea82 100644 --- a/arch/mips/include/asm/bcache.h +++ b/arch/mips/include/asm/bcache.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | 12 | ||
13 | /* Some R4000 / R4400 / R4600 / R5000 machines may have a non-dma-coherent, | 13 | /* Some R4000 / R4400 / R4600 / R5000 machines may have a non-dma-coherent, |
14 | chipset implemented caches. On machines with other CPUs the CPU does the | 14 | chipset implemented caches. On machines with other CPUs the CPU does the |
15 | cache thing itself. */ | 15 | cache thing itself. */ |
16 | struct bcache_ops { | 16 | struct bcache_ops { |
17 | void (*bc_enable)(void); | 17 | void (*bc_enable)(void); |
diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitops.h index 46ac73abd5ee..71305a8b3d78 100644 --- a/arch/mips/include/asm/bitops.h +++ b/arch/mips/include/asm/bitops.h | |||
@@ -26,15 +26,15 @@ | |||
26 | #define SZLONG_MASK 31UL | 26 | #define SZLONG_MASK 31UL |
27 | #define __LL "ll " | 27 | #define __LL "ll " |
28 | #define __SC "sc " | 28 | #define __SC "sc " |
29 | #define __INS "ins " | 29 | #define __INS "ins " |
30 | #define __EXT "ext " | 30 | #define __EXT "ext " |
31 | #elif _MIPS_SZLONG == 64 | 31 | #elif _MIPS_SZLONG == 64 |
32 | #define SZLONG_LOG 6 | 32 | #define SZLONG_LOG 6 |
33 | #define SZLONG_MASK 63UL | 33 | #define SZLONG_MASK 63UL |
34 | #define __LL "lld " | 34 | #define __LL "lld " |
35 | #define __SC "scd " | 35 | #define __SC "scd " |
36 | #define __INS "dins " | 36 | #define __INS "dins " |
37 | #define __EXT "dext " | 37 | #define __EXT "dext " |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | /* | 40 | /* |
@@ -357,7 +357,7 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
357 | "1: " __LL "%0, %1 # test_and_clear_bit \n" | 357 | "1: " __LL "%0, %1 # test_and_clear_bit \n" |
358 | " or %2, %0, %3 \n" | 358 | " or %2, %0, %3 \n" |
359 | " xor %2, %3 \n" | 359 | " xor %2, %3 \n" |
360 | " " __SC "%2, %1 \n" | 360 | " " __SC "%2, %1 \n" |
361 | " beqzl %2, 1b \n" | 361 | " beqzl %2, 1b \n" |
362 | " and %2, %0, %3 \n" | 362 | " and %2, %0, %3 \n" |
363 | " .set mips0 \n" | 363 | " .set mips0 \n" |
@@ -371,10 +371,10 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
371 | 371 | ||
372 | do { | 372 | do { |
373 | __asm__ __volatile__( | 373 | __asm__ __volatile__( |
374 | " " __LL "%0, %1 # test_and_clear_bit \n" | 374 | " " __LL "%0, %1 # test_and_clear_bit \n" |
375 | " " __EXT "%2, %0, %3, 1 \n" | 375 | " " __EXT "%2, %0, %3, 1 \n" |
376 | " " __INS "%0, $0, %3, 1 \n" | 376 | " " __INS "%0, $0, %3, 1 \n" |
377 | " " __SC "%0, %1 \n" | 377 | " " __SC "%0, %1 \n" |
378 | : "=&r" (temp), "+m" (*m), "=&r" (res) | 378 | : "=&r" (temp), "+m" (*m), "=&r" (res) |
379 | : "ir" (bit) | 379 | : "ir" (bit) |
380 | : "memory"); | 380 | : "memory"); |
@@ -387,10 +387,10 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
387 | do { | 387 | do { |
388 | __asm__ __volatile__( | 388 | __asm__ __volatile__( |
389 | " .set mips3 \n" | 389 | " .set mips3 \n" |
390 | " " __LL "%0, %1 # test_and_clear_bit \n" | 390 | " " __LL "%0, %1 # test_and_clear_bit \n" |
391 | " or %2, %0, %3 \n" | 391 | " or %2, %0, %3 \n" |
392 | " xor %2, %3 \n" | 392 | " xor %2, %3 \n" |
393 | " " __SC "%2, %1 \n" | 393 | " " __SC "%2, %1 \n" |
394 | " .set mips0 \n" | 394 | " .set mips0 \n" |
395 | : "=&r" (temp), "+m" (*m), "=&r" (res) | 395 | : "=&r" (temp), "+m" (*m), "=&r" (res) |
396 | : "r" (1UL << bit) | 396 | : "r" (1UL << bit) |
@@ -444,7 +444,7 @@ static inline int test_and_change_bit(unsigned long nr, | |||
444 | do { | 444 | do { |
445 | __asm__ __volatile__( | 445 | __asm__ __volatile__( |
446 | " .set mips3 \n" | 446 | " .set mips3 \n" |
447 | " " __LL "%0, %1 # test_and_change_bit \n" | 447 | " " __LL "%0, %1 # test_and_change_bit \n" |
448 | " xor %2, %0, %3 \n" | 448 | " xor %2, %0, %3 \n" |
449 | " " __SC "\t%2, %1 \n" | 449 | " " __SC "\t%2, %1 \n" |
450 | " .set mips0 \n" | 450 | " .set mips0 \n" |
diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h index 7a51d879e6ca..b71dd5b16085 100644 --- a/arch/mips/include/asm/bootinfo.h +++ b/arch/mips/include/asm/bootinfo.h | |||
@@ -44,19 +44,19 @@ | |||
44 | /* | 44 | /* |
45 | * Valid machtype for group PMC-MSP | 45 | * Valid machtype for group PMC-MSP |
46 | */ | 46 | */ |
47 | #define MACH_MSP4200_EVAL 0 /* PMC-Sierra MSP4200 Evaluation */ | 47 | #define MACH_MSP4200_EVAL 0 /* PMC-Sierra MSP4200 Evaluation */ |
48 | #define MACH_MSP4200_GW 1 /* PMC-Sierra MSP4200 Gateway demo */ | 48 | #define MACH_MSP4200_GW 1 /* PMC-Sierra MSP4200 Gateway demo */ |
49 | #define MACH_MSP4200_FPGA 2 /* PMC-Sierra MSP4200 Emulation */ | 49 | #define MACH_MSP4200_FPGA 2 /* PMC-Sierra MSP4200 Emulation */ |
50 | #define MACH_MSP7120_EVAL 3 /* PMC-Sierra MSP7120 Evaluation */ | 50 | #define MACH_MSP7120_EVAL 3 /* PMC-Sierra MSP7120 Evaluation */ |
51 | #define MACH_MSP7120_GW 4 /* PMC-Sierra MSP7120 Residential GW */ | 51 | #define MACH_MSP7120_GW 4 /* PMC-Sierra MSP7120 Residential GW */ |
52 | #define MACH_MSP7120_FPGA 5 /* PMC-Sierra MSP7120 Emulation */ | 52 | #define MACH_MSP7120_FPGA 5 /* PMC-Sierra MSP7120 Emulation */ |
53 | #define MACH_MSP_OTHER 255 /* PMC-Sierra unknown board type */ | 53 | #define MACH_MSP_OTHER 255 /* PMC-Sierra unknown board type */ |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * Valid machtype for group Mikrotik | 56 | * Valid machtype for group Mikrotik |
57 | */ | 57 | */ |
58 | #define MACH_MIKROTIK_RB532 0 /* Mikrotik RouterBoard 532 */ | 58 | #define MACH_MIKROTIK_RB532 0 /* Mikrotik RouterBoard 532 */ |
59 | #define MACH_MIKROTIK_RB532A 1 /* Mikrotik RouterBoard 532A */ | 59 | #define MACH_MIKROTIK_RB532A 1 /* Mikrotik RouterBoard 532A */ |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * Valid machtype for Loongson family | 62 | * Valid machtype for Loongson family |
@@ -67,7 +67,7 @@ | |||
67 | #define MACH_LEMOTE_ML2F7 3 | 67 | #define MACH_LEMOTE_ML2F7 3 |
68 | #define MACH_LEMOTE_YL2F89 4 | 68 | #define MACH_LEMOTE_YL2F89 4 |
69 | #define MACH_DEXXON_GDIUM2F10 5 | 69 | #define MACH_DEXXON_GDIUM2F10 5 |
70 | #define MACH_LEMOTE_NAS 6 | 70 | #define MACH_LEMOTE_NAS 6 |
71 | #define MACH_LEMOTE_LL2F 7 | 71 | #define MACH_LEMOTE_LL2F 7 |
72 | #define MACH_LOONGSON_END 8 | 72 | #define MACH_LOONGSON_END 8 |
73 | 73 | ||
diff --git a/arch/mips/include/asm/cacheops.h b/arch/mips/include/asm/cacheops.h index 8f99c11ab665..68f37e3eccc7 100644 --- a/arch/mips/include/asm/cacheops.h +++ b/arch/mips/include/asm/cacheops.h | |||
@@ -8,20 +8,20 @@ | |||
8 | * (C) Copyright 1996, 97, 99, 2002, 03 Ralf Baechle | 8 | * (C) Copyright 1996, 97, 99, 2002, 03 Ralf Baechle |
9 | * (C) Copyright 1999 Silicon Graphics, Inc. | 9 | * (C) Copyright 1999 Silicon Graphics, Inc. |
10 | */ | 10 | */ |
11 | #ifndef __ASM_CACHEOPS_H | 11 | #ifndef __ASM_CACHEOPS_H |
12 | #define __ASM_CACHEOPS_H | 12 | #define __ASM_CACHEOPS_H |
13 | 13 | ||
14 | /* | 14 | /* |
15 | * Cache Operations available on all MIPS processors with R4000-style caches | 15 | * Cache Operations available on all MIPS processors with R4000-style caches |
16 | */ | 16 | */ |
17 | #define Index_Invalidate_I 0x00 | 17 | #define Index_Invalidate_I 0x00 |
18 | #define Index_Writeback_Inv_D 0x01 | 18 | #define Index_Writeback_Inv_D 0x01 |
19 | #define Index_Load_Tag_I 0x04 | 19 | #define Index_Load_Tag_I 0x04 |
20 | #define Index_Load_Tag_D 0x05 | 20 | #define Index_Load_Tag_D 0x05 |
21 | #define Index_Store_Tag_I 0x08 | 21 | #define Index_Store_Tag_I 0x08 |
22 | #define Index_Store_Tag_D 0x09 | 22 | #define Index_Store_Tag_D 0x09 |
23 | #if defined(CONFIG_CPU_LOONGSON2) | 23 | #if defined(CONFIG_CPU_LOONGSON2) |
24 | #define Hit_Invalidate_I 0x00 | 24 | #define Hit_Invalidate_I 0x00 |
25 | #else | 25 | #else |
26 | #define Hit_Invalidate_I 0x10 | 26 | #define Hit_Invalidate_I 0x10 |
27 | #endif | 27 | #endif |
@@ -39,8 +39,8 @@ | |||
39 | /* | 39 | /* |
40 | * R4000SC and R4400SC-specific cacheops | 40 | * R4000SC and R4400SC-specific cacheops |
41 | */ | 41 | */ |
42 | #define Index_Invalidate_SI 0x02 | 42 | #define Index_Invalidate_SI 0x02 |
43 | #define Index_Writeback_Inv_SD 0x03 | 43 | #define Index_Writeback_Inv_SD 0x03 |
44 | #define Index_Load_Tag_SI 0x06 | 44 | #define Index_Load_Tag_SI 0x06 |
45 | #define Index_Load_Tag_SD 0x07 | 45 | #define Index_Load_Tag_SD 0x07 |
46 | #define Index_Store_Tag_SI 0x0A | 46 | #define Index_Store_Tag_SI 0x0A |
diff --git a/arch/mips/include/asm/checksum.h b/arch/mips/include/asm/checksum.h index f2f7c6c264da..ac3d2b8a20d4 100644 --- a/arch/mips/include/asm/checksum.h +++ b/arch/mips/include/asm/checksum.h | |||
@@ -194,7 +194,7 @@ static inline __sum16 ip_compute_csum(const void *buff, int len) | |||
194 | 194 | ||
195 | #define _HAVE_ARCH_IPV6_CSUM | 195 | #define _HAVE_ARCH_IPV6_CSUM |
196 | static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, | 196 | static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, |
197 | const struct in6_addr *daddr, | 197 | const struct in6_addr *daddr, |
198 | __u32 len, unsigned short proto, | 198 | __u32 len, unsigned short proto, |
199 | __wsum sum) | 199 | __wsum sum) |
200 | { | 200 | { |
diff --git a/arch/mips/include/asm/cmpxchg.h b/arch/mips/include/asm/cmpxchg.h index eee10dc07ac1..466069bd8465 100644 --- a/arch/mips/include/asm/cmpxchg.h +++ b/arch/mips/include/asm/cmpxchg.h | |||
@@ -146,7 +146,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
146 | " .set push \n" \ | 146 | " .set push \n" \ |
147 | " .set noat \n" \ | 147 | " .set noat \n" \ |
148 | " .set mips3 \n" \ | 148 | " .set mips3 \n" \ |
149 | "1: " ld " %0, %2 # __cmpxchg_asm \n" \ | 149 | "1: " ld " %0, %2 # __cmpxchg_asm \n" \ |
150 | " bne %0, %z3, 2f \n" \ | 150 | " bne %0, %z3, 2f \n" \ |
151 | " .set mips0 \n" \ | 151 | " .set mips0 \n" \ |
152 | " move $1, %z4 \n" \ | 152 | " move $1, %z4 \n" \ |
@@ -163,7 +163,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
163 | " .set push \n" \ | 163 | " .set push \n" \ |
164 | " .set noat \n" \ | 164 | " .set noat \n" \ |
165 | " .set mips3 \n" \ | 165 | " .set mips3 \n" \ |
166 | "1: " ld " %0, %2 # __cmpxchg_asm \n" \ | 166 | "1: " ld " %0, %2 # __cmpxchg_asm \n" \ |
167 | " bne %0, %z3, 2f \n" \ | 167 | " bne %0, %z3, 2f \n" \ |
168 | " .set mips0 \n" \ | 168 | " .set mips0 \n" \ |
169 | " move $1, %z4 \n" \ | 169 | " move $1, %z4 \n" \ |
@@ -205,7 +205,7 @@ extern void __cmpxchg_called_with_bad_pointer(void); | |||
205 | \ | 205 | \ |
206 | switch (sizeof(*(__ptr))) { \ | 206 | switch (sizeof(*(__ptr))) { \ |
207 | case 4: \ | 207 | case 4: \ |
208 | __res = __cmpxchg_asm("ll", "sc", __ptr, __old, __new); \ | 208 | __res = __cmpxchg_asm("ll", "sc", __ptr, __old, __new); \ |
209 | break; \ | 209 | break; \ |
210 | case 8: \ | 210 | case 8: \ |
211 | if (sizeof(long) == 8) { \ | 211 | if (sizeof(long) == 8) { \ |
diff --git a/arch/mips/include/asm/compat-signal.h b/arch/mips/include/asm/compat-signal.h index 6599a901b63e..64e0b9343b8c 100644 --- a/arch/mips/include/asm/compat-signal.h +++ b/arch/mips/include/asm/compat-signal.h | |||
@@ -18,9 +18,9 @@ static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d, | |||
18 | BUG_ON(sizeof(*d) != sizeof(*s)); | 18 | BUG_ON(sizeof(*d) != sizeof(*s)); |
19 | BUG_ON(_NSIG_WORDS != 2); | 19 | BUG_ON(_NSIG_WORDS != 2); |
20 | 20 | ||
21 | err = __put_user(s->sig[0], &d->sig[0]); | 21 | err = __put_user(s->sig[0], &d->sig[0]); |
22 | err |= __put_user(s->sig[0] >> 32, &d->sig[1]); | 22 | err |= __put_user(s->sig[0] >> 32, &d->sig[1]); |
23 | err |= __put_user(s->sig[1], &d->sig[2]); | 23 | err |= __put_user(s->sig[1], &d->sig[2]); |
24 | err |= __put_user(s->sig[1] >> 32, &d->sig[3]); | 24 | err |= __put_user(s->sig[1] >> 32, &d->sig[3]); |
25 | 25 | ||
26 | return err; | 26 | return err; |
diff --git a/arch/mips/include/asm/compat.h b/arch/mips/include/asm/compat.h index 3c5d1464b7bd..988477e492b3 100644 --- a/arch/mips/include/asm/compat.h +++ b/arch/mips/include/asm/compat.h | |||
@@ -120,7 +120,7 @@ struct compat_statfs { | |||
120 | 120 | ||
121 | typedef u32 compat_old_sigset_t; /* at least 32 bits */ | 121 | typedef u32 compat_old_sigset_t; /* at least 32 bits */ |
122 | 122 | ||
123 | #define _COMPAT_NSIG 128 /* Don't ask !$@#% ... */ | 123 | #define _COMPAT_NSIG 128 /* Don't ask !$@#% ... */ |
124 | #define _COMPAT_NSIG_BPW 32 | 124 | #define _COMPAT_NSIG_BPW 32 |
125 | 125 | ||
126 | typedef u32 compat_sigset_word; | 126 | typedef u32 compat_sigset_word; |
@@ -168,7 +168,7 @@ typedef struct compat_siginfo { | |||
168 | s32 _addr; /* faulting insn/memory ref. */ | 168 | s32 _addr; /* faulting insn/memory ref. */ |
169 | } _sigfault; | 169 | } _sigfault; |
170 | 170 | ||
171 | /* SIGPOLL, SIGXFSZ (To do ...) */ | 171 | /* SIGPOLL, SIGXFSZ (To do ...) */ |
172 | struct { | 172 | struct { |
173 | int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | 173 | int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ |
174 | int _fd; | 174 | int _fd; |
@@ -179,7 +179,7 @@ typedef struct compat_siginfo { | |||
179 | timer_t _tid; /* timer id */ | 179 | timer_t _tid; /* timer id */ |
180 | int _overrun; /* overrun count */ | 180 | int _overrun; /* overrun count */ |
181 | compat_sigval_t _sigval;/* same as below */ | 181 | compat_sigval_t _sigval;/* same as below */ |
182 | int _sys_private; /* not to be passed to user */ | 182 | int _sys_private; /* not to be passed to user */ |
183 | } _timer; | 183 | } _timer; |
184 | 184 | ||
185 | /* POSIX.1b signals */ | 185 | /* POSIX.1b signals */ |
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index c507b931b484..e0ac24759d92 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <cpu-feature-overrides.h> | 14 | #include <cpu-feature-overrides.h> |
15 | 15 | ||
16 | #ifndef current_cpu_type | 16 | #ifndef current_cpu_type |
17 | #define current_cpu_type() current_cpu_data.cputype | 17 | #define current_cpu_type() current_cpu_data.cputype |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | /* | 20 | /* |
@@ -87,10 +87,10 @@ | |||
87 | #define cpu_has_mips16 (cpu_data[0].ases & MIPS_ASE_MIPS16) | 87 | #define cpu_has_mips16 (cpu_data[0].ases & MIPS_ASE_MIPS16) |
88 | #endif | 88 | #endif |
89 | #ifndef cpu_has_mdmx | 89 | #ifndef cpu_has_mdmx |
90 | #define cpu_has_mdmx (cpu_data[0].ases & MIPS_ASE_MDMX) | 90 | #define cpu_has_mdmx (cpu_data[0].ases & MIPS_ASE_MDMX) |
91 | #endif | 91 | #endif |
92 | #ifndef cpu_has_mips3d | 92 | #ifndef cpu_has_mips3d |
93 | #define cpu_has_mips3d (cpu_data[0].ases & MIPS_ASE_MIPS3D) | 93 | #define cpu_has_mips3d (cpu_data[0].ases & MIPS_ASE_MIPS3D) |
94 | #endif | 94 | #endif |
95 | #ifndef cpu_has_smartmips | 95 | #ifndef cpu_has_smartmips |
96 | #define cpu_has_smartmips (cpu_data[0].ases & MIPS_ASE_SMARTMIPS) | 96 | #define cpu_has_smartmips (cpu_data[0].ases & MIPS_ASE_SMARTMIPS) |
@@ -108,11 +108,11 @@ | |||
108 | #define cpu_has_ic_fills_f_dc (cpu_data[0].icache.flags & MIPS_CACHE_IC_F_DC) | 108 | #define cpu_has_ic_fills_f_dc (cpu_data[0].icache.flags & MIPS_CACHE_IC_F_DC) |
109 | #endif | 109 | #endif |
110 | #ifndef cpu_has_pindexed_dcache | 110 | #ifndef cpu_has_pindexed_dcache |
111 | #define cpu_has_pindexed_dcache (cpu_data[0].dcache.flags & MIPS_CACHE_PINDEX) | 111 | #define cpu_has_pindexed_dcache (cpu_data[0].dcache.flags & MIPS_CACHE_PINDEX) |
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | /* | 114 | /* |
115 | * I-Cache snoops remote store. This only matters on SMP. Some multiprocessors | 115 | * I-Cache snoops remote store. This only matters on SMP. Some multiprocessors |
116 | * such as the R10000 have I-Caches that snoop local stores; the embedded ones | 116 | * such as the R10000 have I-Caches that snoop local stores; the embedded ones |
117 | * don't. For maintaining I-cache coherency this means we need to flush the | 117 | * don't. For maintaining I-cache coherency this means we need to flush the |
118 | * D-cache all the way back to whever the I-cache does refills from, so the | 118 | * D-cache all the way back to whever the I-cache does refills from, so the |
@@ -148,8 +148,8 @@ | |||
148 | */ | 148 | */ |
149 | #define cpu_has_mips32 (cpu_has_mips32r1 | cpu_has_mips32r2) | 149 | #define cpu_has_mips32 (cpu_has_mips32r1 | cpu_has_mips32r2) |
150 | #define cpu_has_mips64 (cpu_has_mips64r1 | cpu_has_mips64r2) | 150 | #define cpu_has_mips64 (cpu_has_mips64r1 | cpu_has_mips64r2) |
151 | #define cpu_has_mips_r1 (cpu_has_mips32r1 | cpu_has_mips64r1) | 151 | #define cpu_has_mips_r1 (cpu_has_mips32r1 | cpu_has_mips64r1) |
152 | #define cpu_has_mips_r2 (cpu_has_mips32r2 | cpu_has_mips64r2) | 152 | #define cpu_has_mips_r2 (cpu_has_mips32r2 | cpu_has_mips64r2) |
153 | #define cpu_has_mips_r (cpu_has_mips32r1 | cpu_has_mips32r2 | \ | 153 | #define cpu_has_mips_r (cpu_has_mips32r1 | cpu_has_mips32r2 | \ |
154 | cpu_has_mips64r1 | cpu_has_mips64r2) | 154 | cpu_has_mips64r1 | cpu_has_mips64r2) |
155 | 155 | ||
@@ -159,7 +159,7 @@ | |||
159 | 159 | ||
160 | /* | 160 | /* |
161 | * MIPS32, MIPS64, VR5500, IDT32332, IDT32334 and maybe a few other | 161 | * MIPS32, MIPS64, VR5500, IDT32332, IDT32334 and maybe a few other |
162 | * pre-MIPS32/MIPS53 processors have CLO, CLZ. The IDT RC64574 is 64-bit and | 162 | * pre-MIPS32/MIPS53 processors have CLO, CLZ. The IDT RC64574 is 64-bit and |
163 | * has CLO and CLZ but not DCLO nor DCLZ. For 64-bit kernels | 163 | * has CLO and CLZ but not DCLO nor DCLZ. For 64-bit kernels |
164 | * cpu_has_clo_clz also indicates the availability of DCLO and DCLZ. | 164 | * cpu_has_clo_clz also indicates the availability of DCLO and DCLZ. |
165 | */ | 165 | */ |
@@ -191,7 +191,7 @@ | |||
191 | # define cpu_has_64bits (cpu_data[0].isa_level & MIPS_CPU_ISA_64BIT) | 191 | # define cpu_has_64bits (cpu_data[0].isa_level & MIPS_CPU_ISA_64BIT) |
192 | # endif | 192 | # endif |
193 | # ifndef cpu_has_64bit_zero_reg | 193 | # ifndef cpu_has_64bit_zero_reg |
194 | # define cpu_has_64bit_zero_reg (cpu_data[0].isa_level & MIPS_CPU_ISA_64BIT) | 194 | # define cpu_has_64bit_zero_reg (cpu_data[0].isa_level & MIPS_CPU_ISA_64BIT) |
195 | # endif | 195 | # endif |
196 | # ifndef cpu_has_64bit_gp_regs | 196 | # ifndef cpu_has_64bit_gp_regs |
197 | # define cpu_has_64bit_gp_regs 0 | 197 | # define cpu_has_64bit_gp_regs 0 |
diff --git a/arch/mips/include/asm/cpu-info.h b/arch/mips/include/asm/cpu-info.h index c454550eb0c0..41401d8eb7d1 100644 --- a/arch/mips/include/asm/cpu-info.h +++ b/arch/mips/include/asm/cpu-info.h | |||
@@ -52,14 +52,14 @@ struct cpuinfo_mips { | |||
52 | unsigned int cputype; | 52 | unsigned int cputype; |
53 | int isa_level; | 53 | int isa_level; |
54 | int tlbsize; | 54 | int tlbsize; |
55 | struct cache_desc icache; /* Primary I-cache */ | 55 | struct cache_desc icache; /* Primary I-cache */ |
56 | struct cache_desc dcache; /* Primary D or combined I/D cache */ | 56 | struct cache_desc dcache; /* Primary D or combined I/D cache */ |
57 | struct cache_desc scache; /* Secondary cache */ | 57 | struct cache_desc scache; /* Secondary cache */ |
58 | struct cache_desc tcache; /* Tertiary/split secondary cache */ | 58 | struct cache_desc tcache; /* Tertiary/split secondary cache */ |
59 | int srsets; /* Shadow register sets */ | 59 | int srsets; /* Shadow register sets */ |
60 | int core; /* physical core number */ | 60 | int core; /* physical core number */ |
61 | #ifdef CONFIG_64BIT | 61 | #ifdef CONFIG_64BIT |
62 | int vmbits; /* Virtual memory size in bits */ | 62 | int vmbits; /* Virtual memory size in bits */ |
63 | #endif | 63 | #endif |
64 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) | 64 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) |
65 | /* | 65 | /* |
@@ -68,12 +68,12 @@ struct cpuinfo_mips { | |||
68 | * exception resources, ASID spaces, etc, are common | 68 | * exception resources, ASID spaces, etc, are common |
69 | * to all TCs within the same VPE. | 69 | * to all TCs within the same VPE. |
70 | */ | 70 | */ |
71 | int vpe_id; /* Virtual Processor number */ | 71 | int vpe_id; /* Virtual Processor number */ |
72 | #endif | 72 | #endif |
73 | #ifdef CONFIG_MIPS_MT_SMTC | 73 | #ifdef CONFIG_MIPS_MT_SMTC |
74 | int tc_id; /* Thread Context number */ | 74 | int tc_id; /* Thread Context number */ |
75 | #endif | 75 | #endif |
76 | void *data; /* Additional data */ | 76 | void *data; /* Additional data */ |
77 | unsigned int watch_reg_count; /* Number that exist */ | 77 | unsigned int watch_reg_count; /* Number that exist */ |
78 | unsigned int watch_reg_use_cnt; /* Usable by ptrace */ | 78 | unsigned int watch_reg_use_cnt; /* Usable by ptrace */ |
79 | #define NUM_WATCH_REGS 4 | 79 | #define NUM_WATCH_REGS 4 |
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h index 90112adb1940..9904697bd792 100644 --- a/arch/mips/include/asm/cpu.h +++ b/arch/mips/include/asm/cpu.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * cpu.h: Values of the PRId register used to match up | 2 | * cpu.h: Values of the PRId register used to match up |
3 | * various MIPS cpu types. | 3 | * various MIPS cpu types. |
4 | * | 4 | * |
5 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) | 5 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) |
6 | * Copyright (C) 2004 Maciej W. Rozycki | 6 | * Copyright (C) 2004 Maciej W. Rozycki |
@@ -9,14 +9,14 @@ | |||
9 | #define _ASM_CPU_H | 9 | #define _ASM_CPU_H |
10 | 10 | ||
11 | /* Assigned Company values for bits 23:16 of the PRId Register | 11 | /* Assigned Company values for bits 23:16 of the PRId Register |
12 | (CP0 register 15, select 0). As of the MIPS32 and MIPS64 specs from | 12 | (CP0 register 15, select 0). As of the MIPS32 and MIPS64 specs from |
13 | MTI, the PRId register is defined in this (backwards compatible) | 13 | MTI, the PRId register is defined in this (backwards compatible) |
14 | way: | 14 | way: |
15 | 15 | ||
16 | +----------------+----------------+----------------+----------------+ | 16 | +----------------+----------------+----------------+----------------+ |
17 | | Company Options| Company ID | Processor ID | Revision | | 17 | | Company Options| Company ID | Processor ID | Revision | |
18 | +----------------+----------------+----------------+----------------+ | 18 | +----------------+----------------+----------------+----------------+ |
19 | 31 24 23 16 15 8 7 | 19 | 31 24 23 16 15 8 7 |
20 | 20 | ||
21 | I don't have docs for all the previous processors, but my impression is | 21 | I don't have docs for all the previous processors, but my impression is |
22 | that bits 16-23 have been 0 for all MIPS processors before the MIPS32/64 | 22 | that bits 16-23 have been 0 for all MIPS processors before the MIPS32/64 |
@@ -29,7 +29,7 @@ | |||
29 | #define PRID_COMP_ALCHEMY 0x030000 | 29 | #define PRID_COMP_ALCHEMY 0x030000 |
30 | #define PRID_COMP_SIBYTE 0x040000 | 30 | #define PRID_COMP_SIBYTE 0x040000 |
31 | #define PRID_COMP_SANDCRAFT 0x050000 | 31 | #define PRID_COMP_SANDCRAFT 0x050000 |
32 | #define PRID_COMP_NXP 0x060000 | 32 | #define PRID_COMP_NXP 0x060000 |
33 | #define PRID_COMP_TOSHIBA 0x070000 | 33 | #define PRID_COMP_TOSHIBA 0x070000 |
34 | #define PRID_COMP_LSI 0x080000 | 34 | #define PRID_COMP_LSI 0x080000 |
35 | #define PRID_COMP_LEXRA 0x0b0000 | 35 | #define PRID_COMP_LEXRA 0x0b0000 |
@@ -38,9 +38,9 @@ | |||
38 | #define PRID_COMP_INGENIC 0xd00000 | 38 | #define PRID_COMP_INGENIC 0xd00000 |
39 | 39 | ||
40 | /* | 40 | /* |
41 | * Assigned values for the product ID register. In order to detect a | 41 | * Assigned values for the product ID register. In order to detect a |
42 | * certain CPU type exactly eventually additional registers may need to | 42 | * certain CPU type exactly eventually additional registers may need to |
43 | * be examined. These are valid when 23:16 == PRID_COMP_LEGACY | 43 | * be examined. These are valid when 23:16 == PRID_COMP_LEGACY |
44 | */ | 44 | */ |
45 | #define PRID_IMP_R2000 0x0100 | 45 | #define PRID_IMP_R2000 0x0100 |
46 | #define PRID_IMP_AU1_REV1 0x0100 | 46 | #define PRID_IMP_AU1_REV1 0x0100 |
@@ -101,14 +101,14 @@ | |||
101 | * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE | 101 | * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE |
102 | */ | 102 | */ |
103 | 103 | ||
104 | #define PRID_IMP_SB1 0x0100 | 104 | #define PRID_IMP_SB1 0x0100 |
105 | #define PRID_IMP_SB1A 0x1100 | 105 | #define PRID_IMP_SB1A 0x1100 |
106 | 106 | ||
107 | /* | 107 | /* |
108 | * These are the PRID's for when 23:16 == PRID_COMP_SANDCRAFT | 108 | * These are the PRID's for when 23:16 == PRID_COMP_SANDCRAFT |
109 | */ | 109 | */ |
110 | 110 | ||
111 | #define PRID_IMP_SR71000 0x0400 | 111 | #define PRID_IMP_SR71000 0x0400 |
112 | 112 | ||
113 | /* | 113 | /* |
114 | * These are the PRID's for when 23:16 == PRID_COMP_BROADCOM | 114 | * These are the PRID's for when 23:16 == PRID_COMP_BROADCOM |
@@ -145,7 +145,7 @@ | |||
145 | * These are the PRID's for when 23:16 == PRID_COMP_INGENIC | 145 | * These are the PRID's for when 23:16 == PRID_COMP_INGENIC |
146 | */ | 146 | */ |
147 | 147 | ||
148 | #define PRID_IMP_JZRISC 0x0200 | 148 | #define PRID_IMP_JZRISC 0x0200 |
149 | 149 | ||
150 | /* | 150 | /* |
151 | * These are the PRID's for when 23:16 == PRID_COMP_NETLOGIC | 151 | * These are the PRID's for when 23:16 == PRID_COMP_NETLOGIC |
@@ -188,9 +188,9 @@ | |||
188 | #define PRID_REV_R3000A 0x0030 | 188 | #define PRID_REV_R3000A 0x0030 |
189 | #define PRID_REV_R3000 0x0020 | 189 | #define PRID_REV_R3000 0x0020 |
190 | #define PRID_REV_R2000A 0x0010 | 190 | #define PRID_REV_R2000A 0x0010 |
191 | #define PRID_REV_TX3912 0x0010 | 191 | #define PRID_REV_TX3912 0x0010 |
192 | #define PRID_REV_TX3922 0x0030 | 192 | #define PRID_REV_TX3922 0x0030 |
193 | #define PRID_REV_TX3927 0x0040 | 193 | #define PRID_REV_TX3927 0x0040 |
194 | #define PRID_REV_VR4111 0x0050 | 194 | #define PRID_REV_VR4111 0x0050 |
195 | #define PRID_REV_VR4181 0x0050 /* Same as VR4111 */ | 195 | #define PRID_REV_VR4181 0x0050 /* Same as VR4111 */ |
196 | #define PRID_REV_VR4121 0x0060 | 196 | #define PRID_REV_VR4121 0x0060 |
@@ -217,9 +217,9 @@ | |||
217 | * FPU implementation/revision register (CP1 control register 0). | 217 | * FPU implementation/revision register (CP1 control register 0). |
218 | * | 218 | * |
219 | * +---------------------------------+----------------+----------------+ | 219 | * +---------------------------------+----------------+----------------+ |
220 | * | 0 | Implementation | Revision | | 220 | * | 0 | Implementation | Revision | |
221 | * +---------------------------------+----------------+----------------+ | 221 | * +---------------------------------+----------------+----------------+ |
222 | * 31 16 15 8 7 0 | 222 | * 31 16 15 8 7 0 |
223 | */ | 223 | */ |
224 | 224 | ||
225 | #define FPIR_IMP_NONE 0x0000 | 225 | #define FPIR_IMP_NONE 0x0000 |
diff --git a/arch/mips/include/asm/dec/ioasic_addrs.h b/arch/mips/include/asm/dec/ioasic_addrs.h index 4cbc1f8a1129..a8665a7611c2 100644 --- a/arch/mips/include/asm/dec/ioasic_addrs.h +++ b/arch/mips/include/asm/dec/ioasic_addrs.h | |||
@@ -25,22 +25,22 @@ | |||
25 | */ | 25 | */ |
26 | #define IOASIC_SYS_ROM (0*IOASIC_SLOT_SIZE) /* system board ROM */ | 26 | #define IOASIC_SYS_ROM (0*IOASIC_SLOT_SIZE) /* system board ROM */ |
27 | #define IOASIC_IOCTL (1*IOASIC_SLOT_SIZE) /* I/O ASIC */ | 27 | #define IOASIC_IOCTL (1*IOASIC_SLOT_SIZE) /* I/O ASIC */ |
28 | #define IOASIC_ESAR (2*IOASIC_SLOT_SIZE) /* LANCE MAC address chip */ | 28 | #define IOASIC_ESAR (2*IOASIC_SLOT_SIZE) /* LANCE MAC address chip */ |
29 | #define IOASIC_LANCE (3*IOASIC_SLOT_SIZE) /* LANCE Ethernet */ | 29 | #define IOASIC_LANCE (3*IOASIC_SLOT_SIZE) /* LANCE Ethernet */ |
30 | #define IOASIC_SCC0 (4*IOASIC_SLOT_SIZE) /* SCC #0 */ | 30 | #define IOASIC_SCC0 (4*IOASIC_SLOT_SIZE) /* SCC #0 */ |
31 | #define IOASIC_VDAC_HI (5*IOASIC_SLOT_SIZE) /* VDAC (maxine) */ | 31 | #define IOASIC_VDAC_HI (5*IOASIC_SLOT_SIZE) /* VDAC (maxine) */ |
32 | #define IOASIC_SCC1 (6*IOASIC_SLOT_SIZE) /* SCC #1 (3min, 3max+) */ | 32 | #define IOASIC_SCC1 (6*IOASIC_SLOT_SIZE) /* SCC #1 (3min, 3max+) */ |
33 | #define IOASIC_VDAC_LO (7*IOASIC_SLOT_SIZE) /* VDAC (maxine) */ | 33 | #define IOASIC_VDAC_LO (7*IOASIC_SLOT_SIZE) /* VDAC (maxine) */ |
34 | #define IOASIC_TOY (8*IOASIC_SLOT_SIZE) /* RTC */ | 34 | #define IOASIC_TOY (8*IOASIC_SLOT_SIZE) /* RTC */ |
35 | #define IOASIC_ISDN (9*IOASIC_SLOT_SIZE) /* ISDN (maxine) */ | 35 | #define IOASIC_ISDN (9*IOASIC_SLOT_SIZE) /* ISDN (maxine) */ |
36 | #define IOASIC_ERRADDR (9*IOASIC_SLOT_SIZE) /* bus error address (3max+) */ | 36 | #define IOASIC_ERRADDR (9*IOASIC_SLOT_SIZE) /* bus error address (3max+) */ |
37 | #define IOASIC_CHKSYN (10*IOASIC_SLOT_SIZE) /* ECC syndrome (3max+) */ | 37 | #define IOASIC_CHKSYN (10*IOASIC_SLOT_SIZE) /* ECC syndrome (3max+) */ |
38 | #define IOASIC_ACC_BUS (10*IOASIC_SLOT_SIZE) /* ACCESS.bus (maxine) */ | 38 | #define IOASIC_ACC_BUS (10*IOASIC_SLOT_SIZE) /* ACCESS.bus (maxine) */ |
39 | #define IOASIC_MCR (11*IOASIC_SLOT_SIZE) /* memory control (3max+) */ | 39 | #define IOASIC_MCR (11*IOASIC_SLOT_SIZE) /* memory control (3max+) */ |
40 | #define IOASIC_FLOPPY (11*IOASIC_SLOT_SIZE) /* FDC (maxine) */ | 40 | #define IOASIC_FLOPPY (11*IOASIC_SLOT_SIZE) /* FDC (maxine) */ |
41 | #define IOASIC_SCSI (12*IOASIC_SLOT_SIZE) /* ASC SCSI */ | 41 | #define IOASIC_SCSI (12*IOASIC_SLOT_SIZE) /* ASC SCSI */ |
42 | #define IOASIC_FDC_DMA (13*IOASIC_SLOT_SIZE) /* FDC DMA (maxine) */ | 42 | #define IOASIC_FDC_DMA (13*IOASIC_SLOT_SIZE) /* FDC DMA (maxine) */ |
43 | #define IOASIC_SCSI_DMA (14*IOASIC_SLOT_SIZE) /* ??? */ | 43 | #define IOASIC_SCSI_DMA (14*IOASIC_SLOT_SIZE) /* ??? */ |
44 | #define IOASIC_RES_15 (15*IOASIC_SLOT_SIZE) /* unused? */ | 44 | #define IOASIC_RES_15 (15*IOASIC_SLOT_SIZE) /* unused? */ |
45 | 45 | ||
46 | 46 | ||
diff --git a/arch/mips/include/asm/dec/kn01.h b/arch/mips/include/asm/dec/kn01.h index 88d9ffd74258..0eb3241de706 100644 --- a/arch/mips/include/asm/dec/kn01.h +++ b/arch/mips/include/asm/dec/kn01.h | |||
@@ -57,12 +57,12 @@ | |||
57 | /* | 57 | /* |
58 | * System Control & Status Register bits. | 58 | * System Control & Status Register bits. |
59 | */ | 59 | */ |
60 | #define KN01_CSR_MNFMOD (1<<15) /* MNFMOD manufacturing jumper */ | 60 | #define KN01_CSR_MNFMOD (1<<15) /* MNFMOD manufacturing jumper */ |
61 | #define KN01_CSR_STATUS (1<<14) /* self-test result status output */ | 61 | #define KN01_CSR_STATUS (1<<14) /* self-test result status output */ |
62 | #define KN01_CSR_PARDIS (1<<13) /* parity error disable */ | 62 | #define KN01_CSR_PARDIS (1<<13) /* parity error disable */ |
63 | #define KN01_CSR_CRSRTST (1<<12) /* PCC test output */ | 63 | #define KN01_CSR_CRSRTST (1<<12) /* PCC test output */ |
64 | #define KN01_CSR_MONO (1<<11) /* mono/color fb SIMM installed */ | 64 | #define KN01_CSR_MONO (1<<11) /* mono/color fb SIMM installed */ |
65 | #define KN01_CSR_MEMERR (1<<10) /* write timeout error status & ack*/ | 65 | #define KN01_CSR_MEMERR (1<<10) /* write timeout error status & ack*/ |
66 | #define KN01_CSR_VINT (1<<9) /* PCC area detect #2 status & ack */ | 66 | #define KN01_CSR_VINT (1<<9) /* PCC area detect #2 status & ack */ |
67 | #define KN01_CSR_TXDIS (1<<8) /* DZ11 transmit disable */ | 67 | #define KN01_CSR_TXDIS (1<<8) /* DZ11 transmit disable */ |
68 | #define KN01_CSR_VBGTRG (1<<2) /* blue DAC voltage over green (r/o) */ | 68 | #define KN01_CSR_VBGTRG (1<<2) /* blue DAC voltage over green (r/o) */ |
diff --git a/arch/mips/include/asm/dec/kn02ca.h b/arch/mips/include/asm/dec/kn02ca.h index 92c0fe256099..69dc2a9a2d0f 100644 --- a/arch/mips/include/asm/dec/kn02ca.h +++ b/arch/mips/include/asm/dec/kn02ca.h | |||
@@ -68,7 +68,7 @@ | |||
68 | #define KN03CA_IO_SSR_ISDN_RST (1<<12) /* ~ISDN (Am79C30A) reset */ | 68 | #define KN03CA_IO_SSR_ISDN_RST (1<<12) /* ~ISDN (Am79C30A) reset */ |
69 | 69 | ||
70 | #define KN03CA_IO_SSR_FLOPPY_RST (1<<7) /* ~FDC (82077) reset */ | 70 | #define KN03CA_IO_SSR_FLOPPY_RST (1<<7) /* ~FDC (82077) reset */ |
71 | #define KN03CA_IO_SSR_VIDEO_RST (1<<6) /* ~framebuffer reset */ | 71 | #define KN03CA_IO_SSR_VIDEO_RST (1<<6) /* ~framebuffer reset */ |
72 | #define KN03CA_IO_SSR_AB_RST (1<<5) /* ACCESS.bus reset */ | 72 | #define KN03CA_IO_SSR_AB_RST (1<<5) /* ACCESS.bus reset */ |
73 | #define KN03CA_IO_SSR_RES_4 (1<<4) /* unused */ | 73 | #define KN03CA_IO_SSR_RES_4 (1<<4) /* unused */ |
74 | #define KN03CA_IO_SSR_RES_3 (1<<4) /* unused */ | 74 | #define KN03CA_IO_SSR_RES_3 (1<<4) /* unused */ |
diff --git a/arch/mips/include/asm/dec/prom.h b/arch/mips/include/asm/dec/prom.h index c0ead6313845..446577712bee 100644 --- a/arch/mips/include/asm/dec/prom.h +++ b/arch/mips/include/asm/dec/prom.h | |||
@@ -49,7 +49,7 @@ | |||
49 | 49 | ||
50 | #ifdef CONFIG_64BIT | 50 | #ifdef CONFIG_64BIT |
51 | 51 | ||
52 | #define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */ | 52 | #define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */ |
53 | 53 | ||
54 | #else /* !CONFIG_64BIT */ | 54 | #else /* !CONFIG_64BIT */ |
55 | 55 | ||
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h index 006b43e38a9c..f8fc74b6cb47 100644 --- a/arch/mips/include/asm/dma-mapping.h +++ b/arch/mips/include/asm/dma-mapping.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <asm/cache.h> | 5 | #include <asm/cache.h> |
6 | #include <asm-generic/dma-coherent.h> | 6 | #include <asm-generic/dma-coherent.h> |
7 | 7 | ||
8 | #ifndef CONFIG_SGI_IP27 /* Kludge to fix 2.6.39 build for IP27 */ | 8 | #ifndef CONFIG_SGI_IP27 /* Kludge to fix 2.6.39 build for IP27 */ |
9 | #include <dma-coherence.h> | 9 | #include <dma-coherence.h> |
10 | #endif | 10 | #endif |
11 | 11 | ||
diff --git a/arch/mips/include/asm/dma.h b/arch/mips/include/asm/dma.h index f5097f65a8ab..5b9ed1bffdbc 100644 --- a/arch/mips/include/asm/dma.h +++ b/arch/mips/include/asm/dma.h | |||
@@ -47,21 +47,21 @@ | |||
47 | * | 47 | * |
48 | * Address mapping for channels 0-3: | 48 | * Address mapping for channels 0-3: |
49 | * | 49 | * |
50 | * A23 ... A16 A15 ... A8 A7 ... A0 (Physical addresses) | 50 | * A23 ... A16 A15 ... A8 A7 ... A0 (Physical addresses) |
51 | * | ... | | ... | | ... | | 51 | * | ... | | ... | | ... | |
52 | * | ... | | ... | | ... | | 52 | * | ... | | ... | | ... | |
53 | * | ... | | ... | | ... | | 53 | * | ... | | ... | | ... | |
54 | * P7 ... P0 A7 ... A0 A7 ... A0 | 54 | * P7 ... P0 A7 ... A0 A7 ... A0 |
55 | * | Page | Addr MSB | Addr LSB | (DMA registers) | 55 | * | Page | Addr MSB | Addr LSB | (DMA registers) |
56 | * | 56 | * |
57 | * Address mapping for channels 5-7: | 57 | * Address mapping for channels 5-7: |
58 | * | 58 | * |
59 | * A23 ... A17 A16 A15 ... A9 A8 A7 ... A1 A0 (Physical addresses) | 59 | * A23 ... A17 A16 A15 ... A9 A8 A7 ... A1 A0 (Physical addresses) |
60 | * | ... | \ \ ... \ \ \ ... \ \ | 60 | * | ... | \ \ ... \ \ \ ... \ \ |
61 | * | ... | \ \ ... \ \ \ ... \ (not used) | 61 | * | ... | \ \ ... \ \ \ ... \ (not used) |
62 | * | ... | \ \ ... \ \ \ ... \ | 62 | * | ... | \ \ ... \ \ \ ... \ |
63 | * P7 ... P1 (0) A7 A6 ... A0 A7 A6 ... A0 | 63 | * P7 ... P1 (0) A7 A6 ... A0 A7 A6 ... A0 |
64 | * | Page | Addr MSB | Addr LSB | (DMA registers) | 64 | * | Page | Addr MSB | Addr LSB | (DMA registers) |
65 | * | 65 | * |
66 | * Again, channels 5-7 transfer _physical_ words (16 bits), so addresses | 66 | * Again, channels 5-7 transfer _physical_ words (16 bits), so addresses |
67 | * and counts _must_ be word-aligned (the lowest address bit is _ignored_ at | 67 | * and counts _must_ be word-aligned (the lowest address bit is _ignored_ at |
@@ -102,55 +102,55 @@ | |||
102 | /* DMA controller registers */ | 102 | /* DMA controller registers */ |
103 | #define DMA1_CMD_REG 0x08 /* command register (w) */ | 103 | #define DMA1_CMD_REG 0x08 /* command register (w) */ |
104 | #define DMA1_STAT_REG 0x08 /* status register (r) */ | 104 | #define DMA1_STAT_REG 0x08 /* status register (r) */ |
105 | #define DMA1_REQ_REG 0x09 /* request register (w) */ | 105 | #define DMA1_REQ_REG 0x09 /* request register (w) */ |
106 | #define DMA1_MASK_REG 0x0A /* single-channel mask (w) */ | 106 | #define DMA1_MASK_REG 0x0A /* single-channel mask (w) */ |
107 | #define DMA1_MODE_REG 0x0B /* mode register (w) */ | 107 | #define DMA1_MODE_REG 0x0B /* mode register (w) */ |
108 | #define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */ | 108 | #define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */ |
109 | #define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */ | 109 | #define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */ |
110 | #define DMA1_RESET_REG 0x0D /* Master Clear (w) */ | 110 | #define DMA1_RESET_REG 0x0D /* Master Clear (w) */ |
111 | #define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */ | 111 | #define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */ |
112 | #define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */ | 112 | #define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */ |
113 | 113 | ||
114 | #define DMA2_CMD_REG 0xD0 /* command register (w) */ | 114 | #define DMA2_CMD_REG 0xD0 /* command register (w) */ |
115 | #define DMA2_STAT_REG 0xD0 /* status register (r) */ | 115 | #define DMA2_STAT_REG 0xD0 /* status register (r) */ |
116 | #define DMA2_REQ_REG 0xD2 /* request register (w) */ | 116 | #define DMA2_REQ_REG 0xD2 /* request register (w) */ |
117 | #define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */ | 117 | #define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */ |
118 | #define DMA2_MODE_REG 0xD6 /* mode register (w) */ | 118 | #define DMA2_MODE_REG 0xD6 /* mode register (w) */ |
119 | #define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */ | 119 | #define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */ |
120 | #define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */ | 120 | #define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */ |
121 | #define DMA2_RESET_REG 0xDA /* Master Clear (w) */ | 121 | #define DMA2_RESET_REG 0xDA /* Master Clear (w) */ |
122 | #define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */ | 122 | #define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */ |
123 | #define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */ | 123 | #define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */ |
124 | 124 | ||
125 | #define DMA_ADDR_0 0x00 /* DMA address registers */ | 125 | #define DMA_ADDR_0 0x00 /* DMA address registers */ |
126 | #define DMA_ADDR_1 0x02 | 126 | #define DMA_ADDR_1 0x02 |
127 | #define DMA_ADDR_2 0x04 | 127 | #define DMA_ADDR_2 0x04 |
128 | #define DMA_ADDR_3 0x06 | 128 | #define DMA_ADDR_3 0x06 |
129 | #define DMA_ADDR_4 0xC0 | 129 | #define DMA_ADDR_4 0xC0 |
130 | #define DMA_ADDR_5 0xC4 | 130 | #define DMA_ADDR_5 0xC4 |
131 | #define DMA_ADDR_6 0xC8 | 131 | #define DMA_ADDR_6 0xC8 |
132 | #define DMA_ADDR_7 0xCC | 132 | #define DMA_ADDR_7 0xCC |
133 | 133 | ||
134 | #define DMA_CNT_0 0x01 /* DMA count registers */ | 134 | #define DMA_CNT_0 0x01 /* DMA count registers */ |
135 | #define DMA_CNT_1 0x03 | 135 | #define DMA_CNT_1 0x03 |
136 | #define DMA_CNT_2 0x05 | 136 | #define DMA_CNT_2 0x05 |
137 | #define DMA_CNT_3 0x07 | 137 | #define DMA_CNT_3 0x07 |
138 | #define DMA_CNT_4 0xC2 | 138 | #define DMA_CNT_4 0xC2 |
139 | #define DMA_CNT_5 0xC6 | 139 | #define DMA_CNT_5 0xC6 |
140 | #define DMA_CNT_6 0xCA | 140 | #define DMA_CNT_6 0xCA |
141 | #define DMA_CNT_7 0xCE | 141 | #define DMA_CNT_7 0xCE |
142 | 142 | ||
143 | #define DMA_PAGE_0 0x87 /* DMA page registers */ | 143 | #define DMA_PAGE_0 0x87 /* DMA page registers */ |
144 | #define DMA_PAGE_1 0x83 | 144 | #define DMA_PAGE_1 0x83 |
145 | #define DMA_PAGE_2 0x81 | 145 | #define DMA_PAGE_2 0x81 |
146 | #define DMA_PAGE_3 0x82 | 146 | #define DMA_PAGE_3 0x82 |
147 | #define DMA_PAGE_5 0x8B | 147 | #define DMA_PAGE_5 0x8B |
148 | #define DMA_PAGE_6 0x89 | 148 | #define DMA_PAGE_6 0x89 |
149 | #define DMA_PAGE_7 0x8A | 149 | #define DMA_PAGE_7 0x8A |
150 | 150 | ||
151 | #define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */ | 151 | #define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */ |
152 | #define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */ | 152 | #define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */ |
153 | #define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */ | 153 | #define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */ |
154 | 154 | ||
155 | #define DMA_AUTOINIT 0x10 | 155 | #define DMA_AUTOINIT 0x10 |
156 | 156 | ||
@@ -172,7 +172,7 @@ static __inline__ void release_dma_lock(unsigned long flags) | |||
172 | static __inline__ void enable_dma(unsigned int dmanr) | 172 | static __inline__ void enable_dma(unsigned int dmanr) |
173 | { | 173 | { |
174 | if (dmanr<=3) | 174 | if (dmanr<=3) |
175 | dma_outb(dmanr, DMA1_MASK_REG); | 175 | dma_outb(dmanr, DMA1_MASK_REG); |
176 | else | 176 | else |
177 | dma_outb(dmanr & 3, DMA2_MASK_REG); | 177 | dma_outb(dmanr & 3, DMA2_MASK_REG); |
178 | } | 178 | } |
@@ -204,7 +204,7 @@ static __inline__ void clear_dma_ff(unsigned int dmanr) | |||
204 | static __inline__ void set_dma_mode(unsigned int dmanr, char mode) | 204 | static __inline__ void set_dma_mode(unsigned int dmanr, char mode) |
205 | { | 205 | { |
206 | if (dmanr<=3) | 206 | if (dmanr<=3) |
207 | dma_outb(mode | dmanr, DMA1_MODE_REG); | 207 | dma_outb(mode | dmanr, DMA1_MODE_REG); |
208 | else | 208 | else |
209 | dma_outb(mode | (dmanr&3), DMA2_MODE_REG); | 209 | dma_outb(mode | (dmanr&3), DMA2_MODE_REG); |
210 | } | 210 | } |
@@ -248,10 +248,10 @@ static __inline__ void set_dma_page(unsigned int dmanr, char pagenr) | |||
248 | static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a) | 248 | static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a) |
249 | { | 249 | { |
250 | set_dma_page(dmanr, a>>16); | 250 | set_dma_page(dmanr, a>>16); |
251 | if (dmanr <= 3) { | 251 | if (dmanr <= 3) { |
252 | dma_outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); | 252 | dma_outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); |
253 | dma_outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); | 253 | dma_outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); |
254 | } else { | 254 | } else { |
255 | dma_outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); | 255 | dma_outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); |
256 | dma_outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); | 256 | dma_outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); |
257 | } | 257 | } |
@@ -268,14 +268,14 @@ static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a) | |||
268 | */ | 268 | */ |
269 | static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) | 269 | static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) |
270 | { | 270 | { |
271 | count--; | 271 | count--; |
272 | if (dmanr <= 3) { | 272 | if (dmanr <= 3) { |
273 | dma_outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); | 273 | dma_outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); |
274 | dma_outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); | 274 | dma_outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); |
275 | } else { | 275 | } else { |
276 | dma_outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); | 276 | dma_outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); |
277 | dma_outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); | 277 | dma_outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); |
278 | } | 278 | } |
279 | } | 279 | } |
280 | 280 | ||
281 | 281 | ||
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h index 455c0ac7d4ea..cf3ae2480b1d 100644 --- a/arch/mips/include/asm/elf.h +++ b/arch/mips/include/asm/elf.h | |||
@@ -11,13 +11,13 @@ | |||
11 | 11 | ||
12 | /* ELF header e_flags defines. */ | 12 | /* ELF header e_flags defines. */ |
13 | /* MIPS architecture level. */ | 13 | /* MIPS architecture level. */ |
14 | #define EF_MIPS_ARCH_1 0x00000000 /* -mips1 code. */ | 14 | #define EF_MIPS_ARCH_1 0x00000000 /* -mips1 code. */ |
15 | #define EF_MIPS_ARCH_2 0x10000000 /* -mips2 code. */ | 15 | #define EF_MIPS_ARCH_2 0x10000000 /* -mips2 code. */ |
16 | #define EF_MIPS_ARCH_3 0x20000000 /* -mips3 code. */ | 16 | #define EF_MIPS_ARCH_3 0x20000000 /* -mips3 code. */ |
17 | #define EF_MIPS_ARCH_4 0x30000000 /* -mips4 code. */ | 17 | #define EF_MIPS_ARCH_4 0x30000000 /* -mips4 code. */ |
18 | #define EF_MIPS_ARCH_5 0x40000000 /* -mips5 code. */ | 18 | #define EF_MIPS_ARCH_5 0x40000000 /* -mips5 code. */ |
19 | #define EF_MIPS_ARCH_32 0x50000000 /* MIPS32 code. */ | 19 | #define EF_MIPS_ARCH_32 0x50000000 /* MIPS32 code. */ |
20 | #define EF_MIPS_ARCH_64 0x60000000 /* MIPS64 code. */ | 20 | #define EF_MIPS_ARCH_64 0x60000000 /* MIPS64 code. */ |
21 | #define EF_MIPS_ARCH_32R2 0x70000000 /* MIPS32 R2 code. */ | 21 | #define EF_MIPS_ARCH_32R2 0x70000000 /* MIPS32 R2 code. */ |
22 | #define EF_MIPS_ARCH_64R2 0x80000000 /* MIPS64 R2 code. */ | 22 | #define EF_MIPS_ARCH_64R2 0x80000000 /* MIPS64 R2 code. */ |
23 | 23 | ||
@@ -74,7 +74,7 @@ | |||
74 | #define R_MIPS_CALL16 11 | 74 | #define R_MIPS_CALL16 11 |
75 | #define R_MIPS_GPREL32 12 | 75 | #define R_MIPS_GPREL32 12 |
76 | /* The remaining relocs are defined on Irix, although they are not | 76 | /* The remaining relocs are defined on Irix, although they are not |
77 | in the MIPS ELF ABI. */ | 77 | in the MIPS ELF ABI. */ |
78 | #define R_MIPS_UNUSED1 13 | 78 | #define R_MIPS_UNUSED1 13 |
79 | #define R_MIPS_UNUSED2 14 | 79 | #define R_MIPS_UNUSED2 14 |
80 | #define R_MIPS_UNUSED3 15 | 80 | #define R_MIPS_UNUSED3 15 |
@@ -214,7 +214,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
214 | \ | 214 | \ |
215 | if (__h->e_machine != EM_MIPS) \ | 215 | if (__h->e_machine != EM_MIPS) \ |
216 | __res = 0; \ | 216 | __res = 0; \ |
217 | if (__h->e_ident[EI_CLASS] != ELFCLASS64) \ | 217 | if (__h->e_ident[EI_CLASS] != ELFCLASS64) \ |
218 | __res = 0; \ | 218 | __res = 0; \ |
219 | \ | 219 | \ |
220 | __res; \ | 220 | __res; \ |
@@ -292,7 +292,7 @@ do { \ | |||
292 | __SET_PERSONALITY32_O32(); \ | 292 | __SET_PERSONALITY32_O32(); \ |
293 | } while (0) | 293 | } while (0) |
294 | #else | 294 | #else |
295 | #define __SET_PERSONALITY32(ex) do { } while (0) | 295 | #define __SET_PERSONALITY32(ex) do { } while (0) |
296 | #endif | 296 | #endif |
297 | 297 | ||
298 | #define SET_PERSONALITY(ex) \ | 298 | #define SET_PERSONALITY(ex) \ |
@@ -337,11 +337,11 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); | |||
337 | instruction set this cpu supports. This could be done in userspace, | 337 | instruction set this cpu supports. This could be done in userspace, |
338 | but it's not easy, and we've already done it here. */ | 338 | but it's not easy, and we've already done it here. */ |
339 | 339 | ||
340 | #define ELF_HWCAP (0) | 340 | #define ELF_HWCAP (0) |
341 | 341 | ||
342 | /* | 342 | /* |
343 | * This yields a string that ld.so will use to load implementation | 343 | * This yields a string that ld.so will use to load implementation |
344 | * specific libraries for optimization. This is more specific in | 344 | * specific libraries for optimization. This is more specific in |
345 | * intent than poking at uname or /proc/cpuinfo. | 345 | * intent than poking at uname or /proc/cpuinfo. |
346 | */ | 346 | */ |
347 | 347 | ||
@@ -365,11 +365,11 @@ extern const char *__elf_platform; | |||
365 | 365 | ||
366 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical | 366 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical |
367 | use of this is to invoke "./ld.so someprog" to test out a new version of | 367 | use of this is to invoke "./ld.so someprog" to test out a new version of |
368 | the loader. We need to make sure that it is out of the way of the program | 368 | the loader. We need to make sure that it is out of the way of the program |
369 | that it will "exec", and that there is sufficient room for the brk. */ | 369 | that it will "exec", and that there is sufficient room for the brk. */ |
370 | 370 | ||
371 | #ifndef ELF_ET_DYN_BASE | 371 | #ifndef ELF_ET_DYN_BASE |
372 | #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) | 372 | #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) |
373 | #endif | 373 | #endif |
374 | 374 | ||
375 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 | 375 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 |
diff --git a/arch/mips/include/asm/emma/emma2rh.h b/arch/mips/include/asm/emma/emma2rh.h index c1449d20ef0e..ecf059608bd8 100644 --- a/arch/mips/include/asm/emma/emma2rh.h +++ b/arch/mips/include/asm/emma/emma2rh.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Copyright (C) NEC Electronics Corporation 2005-2006 | 2 | * Copyright (C) NEC Electronics Corporation 2005-2006 |
3 | * | 3 | * |
4 | * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h | 4 | * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h |
5 | * Copyright 2001 MontaVista Software Inc. | 5 | * Copyright 2001 MontaVista Software Inc. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -40,7 +40,7 @@ | |||
40 | #define EMMA2RH_BHIF_INT1_EN_2 (0x000058+REGBASE) | 40 | #define EMMA2RH_BHIF_INT1_EN_2 (0x000058+REGBASE) |
41 | #define EMMA2RH_BHIF_SW_INT (0x000070+REGBASE) | 41 | #define EMMA2RH_BHIF_SW_INT (0x000070+REGBASE) |
42 | #define EMMA2RH_BHIF_SW_INT_EN (0x000080+REGBASE) | 42 | #define EMMA2RH_BHIF_SW_INT_EN (0x000080+REGBASE) |
43 | #define EMMA2RH_BHIF_SW_INT_CLR (0x000090+REGBASE) | 43 | #define EMMA2RH_BHIF_SW_INT_CLR (0x000090+REGBASE) |
44 | #define EMMA2RH_BHIF_MAIN_CTRL (0x0000b4+REGBASE) | 44 | #define EMMA2RH_BHIF_MAIN_CTRL (0x0000b4+REGBASE) |
45 | #define EMMA2RH_BHIF_EXCEPT_VECT_BASE_ADDRESS (0x0000c0+REGBASE) | 45 | #define EMMA2RH_BHIF_EXCEPT_VECT_BASE_ADDRESS (0x0000c0+REGBASE) |
46 | #define EMMA2RH_GPIO_DIR (0x110d20+REGBASE) | 46 | #define EMMA2RH_GPIO_DIR (0x110d20+REGBASE) |
@@ -73,7 +73,7 @@ | |||
73 | * Memory map (physical address) | 73 | * Memory map (physical address) |
74 | * | 74 | * |
75 | * Note most of the following address must be properly aligned by the | 75 | * Note most of the following address must be properly aligned by the |
76 | * corresponding size. For example, if PCI_IO_SIZE is 16MB, then | 76 | * corresponding size. For example, if PCI_IO_SIZE is 16MB, then |
77 | * PCI_IO_BASE must be aligned along 16MB boundary. | 77 | * PCI_IO_BASE must be aligned along 16MB boundary. |
78 | */ | 78 | */ |
79 | 79 | ||
@@ -96,8 +96,8 @@ | |||
96 | #define EMMA2RH_ROM_BASE 0x1c000000 | 96 | #define EMMA2RH_ROM_BASE 0x1c000000 |
97 | #define EMMA2RH_ROM_SIZE 0x04000000 /* 64 MB */ | 97 | #define EMMA2RH_ROM_SIZE 0x04000000 /* 64 MB */ |
98 | 98 | ||
99 | #define EMMA2RH_PCI_CONFIG_BASE EMMA2RH_PCI_IO_BASE | 99 | #define EMMA2RH_PCI_CONFIG_BASE EMMA2RH_PCI_IO_BASE |
100 | #define EMMA2RH_PCI_CONFIG_SIZE EMMA2RH_PCI_IO_SIZE | 100 | #define EMMA2RH_PCI_CONFIG_SIZE EMMA2RH_PCI_IO_SIZE |
101 | 101 | ||
102 | #define NUM_EMMA2RH_IRQ 96 | 102 | #define NUM_EMMA2RH_IRQ 96 |
103 | 103 | ||
@@ -169,51 +169,51 @@ static inline u8 emma2rh_in8(u32 offset) | |||
169 | **/ | 169 | **/ |
170 | 170 | ||
171 | /*---------------------------------------------------------------------------*/ | 171 | /*---------------------------------------------------------------------------*/ |
172 | /* CNT - Control register (00H R/W) */ | 172 | /* CNT - Control register (00H R/W) */ |
173 | /*---------------------------------------------------------------------------*/ | 173 | /*---------------------------------------------------------------------------*/ |
174 | #define SPT 0x00000001 | 174 | #define SPT 0x00000001 |
175 | #define STT 0x00000002 | 175 | #define STT 0x00000002 |
176 | #define ACKE 0x00000004 | 176 | #define ACKE 0x00000004 |
177 | #define WTIM 0x00000008 | 177 | #define WTIM 0x00000008 |
178 | #define SPIE 0x00000010 | 178 | #define SPIE 0x00000010 |
179 | #define WREL 0x00000020 | 179 | #define WREL 0x00000020 |
180 | #define LREL 0x00000040 | 180 | #define LREL 0x00000040 |
181 | #define IICE 0x00000080 | 181 | #define IICE 0x00000080 |
182 | #define CNT_RESERVED 0x000000ff /* reserved bit 0 */ | 182 | #define CNT_RESERVED 0x000000ff /* reserved bit 0 */ |
183 | 183 | ||
184 | #define I2C_EMMA_START (IICE | STT) | 184 | #define I2C_EMMA_START (IICE | STT) |
185 | #define I2C_EMMA_STOP (IICE | SPT) | 185 | #define I2C_EMMA_STOP (IICE | SPT) |
186 | #define I2C_EMMA_REPSTART I2C_EMMA_START | 186 | #define I2C_EMMA_REPSTART I2C_EMMA_START |
187 | 187 | ||
188 | /*---------------------------------------------------------------------------*/ | 188 | /*---------------------------------------------------------------------------*/ |
189 | /* STA - Status register (10H Read) */ | 189 | /* STA - Status register (10H Read) */ |
190 | /*---------------------------------------------------------------------------*/ | 190 | /*---------------------------------------------------------------------------*/ |
191 | #define MSTS 0x00000080 | 191 | #define MSTS 0x00000080 |
192 | #define ALD 0x00000040 | 192 | #define ALD 0x00000040 |
193 | #define EXC 0x00000020 | 193 | #define EXC 0x00000020 |
194 | #define COI 0x00000010 | 194 | #define COI 0x00000010 |
195 | #define TRC 0x00000008 | 195 | #define TRC 0x00000008 |
196 | #define ACKD 0x00000004 | 196 | #define ACKD 0x00000004 |
197 | #define STD 0x00000002 | 197 | #define STD 0x00000002 |
198 | #define SPD 0x00000001 | 198 | #define SPD 0x00000001 |
199 | 199 | ||
200 | /*---------------------------------------------------------------------------*/ | 200 | /*---------------------------------------------------------------------------*/ |
201 | /* CSEL - Clock select register (20H R/W) */ | 201 | /* CSEL - Clock select register (20H R/W) */ |
202 | /*---------------------------------------------------------------------------*/ | 202 | /*---------------------------------------------------------------------------*/ |
203 | #define FCL 0x00000080 | 203 | #define FCL 0x00000080 |
204 | #define ND50 0x00000040 | 204 | #define ND50 0x00000040 |
205 | #define CLD 0x00000020 | 205 | #define CLD 0x00000020 |
206 | #define DAD 0x00000010 | 206 | #define DAD 0x00000010 |
207 | #define SMC 0x00000008 | 207 | #define SMC 0x00000008 |
208 | #define DFC 0x00000004 | 208 | #define DFC 0x00000004 |
209 | #define CL 0x00000003 | 209 | #define CL 0x00000003 |
210 | #define CSEL_RESERVED 0x000000ff /* reserved bit 0 */ | 210 | #define CSEL_RESERVED 0x000000ff /* reserved bit 0 */ |
211 | 211 | ||
212 | #define FAST397 0x0000008b | 212 | #define FAST397 0x0000008b |
213 | #define FAST297 0x0000008a | 213 | #define FAST297 0x0000008a |
214 | #define FAST347 0x0000000b | 214 | #define FAST347 0x0000000b |
215 | #define FAST260 0x0000000a | 215 | #define FAST260 0x0000000a |
216 | #define FAST130 0x00000008 | 216 | #define FAST130 0x00000008 |
217 | #define STANDARD108 0x00000083 | 217 | #define STANDARD108 0x00000083 |
218 | #define STANDARD83 0x00000082 | 218 | #define STANDARD83 0x00000082 |
219 | #define STANDARD95 0x00000003 | 219 | #define STANDARD95 0x00000003 |
@@ -222,32 +222,32 @@ static inline u8 emma2rh_in8(u32 offset) | |||
222 | #define STANDARD71 0x00000000 | 222 | #define STANDARD71 0x00000000 |
223 | 223 | ||
224 | /*---------------------------------------------------------------------------*/ | 224 | /*---------------------------------------------------------------------------*/ |
225 | /* SVA - Slave address register (30H R/W) */ | 225 | /* SVA - Slave address register (30H R/W) */ |
226 | /*---------------------------------------------------------------------------*/ | 226 | /*---------------------------------------------------------------------------*/ |
227 | #define SVA 0x000000fe | 227 | #define SVA 0x000000fe |
228 | 228 | ||
229 | /*---------------------------------------------------------------------------*/ | 229 | /*---------------------------------------------------------------------------*/ |
230 | /* SHR - Shift register (40H R/W) */ | 230 | /* SHR - Shift register (40H R/W) */ |
231 | /*---------------------------------------------------------------------------*/ | 231 | /*---------------------------------------------------------------------------*/ |
232 | #define SR 0x000000ff | 232 | #define SR 0x000000ff |
233 | 233 | ||
234 | /*---------------------------------------------------------------------------*/ | 234 | /*---------------------------------------------------------------------------*/ |
235 | /* INT - Interrupt register (50H R/W) */ | 235 | /* INT - Interrupt register (50H R/W) */ |
236 | /* INTM - Interrupt mask register (60H R/W) */ | 236 | /* INTM - Interrupt mask register (60H R/W) */ |
237 | /*---------------------------------------------------------------------------*/ | 237 | /*---------------------------------------------------------------------------*/ |
238 | #define INTE0 0x00000001 | 238 | #define INTE0 0x00000001 |
239 | 239 | ||
240 | /*********************************************************************** | 240 | /*********************************************************************** |
241 | * I2C registers | 241 | * I2C registers |
242 | *********************************************************************** | 242 | *********************************************************************** |
243 | */ | 243 | */ |
244 | #define I2C_EMMA_CNT 0x00 | 244 | #define I2C_EMMA_CNT 0x00 |
245 | #define I2C_EMMA_STA 0x10 | 245 | #define I2C_EMMA_STA 0x10 |
246 | #define I2C_EMMA_CSEL 0x20 | 246 | #define I2C_EMMA_CSEL 0x20 |
247 | #define I2C_EMMA_SVA 0x30 | 247 | #define I2C_EMMA_SVA 0x30 |
248 | #define I2C_EMMA_SHR 0x40 | 248 | #define I2C_EMMA_SHR 0x40 |
249 | #define I2C_EMMA_INT 0x50 | 249 | #define I2C_EMMA_INT 0x50 |
250 | #define I2C_EMMA_INTM 0x60 | 250 | #define I2C_EMMA_INTM 0x60 |
251 | 251 | ||
252 | /* | 252 | /* |
253 | * include the board dependent part | 253 | * include the board dependent part |
diff --git a/arch/mips/include/asm/emma/markeins.h b/arch/mips/include/asm/emma/markeins.h index bf2d229c2dae..e55a67477820 100644 --- a/arch/mips/include/asm/emma/markeins.h +++ b/arch/mips/include/asm/emma/markeins.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Copyright (C) NEC Electronics Corporation 2005-2006 | 2 | * Copyright (C) NEC Electronics Corporation 2005-2006 |
3 | * | 3 | * |
4 | * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h | 4 | * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h |
5 | * Copyright 2001 MontaVista Software Inc. | 5 | * Copyright 2001 MontaVista Software Inc. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/include/asm/fixmap.h b/arch/mips/include/asm/fixmap.h index 98bcc98cf29b..dfaaf493e9d4 100644 --- a/arch/mips/include/asm/fixmap.h +++ b/arch/mips/include/asm/fixmap.h | |||
@@ -95,7 +95,7 @@ static inline unsigned long fix_to_virt(const unsigned int idx) | |||
95 | if (idx >= __end_of_fixed_addresses) | 95 | if (idx >= __end_of_fixed_addresses) |
96 | __this_fixmap_does_not_exist(); | 96 | __this_fixmap_does_not_exist(); |
97 | 97 | ||
98 | return __fix_to_virt(idx); | 98 | return __fix_to_virt(idx); |
99 | } | 99 | } |
100 | 100 | ||
101 | static inline unsigned long virt_to_fix(const unsigned long vaddr) | 101 | static inline unsigned long virt_to_fix(const unsigned long vaddr) |
@@ -111,7 +111,7 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr) | |||
111 | * Called from pgtable_init() | 111 | * Called from pgtable_init() |
112 | */ | 112 | */ |
113 | extern void fixrange_init(unsigned long start, unsigned long end, | 113 | extern void fixrange_init(unsigned long start, unsigned long end, |
114 | pgd_t *pgd_base); | 114 | pgd_t *pgd_base); |
115 | 115 | ||
116 | 116 | ||
117 | #endif | 117 | #endif |
diff --git a/arch/mips/include/asm/floppy.h b/arch/mips/include/asm/floppy.h index 4456c9c47e21..d75aed36480a 100644 --- a/arch/mips/include/asm/floppy.h +++ b/arch/mips/include/asm/floppy.h | |||
@@ -24,9 +24,9 @@ static inline void fd_cacheflush(char * addr, long size) | |||
24 | * And on Mips's the CMOS info fails also ... | 24 | * And on Mips's the CMOS info fails also ... |
25 | * | 25 | * |
26 | * FIXME: This information should come from the ARC configuration tree | 26 | * FIXME: This information should come from the ARC configuration tree |
27 | * or wherever a particular machine has stored this ... | 27 | * or wherever a particular machine has stored this ... |
28 | */ | 28 | */ |
29 | #define FLOPPY0_TYPE fd_drive_type(0) | 29 | #define FLOPPY0_TYPE fd_drive_type(0) |
30 | #define FLOPPY1_TYPE fd_drive_type(1) | 30 | #define FLOPPY1_TYPE fd_drive_type(1) |
31 | 31 | ||
32 | #define FDC1 fd_getfdaddr1() | 32 | #define FDC1 fd_getfdaddr1() |
diff --git a/arch/mips/include/asm/fpregdef.h b/arch/mips/include/asm/fpregdef.h index 2b5fddc8f487..429481f9028d 100644 --- a/arch/mips/include/asm/fpregdef.h +++ b/arch/mips/include/asm/fpregdef.h | |||
@@ -20,15 +20,15 @@ | |||
20 | * These definitions only cover the R3000-ish 16/32 register model. | 20 | * These definitions only cover the R3000-ish 16/32 register model. |
21 | * But we're trying to be R3000 friendly anyway ... | 21 | * But we're trying to be R3000 friendly anyway ... |
22 | */ | 22 | */ |
23 | #define fv0 $f0 /* return value */ | 23 | #define fv0 $f0 /* return value */ |
24 | #define fv0f $f1 | 24 | #define fv0f $f1 |
25 | #define fv1 $f2 | 25 | #define fv1 $f2 |
26 | #define fv1f $f3 | 26 | #define fv1f $f3 |
27 | #define fa0 $f12 /* argument registers */ | 27 | #define fa0 $f12 /* argument registers */ |
28 | #define fa0f $f13 | 28 | #define fa0f $f13 |
29 | #define fa1 $f14 | 29 | #define fa1 $f14 |
30 | #define fa1f $f15 | 30 | #define fa1f $f15 |
31 | #define ft0 $f4 /* caller saved */ | 31 | #define ft0 $f4 /* caller saved */ |
32 | #define ft0f $f5 | 32 | #define ft0f $f5 |
33 | #define ft1 $f6 | 33 | #define ft1 $f6 |
34 | #define ft1f $f7 | 34 | #define ft1f $f7 |
@@ -40,7 +40,7 @@ | |||
40 | #define ft4f $f17 | 40 | #define ft4f $f17 |
41 | #define ft5 $f18 | 41 | #define ft5 $f18 |
42 | #define ft5f $f19 | 42 | #define ft5f $f19 |
43 | #define fs0 $f20 /* callee saved */ | 43 | #define fs0 $f20 /* callee saved */ |
44 | #define fs0f $f21 | 44 | #define fs0f $f21 |
45 | #define fs1 $f22 | 45 | #define fs1 $f22 |
46 | #define fs1f $f23 | 46 | #define fs1f $f23 |
@@ -53,7 +53,7 @@ | |||
53 | #define fs5 $f30 | 53 | #define fs5 $f30 |
54 | #define fs5f $f31 | 54 | #define fs5f $f31 |
55 | 55 | ||
56 | #define fcr31 $31 /* FPU status register */ | 56 | #define fcr31 $31 /* FPU status register */ |
57 | 57 | ||
58 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 58 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
59 | 59 | ||
diff --git a/arch/mips/include/asm/fpu.h b/arch/mips/include/asm/fpu.h index 7fcef8ef3fab..d088e5db4903 100644 --- a/arch/mips/include/asm/fpu.h +++ b/arch/mips/include/asm/fpu.h | |||
@@ -35,14 +35,14 @@ extern void _restore_fp(struct task_struct *); | |||
35 | 35 | ||
36 | #define __enable_fpu() \ | 36 | #define __enable_fpu() \ |
37 | do { \ | 37 | do { \ |
38 | set_c0_status(ST0_CU1); \ | 38 | set_c0_status(ST0_CU1); \ |
39 | enable_fpu_hazard(); \ | 39 | enable_fpu_hazard(); \ |
40 | } while (0) | 40 | } while (0) |
41 | 41 | ||
42 | #define __disable_fpu() \ | 42 | #define __disable_fpu() \ |
43 | do { \ | 43 | do { \ |
44 | clear_c0_status(ST0_CU1); \ | 44 | clear_c0_status(ST0_CU1); \ |
45 | disable_fpu_hazard(); \ | 45 | disable_fpu_hazard(); \ |
46 | } while (0) | 46 | } while (0) |
47 | 47 | ||
48 | #define enable_fpu() \ | 48 | #define enable_fpu() \ |
diff --git a/arch/mips/include/asm/futex.h b/arch/mips/include/asm/futex.h index 6ebf1734b411..6ea15815d3ee 100644 --- a/arch/mips/include/asm/futex.h +++ b/arch/mips/include/asm/futex.h | |||
@@ -92,24 +92,24 @@ futex_atomic_op_inuser(int encoded_op, u32 __user *uaddr) | |||
92 | 92 | ||
93 | switch (op) { | 93 | switch (op) { |
94 | case FUTEX_OP_SET: | 94 | case FUTEX_OP_SET: |
95 | __futex_atomic_op("move $1, %z5", ret, oldval, uaddr, oparg); | 95 | __futex_atomic_op("move $1, %z5", ret, oldval, uaddr, oparg); |
96 | break; | 96 | break; |
97 | 97 | ||
98 | case FUTEX_OP_ADD: | 98 | case FUTEX_OP_ADD: |
99 | __futex_atomic_op("addu $1, %1, %z5", | 99 | __futex_atomic_op("addu $1, %1, %z5", |
100 | ret, oldval, uaddr, oparg); | 100 | ret, oldval, uaddr, oparg); |
101 | break; | 101 | break; |
102 | case FUTEX_OP_OR: | 102 | case FUTEX_OP_OR: |
103 | __futex_atomic_op("or $1, %1, %z5", | 103 | __futex_atomic_op("or $1, %1, %z5", |
104 | ret, oldval, uaddr, oparg); | 104 | ret, oldval, uaddr, oparg); |
105 | break; | 105 | break; |
106 | case FUTEX_OP_ANDN: | 106 | case FUTEX_OP_ANDN: |
107 | __futex_atomic_op("and $1, %1, %z5", | 107 | __futex_atomic_op("and $1, %1, %z5", |
108 | ret, oldval, uaddr, ~oparg); | 108 | ret, oldval, uaddr, ~oparg); |
109 | break; | 109 | break; |
110 | case FUTEX_OP_XOR: | 110 | case FUTEX_OP_XOR: |
111 | __futex_atomic_op("xor $1, %1, %z5", | 111 | __futex_atomic_op("xor $1, %1, %z5", |
112 | ret, oldval, uaddr, oparg); | 112 | ret, oldval, uaddr, oparg); |
113 | break; | 113 | break; |
114 | default: | 114 | default: |
115 | ret = -ENOSYS; | 115 | ret = -ENOSYS; |
diff --git a/arch/mips/include/asm/fw/arc/hinv.h b/arch/mips/include/asm/fw/arc/hinv.h index e6ff4add04e2..f8d37d1df5de 100644 --- a/arch/mips/include/asm/fw/arc/hinv.h +++ b/arch/mips/include/asm/fw/arc/hinv.h | |||
@@ -12,7 +12,7 @@ typedef enum configclass { | |||
12 | SystemClass, | 12 | SystemClass, |
13 | ProcessorClass, | 13 | ProcessorClass, |
14 | CacheClass, | 14 | CacheClass, |
15 | #ifndef _NT_PROM | 15 | #ifndef _NT_PROM |
16 | MemoryClass, | 16 | MemoryClass, |
17 | AdapterClass, | 17 | AdapterClass, |
18 | ControllerClass, | 18 | ControllerClass, |
@@ -34,7 +34,7 @@ typedef enum configtype { | |||
34 | SecondaryICache, | 34 | SecondaryICache, |
35 | SecondaryDCache, | 35 | SecondaryDCache, |
36 | SecondaryCache, | 36 | SecondaryCache, |
37 | #ifndef _NT_PROM | 37 | #ifndef _NT_PROM |
38 | Memory, | 38 | Memory, |
39 | #endif | 39 | #endif |
40 | EISAAdapter, | 40 | EISAAdapter, |
@@ -93,7 +93,7 @@ typedef enum { | |||
93 | } IDENTIFIERFLAG; | 93 | } IDENTIFIERFLAG; |
94 | 94 | ||
95 | #ifndef NULL /* for GetChild(NULL); */ | 95 | #ifndef NULL /* for GetChild(NULL); */ |
96 | #define NULL 0 | 96 | #define NULL 0 |
97 | #endif | 97 | #endif |
98 | 98 | ||
99 | union key_u { | 99 | union key_u { |
@@ -125,7 +125,7 @@ typedef struct component { | |||
125 | IDENTIFIERFLAG Flags; | 125 | IDENTIFIERFLAG Flags; |
126 | USHORT Version; | 126 | USHORT Version; |
127 | USHORT Revision; | 127 | USHORT Revision; |
128 | ULONG Key; | 128 | ULONG Key; |
129 | ULONG AffinityMask; | 129 | ULONG AffinityMask; |
130 | ULONG ConfigurationDataSize; | 130 | ULONG ConfigurationDataSize; |
131 | ULONG IdentifierLength; | 131 | ULONG IdentifierLength; |
@@ -149,7 +149,7 @@ typedef struct systemid { | |||
149 | typedef enum memorytype { | 149 | typedef enum memorytype { |
150 | ExceptionBlock, | 150 | ExceptionBlock, |
151 | SPBPage, /* ARCS == SystemParameterBlock */ | 151 | SPBPage, /* ARCS == SystemParameterBlock */ |
152 | #ifndef _NT_PROM | 152 | #ifndef _NT_PROM |
153 | FreeContiguous, | 153 | FreeContiguous, |
154 | FreeMemory, | 154 | FreeMemory, |
155 | BadMemory, | 155 | BadMemory, |
diff --git a/arch/mips/include/asm/fw/arc/types.h b/arch/mips/include/asm/fw/arc/types.h index 2b11f87d6fb3..ad163806148a 100644 --- a/arch/mips/include/asm/fw/arc/types.h +++ b/arch/mips/include/asm/fw/arc/types.h | |||
@@ -15,7 +15,7 @@ | |||
15 | typedef char CHAR; | 15 | typedef char CHAR; |
16 | typedef short SHORT; | 16 | typedef short SHORT; |
17 | typedef long LARGE_INTEGER __attribute__ ((__mode__ (__DI__))); | 17 | typedef long LARGE_INTEGER __attribute__ ((__mode__ (__DI__))); |
18 | typedef long LONG __attribute__ ((__mode__ (__SI__))); | 18 | typedef long LONG __attribute__ ((__mode__ (__SI__))); |
19 | typedef unsigned char UCHAR; | 19 | typedef unsigned char UCHAR; |
20 | typedef unsigned short USHORT; | 20 | typedef unsigned short USHORT; |
21 | typedef unsigned long ULONG __attribute__ ((__mode__ (__SI__))); | 21 | typedef unsigned long ULONG __attribute__ ((__mode__ (__SI__))); |
@@ -23,11 +23,11 @@ typedef void VOID; | |||
23 | 23 | ||
24 | /* The pointer types. Note that we're using a 64-bit compiler but all | 24 | /* The pointer types. Note that we're using a 64-bit compiler but all |
25 | pointer in the ARC structures are only 32-bit, so we need some disgusting | 25 | pointer in the ARC structures are only 32-bit, so we need some disgusting |
26 | workarounds. Keep your vomit bag handy. */ | 26 | workarounds. Keep your vomit bag handy. */ |
27 | typedef LONG _PCHAR; | 27 | typedef LONG _PCHAR; |
28 | typedef LONG _PSHORT; | 28 | typedef LONG _PSHORT; |
29 | typedef LONG _PLARGE_INTEGER; | 29 | typedef LONG _PLARGE_INTEGER; |
30 | typedef LONG _PLONG; | 30 | typedef LONG _PLONG; |
31 | typedef LONG _PUCHAR; | 31 | typedef LONG _PUCHAR; |
32 | typedef LONG _PUSHORT; | 32 | typedef LONG _PUSHORT; |
33 | typedef LONG _PULONG; | 33 | typedef LONG _PULONG; |
@@ -40,7 +40,7 @@ typedef LONG _PVOID; | |||
40 | typedef char CHAR; | 40 | typedef char CHAR; |
41 | typedef short SHORT; | 41 | typedef short SHORT; |
42 | typedef long LARGE_INTEGER __attribute__ ((__mode__ (__DI__))); | 42 | typedef long LARGE_INTEGER __attribute__ ((__mode__ (__DI__))); |
43 | typedef long LONG __attribute__ ((__mode__ (__DI__))); | 43 | typedef long LONG __attribute__ ((__mode__ (__DI__))); |
44 | typedef unsigned char UCHAR; | 44 | typedef unsigned char UCHAR; |
45 | typedef unsigned short USHORT; | 45 | typedef unsigned short USHORT; |
46 | typedef unsigned long ULONG __attribute__ ((__mode__ (__DI__))); | 46 | typedef unsigned long ULONG __attribute__ ((__mode__ (__DI__))); |
@@ -51,7 +51,7 @@ typedef void VOID; | |||
51 | typedef CHAR *_PCHAR; | 51 | typedef CHAR *_PCHAR; |
52 | typedef SHORT *_PSHORT; | 52 | typedef SHORT *_PSHORT; |
53 | typedef LARGE_INTEGER *_PLARGE_INTEGER; | 53 | typedef LARGE_INTEGER *_PLARGE_INTEGER; |
54 | typedef LONG *_PLONG; | 54 | typedef LONG *_PLONG; |
55 | typedef UCHAR *_PUCHAR; | 55 | typedef UCHAR *_PUCHAR; |
56 | typedef USHORT *_PUSHORT; | 56 | typedef USHORT *_PUSHORT; |
57 | typedef ULONG *_PULONG; | 57 | typedef ULONG *_PULONG; |
@@ -62,7 +62,7 @@ typedef VOID *_PVOID; | |||
62 | typedef CHAR *PCHAR; | 62 | typedef CHAR *PCHAR; |
63 | typedef SHORT *PSHORT; | 63 | typedef SHORT *PSHORT; |
64 | typedef LARGE_INTEGER *PLARGE_INTEGER; | 64 | typedef LARGE_INTEGER *PLARGE_INTEGER; |
65 | typedef LONG *PLONG; | 65 | typedef LONG *PLONG; |
66 | typedef UCHAR *PUCHAR; | 66 | typedef UCHAR *PUCHAR; |
67 | typedef USHORT *PUSHORT; | 67 | typedef USHORT *PUSHORT; |
68 | typedef ULONG *PULONG; | 68 | typedef ULONG *PULONG; |
diff --git a/arch/mips/include/asm/fw/cfe/cfe_api.h b/arch/mips/include/asm/fw/cfe/cfe_api.h index 0995575db320..17347551a1b2 100644 --- a/arch/mips/include/asm/fw/cfe/cfe_api.h +++ b/arch/mips/include/asm/fw/cfe/cfe_api.h | |||
@@ -40,7 +40,7 @@ typedef long intptr_t; | |||
40 | /* Seal indicating CFE's presence, passed to user program. */ | 40 | /* Seal indicating CFE's presence, passed to user program. */ |
41 | #define CFE_EPTSEAL 0x43464531 | 41 | #define CFE_EPTSEAL 0x43464531 |
42 | 42 | ||
43 | #define CFE_MI_RESERVED 0 /* memory is reserved, do not use */ | 43 | #define CFE_MI_RESERVED 0 /* memory is reserved, do not use */ |
44 | #define CFE_MI_AVAILABLE 1 /* memory is available */ | 44 | #define CFE_MI_AVAILABLE 1 /* memory is available */ |
45 | 45 | ||
46 | #define CFE_FLG_WARMSTART 0x00000001 | 46 | #define CFE_FLG_WARMSTART 0x00000001 |
@@ -52,13 +52,13 @@ typedef long intptr_t; | |||
52 | 52 | ||
53 | #define CFE_STDHANDLE_CONSOLE 0 | 53 | #define CFE_STDHANDLE_CONSOLE 0 |
54 | 54 | ||
55 | #define CFE_DEV_NETWORK 1 | 55 | #define CFE_DEV_NETWORK 1 |
56 | #define CFE_DEV_DISK 2 | 56 | #define CFE_DEV_DISK 2 |
57 | #define CFE_DEV_FLASH 3 | 57 | #define CFE_DEV_FLASH 3 |
58 | #define CFE_DEV_SERIAL 4 | 58 | #define CFE_DEV_SERIAL 4 |
59 | #define CFE_DEV_CPU 5 | 59 | #define CFE_DEV_CPU 5 |
60 | #define CFE_DEV_NVRAM 6 | 60 | #define CFE_DEV_NVRAM 6 |
61 | #define CFE_DEV_CLOCK 7 | 61 | #define CFE_DEV_CLOCK 7 |
62 | #define CFE_DEV_OTHER 8 | 62 | #define CFE_DEV_OTHER 8 |
63 | #define CFE_DEV_MASK 0x0F | 63 | #define CFE_DEV_MASK 0x0F |
64 | 64 | ||
diff --git a/arch/mips/include/asm/fw/cfe/cfe_error.h b/arch/mips/include/asm/fw/cfe/cfe_error.h index b80374636279..fc0e91f07e22 100644 --- a/arch/mips/include/asm/fw/cfe/cfe_error.h +++ b/arch/mips/include/asm/fw/cfe/cfe_error.h | |||
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #define CFE_OK 0 | 27 | #define CFE_OK 0 |
28 | #define CFE_ERR -1 /* generic error */ | 28 | #define CFE_ERR -1 /* generic error */ |
29 | #define CFE_ERR_INV_COMMAND -2 | 29 | #define CFE_ERR_INV_COMMAND -2 |
30 | #define CFE_ERR_EOF -3 | 30 | #define CFE_ERR_EOF -3 |
31 | #define CFE_ERR_IOERR -4 | 31 | #define CFE_ERR_IOERR -4 |
@@ -37,12 +37,12 @@ | |||
37 | #define CFE_ERR_ENVREADONLY -10 | 37 | #define CFE_ERR_ENVREADONLY -10 |
38 | 38 | ||
39 | #define CFE_ERR_NOTELF -11 | 39 | #define CFE_ERR_NOTELF -11 |
40 | #define CFE_ERR_NOT32BIT -12 | 40 | #define CFE_ERR_NOT32BIT -12 |
41 | #define CFE_ERR_WRONGENDIAN -13 | 41 | #define CFE_ERR_WRONGENDIAN -13 |
42 | #define CFE_ERR_BADELFVERS -14 | 42 | #define CFE_ERR_BADELFVERS -14 |
43 | #define CFE_ERR_NOTMIPS -15 | 43 | #define CFE_ERR_NOTMIPS -15 |
44 | #define CFE_ERR_BADELFFMT -16 | 44 | #define CFE_ERR_BADELFFMT -16 |
45 | #define CFE_ERR_BADADDR -17 | 45 | #define CFE_ERR_BADADDR -17 |
46 | 46 | ||
47 | #define CFE_ERR_FILENOTFOUND -18 | 47 | #define CFE_ERR_FILENOTFOUND -18 |
48 | #define CFE_ERR_UNSUPPORTED -19 | 48 | #define CFE_ERR_UNSUPPORTED -19 |
@@ -73,8 +73,8 @@ | |||
73 | 73 | ||
74 | #define CFE_ERR_NOTREADY -36 | 74 | #define CFE_ERR_NOTREADY -36 |
75 | 75 | ||
76 | #define CFE_ERR_GETMEM -37 | 76 | #define CFE_ERR_GETMEM -37 |
77 | #define CFE_ERR_SETMEM -38 | 77 | #define CFE_ERR_SETMEM -38 |
78 | 78 | ||
79 | #define CFE_ERR_NOTCONN -39 | 79 | #define CFE_ERR_NOTCONN -39 |
80 | #define CFE_ERR_ADDRINUSE -40 | 80 | #define CFE_ERR_ADDRINUSE -40 |
diff --git a/arch/mips/include/asm/gcmpregs.h b/arch/mips/include/asm/gcmpregs.h index c0cf76a2ca89..a7359f77a48e 100644 --- a/arch/mips/include/asm/gcmpregs.h +++ b/arch/mips/include/asm/gcmpregs.h | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | /* GCMP register access */ | 33 | /* GCMP register access */ |
34 | #define GCMPGCB(reg) REGP(_gcmp_base, GCMPGCBOFS(reg)) | 34 | #define GCMPGCB(reg) REGP(_gcmp_base, GCMPGCBOFS(reg)) |
35 | #define GCMPGCBn(reg, n) REGP(_gcmp_base, GCMPGCBOFSn(reg, n)) | 35 | #define GCMPGCBn(reg, n) REGP(_gcmp_base, GCMPGCBOFSn(reg, n)) |
36 | #define GCMPCLCB(reg) REGP(_gcmp_base, GCMPCLCBOFS(reg)) | 36 | #define GCMPCLCB(reg) REGP(_gcmp_base, GCMPCLCBOFS(reg)) |
37 | #define GCMPCOCB(reg) REGP(_gcmp_base, GCMPCOCBOFS(reg)) | 37 | #define GCMPCOCB(reg) REGP(_gcmp_base, GCMPCOCBOFS(reg)) |
38 | #define GCMPGDB(reg) REGP(_gcmp_base, GCMPGDBOFS(reg)) | 38 | #define GCMPGDB(reg) REGP(_gcmp_base, GCMPGDBOFS(reg)) |
@@ -45,76 +45,76 @@ | |||
45 | 45 | ||
46 | /* GCB registers */ | 46 | /* GCB registers */ |
47 | #define GCMP_GCB_GC_OFS 0x0000 /* Global Config Register */ | 47 | #define GCMP_GCB_GC_OFS 0x0000 /* Global Config Register */ |
48 | #define GCMP_GCB_GC_NUMIOCU_SHF 8 | 48 | #define GCMP_GCB_GC_NUMIOCU_SHF 8 |
49 | #define GCMP_GCB_GC_NUMIOCU_MSK GCMPGCBMSK(GC_NUMIOCU, 4) | 49 | #define GCMP_GCB_GC_NUMIOCU_MSK GCMPGCBMSK(GC_NUMIOCU, 4) |
50 | #define GCMP_GCB_GC_NUMCORES_SHF 0 | 50 | #define GCMP_GCB_GC_NUMCORES_SHF 0 |
51 | #define GCMP_GCB_GC_NUMCORES_MSK GCMPGCBMSK(GC_NUMCORES, 8) | 51 | #define GCMP_GCB_GC_NUMCORES_MSK GCMPGCBMSK(GC_NUMCORES, 8) |
52 | #define GCMP_GCB_GCMPB_OFS 0x0008 /* Global GCMP Base */ | 52 | #define GCMP_GCB_GCMPB_OFS 0x0008 /* Global GCMP Base */ |
53 | #define GCMP_GCB_GCMPB_GCMPBASE_SHF 15 | 53 | #define GCMP_GCB_GCMPB_GCMPBASE_SHF 15 |
54 | #define GCMP_GCB_GCMPB_GCMPBASE_MSK GCMPGCBMSK(GCMPB_GCMPBASE, 17) | 54 | #define GCMP_GCB_GCMPB_GCMPBASE_MSK GCMPGCBMSK(GCMPB_GCMPBASE, 17) |
55 | #define GCMP_GCB_GCMPB_CMDEFTGT_SHF 0 | 55 | #define GCMP_GCB_GCMPB_CMDEFTGT_SHF 0 |
56 | #define GCMP_GCB_GCMPB_CMDEFTGT_MSK GCMPGCBMSK(GCMPB_CMDEFTGT, 2) | 56 | #define GCMP_GCB_GCMPB_CMDEFTGT_MSK GCMPGCBMSK(GCMPB_CMDEFTGT, 2) |
57 | #define GCMP_GCB_GCMPB_CMDEFTGT_DISABLED 0 | 57 | #define GCMP_GCB_GCMPB_CMDEFTGT_DISABLED 0 |
58 | #define GCMP_GCB_GCMPB_CMDEFTGT_MEM 1 | 58 | #define GCMP_GCB_GCMPB_CMDEFTGT_MEM 1 |
59 | #define GCMP_GCB_GCMPB_CMDEFTGT_IOCU1 2 | 59 | #define GCMP_GCB_GCMPB_CMDEFTGT_IOCU1 2 |
60 | #define GCMP_GCB_GCMPB_CMDEFTGT_IOCU2 3 | 60 | #define GCMP_GCB_GCMPB_CMDEFTGT_IOCU2 3 |
61 | #define GCMP_GCB_CCMC_OFS 0x0010 /* Global CM Control */ | 61 | #define GCMP_GCB_CCMC_OFS 0x0010 /* Global CM Control */ |
62 | #define GCMP_GCB_GCSRAP_OFS 0x0020 /* Global CSR Access Privilege */ | 62 | #define GCMP_GCB_GCSRAP_OFS 0x0020 /* Global CSR Access Privilege */ |
63 | #define GCMP_GCB_GCSRAP_CMACCESS_SHF 0 | 63 | #define GCMP_GCB_GCSRAP_CMACCESS_SHF 0 |
64 | #define GCMP_GCB_GCSRAP_CMACCESS_MSK GCMPGCBMSK(GCSRAP_CMACCESS, 8) | 64 | #define GCMP_GCB_GCSRAP_CMACCESS_MSK GCMPGCBMSK(GCSRAP_CMACCESS, 8) |
65 | #define GCMP_GCB_GCMPREV_OFS 0x0030 /* GCMP Revision Register */ | 65 | #define GCMP_GCB_GCMPREV_OFS 0x0030 /* GCMP Revision Register */ |
66 | #define GCMP_GCB_GCMEM_OFS 0x0040 /* Global CM Error Mask */ | 66 | #define GCMP_GCB_GCMEM_OFS 0x0040 /* Global CM Error Mask */ |
67 | #define GCMP_GCB_GCMEC_OFS 0x0048 /* Global CM Error Cause */ | 67 | #define GCMP_GCB_GCMEC_OFS 0x0048 /* Global CM Error Cause */ |
68 | #define GCMP_GCB_GMEC_ERROR_TYPE_SHF 27 | 68 | #define GCMP_GCB_GMEC_ERROR_TYPE_SHF 27 |
69 | #define GCMP_GCB_GMEC_ERROR_TYPE_MSK GCMPGCBMSK(GMEC_ERROR_TYPE, 5) | 69 | #define GCMP_GCB_GMEC_ERROR_TYPE_MSK GCMPGCBMSK(GMEC_ERROR_TYPE, 5) |
70 | #define GCMP_GCB_GMEC_ERROR_INFO_SHF 0 | 70 | #define GCMP_GCB_GMEC_ERROR_INFO_SHF 0 |
71 | #define GCMP_GCB_GMEC_ERROR_INFO_MSK GCMPGCBMSK(GMEC_ERROR_INFO, 27) | 71 | #define GCMP_GCB_GMEC_ERROR_INFO_MSK GCMPGCBMSK(GMEC_ERROR_INFO, 27) |
72 | #define GCMP_GCB_GCMEA_OFS 0x0050 /* Global CM Error Address */ | 72 | #define GCMP_GCB_GCMEA_OFS 0x0050 /* Global CM Error Address */ |
73 | #define GCMP_GCB_GCMEO_OFS 0x0058 /* Global CM Error Multiple */ | 73 | #define GCMP_GCB_GCMEO_OFS 0x0058 /* Global CM Error Multiple */ |
74 | #define GCMP_GCB_GMEO_ERROR_2ND_SHF 0 | 74 | #define GCMP_GCB_GMEO_ERROR_2ND_SHF 0 |
75 | #define GCMP_GCB_GMEO_ERROR_2ND_MSK GCMPGCBMSK(GMEO_ERROR_2ND, 5) | 75 | #define GCMP_GCB_GMEO_ERROR_2ND_MSK GCMPGCBMSK(GMEO_ERROR_2ND, 5) |
76 | #define GCMP_GCB_GICBA_OFS 0x0080 /* Global Interrupt Controller Base Address */ | 76 | #define GCMP_GCB_GICBA_OFS 0x0080 /* Global Interrupt Controller Base Address */ |
77 | #define GCMP_GCB_GICBA_BASE_SHF 17 | 77 | #define GCMP_GCB_GICBA_BASE_SHF 17 |
78 | #define GCMP_GCB_GICBA_BASE_MSK GCMPGCBMSK(GICBA_BASE, 15) | 78 | #define GCMP_GCB_GICBA_BASE_MSK GCMPGCBMSK(GICBA_BASE, 15) |
79 | #define GCMP_GCB_GICBA_EN_SHF 0 | 79 | #define GCMP_GCB_GICBA_EN_SHF 0 |
80 | #define GCMP_GCB_GICBA_EN_MSK GCMPGCBMSK(GICBA_EN, 1) | 80 | #define GCMP_GCB_GICBA_EN_MSK GCMPGCBMSK(GICBA_EN, 1) |
81 | 81 | ||
82 | /* GCB Regions */ | 82 | /* GCB Regions */ |
83 | #define GCMP_GCB_CMxBASE_OFS(n) (0x0090+16*(n)) /* Global Region[0-3] Base Address */ | 83 | #define GCMP_GCB_CMxBASE_OFS(n) (0x0090+16*(n)) /* Global Region[0-3] Base Address */ |
84 | #define GCMP_GCB_CMxBASE_BASE_SHF 16 | 84 | #define GCMP_GCB_CMxBASE_BASE_SHF 16 |
85 | #define GCMP_GCB_CMxBASE_BASE_MSK GCMPGCBMSK(CMxBASE_BASE, 16) | 85 | #define GCMP_GCB_CMxBASE_BASE_MSK GCMPGCBMSK(CMxBASE_BASE, 16) |
86 | #define GCMP_GCB_CMxMASK_OFS(n) (0x0098+16*(n)) /* Global Region[0-3] Address Mask */ | 86 | #define GCMP_GCB_CMxMASK_OFS(n) (0x0098+16*(n)) /* Global Region[0-3] Address Mask */ |
87 | #define GCMP_GCB_CMxMASK_MASK_SHF 16 | 87 | #define GCMP_GCB_CMxMASK_MASK_SHF 16 |
88 | #define GCMP_GCB_CMxMASK_MASK_MSK GCMPGCBMSK(CMxMASK_MASK, 16) | 88 | #define GCMP_GCB_CMxMASK_MASK_MSK GCMPGCBMSK(CMxMASK_MASK, 16) |
89 | #define GCMP_GCB_CMxMASK_CMREGTGT_SHF 0 | 89 | #define GCMP_GCB_CMxMASK_CMREGTGT_SHF 0 |
90 | #define GCMP_GCB_CMxMASK_CMREGTGT_MSK GCMPGCBMSK(CMxMASK_CMREGTGT, 2) | 90 | #define GCMP_GCB_CMxMASK_CMREGTGT_MSK GCMPGCBMSK(CMxMASK_CMREGTGT, 2) |
91 | #define GCMP_GCB_CMxMASK_CMREGTGT_MEM 0 | 91 | #define GCMP_GCB_CMxMASK_CMREGTGT_MEM 0 |
92 | #define GCMP_GCB_CMxMASK_CMREGTGT_MEM1 1 | 92 | #define GCMP_GCB_CMxMASK_CMREGTGT_MEM1 1 |
93 | #define GCMP_GCB_CMxMASK_CMREGTGT_IOCU1 2 | 93 | #define GCMP_GCB_CMxMASK_CMREGTGT_IOCU1 2 |
94 | #define GCMP_GCB_CMxMASK_CMREGTGT_IOCU2 3 | 94 | #define GCMP_GCB_CMxMASK_CMREGTGT_IOCU2 3 |
95 | 95 | ||
96 | 96 | ||
97 | /* Core local/Core other control block registers */ | 97 | /* Core local/Core other control block registers */ |
98 | #define GCMP_CCB_RESETR_OFS 0x0000 /* Reset Release */ | 98 | #define GCMP_CCB_RESETR_OFS 0x0000 /* Reset Release */ |
99 | #define GCMP_CCB_RESETR_INRESET_SHF 0 | 99 | #define GCMP_CCB_RESETR_INRESET_SHF 0 |
100 | #define GCMP_CCB_RESETR_INRESET_MSK GCMPCCBMSK(RESETR_INRESET, 16) | 100 | #define GCMP_CCB_RESETR_INRESET_MSK GCMPCCBMSK(RESETR_INRESET, 16) |
101 | #define GCMP_CCB_COHCTL_OFS 0x0008 /* Coherence Control */ | 101 | #define GCMP_CCB_COHCTL_OFS 0x0008 /* Coherence Control */ |
102 | #define GCMP_CCB_COHCTL_DOMAIN_SHF 0 | 102 | #define GCMP_CCB_COHCTL_DOMAIN_SHF 0 |
103 | #define GCMP_CCB_COHCTL_DOMAIN_MSK GCMPCCBMSK(COHCTL_DOMAIN, 8) | 103 | #define GCMP_CCB_COHCTL_DOMAIN_MSK GCMPCCBMSK(COHCTL_DOMAIN, 8) |
104 | #define GCMP_CCB_CFG_OFS 0x0010 /* Config */ | 104 | #define GCMP_CCB_CFG_OFS 0x0010 /* Config */ |
105 | #define GCMP_CCB_CFG_IOCUTYPE_SHF 10 | 105 | #define GCMP_CCB_CFG_IOCUTYPE_SHF 10 |
106 | #define GCMP_CCB_CFG_IOCUTYPE_MSK GCMPCCBMSK(CFG_IOCUTYPE, 2) | 106 | #define GCMP_CCB_CFG_IOCUTYPE_MSK GCMPCCBMSK(CFG_IOCUTYPE, 2) |
107 | #define GCMP_CCB_CFG_IOCUTYPE_CPU 0 | 107 | #define GCMP_CCB_CFG_IOCUTYPE_CPU 0 |
108 | #define GCMP_CCB_CFG_IOCUTYPE_NCIOCU 1 | 108 | #define GCMP_CCB_CFG_IOCUTYPE_NCIOCU 1 |
109 | #define GCMP_CCB_CFG_IOCUTYPE_CIOCU 2 | 109 | #define GCMP_CCB_CFG_IOCUTYPE_CIOCU 2 |
110 | #define GCMP_CCB_CFG_NUMVPE_SHF 0 | 110 | #define GCMP_CCB_CFG_NUMVPE_SHF 0 |
111 | #define GCMP_CCB_CFG_NUMVPE_MSK GCMPCCBMSK(CFG_NUMVPE, 10) | 111 | #define GCMP_CCB_CFG_NUMVPE_MSK GCMPCCBMSK(CFG_NUMVPE, 10) |
112 | #define GCMP_CCB_OTHER_OFS 0x0018 /* Other Address */ | 112 | #define GCMP_CCB_OTHER_OFS 0x0018 /* Other Address */ |
113 | #define GCMP_CCB_OTHER_CORENUM_SHF 16 | 113 | #define GCMP_CCB_OTHER_CORENUM_SHF 16 |
114 | #define GCMP_CCB_OTHER_CORENUM_MSK GCMPCCBMSK(OTHER_CORENUM, 16) | 114 | #define GCMP_CCB_OTHER_CORENUM_MSK GCMPCCBMSK(OTHER_CORENUM, 16) |
115 | #define GCMP_CCB_RESETBASE_OFS 0x0020 /* Reset Exception Base */ | 115 | #define GCMP_CCB_RESETBASE_OFS 0x0020 /* Reset Exception Base */ |
116 | #define GCMP_CCB_RESETBASE_BEV_SHF 12 | 116 | #define GCMP_CCB_RESETBASE_BEV_SHF 12 |
117 | #define GCMP_CCB_RESETBASE_BEV_MSK GCMPCCBMSK(RESETBASE_BEV, 20) | 117 | #define GCMP_CCB_RESETBASE_BEV_MSK GCMPCCBMSK(RESETBASE_BEV, 20) |
118 | #define GCMP_CCB_ID_OFS 0x0028 /* Identification */ | 118 | #define GCMP_CCB_ID_OFS 0x0028 /* Identification */ |
119 | #define GCMP_CCB_DINTGROUP_OFS 0x0030 /* DINT Group Participate */ | 119 | #define GCMP_CCB_DINTGROUP_OFS 0x0030 /* DINT Group Participate */ |
120 | #define GCMP_CCB_DBGGROUP_OFS 0x0100 /* DebugBreak Group */ | 120 | #define GCMP_CCB_DBGGROUP_OFS 0x0100 /* DebugBreak Group */ |
diff --git a/arch/mips/include/asm/gic.h b/arch/mips/include/asm/gic.h index 37620db588be..61b06d7e7de1 100644 --- a/arch/mips/include/asm/gic.h +++ b/arch/mips/include/asm/gic.h | |||
@@ -66,7 +66,7 @@ | |||
66 | 66 | ||
67 | /* Register Map for Shared Section */ | 67 | /* Register Map for Shared Section */ |
68 | 68 | ||
69 | #define GIC_SH_CONFIG_OFS 0x0000 | 69 | #define GIC_SH_CONFIG_OFS 0x0000 |
70 | 70 | ||
71 | /* Shared Global Counter */ | 71 | /* Shared Global Counter */ |
72 | #define GIC_SH_COUNTER_31_00_OFS 0x0010 | 72 | #define GIC_SH_COUNTER_31_00_OFS 0x0010 |
@@ -146,13 +146,13 @@ | |||
146 | #define GIC_SH_PEND_223_192_OFS 0x0498 | 146 | #define GIC_SH_PEND_223_192_OFS 0x0498 |
147 | #define GIC_SH_PEND_255_224_OFS 0x049c | 147 | #define GIC_SH_PEND_255_224_OFS 0x049c |
148 | 148 | ||
149 | #define GIC_SH_INTR_MAP_TO_PIN_BASE_OFS 0x0500 | 149 | #define GIC_SH_INTR_MAP_TO_PIN_BASE_OFS 0x0500 |
150 | 150 | ||
151 | /* Maps Interrupt X to a Pin */ | 151 | /* Maps Interrupt X to a Pin */ |
152 | #define GIC_SH_MAP_TO_PIN(intr) \ | 152 | #define GIC_SH_MAP_TO_PIN(intr) \ |
153 | (GIC_SH_INTR_MAP_TO_PIN_BASE_OFS + (4 * intr)) | 153 | (GIC_SH_INTR_MAP_TO_PIN_BASE_OFS + (4 * intr)) |
154 | 154 | ||
155 | #define GIC_SH_INTR_MAP_TO_VPE_BASE_OFS 0x2000 | 155 | #define GIC_SH_INTR_MAP_TO_VPE_BASE_OFS 0x2000 |
156 | 156 | ||
157 | /* Maps Interrupt X to a VPE */ | 157 | /* Maps Interrupt X to a VPE */ |
158 | #define GIC_SH_MAP_TO_VPE_REG_OFF(intr, vpe) \ | 158 | #define GIC_SH_MAP_TO_VPE_REG_OFF(intr, vpe) \ |
@@ -326,7 +326,7 @@ struct gic_intr_map { | |||
326 | unsigned int polarity; /* Polarity : +/- */ | 326 | unsigned int polarity; /* Polarity : +/- */ |
327 | unsigned int trigtype; /* Trigger : Edge/Levl */ | 327 | unsigned int trigtype; /* Trigger : Edge/Levl */ |
328 | unsigned int flags; /* Misc flags */ | 328 | unsigned int flags; /* Misc flags */ |
329 | #define GIC_FLAG_IPI 0x01 | 329 | #define GIC_FLAG_IPI 0x01 |
330 | #define GIC_FLAG_TRANSPARENT 0x02 | 330 | #define GIC_FLAG_TRANSPARENT 0x02 |
331 | }; | 331 | }; |
332 | 332 | ||
@@ -343,10 +343,10 @@ struct gic_shared_intr_map { | |||
343 | 343 | ||
344 | /* GIC nomenclature for Core Interrupt Pins. */ | 344 | /* GIC nomenclature for Core Interrupt Pins. */ |
345 | #define GIC_CPU_INT0 0 /* Core Interrupt 2 */ | 345 | #define GIC_CPU_INT0 0 /* Core Interrupt 2 */ |
346 | #define GIC_CPU_INT1 1 /* . */ | 346 | #define GIC_CPU_INT1 1 /* . */ |
347 | #define GIC_CPU_INT2 2 /* . */ | 347 | #define GIC_CPU_INT2 2 /* . */ |
348 | #define GIC_CPU_INT3 3 /* . */ | 348 | #define GIC_CPU_INT3 3 /* . */ |
349 | #define GIC_CPU_INT4 4 /* . */ | 349 | #define GIC_CPU_INT4 4 /* . */ |
350 | #define GIC_CPU_INT5 5 /* Core Interrupt 5 */ | 350 | #define GIC_CPU_INT5 5 /* Core Interrupt 5 */ |
351 | 351 | ||
352 | /* Local GIC interrupts. */ | 352 | /* Local GIC interrupts. */ |
diff --git a/arch/mips/include/asm/gio_device.h b/arch/mips/include/asm/gio_device.h index 5437c84664bf..0878701712f8 100644 --- a/arch/mips/include/asm/gio_device.h +++ b/arch/mips/include/asm/gio_device.h | |||
@@ -6,15 +6,15 @@ struct gio_device_id { | |||
6 | }; | 6 | }; |
7 | 7 | ||
8 | struct gio_device { | 8 | struct gio_device { |
9 | struct device dev; | 9 | struct device dev; |
10 | struct resource resource; | 10 | struct resource resource; |
11 | unsigned int irq; | 11 | unsigned int irq; |
12 | unsigned int slotno; | 12 | unsigned int slotno; |
13 | 13 | ||
14 | const char *name; | 14 | const char *name; |
15 | struct gio_device_id id; | 15 | struct gio_device_id id; |
16 | unsigned id32:1; | 16 | unsigned id32:1; |
17 | unsigned gio64:1; | 17 | unsigned gio64:1; |
18 | }; | 18 | }; |
19 | #define to_gio_device(d) container_of(d, struct gio_device, dev) | 19 | #define to_gio_device(d) container_of(d, struct gio_device, dev) |
20 | 20 | ||
@@ -50,7 +50,7 @@ static inline void gio_device_free(struct gio_device *dev) | |||
50 | extern int gio_register_driver(struct gio_driver *); | 50 | extern int gio_register_driver(struct gio_driver *); |
51 | extern void gio_unregister_driver(struct gio_driver *); | 51 | extern void gio_unregister_driver(struct gio_driver *); |
52 | 52 | ||
53 | #define gio_get_drvdata(_dev) drv_get_drvdata(&(_dev)->dev) | 53 | #define gio_get_drvdata(_dev) drv_get_drvdata(&(_dev)->dev) |
54 | #define gio_set_drvdata(_dev, data) drv_set_drvdata(&(_dev)->dev, (data)) | 54 | #define gio_set_drvdata(_dev, data) drv_set_drvdata(&(_dev)->dev, (data)) |
55 | 55 | ||
56 | extern void gio_set_master(struct gio_device *); | 56 | extern void gio_set_master(struct gio_device *); |
diff --git a/arch/mips/include/asm/gt64120.h b/arch/mips/include/asm/gt64120.h index 0aa44abc77fe..2e72abb9440e 100644 --- a/arch/mips/include/asm/gt64120.h +++ b/arch/mips/include/asm/gt64120.h | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | #define GT_MULTI_OFS 0x120 | 35 | #define GT_MULTI_OFS 0x120 |
36 | 36 | ||
37 | /* CPU Address Decode. */ | 37 | /* CPU Address Decode. */ |
38 | #define GT_SCS10LD_OFS 0x008 | 38 | #define GT_SCS10LD_OFS 0x008 |
39 | #define GT_SCS10HD_OFS 0x010 | 39 | #define GT_SCS10HD_OFS 0x010 |
40 | #define GT_SCS32LD_OFS 0x018 | 40 | #define GT_SCS32LD_OFS 0x018 |
@@ -106,12 +106,12 @@ | |||
106 | 106 | ||
107 | #define GT_ADERR_OFS 0x470 | 107 | #define GT_ADERR_OFS 0x470 |
108 | 108 | ||
109 | /* SDRAM Configuration. */ | 109 | /* SDRAM Configuration. */ |
110 | #define GT_SDRAM_CFG_OFS 0x448 | 110 | #define GT_SDRAM_CFG_OFS 0x448 |
111 | 111 | ||
112 | #define GT_SDRAM_OPMODE_OFS 0x474 | 112 | #define GT_SDRAM_OPMODE_OFS 0x474 |
113 | #define GT_SDRAM_BM_OFS 0x478 | 113 | #define GT_SDRAM_BM_OFS 0x478 |
114 | #define GT_SDRAM_ADDRDECODE_OFS 0x47c | 114 | #define GT_SDRAM_ADDRDECODE_OFS 0x47c |
115 | 115 | ||
116 | /* SDRAM Parameters. */ | 116 | /* SDRAM Parameters. */ |
117 | #define GT_SDRAM_B0_OFS 0x44c | 117 | #define GT_SDRAM_B0_OFS 0x44c |
@@ -126,14 +126,14 @@ | |||
126 | #define GT_DEV_B3_OFS 0x468 | 126 | #define GT_DEV_B3_OFS 0x468 |
127 | #define GT_DEV_BOOT_OFS 0x46c | 127 | #define GT_DEV_BOOT_OFS 0x46c |
128 | 128 | ||
129 | /* ECC. */ | 129 | /* ECC. */ |
130 | #define GT_ECC_ERRDATALO 0x480 /* GT-64120A only */ | 130 | #define GT_ECC_ERRDATALO 0x480 /* GT-64120A only */ |
131 | #define GT_ECC_ERRDATAHI 0x484 /* GT-64120A only */ | 131 | #define GT_ECC_ERRDATAHI 0x484 /* GT-64120A only */ |
132 | #define GT_ECC_MEM 0x488 /* GT-64120A only */ | 132 | #define GT_ECC_MEM 0x488 /* GT-64120A only */ |
133 | #define GT_ECC_CALC 0x48c /* GT-64120A only */ | 133 | #define GT_ECC_CALC 0x48c /* GT-64120A only */ |
134 | #define GT_ECC_ERRADDR 0x490 /* GT-64120A only */ | 134 | #define GT_ECC_ERRADDR 0x490 /* GT-64120A only */ |
135 | 135 | ||
136 | /* DMA Record. */ | 136 | /* DMA Record. */ |
137 | #define GT_DMA0_CNT_OFS 0x800 | 137 | #define GT_DMA0_CNT_OFS 0x800 |
138 | #define GT_DMA1_CNT_OFS 0x804 | 138 | #define GT_DMA1_CNT_OFS 0x804 |
139 | #define GT_DMA2_CNT_OFS 0x808 | 139 | #define GT_DMA2_CNT_OFS 0x808 |
@@ -156,13 +156,13 @@ | |||
156 | #define GT_DMA2_CUR_OFS 0x878 | 156 | #define GT_DMA2_CUR_OFS 0x878 |
157 | #define GT_DMA3_CUR_OFS 0x87c | 157 | #define GT_DMA3_CUR_OFS 0x87c |
158 | 158 | ||
159 | /* DMA Channel Control. */ | 159 | /* DMA Channel Control. */ |
160 | #define GT_DMA0_CTRL_OFS 0x840 | 160 | #define GT_DMA0_CTRL_OFS 0x840 |
161 | #define GT_DMA1_CTRL_OFS 0x844 | 161 | #define GT_DMA1_CTRL_OFS 0x844 |
162 | #define GT_DMA2_CTRL_OFS 0x848 | 162 | #define GT_DMA2_CTRL_OFS 0x848 |
163 | #define GT_DMA3_CTRL_OFS 0x84c | 163 | #define GT_DMA3_CTRL_OFS 0x84c |
164 | 164 | ||
165 | /* DMA Arbiter. */ | 165 | /* DMA Arbiter. */ |
166 | #define GT_DMA_ARB_OFS 0x860 | 166 | #define GT_DMA_ARB_OFS 0x860 |
167 | 167 | ||
168 | /* Timer/Counter. */ | 168 | /* Timer/Counter. */ |
@@ -220,7 +220,7 @@ | |||
220 | #define GT_PCI0_CFGADDR_OFS 0xcf8 | 220 | #define GT_PCI0_CFGADDR_OFS 0xcf8 |
221 | #define GT_PCI0_CFGDATA_OFS 0xcfc | 221 | #define GT_PCI0_CFGDATA_OFS 0xcfc |
222 | 222 | ||
223 | /* Interrupts. */ | 223 | /* Interrupts. */ |
224 | #define GT_INTRCAUSE_OFS 0xc18 | 224 | #define GT_INTRCAUSE_OFS 0xc18 |
225 | #define GT_INTRMASK_OFS 0xc1c | 225 | #define GT_INTRMASK_OFS 0xc1c |
226 | 226 | ||
@@ -547,15 +547,15 @@ | |||
547 | #define GT_DEF_BASE 0x14000000UL | 547 | #define GT_DEF_BASE 0x14000000UL |
548 | 548 | ||
549 | #define GT_MAX_BANKSIZE (256 * 1024 * 1024) /* Max 256MB bank */ | 549 | #define GT_MAX_BANKSIZE (256 * 1024 * 1024) /* Max 256MB bank */ |
550 | #define GT_LATTIM_MIN 6 /* Minimum lat */ | 550 | #define GT_LATTIM_MIN 6 /* Minimum lat */ |
551 | 551 | ||
552 | /* | 552 | /* |
553 | * The gt64120_dep.h file must define the following macros | 553 | * The gt64120_dep.h file must define the following macros |
554 | * | 554 | * |
555 | * GT_READ(ofs, data_pointer) | 555 | * GT_READ(ofs, data_pointer) |
556 | * GT_WRITE(ofs, data) - read/write GT64120 registers in 32bit | 556 | * GT_WRITE(ofs, data) - read/write GT64120 registers in 32bit |
557 | * | 557 | * |
558 | * TIMER - gt64120 timer irq, temporary solution until | 558 | * TIMER - gt64120 timer irq, temporary solution until |
559 | * full gt64120 cascade interrupt support is in place | 559 | * full gt64120 cascade interrupt support is in place |
560 | */ | 560 | */ |
561 | 561 | ||
diff --git a/arch/mips/include/asm/hazards.h b/arch/mips/include/asm/hazards.h index f0324e92d089..568544b6e856 100644 --- a/arch/mips/include/asm/hazards.h +++ b/arch/mips/include/asm/hazards.h | |||
@@ -25,7 +25,7 @@ static inline void name(void) \ | |||
25 | } | 25 | } |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * MIPS R2 instruction hazard barrier. Needs to be called as a subroutine. | 28 | * MIPS R2 instruction hazard barrier. Needs to be called as a subroutine. |
29 | */ | 29 | */ |
30 | extern void mips_ihb(void); | 30 | extern void mips_ihb(void); |
31 | 31 | ||
@@ -68,7 +68,7 @@ ASMMACRO(back_to_back_c0_hazard, | |||
68 | ) | 68 | ) |
69 | /* | 69 | /* |
70 | * gcc has a tradition of misscompiling the previous construct using the | 70 | * gcc has a tradition of misscompiling the previous construct using the |
71 | * address of a label as argument to inline assembler. Gas otoh has the | 71 | * address of a label as argument to inline assembler. Gas otoh has the |
72 | * annoying difference between la and dla which are only usable for 32-bit | 72 | * annoying difference between la and dla which are only usable for 32-bit |
73 | * rsp. 64-bit code, so can't be used without conditional compilation. | 73 | * rsp. 64-bit code, so can't be used without conditional compilation. |
74 | * The alterantive is switching the assembler to 64-bit code which happens | 74 | * The alterantive is switching the assembler to 64-bit code which happens |
@@ -114,7 +114,7 @@ ASMMACRO(back_to_back_c0_hazard, | |||
114 | ) | 114 | ) |
115 | /* | 115 | /* |
116 | * gcc has a tradition of misscompiling the previous construct using the | 116 | * gcc has a tradition of misscompiling the previous construct using the |
117 | * address of a label as argument to inline assembler. Gas otoh has the | 117 | * address of a label as argument to inline assembler. Gas otoh has the |
118 | * annoying difference between la and dla which are only usable for 32-bit | 118 | * annoying difference between la and dla which are only usable for 32-bit |
119 | * rsp. 64-bit code, so can't be used without conditional compilation. | 119 | * rsp. 64-bit code, so can't be used without conditional compilation. |
120 | * The alterantive is switching the assembler to 64-bit code which happens | 120 | * The alterantive is switching the assembler to 64-bit code which happens |
diff --git a/arch/mips/include/asm/highmem.h b/arch/mips/include/asm/highmem.h index 2d91888c9b74..b0dd0c84df70 100644 --- a/arch/mips/include/asm/highmem.h +++ b/arch/mips/include/asm/highmem.h | |||
@@ -39,8 +39,8 @@ extern pte_t *pkmap_page_table; | |||
39 | */ | 39 | */ |
40 | #define LAST_PKMAP 1024 | 40 | #define LAST_PKMAP 1024 |
41 | #define LAST_PKMAP_MASK (LAST_PKMAP-1) | 41 | #define LAST_PKMAP_MASK (LAST_PKMAP-1) |
42 | #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) | 42 | #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) |
43 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) | 43 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) |
44 | 44 | ||
45 | extern void * kmap_high(struct page *page); | 45 | extern void * kmap_high(struct page *page); |
46 | extern void kunmap_high(struct page *page); | 46 | extern void kunmap_high(struct page *page); |
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index ff2e0345e013..1be13727323f 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright (C) 1994 - 2000, 06 Ralf Baechle | 7 | * Copyright (C) 1994 - 2000, 06 Ralf Baechle |
8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
9 | * Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved. | 9 | * Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved. |
10 | * Author: Maciej W. Rozycki <macro@mips.com> | 10 | * Author: Maciej W. Rozycki <macro@mips.com> |
11 | */ | 11 | */ |
12 | #ifndef _ASM_IO_H | 12 | #ifndef _ASM_IO_H |
13 | #define _ASM_IO_H | 13 | #define _ASM_IO_H |
@@ -253,9 +253,9 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, | |||
253 | __ioremap_mode((offset), (size), _CACHE_UNCACHED) | 253 | __ioremap_mode((offset), (size), _CACHE_UNCACHED) |
254 | 254 | ||
255 | /* | 255 | /* |
256 | * ioremap_cachable - map bus memory into CPU space | 256 | * ioremap_cachable - map bus memory into CPU space |
257 | * @offset: bus address of the memory | 257 | * @offset: bus address of the memory |
258 | * @size: size of the resource to map | 258 | * @size: size of the resource to map |
259 | * | 259 | * |
260 | * ioremap_nocache performs a platform specific sequence of operations to | 260 | * ioremap_nocache performs a platform specific sequence of operations to |
261 | * make bus memory CPU accessible via the readb/readw/readl/writeb/ | 261 | * make bus memory CPU accessible via the readb/readw/readl/writeb/ |
@@ -264,14 +264,14 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, | |||
264 | * address. | 264 | * address. |
265 | * | 265 | * |
266 | * This version of ioremap ensures that the memory is marked cachable by | 266 | * This version of ioremap ensures that the memory is marked cachable by |
267 | * the CPU. Also enables full write-combining. Useful for some | 267 | * the CPU. Also enables full write-combining. Useful for some |
268 | * memory-like regions on I/O busses. | 268 | * memory-like regions on I/O busses. |
269 | */ | 269 | */ |
270 | #define ioremap_cachable(offset, size) \ | 270 | #define ioremap_cachable(offset, size) \ |
271 | __ioremap_mode((offset), (size), _page_cachable_default) | 271 | __ioremap_mode((offset), (size), _page_cachable_default) |
272 | 272 | ||
273 | /* | 273 | /* |
274 | * These two are MIPS specific ioremap variant. ioremap_cacheable_cow | 274 | * These two are MIPS specific ioremap variant. ioremap_cacheable_cow |
275 | * requests a cachable mapping, ioremap_uncached_accelerated requests a | 275 | * requests a cachable mapping, ioremap_uncached_accelerated requests a |
276 | * mapping using the uncached accelerated mode which isn't supported on | 276 | * mapping using the uncached accelerated mode which isn't supported on |
277 | * all processors. | 277 | * all processors. |
@@ -298,7 +298,7 @@ static inline void iounmap(const volatile void __iomem *addr) | |||
298 | } | 298 | } |
299 | 299 | ||
300 | #ifdef CONFIG_CPU_CAVIUM_OCTEON | 300 | #ifdef CONFIG_CPU_CAVIUM_OCTEON |
301 | #define war_octeon_io_reorder_wmb() wmb() | 301 | #define war_octeon_io_reorder_wmb() wmb() |
302 | #else | 302 | #else |
303 | #define war_octeon_io_reorder_wmb() do { } while (0) | 303 | #define war_octeon_io_reorder_wmb() do { } while (0) |
304 | #endif | 304 | #endif |
@@ -317,7 +317,7 @@ static inline void pfx##write##bwlq(type val, \ | |||
317 | \ | 317 | \ |
318 | __val = pfx##ioswab##bwlq(__mem, val); \ | 318 | __val = pfx##ioswab##bwlq(__mem, val); \ |
319 | \ | 319 | \ |
320 | if (sizeof(type) != sizeof(u64) || sizeof(u64) == sizeof(long)) \ | 320 | if (sizeof(type) != sizeof(u64) || sizeof(u64) == sizeof(long)) \ |
321 | *__mem = __val; \ | 321 | *__mem = __val; \ |
322 | else if (cpu_has_64bits) { \ | 322 | else if (cpu_has_64bits) { \ |
323 | unsigned long __flags; \ | 323 | unsigned long __flags; \ |
@@ -327,9 +327,9 @@ static inline void pfx##write##bwlq(type val, \ | |||
327 | local_irq_save(__flags); \ | 327 | local_irq_save(__flags); \ |
328 | __asm__ __volatile__( \ | 328 | __asm__ __volatile__( \ |
329 | ".set mips3" "\t\t# __writeq""\n\t" \ | 329 | ".set mips3" "\t\t# __writeq""\n\t" \ |
330 | "dsll32 %L0, %L0, 0" "\n\t" \ | 330 | "dsll32 %L0, %L0, 0" "\n\t" \ |
331 | "dsrl32 %L0, %L0, 0" "\n\t" \ | 331 | "dsrl32 %L0, %L0, 0" "\n\t" \ |
332 | "dsll32 %M0, %M0, 0" "\n\t" \ | 332 | "dsll32 %M0, %M0, 0" "\n\t" \ |
333 | "or %L0, %L0, %M0" "\n\t" \ | 333 | "or %L0, %L0, %M0" "\n\t" \ |
334 | "sd %L0, %2" "\n\t" \ | 334 | "sd %L0, %2" "\n\t" \ |
335 | ".set mips0" "\n" \ | 335 | ".set mips0" "\n" \ |
@@ -348,7 +348,7 @@ static inline type pfx##read##bwlq(const volatile void __iomem *mem) \ | |||
348 | \ | 348 | \ |
349 | __mem = (void *)__swizzle_addr_##bwlq((unsigned long)(mem)); \ | 349 | __mem = (void *)__swizzle_addr_##bwlq((unsigned long)(mem)); \ |
350 | \ | 350 | \ |
351 | if (sizeof(type) != sizeof(u64) || sizeof(u64) == sizeof(long)) \ | 351 | if (sizeof(type) != sizeof(u64) || sizeof(u64) == sizeof(long)) \ |
352 | __val = *__mem; \ | 352 | __val = *__mem; \ |
353 | else if (cpu_has_64bits) { \ | 353 | else if (cpu_has_64bits) { \ |
354 | unsigned long __flags; \ | 354 | unsigned long __flags; \ |
@@ -356,9 +356,9 @@ static inline type pfx##read##bwlq(const volatile void __iomem *mem) \ | |||
356 | if (irq) \ | 356 | if (irq) \ |
357 | local_irq_save(__flags); \ | 357 | local_irq_save(__flags); \ |
358 | __asm__ __volatile__( \ | 358 | __asm__ __volatile__( \ |
359 | ".set mips3" "\t\t# __readq" "\n\t" \ | 359 | ".set mips3" "\t\t# __readq" "\n\t" \ |
360 | "ld %L0, %1" "\n\t" \ | 360 | "ld %L0, %1" "\n\t" \ |
361 | "dsra32 %M0, %L0, 0" "\n\t" \ | 361 | "dsra32 %M0, %L0, 0" "\n\t" \ |
362 | "sll %L0, %L0, 0" "\n\t" \ | 362 | "sll %L0, %L0, 0" "\n\t" \ |
363 | ".set mips0" "\n" \ | 363 | ".set mips0" "\n" \ |
364 | : "=r" (__val) \ | 364 | : "=r" (__val) \ |
@@ -586,7 +586,7 @@ extern void (*_dma_cache_inv)(unsigned long start, unsigned long size); | |||
586 | 586 | ||
587 | #else /* Sane hardware */ | 587 | #else /* Sane hardware */ |
588 | 588 | ||
589 | #define dma_cache_wback_inv(start,size) \ | 589 | #define dma_cache_wback_inv(start,size) \ |
590 | do { (void) (start); (void) (size); } while (0) | 590 | do { (void) (start); (void) (size); } while (0) |
591 | #define dma_cache_wback(start,size) \ | 591 | #define dma_cache_wback(start,size) \ |
592 | do { (void) (start); (void) (size); } while (0) | 592 | do { (void) (start); (void) (size); } while (0) |
diff --git a/arch/mips/include/asm/ip32/crime.h b/arch/mips/include/asm/ip32/crime.h index 7c36b0e5b1c6..16c94a27beba 100644 --- a/arch/mips/include/asm/ip32/crime.h +++ b/arch/mips/include/asm/ip32/crime.h | |||
@@ -74,7 +74,7 @@ struct sgi_crime { | |||
74 | #define CRIME_RE_IDLE_E_INT BIT(24) | 74 | #define CRIME_RE_IDLE_E_INT BIT(24) |
75 | #define CRIME_RE_EMPTY_L_INT BIT(25) | 75 | #define CRIME_RE_EMPTY_L_INT BIT(25) |
76 | #define CRIME_RE_FULL_L_INT BIT(26) | 76 | #define CRIME_RE_FULL_L_INT BIT(26) |
77 | #define CRIME_RE_IDLE_L_INT BIT(27) | 77 | #define CRIME_RE_IDLE_L_INT BIT(27) |
78 | #define CRIME_SOFT0_INT BIT(28) | 78 | #define CRIME_SOFT0_INT BIT(28) |
79 | #define CRIME_SOFT1_INT BIT(29) | 79 | #define CRIME_SOFT1_INT BIT(29) |
80 | #define CRIME_SOFT2_INT BIT(30) | 80 | #define CRIME_SOFT2_INT BIT(30) |
@@ -118,7 +118,7 @@ struct sgi_crime { | |||
118 | #define CRIME_MEM_REF_COUNTER_MASK 0x3ff /* 10bit */ | 118 | #define CRIME_MEM_REF_COUNTER_MASK 0x3ff /* 10bit */ |
119 | 119 | ||
120 | volatile unsigned long mem_error_stat; | 120 | volatile unsigned long mem_error_stat; |
121 | #define CRIME_MEM_ERROR_STAT_MASK 0x0ff7ffff /* 28-bit register */ | 121 | #define CRIME_MEM_ERROR_STAT_MASK 0x0ff7ffff /* 28-bit register */ |
122 | #define CRIME_MEM_ERROR_MACE_ID 0x0000007f | 122 | #define CRIME_MEM_ERROR_MACE_ID 0x0000007f |
123 | #define CRIME_MEM_ERROR_MACE_ACCESS 0x00000080 | 123 | #define CRIME_MEM_ERROR_MACE_ACCESS 0x00000080 |
124 | #define CRIME_MEM_ERROR_RE_ID 0x00007f00 | 124 | #define CRIME_MEM_ERROR_RE_ID 0x00007f00 |
@@ -134,8 +134,8 @@ struct sgi_crime { | |||
134 | #define CRIME_MEM_ERROR_MEM_ECC_RD 0x00800000 | 134 | #define CRIME_MEM_ERROR_MEM_ECC_RD 0x00800000 |
135 | #define CRIME_MEM_ERROR_MEM_ECC_RMW 0x01000000 | 135 | #define CRIME_MEM_ERROR_MEM_ECC_RMW 0x01000000 |
136 | #define CRIME_MEM_ERROR_INV 0x0e000000 | 136 | #define CRIME_MEM_ERROR_INV 0x0e000000 |
137 | #define CRIME_MEM_ERROR_INV_MEM_ADDR_RD 0x02000000 | 137 | #define CRIME_MEM_ERROR_INV_MEM_ADDR_RD 0x02000000 |
138 | #define CRIME_MEM_ERROR_INV_MEM_ADDR_WR 0x04000000 | 138 | #define CRIME_MEM_ERROR_INV_MEM_ADDR_WR 0x04000000 |
139 | #define CRIME_MEM_ERROR_INV_MEM_ADDR_RMW 0x08000000 | 139 | #define CRIME_MEM_ERROR_INV_MEM_ADDR_RMW 0x08000000 |
140 | 140 | ||
141 | volatile unsigned long mem_error_addr; | 141 | volatile unsigned long mem_error_addr; |
diff --git a/arch/mips/include/asm/ip32/ip32_ints.h b/arch/mips/include/asm/ip32/ip32_ints.h index 85bc5302bce0..72e3368de111 100644 --- a/arch/mips/include/asm/ip32/ip32_ints.h +++ b/arch/mips/include/asm/ip32/ip32_ints.h | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | /* | 14 | /* |
15 | * This list reflects the assignment of interrupt numbers to | 15 | * This list reflects the assignment of interrupt numbers to |
16 | * interrupting events. Order is fairly irrelevant to handling | 16 | * interrupting events. Order is fairly irrelevant to handling |
17 | * priority. This differs from irix. | 17 | * priority. This differs from irix. |
18 | */ | 18 | */ |
19 | 19 | ||
diff --git a/arch/mips/include/asm/ip32/mace.h b/arch/mips/include/asm/ip32/mace.h index c523123df380..253ed7ea80be 100644 --- a/arch/mips/include/asm/ip32/mace.h +++ b/arch/mips/include/asm/ip32/mace.h | |||
@@ -250,12 +250,12 @@ struct mace_ps2 { | |||
250 | * -> drivers/i2c/algos/i2c-algo-sgi.c */ | 250 | * -> drivers/i2c/algos/i2c-algo-sgi.c */ |
251 | struct mace_i2c { | 251 | struct mace_i2c { |
252 | volatile unsigned long config; | 252 | volatile unsigned long config; |
253 | #define MACEI2C_RESET BIT(0) | 253 | #define MACEI2C_RESET BIT(0) |
254 | #define MACEI2C_FAST BIT(1) | 254 | #define MACEI2C_FAST BIT(1) |
255 | #define MACEI2C_DATA_OVERRIDE BIT(2) | 255 | #define MACEI2C_DATA_OVERRIDE BIT(2) |
256 | #define MACEI2C_CLOCK_OVERRIDE BIT(3) | 256 | #define MACEI2C_CLOCK_OVERRIDE BIT(3) |
257 | #define MACEI2C_DATA_STATUS BIT(4) | 257 | #define MACEI2C_DATA_STATUS BIT(4) |
258 | #define MACEI2C_CLOCK_STATUS BIT(5) | 258 | #define MACEI2C_CLOCK_STATUS BIT(5) |
259 | volatile unsigned long control; | 259 | volatile unsigned long control; |
260 | volatile unsigned long data; | 260 | volatile unsigned long data; |
261 | }; | 261 | }; |
diff --git a/arch/mips/include/asm/irq.h b/arch/mips/include/asm/irq.h index 78dbb8a86da2..7bc2cdb35057 100644 --- a/arch/mips/include/asm/irq.h +++ b/arch/mips/include/asm/irq.h | |||
@@ -32,7 +32,7 @@ struct irqaction; | |||
32 | 32 | ||
33 | extern unsigned long irq_hwmask[]; | 33 | extern unsigned long irq_hwmask[]; |
34 | extern int setup_irq_smtc(unsigned int irq, struct irqaction * new, | 34 | extern int setup_irq_smtc(unsigned int irq, struct irqaction * new, |
35 | unsigned long hwmask); | 35 | unsigned long hwmask); |
36 | 36 | ||
37 | static inline void smtc_im_ack_irq(unsigned int irq) | 37 | static inline void smtc_im_ack_irq(unsigned int irq) |
38 | { | 38 | { |
@@ -60,7 +60,7 @@ extern void smtc_forward_irq(struct irq_data *d); | |||
60 | * if option is enabled. | 60 | * if option is enabled. |
61 | * | 61 | * |
62 | * Up through Linux 2.6.22 (at least) cpumask operations are very | 62 | * Up through Linux 2.6.22 (at least) cpumask operations are very |
63 | * inefficient on MIPS. Initial prototypes of SMTC IRQ affinity | 63 | * inefficient on MIPS. Initial prototypes of SMTC IRQ affinity |
64 | * used a "fast path" per-IRQ-descriptor cache of affinity information | 64 | * used a "fast path" per-IRQ-descriptor cache of affinity information |
65 | * to reduce latency. As there is a project afoot to optimize the | 65 | * to reduce latency. As there is a project afoot to optimize the |
66 | * cpumask implementations, this version is optimistically assuming | 66 | * cpumask implementations, this version is optimistically assuming |
@@ -133,7 +133,7 @@ extern void free_irqno(unsigned int irq); | |||
133 | 133 | ||
134 | /* | 134 | /* |
135 | * Before R2 the timer and performance counter interrupts were both fixed to | 135 | * Before R2 the timer and performance counter interrupts were both fixed to |
136 | * IE7. Since R2 their number has to be read from the c0_intctl register. | 136 | * IE7. Since R2 their number has to be read from the c0_intctl register. |
137 | */ | 137 | */ |
138 | #define CP0_LEGACY_COMPARE_IRQ 7 | 138 | #define CP0_LEGACY_COMPARE_IRQ 7 |
139 | #define CP0_LEGACY_PERFCNT_IRQ 7 | 139 | #define CP0_LEGACY_PERFCNT_IRQ 7 |
diff --git a/arch/mips/include/asm/isadep.h b/arch/mips/include/asm/isadep.h index 24c6cda79377..b4af6eb24ab9 100644 --- a/arch/mips/include/asm/isadep.h +++ b/arch/mips/include/asm/isadep.h | |||
@@ -18,7 +18,7 @@ | |||
18 | * kernel or user mode? (CP0_STATUS) | 18 | * kernel or user mode? (CP0_STATUS) |
19 | */ | 19 | */ |
20 | #define KU_MASK 0x08 | 20 | #define KU_MASK 0x08 |
21 | #define KU_USER 0x08 | 21 | #define KU_USER 0x08 |
22 | #define KU_KERN 0x00 | 22 | #define KU_KERN 0x00 |
23 | 23 | ||
24 | #else | 24 | #else |
@@ -26,7 +26,7 @@ | |||
26 | * kernel or user mode? | 26 | * kernel or user mode? |
27 | */ | 27 | */ |
28 | #define KU_MASK 0x18 | 28 | #define KU_MASK 0x18 |
29 | #define KU_USER 0x10 | 29 | #define KU_USER 0x10 |
30 | #define KU_KERN 0x00 | 30 | #define KU_KERN 0x00 |
31 | 31 | ||
32 | #endif | 32 | #endif |
diff --git a/arch/mips/include/asm/jazz.h b/arch/mips/include/asm/jazz.h index 83f449dec95e..a61970d01a81 100644 --- a/arch/mips/include/asm/jazz.h +++ b/arch/mips/include/asm/jazz.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * instead of 0xe0000000. | 16 | * instead of 0xe0000000. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #define JAZZ_LOCAL_IO_SPACE 0xe0000000 | 19 | #define JAZZ_LOCAL_IO_SPACE 0xe0000000 |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * Revision numbers in PICA_ASIC_REVISION | 22 | * Revision numbers in PICA_ASIC_REVISION |
@@ -25,24 +25,24 @@ | |||
25 | * 0xf0000001 - Rev2 | 25 | * 0xf0000001 - Rev2 |
26 | * 0xf0000002 - Rev3 | 26 | * 0xf0000002 - Rev3 |
27 | */ | 27 | */ |
28 | #define PICA_ASIC_REVISION 0xe0000008 | 28 | #define PICA_ASIC_REVISION 0xe0000008 |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * The segments of the seven segment LED are mapped | 31 | * The segments of the seven segment LED are mapped |
32 | * to the control bits as follows: | 32 | * to the control bits as follows: |
33 | * | 33 | * |
34 | * (7) | 34 | * (7) |
35 | * --------- | 35 | * --------- |
36 | * | | | 36 | * | | |
37 | * (2) | | (6) | 37 | * (2) | | (6) |
38 | * | (1) | | 38 | * | (1) | |
39 | * --------- | 39 | * --------- |
40 | * | | | 40 | * | | |
41 | * (3) | | (5) | 41 | * (3) | | (5) |
42 | * | (4) | | 42 | * | (4) | |
43 | * --------- . (0) | 43 | * --------- . (0) |
44 | */ | 44 | */ |
45 | #define PICA_LED 0xe000f000 | 45 | #define PICA_LED 0xe000f000 |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Some characters for the LED control registers | 48 | * Some characters for the LED control registers |
@@ -51,24 +51,24 @@ | |||
51 | * control each of the seven segments and the dot independently. | 51 | * control each of the seven segments and the dot independently. |
52 | * It's only a toy, anyway... | 52 | * It's only a toy, anyway... |
53 | */ | 53 | */ |
54 | #define LED_DOT 0x01 | 54 | #define LED_DOT 0x01 |
55 | #define LED_SPACE 0x00 | 55 | #define LED_SPACE 0x00 |
56 | #define LED_0 0xfc | 56 | #define LED_0 0xfc |
57 | #define LED_1 0x60 | 57 | #define LED_1 0x60 |
58 | #define LED_2 0xda | 58 | #define LED_2 0xda |
59 | #define LED_3 0xf2 | 59 | #define LED_3 0xf2 |
60 | #define LED_4 0x66 | 60 | #define LED_4 0x66 |
61 | #define LED_5 0xb6 | 61 | #define LED_5 0xb6 |
62 | #define LED_6 0xbe | 62 | #define LED_6 0xbe |
63 | #define LED_7 0xe0 | 63 | #define LED_7 0xe0 |
64 | #define LED_8 0xfe | 64 | #define LED_8 0xfe |
65 | #define LED_9 0xf6 | 65 | #define LED_9 0xf6 |
66 | #define LED_A 0xee | 66 | #define LED_A 0xee |
67 | #define LED_b 0x3e | 67 | #define LED_b 0x3e |
68 | #define LED_C 0x9c | 68 | #define LED_C 0x9c |
69 | #define LED_d 0x7a | 69 | #define LED_d 0x7a |
70 | #define LED_E 0x9e | 70 | #define LED_E 0x9e |
71 | #define LED_F 0x8e | 71 | #define LED_F 0x8e |
72 | 72 | ||
73 | #ifndef __ASSEMBLY__ | 73 | #ifndef __ASSEMBLY__ |
74 | 74 | ||
@@ -96,9 +96,9 @@ static __inline__ void pica_set_led(unsigned int bits) | |||
96 | * This address is just a guess and seems to differ from | 96 | * This address is just a guess and seems to differ from |
97 | * other mips machines such as RC3xxx... | 97 | * other mips machines such as RC3xxx... |
98 | */ | 98 | */ |
99 | #define JAZZ_KEYBOARD_ADDRESS 0xe0005000 | 99 | #define JAZZ_KEYBOARD_ADDRESS 0xe0005000 |
100 | #define JAZZ_KEYBOARD_DATA 0xe0005000 | 100 | #define JAZZ_KEYBOARD_DATA 0xe0005000 |
101 | #define JAZZ_KEYBOARD_COMMAND 0xe0005001 | 101 | #define JAZZ_KEYBOARD_COMMAND 0xe0005001 |
102 | 102 | ||
103 | #ifndef __ASSEMBLY__ | 103 | #ifndef __ASSEMBLY__ |
104 | 104 | ||
@@ -119,28 +119,28 @@ typedef struct { | |||
119 | /* | 119 | /* |
120 | * For now. Needs to be changed for RC3xxx support. See below. | 120 | * For now. Needs to be changed for RC3xxx support. See below. |
121 | */ | 121 | */ |
122 | #define keyboard_hardware jazz_keyboard_hardware | 122 | #define keyboard_hardware jazz_keyboard_hardware |
123 | 123 | ||
124 | #endif /* !__ASSEMBLY__ */ | 124 | #endif /* !__ASSEMBLY__ */ |
125 | 125 | ||
126 | /* | 126 | /* |
127 | * i8042 keyboard controller for most other Mips machines. | 127 | * i8042 keyboard controller for most other Mips machines. |
128 | */ | 128 | */ |
129 | #define MIPS_KEYBOARD_ADDRESS 0xb9005000 | 129 | #define MIPS_KEYBOARD_ADDRESS 0xb9005000 |
130 | #define MIPS_KEYBOARD_DATA 0xb9005003 | 130 | #define MIPS_KEYBOARD_DATA 0xb9005003 |
131 | #define MIPS_KEYBOARD_COMMAND 0xb9005007 | 131 | #define MIPS_KEYBOARD_COMMAND 0xb9005007 |
132 | 132 | ||
133 | /* | 133 | /* |
134 | * Serial and parallel ports (WD 16C552) on the Mips JAZZ | 134 | * Serial and parallel ports (WD 16C552) on the Mips JAZZ |
135 | */ | 135 | */ |
136 | #define JAZZ_SERIAL1_BASE (unsigned int)0xe0006000 | 136 | #define JAZZ_SERIAL1_BASE (unsigned int)0xe0006000 |
137 | #define JAZZ_SERIAL2_BASE (unsigned int)0xe0007000 | 137 | #define JAZZ_SERIAL2_BASE (unsigned int)0xe0007000 |
138 | #define JAZZ_PARALLEL_BASE (unsigned int)0xe0008000 | 138 | #define JAZZ_PARALLEL_BASE (unsigned int)0xe0008000 |
139 | 139 | ||
140 | /* | 140 | /* |
141 | * Dummy Device Address. Used in jazzdma.c | 141 | * Dummy Device Address. Used in jazzdma.c |
142 | */ | 142 | */ |
143 | #define JAZZ_DUMMY_DEVICE 0xe000d000 | 143 | #define JAZZ_DUMMY_DEVICE 0xe000d000 |
144 | 144 | ||
145 | /* | 145 | /* |
146 | * JAZZ timer registers and interrupt no. | 146 | * JAZZ timer registers and interrupt no. |
@@ -148,8 +148,8 @@ typedef struct { | |||
148 | * cpu level 6, but to keep compatibility with PC stuff | 148 | * cpu level 6, but to keep compatibility with PC stuff |
149 | * it is remapped to vector 0. See arch/mips/kernel/entry.S. | 149 | * it is remapped to vector 0. See arch/mips/kernel/entry.S. |
150 | */ | 150 | */ |
151 | #define JAZZ_TIMER_INTERVAL 0xe0000228 | 151 | #define JAZZ_TIMER_INTERVAL 0xe0000228 |
152 | #define JAZZ_TIMER_REGISTER 0xe0000230 | 152 | #define JAZZ_TIMER_REGISTER 0xe0000230 |
153 | 153 | ||
154 | /* | 154 | /* |
155 | * DRAM configuration register | 155 | * DRAM configuration register |
@@ -176,13 +176,13 @@ typedef struct { | |||
176 | #endif | 176 | #endif |
177 | #endif /* !__ASSEMBLY__ */ | 177 | #endif /* !__ASSEMBLY__ */ |
178 | 178 | ||
179 | #define PICA_DRAM_CONFIG 0xe00fffe0 | 179 | #define PICA_DRAM_CONFIG 0xe00fffe0 |
180 | 180 | ||
181 | /* | 181 | /* |
182 | * JAZZ interrupt control registers | 182 | * JAZZ interrupt control registers |
183 | */ | 183 | */ |
184 | #define JAZZ_IO_IRQ_SOURCE 0xe0010000 | 184 | #define JAZZ_IO_IRQ_SOURCE 0xe0010000 |
185 | #define JAZZ_IO_IRQ_ENABLE 0xe0010002 | 185 | #define JAZZ_IO_IRQ_ENABLE 0xe0010002 |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * JAZZ Interrupt Level definitions | 188 | * JAZZ Interrupt Level definitions |
@@ -190,20 +190,20 @@ typedef struct { | |||
190 | * This is somewhat broken. For reasons which nobody can remember anymore | 190 | * This is somewhat broken. For reasons which nobody can remember anymore |
191 | * we remap the Jazz interrupts to the usual ISA style interrupt numbers. | 191 | * we remap the Jazz interrupts to the usual ISA style interrupt numbers. |
192 | */ | 192 | */ |
193 | #define JAZZ_IRQ_START 24 | 193 | #define JAZZ_IRQ_START 24 |
194 | #define JAZZ_IRQ_END (24 + 9) | 194 | #define JAZZ_IRQ_END (24 + 9) |
195 | #define JAZZ_PARALLEL_IRQ (JAZZ_IRQ_START + 0) | 195 | #define JAZZ_PARALLEL_IRQ (JAZZ_IRQ_START + 0) |
196 | #define JAZZ_FLOPPY_IRQ (JAZZ_IRQ_START + 1) | 196 | #define JAZZ_FLOPPY_IRQ (JAZZ_IRQ_START + 1) |
197 | #define JAZZ_SOUND_IRQ (JAZZ_IRQ_START + 2) | 197 | #define JAZZ_SOUND_IRQ (JAZZ_IRQ_START + 2) |
198 | #define JAZZ_VIDEO_IRQ (JAZZ_IRQ_START + 3) | 198 | #define JAZZ_VIDEO_IRQ (JAZZ_IRQ_START + 3) |
199 | #define JAZZ_ETHERNET_IRQ (JAZZ_IRQ_START + 4) | 199 | #define JAZZ_ETHERNET_IRQ (JAZZ_IRQ_START + 4) |
200 | #define JAZZ_SCSI_IRQ (JAZZ_IRQ_START + 5) | 200 | #define JAZZ_SCSI_IRQ (JAZZ_IRQ_START + 5) |
201 | #define JAZZ_KEYBOARD_IRQ (JAZZ_IRQ_START + 6) | 201 | #define JAZZ_KEYBOARD_IRQ (JAZZ_IRQ_START + 6) |
202 | #define JAZZ_MOUSE_IRQ (JAZZ_IRQ_START + 7) | 202 | #define JAZZ_MOUSE_IRQ (JAZZ_IRQ_START + 7) |
203 | #define JAZZ_SERIAL1_IRQ (JAZZ_IRQ_START + 8) | 203 | #define JAZZ_SERIAL1_IRQ (JAZZ_IRQ_START + 8) |
204 | #define JAZZ_SERIAL2_IRQ (JAZZ_IRQ_START + 9) | 204 | #define JAZZ_SERIAL2_IRQ (JAZZ_IRQ_START + 9) |
205 | 205 | ||
206 | #define JAZZ_TIMER_IRQ (MIPS_CPU_IRQ_BASE+6) | 206 | #define JAZZ_TIMER_IRQ (MIPS_CPU_IRQ_BASE+6) |
207 | 207 | ||
208 | 208 | ||
209 | /* | 209 | /* |
@@ -211,46 +211,46 @@ typedef struct { | |||
211 | * Note: Channels 4...7 are not used with respect to the Acer PICA-61 | 211 | * Note: Channels 4...7 are not used with respect to the Acer PICA-61 |
212 | * chipset which does not provide these DMA channels. | 212 | * chipset which does not provide these DMA channels. |
213 | */ | 213 | */ |
214 | #define JAZZ_SCSI_DMA 0 /* SCSI */ | 214 | #define JAZZ_SCSI_DMA 0 /* SCSI */ |
215 | #define JAZZ_FLOPPY_DMA 1 /* FLOPPY */ | 215 | #define JAZZ_FLOPPY_DMA 1 /* FLOPPY */ |
216 | #define JAZZ_AUDIOL_DMA 2 /* AUDIO L */ | 216 | #define JAZZ_AUDIOL_DMA 2 /* AUDIO L */ |
217 | #define JAZZ_AUDIOR_DMA 3 /* AUDIO R */ | 217 | #define JAZZ_AUDIOR_DMA 3 /* AUDIO R */ |
218 | 218 | ||
219 | /* | 219 | /* |
220 | * JAZZ R4030 MCT_ADR chip (DMA controller) | 220 | * JAZZ R4030 MCT_ADR chip (DMA controller) |
221 | * Note: Virtual Addresses ! | 221 | * Note: Virtual Addresses ! |
222 | */ | 222 | */ |
223 | #define JAZZ_R4030_CONFIG 0xE0000000 /* R4030 config register */ | 223 | #define JAZZ_R4030_CONFIG 0xE0000000 /* R4030 config register */ |
224 | #define JAZZ_R4030_REVISION 0xE0000008 /* same as PICA_ASIC_REVISION */ | 224 | #define JAZZ_R4030_REVISION 0xE0000008 /* same as PICA_ASIC_REVISION */ |
225 | #define JAZZ_R4030_INV_ADDR 0xE0000010 /* Invalid Address register */ | 225 | #define JAZZ_R4030_INV_ADDR 0xE0000010 /* Invalid Address register */ |
226 | 226 | ||
227 | #define JAZZ_R4030_TRSTBL_BASE 0xE0000018 /* Translation Table Base */ | 227 | #define JAZZ_R4030_TRSTBL_BASE 0xE0000018 /* Translation Table Base */ |
228 | #define JAZZ_R4030_TRSTBL_LIM 0xE0000020 /* Translation Table Limit */ | 228 | #define JAZZ_R4030_TRSTBL_LIM 0xE0000020 /* Translation Table Limit */ |
229 | #define JAZZ_R4030_TRSTBL_INV 0xE0000028 /* Translation Table Invalidate */ | 229 | #define JAZZ_R4030_TRSTBL_INV 0xE0000028 /* Translation Table Invalidate */ |
230 | 230 | ||
231 | #define JAZZ_R4030_CACHE_MTNC 0xE0000030 /* Cache Maintenance */ | 231 | #define JAZZ_R4030_CACHE_MTNC 0xE0000030 /* Cache Maintenance */ |
232 | #define JAZZ_R4030_R_FAIL_ADDR 0xE0000038 /* Remote Failed Address */ | 232 | #define JAZZ_R4030_R_FAIL_ADDR 0xE0000038 /* Remote Failed Address */ |
233 | #define JAZZ_R4030_M_FAIL_ADDR 0xE0000040 /* Memory Failed Address */ | 233 | #define JAZZ_R4030_M_FAIL_ADDR 0xE0000040 /* Memory Failed Address */ |
234 | 234 | ||
235 | #define JAZZ_R4030_CACHE_PTAG 0xE0000048 /* I/O Cache Physical Tag */ | 235 | #define JAZZ_R4030_CACHE_PTAG 0xE0000048 /* I/O Cache Physical Tag */ |
236 | #define JAZZ_R4030_CACHE_LTAG 0xE0000050 /* I/O Cache Logical Tag */ | 236 | #define JAZZ_R4030_CACHE_LTAG 0xE0000050 /* I/O Cache Logical Tag */ |
237 | #define JAZZ_R4030_CACHE_BMASK 0xE0000058 /* I/O Cache Byte Mask */ | 237 | #define JAZZ_R4030_CACHE_BMASK 0xE0000058 /* I/O Cache Byte Mask */ |
238 | #define JAZZ_R4030_CACHE_BWIN 0xE0000060 /* I/O Cache Buffer Window */ | 238 | #define JAZZ_R4030_CACHE_BWIN 0xE0000060 /* I/O Cache Buffer Window */ |
239 | 239 | ||
240 | /* | 240 | /* |
241 | * Remote Speed Registers. | 241 | * Remote Speed Registers. |
242 | * | 242 | * |
243 | * 0: free, 1: Ethernet, 2: SCSI, 3: Floppy, | 243 | * 0: free, 1: Ethernet, 2: SCSI, 3: Floppy, |
244 | * 4: RTC, 5: Kb./Mouse 6: serial 1, 7: serial 2, | 244 | * 4: RTC, 5: Kb./Mouse 6: serial 1, 7: serial 2, |
245 | * 8: parallel, 9: NVRAM, 10: CPU, 11: PROM, | 245 | * 8: parallel, 9: NVRAM, 10: CPU, 11: PROM, |
246 | * 12: reserved, 13: free, 14: 7seg LED, 15: ??? | 246 | * 12: reserved, 13: free, 14: 7seg LED, 15: ??? |
247 | */ | 247 | */ |
248 | #define JAZZ_R4030_REM_SPEED 0xE0000070 /* 16 Remote Speed Registers */ | 248 | #define JAZZ_R4030_REM_SPEED 0xE0000070 /* 16 Remote Speed Registers */ |
249 | /* 0xE0000070,78,80... 0xE00000E8 */ | 249 | /* 0xE0000070,78,80... 0xE00000E8 */ |
250 | #define JAZZ_R4030_IRQ_ENABLE 0xE00000E8 /* Internal Interrupt Enable */ | 250 | #define JAZZ_R4030_IRQ_ENABLE 0xE00000E8 /* Internal Interrupt Enable */ |
251 | #define JAZZ_R4030_INVAL_ADDR 0xE0000010 /* Invalid address Register */ | 251 | #define JAZZ_R4030_INVAL_ADDR 0xE0000010 /* Invalid address Register */ |
252 | #define JAZZ_R4030_IRQ_SOURCE 0xE0000200 /* Interrupt Source Register */ | 252 | #define JAZZ_R4030_IRQ_SOURCE 0xE0000200 /* Interrupt Source Register */ |
253 | #define JAZZ_R4030_I386_ERROR 0xE0000208 /* i386/EISA Bus Error */ | 253 | #define JAZZ_R4030_I386_ERROR 0xE0000208 /* i386/EISA Bus Error */ |
254 | 254 | ||
255 | /* | 255 | /* |
256 | * Virtual (E)ISA controller address | 256 | * Virtual (E)ISA controller address |
diff --git a/arch/mips/include/asm/jazzdma.h b/arch/mips/include/asm/jazzdma.h index 8bb37bba68f0..2cefc3c47241 100644 --- a/arch/mips/include/asm/jazzdma.h +++ b/arch/mips/include/asm/jazzdma.h | |||
@@ -10,7 +10,7 @@ | |||
10 | extern unsigned long vdma_alloc(unsigned long paddr, unsigned long size); | 10 | extern unsigned long vdma_alloc(unsigned long paddr, unsigned long size); |
11 | extern int vdma_free(unsigned long laddr); | 11 | extern int vdma_free(unsigned long laddr); |
12 | extern int vdma_remap(unsigned long laddr, unsigned long paddr, | 12 | extern int vdma_remap(unsigned long laddr, unsigned long paddr, |
13 | unsigned long size); | 13 | unsigned long size); |
14 | extern unsigned long vdma_phys2log(unsigned long paddr); | 14 | extern unsigned long vdma_phys2log(unsigned long paddr); |
15 | extern unsigned long vdma_log2phys(unsigned long laddr); | 15 | extern unsigned long vdma_log2phys(unsigned long laddr); |
16 | extern void vdma_stats(void); /* for debugging only */ | 16 | extern void vdma_stats(void); /* for debugging only */ |
@@ -35,14 +35,14 @@ extern int vdma_get_enable(int channel); | |||
35 | * Macros to get page no. and offset of a given address | 35 | * Macros to get page no. and offset of a given address |
36 | * Note that VDMA_PAGE() works for physical addresses only | 36 | * Note that VDMA_PAGE() works for physical addresses only |
37 | */ | 37 | */ |
38 | #define VDMA_PAGE(a) ((unsigned int)(a) >> 12) | 38 | #define VDMA_PAGE(a) ((unsigned int)(a) >> 12) |
39 | #define VDMA_OFFSET(a) ((unsigned int)(a) & (VDMA_PAGESIZE-1)) | 39 | #define VDMA_OFFSET(a) ((unsigned int)(a) & (VDMA_PAGESIZE-1)) |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * error code returned by vdma_alloc() | 42 | * error code returned by vdma_alloc() |
43 | * (See also arch/mips/kernel/jazzdma.c) | 43 | * (See also arch/mips/kernel/jazzdma.c) |
44 | */ | 44 | */ |
45 | #define VDMA_ERROR 0xffffffff | 45 | #define VDMA_ERROR 0xffffffff |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * VDMA pagetable entry description | 48 | * VDMA pagetable entry description |
@@ -59,37 +59,37 @@ typedef volatile struct VDMA_PGTBL_ENTRY { | |||
59 | */ | 59 | */ |
60 | #define JAZZ_R4030_CHNL_MODE 0xE0000100 /* 8 DMA Channel Mode Registers, */ | 60 | #define JAZZ_R4030_CHNL_MODE 0xE0000100 /* 8 DMA Channel Mode Registers, */ |
61 | /* 0xE0000100,120,140... */ | 61 | /* 0xE0000100,120,140... */ |
62 | #define JAZZ_R4030_CHNL_ENABLE 0xE0000108 /* 8 DMA Channel Enable Regs, */ | 62 | #define JAZZ_R4030_CHNL_ENABLE 0xE0000108 /* 8 DMA Channel Enable Regs, */ |
63 | /* 0xE0000108,128,148... */ | 63 | /* 0xE0000108,128,148... */ |
64 | #define JAZZ_R4030_CHNL_COUNT 0xE0000110 /* 8 DMA Channel Byte Cnt Regs, */ | 64 | #define JAZZ_R4030_CHNL_COUNT 0xE0000110 /* 8 DMA Channel Byte Cnt Regs, */ |
65 | /* 0xE0000110,130,150... */ | 65 | /* 0xE0000110,130,150... */ |
66 | #define JAZZ_R4030_CHNL_ADDR 0xE0000118 /* 8 DMA Channel Address Regs, */ | 66 | #define JAZZ_R4030_CHNL_ADDR 0xE0000118 /* 8 DMA Channel Address Regs, */ |
67 | /* 0xE0000118,138,158... */ | 67 | /* 0xE0000118,138,158... */ |
68 | 68 | ||
69 | /* channel enable register bits */ | 69 | /* channel enable register bits */ |
70 | 70 | ||
71 | #define R4030_CHNL_ENABLE (1<<0) | 71 | #define R4030_CHNL_ENABLE (1<<0) |
72 | #define R4030_CHNL_WRITE (1<<1) | 72 | #define R4030_CHNL_WRITE (1<<1) |
73 | #define R4030_TC_INTR (1<<8) | 73 | #define R4030_TC_INTR (1<<8) |
74 | #define R4030_MEM_INTR (1<<9) | 74 | #define R4030_MEM_INTR (1<<9) |
75 | #define R4030_ADDR_INTR (1<<10) | 75 | #define R4030_ADDR_INTR (1<<10) |
76 | 76 | ||
77 | /* | 77 | /* |
78 | * Channel mode register bits | 78 | * Channel mode register bits |
79 | */ | 79 | */ |
80 | #define R4030_MODE_ATIME_40 (0) /* device access time on remote bus */ | 80 | #define R4030_MODE_ATIME_40 (0) /* device access time on remote bus */ |
81 | #define R4030_MODE_ATIME_80 (1) | 81 | #define R4030_MODE_ATIME_80 (1) |
82 | #define R4030_MODE_ATIME_120 (2) | 82 | #define R4030_MODE_ATIME_120 (2) |
83 | #define R4030_MODE_ATIME_160 (3) | 83 | #define R4030_MODE_ATIME_160 (3) |
84 | #define R4030_MODE_ATIME_200 (4) | 84 | #define R4030_MODE_ATIME_200 (4) |
85 | #define R4030_MODE_ATIME_240 (5) | 85 | #define R4030_MODE_ATIME_240 (5) |
86 | #define R4030_MODE_ATIME_280 (6) | 86 | #define R4030_MODE_ATIME_280 (6) |
87 | #define R4030_MODE_ATIME_320 (7) | 87 | #define R4030_MODE_ATIME_320 (7) |
88 | #define R4030_MODE_WIDTH_8 (1<<3) /* device data bus width */ | 88 | #define R4030_MODE_WIDTH_8 (1<<3) /* device data bus width */ |
89 | #define R4030_MODE_WIDTH_16 (2<<3) | 89 | #define R4030_MODE_WIDTH_16 (2<<3) |
90 | #define R4030_MODE_WIDTH_32 (3<<3) | 90 | #define R4030_MODE_WIDTH_32 (3<<3) |
91 | #define R4030_MODE_INTR_EN (1<<5) | 91 | #define R4030_MODE_INTR_EN (1<<5) |
92 | #define R4030_MODE_BURST (1<<6) /* Rev. 2 only */ | 92 | #define R4030_MODE_BURST (1<<6) /* Rev. 2 only */ |
93 | #define R4030_MODE_FAST_ACK (1<<7) /* Rev. 2 only */ | 93 | #define R4030_MODE_FAST_ACK (1<<7) /* Rev. 2 only */ |
94 | 94 | ||
95 | #endif /* _ASM_JAZZDMA_H */ | 95 | #endif /* _ASM_JAZZDMA_H */ |
diff --git a/arch/mips/include/asm/kmap_types.h b/arch/mips/include/asm/kmap_types.h index 58e91ed0388f..c1909dcada39 100644 --- a/arch/mips/include/asm/kmap_types.h +++ b/arch/mips/include/asm/kmap_types.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _ASM_KMAP_TYPES_H | 2 | #define _ASM_KMAP_TYPES_H |
3 | 3 | ||
4 | #ifdef CONFIG_DEBUG_HIGHMEM | 4 | #ifdef CONFIG_DEBUG_HIGHMEM |
5 | #define __WITH_KM_FENCE | 5 | #define __WITH_KM_FENCE |
6 | #endif | 6 | #endif |
7 | 7 | ||
8 | #include <asm-generic/kmap_types.h> | 8 | #include <asm-generic/kmap_types.h> |
diff --git a/arch/mips/include/asm/kprobes.h b/arch/mips/include/asm/kprobes.h index 1fbbca01e681..daba1f9a4f79 100644 --- a/arch/mips/include/asm/kprobes.h +++ b/arch/mips/include/asm/kprobes.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <asm/kdebug.h> | 29 | #include <asm/kdebug.h> |
30 | #include <asm/inst.h> | 30 | #include <asm/inst.h> |
31 | 31 | ||
32 | #define __ARCH_WANT_KPROBES_INSN_SLOT | 32 | #define __ARCH_WANT_KPROBES_INSN_SLOT |
33 | 33 | ||
34 | struct kprobe; | 34 | struct kprobe; |
35 | struct pt_regs; | 35 | struct pt_regs; |
diff --git a/arch/mips/include/asm/lasat/eeprom.h b/arch/mips/include/asm/lasat/eeprom.h index 3dac203697fa..d918b822e376 100644 --- a/arch/mips/include/asm/lasat/eeprom.h +++ b/arch/mips/include/asm/lasat/eeprom.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #include <asm/addrspace.h> | 1 | #include <asm/addrspace.h> |
2 | 2 | ||
3 | /* lasat 100 */ | 3 | /* lasat 100 */ |
4 | #define AT93C_REG_100 KSEG1ADDR(0x1c810000) | 4 | #define AT93C_REG_100 KSEG1ADDR(0x1c810000) |
5 | #define AT93C_RDATA_REG_100 AT93C_REG_100 | 5 | #define AT93C_RDATA_REG_100 AT93C_REG_100 |
6 | #define AT93C_RDATA_SHIFT_100 4 | 6 | #define AT93C_RDATA_SHIFT_100 4 |
7 | #define AT93C_WDATA_SHIFT_100 4 | 7 | #define AT93C_WDATA_SHIFT_100 4 |
8 | #define AT93C_CS_M_100 (1 << 5) | 8 | #define AT93C_CS_M_100 (1 << 5) |
9 | #define AT93C_CLK_M_100 (1 << 3) | 9 | #define AT93C_CLK_M_100 (1 << 3) |
10 | 10 | ||
11 | /* lasat 200 */ | 11 | /* lasat 200 */ |
12 | #define AT93C_REG_200 KSEG1ADDR(0x11000000) | 12 | #define AT93C_REG_200 KSEG1ADDR(0x11000000) |
diff --git a/arch/mips/include/asm/lasat/lasat.h b/arch/mips/include/asm/lasat/lasat.h index e8ff70f80e13..9e32b4da99e2 100644 --- a/arch/mips/include/asm/lasat/lasat.h +++ b/arch/mips/include/asm/lasat/lasat.h | |||
@@ -100,7 +100,7 @@ struct lasat_eeprom_struct_pre7 { | |||
100 | 100 | ||
101 | /* Configuration descriptor encoding - see the doc for details */ | 101 | /* Configuration descriptor encoding - see the doc for details */ |
102 | 102 | ||
103 | #define LASAT_W0_DSCTYPE(v) (((v)) & 0xf) | 103 | #define LASAT_W0_DSCTYPE(v) (((v)) & 0xf) |
104 | #define LASAT_W0_BMID(v) (((v) >> 0x04) & 0xf) | 104 | #define LASAT_W0_BMID(v) (((v) >> 0x04) & 0xf) |
105 | #define LASAT_W0_CPUTYPE(v) (((v) >> 0x08) & 0xf) | 105 | #define LASAT_W0_CPUTYPE(v) (((v) >> 0x08) & 0xf) |
106 | #define LASAT_W0_BUSSPEED(v) (((v) >> 0x0c) & 0xf) | 106 | #define LASAT_W0_BUSSPEED(v) (((v) >> 0x0c) & 0xf) |
@@ -109,7 +109,7 @@ struct lasat_eeprom_struct_pre7 { | |||
109 | #define LASAT_W0_SDRAMBANKS(v) (((v) >> 0x18) & 0xf) | 109 | #define LASAT_W0_SDRAMBANKS(v) (((v) >> 0x18) & 0xf) |
110 | #define LASAT_W0_L2CACHE(v) (((v) >> 0x1c) & 0xf) | 110 | #define LASAT_W0_L2CACHE(v) (((v) >> 0x1c) & 0xf) |
111 | 111 | ||
112 | #define LASAT_W1_EDHAC(v) (((v)) & 0xf) | 112 | #define LASAT_W1_EDHAC(v) (((v)) & 0xf) |
113 | #define LASAT_W1_HIFN(v) (((v) >> 0x04) & 0x1) | 113 | #define LASAT_W1_HIFN(v) (((v) >> 0x04) & 0x1) |
114 | #define LASAT_W1_ISDN(v) (((v) >> 0x05) & 0x1) | 114 | #define LASAT_W1_ISDN(v) (((v) >> 0x05) & 0x1) |
115 | #define LASAT_W1_IDE(v) (((v) >> 0x06) & 0x1) | 115 | #define LASAT_W1_IDE(v) (((v) >> 0x06) & 0x1) |
@@ -239,7 +239,7 @@ static inline void lasat_ndelay(unsigned int ns) | |||
239 | __delay(ns / lasat_ndelay_divider); | 239 | __delay(ns / lasat_ndelay_divider); |
240 | } | 240 | } |
241 | 241 | ||
242 | #define IS_LASAT_200() (current_cpu_data.cputype == CPU_R5000) | 242 | #define IS_LASAT_200() (current_cpu_data.cputype == CPU_R5000) |
243 | 243 | ||
244 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ | 244 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ |
245 | 245 | ||
@@ -247,11 +247,11 @@ static inline void lasat_ndelay(unsigned int ns) | |||
247 | #define LASAT_SERVICEMODE_MAGIC_2 0xfedeabba | 247 | #define LASAT_SERVICEMODE_MAGIC_2 0xfedeabba |
248 | 248 | ||
249 | /* Lasat 100 boards */ | 249 | /* Lasat 100 boards */ |
250 | #define LASAT_GT_BASE (KSEG1ADDR(0x14000000)) | 250 | #define LASAT_GT_BASE (KSEG1ADDR(0x14000000)) |
251 | 251 | ||
252 | /* Lasat 200 boards */ | 252 | /* Lasat 200 boards */ |
253 | #define Vrc5074_PHYS_BASE 0x1fa00000 | 253 | #define Vrc5074_PHYS_BASE 0x1fa00000 |
254 | #define Vrc5074_BASE (KSEG1ADDR(Vrc5074_PHYS_BASE)) | 254 | #define Vrc5074_BASE (KSEG1ADDR(Vrc5074_PHYS_BASE)) |
255 | #define PCI_WINDOW1 0x1a000000 | 255 | #define PCI_WINDOW1 0x1a000000 |
256 | 256 | ||
257 | #endif /* _LASAT_H */ | 257 | #endif /* _LASAT_H */ |
diff --git a/arch/mips/include/asm/lasat/serial.h b/arch/mips/include/asm/lasat/serial.h index 1c37d70579b8..a2f6c7a9cfe8 100644 --- a/arch/mips/include/asm/lasat/serial.h +++ b/arch/mips/include/asm/lasat/serial.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #include <asm/lasat/lasat.h> | 1 | #include <asm/lasat/lasat.h> |
2 | 2 | ||
3 | /* Lasat 100 boards serial configuration */ | 3 | /* Lasat 100 boards serial configuration */ |
4 | #define LASAT_BASE_BAUD_100 (7372800 / 16) | 4 | #define LASAT_BASE_BAUD_100 (7372800 / 16) |
5 | #define LASAT_UART_REGS_BASE_100 0x1c8b0000 | 5 | #define LASAT_UART_REGS_BASE_100 0x1c8b0000 |
6 | #define LASAT_UART_REGS_SHIFT_100 2 | 6 | #define LASAT_UART_REGS_SHIFT_100 2 |
7 | #define LASATINT_UART_100 16 | 7 | #define LASATINT_UART_100 16 |
diff --git a/arch/mips/include/asm/local.h b/arch/mips/include/asm/local.h index 94fde8d0fac1..d44622cd74be 100644 --- a/arch/mips/include/asm/local.h +++ b/arch/mips/include/asm/local.h | |||
@@ -15,10 +15,10 @@ typedef struct | |||
15 | #define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) } | 15 | #define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) } |
16 | 16 | ||
17 | #define local_read(l) atomic_long_read(&(l)->a) | 17 | #define local_read(l) atomic_long_read(&(l)->a) |
18 | #define local_set(l, i) atomic_long_set(&(l)->a, (i)) | 18 | #define local_set(l, i) atomic_long_set(&(l)->a, (i)) |
19 | 19 | ||
20 | #define local_add(i, l) atomic_long_add((i), (&(l)->a)) | 20 | #define local_add(i, l) atomic_long_add((i), (&(l)->a)) |
21 | #define local_sub(i, l) atomic_long_sub((i), (&(l)->a)) | 21 | #define local_sub(i, l) atomic_long_sub((i), (&(l)->a)) |
22 | #define local_inc(l) atomic_long_inc(&(l)->a) | 22 | #define local_inc(l) atomic_long_inc(&(l)->a) |
23 | #define local_dec(l) atomic_long_dec(&(l)->a) | 23 | #define local_dec(l) atomic_long_dec(&(l)->a) |
24 | 24 | ||
diff --git a/arch/mips/include/asm/m48t37.h b/arch/mips/include/asm/m48t37.h index cabf86264f36..e6eaf5339e4e 100644 --- a/arch/mips/include/asm/m48t37.h +++ b/arch/mips/include/asm/m48t37.h | |||
@@ -9,7 +9,7 @@ | |||
9 | extern spinlock_t rtc_lock; | 9 | extern spinlock_t rtc_lock; |
10 | 10 | ||
11 | struct m48t37_rtc { | 11 | struct m48t37_rtc { |
12 | volatile u8 pad[0x7ff0]; /* NVRAM */ | 12 | volatile u8 pad[0x7ff0]; /* NVRAM */ |
13 | volatile u8 flags; | 13 | volatile u8 flags; |
14 | volatile u8 century; | 14 | volatile u8 century; |
15 | volatile u8 alarm_sec; | 15 | volatile u8 alarm_sec; |
diff --git a/arch/mips/include/asm/mach-ar7/ar7.h b/arch/mips/include/asm/mach-ar7/ar7.h index 07d3fadb2443..a47ea0c85248 100644 --- a/arch/mips/include/asm/mach-ar7/ar7.h +++ b/arch/mips/include/asm/mach-ar7/ar7.h | |||
@@ -40,9 +40,9 @@ | |||
40 | #define AR7_REGS_USB (AR7_REGS_BASE + 0x1200) | 40 | #define AR7_REGS_USB (AR7_REGS_BASE + 0x1200) |
41 | #define AR7_REGS_RESET (AR7_REGS_BASE + 0x1600) | 41 | #define AR7_REGS_RESET (AR7_REGS_BASE + 0x1600) |
42 | #define AR7_REGS_PINSEL (AR7_REGS_BASE + 0x160C) | 42 | #define AR7_REGS_PINSEL (AR7_REGS_BASE + 0x160C) |
43 | #define AR7_REGS_VLYNQ0 (AR7_REGS_BASE + 0x1800) | 43 | #define AR7_REGS_VLYNQ0 (AR7_REGS_BASE + 0x1800) |
44 | #define AR7_REGS_DCL (AR7_REGS_BASE + 0x1a00) | 44 | #define AR7_REGS_DCL (AR7_REGS_BASE + 0x1a00) |
45 | #define AR7_REGS_VLYNQ1 (AR7_REGS_BASE + 0x1c00) | 45 | #define AR7_REGS_VLYNQ1 (AR7_REGS_BASE + 0x1c00) |
46 | #define AR7_REGS_MDIO (AR7_REGS_BASE + 0x1e00) | 46 | #define AR7_REGS_MDIO (AR7_REGS_BASE + 0x1e00) |
47 | #define AR7_REGS_IRQ (AR7_REGS_BASE + 0x2400) | 47 | #define AR7_REGS_IRQ (AR7_REGS_BASE + 0x2400) |
48 | #define AR7_REGS_MAC1 (AR7_REGS_BASE + 0x2800) | 48 | #define AR7_REGS_MAC1 (AR7_REGS_BASE + 0x2800) |
@@ -52,7 +52,7 @@ | |||
52 | #define UR8_REGS_UART1 (AR7_REGS_BASE + 0x0f00) | 52 | #define UR8_REGS_UART1 (AR7_REGS_BASE + 0x0f00) |
53 | 53 | ||
54 | /* Titan registers */ | 54 | /* Titan registers */ |
55 | #define TITAN_REGS_ESWITCH_BASE (0x08640000) | 55 | #define TITAN_REGS_ESWITCH_BASE (0x08640000) |
56 | #define TITAN_REGS_MAC0 (TITAN_REGS_ESWITCH_BASE) | 56 | #define TITAN_REGS_MAC0 (TITAN_REGS_ESWITCH_BASE) |
57 | #define TITAN_REGS_MAC1 (TITAN_REGS_ESWITCH_BASE + 0x0800) | 57 | #define TITAN_REGS_MAC1 (TITAN_REGS_ESWITCH_BASE + 0x0800) |
58 | #define TITAN_REGS_MDIO (TITAN_REGS_ESWITCH_BASE + 0x02000) | 58 | #define TITAN_REGS_MDIO (TITAN_REGS_ESWITCH_BASE + 0x02000) |
@@ -72,9 +72,9 @@ | |||
72 | 72 | ||
73 | /* GPIO control registers */ | 73 | /* GPIO control registers */ |
74 | #define AR7_GPIO_INPUT 0x0 | 74 | #define AR7_GPIO_INPUT 0x0 |
75 | #define AR7_GPIO_OUTPUT 0x4 | 75 | #define AR7_GPIO_OUTPUT 0x4 |
76 | #define AR7_GPIO_DIR 0x8 | 76 | #define AR7_GPIO_DIR 0x8 |
77 | #define AR7_GPIO_ENABLE 0xc | 77 | #define AR7_GPIO_ENABLE 0xc |
78 | #define TITAN_GPIO_INPUT_0 0x0 | 78 | #define TITAN_GPIO_INPUT_0 0x0 |
79 | #define TITAN_GPIO_INPUT_1 0x4 | 79 | #define TITAN_GPIO_INPUT_1 0x4 |
80 | #define TITAN_GPIO_OUTPUT_0 0x8 | 80 | #define TITAN_GPIO_OUTPUT_0 0x8 |
@@ -88,10 +88,10 @@ | |||
88 | #define AR7_CHIP_7200 0x2b | 88 | #define AR7_CHIP_7200 0x2b |
89 | #define AR7_CHIP_7300 0x05 | 89 | #define AR7_CHIP_7300 0x05 |
90 | #define AR7_CHIP_TITAN 0x07 | 90 | #define AR7_CHIP_TITAN 0x07 |
91 | #define TITAN_CHIP_1050 0x0f | 91 | #define TITAN_CHIP_1050 0x0f |
92 | #define TITAN_CHIP_1055 0x0e | 92 | #define TITAN_CHIP_1055 0x0e |
93 | #define TITAN_CHIP_1056 0x0d | 93 | #define TITAN_CHIP_1056 0x0d |
94 | #define TITAN_CHIP_1060 0x07 | 94 | #define TITAN_CHIP_1060 0x07 |
95 | 95 | ||
96 | /* Interrupts */ | 96 | /* Interrupts */ |
97 | #define AR7_IRQ_UART0 15 | 97 | #define AR7_IRQ_UART0 15 |
diff --git a/arch/mips/include/asm/mach-ar7/irq.h b/arch/mips/include/asm/mach-ar7/irq.h index 39e9757e3d93..7ad10e379e2b 100644 --- a/arch/mips/include/asm/mach-ar7/irq.h +++ b/arch/mips/include/asm/mach-ar7/irq.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #ifndef __ASM_AR7_IRQ_H | 9 | #ifndef __ASM_AR7_IRQ_H |
10 | #define __ASM_AR7_IRQ_H | 10 | #define __ASM_AR7_IRQ_H |
11 | 11 | ||
12 | #define NR_IRQS 256 | 12 | #define NR_IRQS 256 |
13 | 13 | ||
14 | #include_next <irq.h> | 14 | #include_next <irq.h> |
15 | 15 | ||
diff --git a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h index a5e0f17ea77c..8dec938af115 100644 --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h | |||
@@ -34,8 +34,8 @@ | |||
34 | #define AR71XX_UART_SIZE 0x100 | 34 | #define AR71XX_UART_SIZE 0x100 |
35 | #define AR71XX_USB_CTRL_BASE (AR71XX_APB_BASE + 0x00030000) | 35 | #define AR71XX_USB_CTRL_BASE (AR71XX_APB_BASE + 0x00030000) |
36 | #define AR71XX_USB_CTRL_SIZE 0x100 | 36 | #define AR71XX_USB_CTRL_SIZE 0x100 |
37 | #define AR71XX_GPIO_BASE (AR71XX_APB_BASE + 0x00040000) | 37 | #define AR71XX_GPIO_BASE (AR71XX_APB_BASE + 0x00040000) |
38 | #define AR71XX_GPIO_SIZE 0x100 | 38 | #define AR71XX_GPIO_SIZE 0x100 |
39 | #define AR71XX_PLL_BASE (AR71XX_APB_BASE + 0x00050000) | 39 | #define AR71XX_PLL_BASE (AR71XX_APB_BASE + 0x00050000) |
40 | #define AR71XX_PLL_SIZE 0x100 | 40 | #define AR71XX_PLL_SIZE 0x100 |
41 | #define AR71XX_RESET_BASE (AR71XX_APB_BASE + 0x00060000) | 41 | #define AR71XX_RESET_BASE (AR71XX_APB_BASE + 0x00060000) |
@@ -312,7 +312,7 @@ | |||
312 | #define AR934X_BOOTSTRAP_EJTAG_MODE BIT(5) | 312 | #define AR934X_BOOTSTRAP_EJTAG_MODE BIT(5) |
313 | #define AR934X_BOOTSTRAP_REF_CLK_40 BIT(4) | 313 | #define AR934X_BOOTSTRAP_REF_CLK_40 BIT(4) |
314 | #define AR934X_BOOTSTRAP_BOOT_FROM_SPI BIT(2) | 314 | #define AR934X_BOOTSTRAP_BOOT_FROM_SPI BIT(2) |
315 | #define AR934X_BOOTSTRAP_SDRAM_DISABLED BIT(1) | 315 | #define AR934X_BOOTSTRAP_SDRAM_DISABLED BIT(1) |
316 | #define AR934X_BOOTSTRAP_DDR1 BIT(0) | 316 | #define AR934X_BOOTSTRAP_DDR1 BIT(0) |
317 | 317 | ||
318 | #define AR934X_PCIE_WMAC_INT_WMAC_MISC BIT(0) | 318 | #define AR934X_PCIE_WMAC_INT_WMAC_MISC BIT(0) |
@@ -362,7 +362,7 @@ | |||
362 | 362 | ||
363 | #define AR724X_REV_ID_REVISION_MASK 0x3 | 363 | #define AR724X_REV_ID_REVISION_MASK 0x3 |
364 | 364 | ||
365 | #define AR934X_REV_ID_REVISION_MASK 0xf | 365 | #define AR934X_REV_ID_REVISION_MASK 0xf |
366 | 366 | ||
367 | /* | 367 | /* |
368 | * SPI block | 368 | * SPI block |
diff --git a/arch/mips/include/asm/mach-ath79/ar933x_uart.h b/arch/mips/include/asm/mach-ath79/ar933x_uart.h index 52730555937f..c2917b39966b 100644 --- a/arch/mips/include/asm/mach-ath79/ar933x_uart.h +++ b/arch/mips/include/asm/mach-ath79/ar933x_uart.h | |||
@@ -26,14 +26,14 @@ | |||
26 | 26 | ||
27 | #define AR933X_UART_CS_PARITY_S 0 | 27 | #define AR933X_UART_CS_PARITY_S 0 |
28 | #define AR933X_UART_CS_PARITY_M 0x3 | 28 | #define AR933X_UART_CS_PARITY_M 0x3 |
29 | #define AR933X_UART_CS_PARITY_NONE 0 | 29 | #define AR933X_UART_CS_PARITY_NONE 0 |
30 | #define AR933X_UART_CS_PARITY_ODD 1 | 30 | #define AR933X_UART_CS_PARITY_ODD 1 |
31 | #define AR933X_UART_CS_PARITY_EVEN 2 | 31 | #define AR933X_UART_CS_PARITY_EVEN 2 |
32 | #define AR933X_UART_CS_IF_MODE_S 2 | 32 | #define AR933X_UART_CS_IF_MODE_S 2 |
33 | #define AR933X_UART_CS_IF_MODE_M 0x3 | 33 | #define AR933X_UART_CS_IF_MODE_M 0x3 |
34 | #define AR933X_UART_CS_IF_MODE_NONE 0 | 34 | #define AR933X_UART_CS_IF_MODE_NONE 0 |
35 | #define AR933X_UART_CS_IF_MODE_DTE 1 | 35 | #define AR933X_UART_CS_IF_MODE_DTE 1 |
36 | #define AR933X_UART_CS_IF_MODE_DCE 2 | 36 | #define AR933X_UART_CS_IF_MODE_DCE 2 |
37 | #define AR933X_UART_CS_FLOW_CTRL_S 4 | 37 | #define AR933X_UART_CS_FLOW_CTRL_S 4 |
38 | #define AR933X_UART_CS_FLOW_CTRL_M 0x3 | 38 | #define AR933X_UART_CS_FLOW_CTRL_M 0x3 |
39 | #define AR933X_UART_CS_DMA_EN BIT(6) | 39 | #define AR933X_UART_CS_DMA_EN BIT(6) |
diff --git a/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h index ea4b66dccf6e..ddb947e9221f 100644 --- a/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h | |||
@@ -49,7 +49,7 @@ | |||
49 | #define cpu_has_64bits 0 | 49 | #define cpu_has_64bits 0 |
50 | #define cpu_has_64bit_zero_reg 0 | 50 | #define cpu_has_64bit_zero_reg 0 |
51 | #define cpu_has_64bit_gp_regs 0 | 51 | #define cpu_has_64bit_gp_regs 0 |
52 | #define cpu_has_64bit_addresses 0 | 52 | #define cpu_has_64bit_addresses 0 |
53 | 53 | ||
54 | #define cpu_dcache_line_size() 32 | 54 | #define cpu_dcache_line_size() 32 |
55 | #define cpu_icache_line_size() 32 | 55 | #define cpu_icache_line_size() 32 |
diff --git a/arch/mips/include/asm/mach-au1x00/au1000.h b/arch/mips/include/asm/mach-au1x00/au1000.h index 569828d3ccab..3e11a468cdf8 100644 --- a/arch/mips/include/asm/mach-au1x00/au1000.h +++ b/arch/mips/include/asm/mach-au1x00/au1000.h | |||
@@ -349,7 +349,7 @@ extern void au1300_vss_block_control(int block, int enable); | |||
349 | #define AU1000_INTC0_INT_LAST (AU1000_INTC0_INT_BASE + 31) | 349 | #define AU1000_INTC0_INT_LAST (AU1000_INTC0_INT_BASE + 31) |
350 | #define AU1000_INTC1_INT_BASE (AU1000_INTC0_INT_LAST + 1) | 350 | #define AU1000_INTC1_INT_BASE (AU1000_INTC0_INT_LAST + 1) |
351 | #define AU1000_INTC1_INT_LAST (AU1000_INTC1_INT_BASE + 31) | 351 | #define AU1000_INTC1_INT_LAST (AU1000_INTC1_INT_BASE + 31) |
352 | #define AU1000_MAX_INTR AU1000_INTC1_INT_LAST | 352 | #define AU1000_MAX_INTR AU1000_INTC1_INT_LAST |
353 | 353 | ||
354 | /* Au1300-style (GPIC): 1 controller with up to 128 sources */ | 354 | /* Au1300-style (GPIC): 1 controller with up to 128 sources */ |
355 | #define ALCHEMY_GPIC_INT_BASE (MIPS_CPU_IRQ_BASE + 8) | 355 | #define ALCHEMY_GPIC_INT_BASE (MIPS_CPU_IRQ_BASE + 8) |
@@ -589,7 +589,7 @@ enum soc_au1550_ints { | |||
589 | AU1550_GPIO14_INT, | 589 | AU1550_GPIO14_INT, |
590 | AU1550_GPIO15_INT, | 590 | AU1550_GPIO15_INT, |
591 | AU1550_GPIO200_INT, | 591 | AU1550_GPIO200_INT, |
592 | AU1550_GPIO201_205_INT, /* Logical or of GPIO201:205 */ | 592 | AU1550_GPIO201_205_INT, /* Logical or of GPIO201:205 */ |
593 | AU1550_GPIO16_INT, | 593 | AU1550_GPIO16_INT, |
594 | AU1550_GPIO17_INT, | 594 | AU1550_GPIO17_INT, |
595 | AU1550_GPIO20_INT, | 595 | AU1550_GPIO20_INT, |
@@ -603,7 +603,7 @@ enum soc_au1550_ints { | |||
603 | AU1550_GPIO28_INT, | 603 | AU1550_GPIO28_INT, |
604 | AU1550_GPIO206_INT, | 604 | AU1550_GPIO206_INT, |
605 | AU1550_GPIO207_INT, | 605 | AU1550_GPIO207_INT, |
606 | AU1550_GPIO208_215_INT, /* Logical or of GPIO208:215 */ | 606 | AU1550_GPIO208_215_INT, /* Logical or of GPIO208:215 */ |
607 | }; | 607 | }; |
608 | 608 | ||
609 | enum soc_au1200_ints { | 609 | enum soc_au1200_ints { |
@@ -636,7 +636,7 @@ enum soc_au1200_ints { | |||
636 | AU1200_GPIO205_INT, | 636 | AU1200_GPIO205_INT, |
637 | AU1200_GPIO206_INT, | 637 | AU1200_GPIO206_INT, |
638 | AU1200_GPIO207_INT, | 638 | AU1200_GPIO207_INT, |
639 | AU1200_GPIO208_215_INT, /* Logical OR of 208:215 */ | 639 | AU1200_GPIO208_215_INT, /* Logical OR of 208:215 */ |
640 | AU1200_USB_INT, | 640 | AU1200_USB_INT, |
641 | AU1200_LCD_INT, | 641 | AU1200_LCD_INT, |
642 | AU1200_MAE_BOTH_INT, | 642 | AU1200_MAE_BOTH_INT, |
@@ -823,7 +823,7 @@ enum soc_au1200_ints { | |||
823 | #define GPIC_GPIO_TO_BIT(gpio) \ | 823 | #define GPIC_GPIO_TO_BIT(gpio) \ |
824 | (1 << ((gpio) & 0x1f)) | 824 | (1 << ((gpio) & 0x1f)) |
825 | 825 | ||
826 | #define GPIC_GPIO_BANKOFF(gpio) \ | 826 | #define GPIC_GPIO_BANKOFF(gpio) \ |
827 | (((gpio) >> 5) * 4) | 827 | (((gpio) >> 5) * 4) |
828 | 828 | ||
829 | /* Pin Control bits: who owns the pin, what does it do */ | 829 | /* Pin Control bits: who owns the pin, what does it do */ |
@@ -958,32 +958,32 @@ enum soc_au1200_ints { | |||
958 | #define MEM_STSTAT 0xB4001104 | 958 | #define MEM_STSTAT 0xB4001104 |
959 | 959 | ||
960 | #define MEM_STNAND_CMD 0x0 | 960 | #define MEM_STNAND_CMD 0x0 |
961 | #define MEM_STNAND_ADDR 0x4 | 961 | #define MEM_STNAND_ADDR 0x4 |
962 | #define MEM_STNAND_DATA 0x20 | 962 | #define MEM_STNAND_DATA 0x20 |
963 | 963 | ||
964 | 964 | ||
965 | /* Programmable Counters 0 and 1 */ | 965 | /* Programmable Counters 0 and 1 */ |
966 | #define SYS_BASE 0xB1900000 | 966 | #define SYS_BASE 0xB1900000 |
967 | #define SYS_COUNTER_CNTRL (SYS_BASE + 0x14) | 967 | #define SYS_COUNTER_CNTRL (SYS_BASE + 0x14) |
968 | # define SYS_CNTRL_E1S (1 << 23) | 968 | # define SYS_CNTRL_E1S (1 << 23) |
969 | # define SYS_CNTRL_T1S (1 << 20) | 969 | # define SYS_CNTRL_T1S (1 << 20) |
970 | # define SYS_CNTRL_M21 (1 << 19) | 970 | # define SYS_CNTRL_M21 (1 << 19) |
971 | # define SYS_CNTRL_M11 (1 << 18) | 971 | # define SYS_CNTRL_M11 (1 << 18) |
972 | # define SYS_CNTRL_M01 (1 << 17) | 972 | # define SYS_CNTRL_M01 (1 << 17) |
973 | # define SYS_CNTRL_C1S (1 << 16) | 973 | # define SYS_CNTRL_C1S (1 << 16) |
974 | # define SYS_CNTRL_BP (1 << 14) | 974 | # define SYS_CNTRL_BP (1 << 14) |
975 | # define SYS_CNTRL_EN1 (1 << 13) | 975 | # define SYS_CNTRL_EN1 (1 << 13) |
976 | # define SYS_CNTRL_BT1 (1 << 12) | 976 | # define SYS_CNTRL_BT1 (1 << 12) |
977 | # define SYS_CNTRL_EN0 (1 << 11) | 977 | # define SYS_CNTRL_EN0 (1 << 11) |
978 | # define SYS_CNTRL_BT0 (1 << 10) | 978 | # define SYS_CNTRL_BT0 (1 << 10) |
979 | # define SYS_CNTRL_E0 (1 << 8) | 979 | # define SYS_CNTRL_E0 (1 << 8) |
980 | # define SYS_CNTRL_E0S (1 << 7) | 980 | # define SYS_CNTRL_E0S (1 << 7) |
981 | # define SYS_CNTRL_32S (1 << 5) | 981 | # define SYS_CNTRL_32S (1 << 5) |
982 | # define SYS_CNTRL_T0S (1 << 4) | 982 | # define SYS_CNTRL_T0S (1 << 4) |
983 | # define SYS_CNTRL_M20 (1 << 3) | 983 | # define SYS_CNTRL_M20 (1 << 3) |
984 | # define SYS_CNTRL_M10 (1 << 2) | 984 | # define SYS_CNTRL_M10 (1 << 2) |
985 | # define SYS_CNTRL_M00 (1 << 1) | 985 | # define SYS_CNTRL_M00 (1 << 1) |
986 | # define SYS_CNTRL_C0S (1 << 0) | 986 | # define SYS_CNTRL_C0S (1 << 0) |
987 | 987 | ||
988 | /* Programmable Counter 0 Registers */ | 988 | /* Programmable Counter 0 Registers */ |
989 | #define SYS_TOYTRIM (SYS_BASE + 0) | 989 | #define SYS_TOYTRIM (SYS_BASE + 0) |
@@ -1003,33 +1003,33 @@ enum soc_au1200_ints { | |||
1003 | 1003 | ||
1004 | /* I2S Controller */ | 1004 | /* I2S Controller */ |
1005 | #define I2S_DATA 0xB1000000 | 1005 | #define I2S_DATA 0xB1000000 |
1006 | # define I2S_DATA_MASK 0xffffff | 1006 | # define I2S_DATA_MASK 0xffffff |
1007 | #define I2S_CONFIG 0xB1000004 | 1007 | #define I2S_CONFIG 0xB1000004 |
1008 | # define I2S_CONFIG_XU (1 << 25) | 1008 | # define I2S_CONFIG_XU (1 << 25) |
1009 | # define I2S_CONFIG_XO (1 << 24) | 1009 | # define I2S_CONFIG_XO (1 << 24) |
1010 | # define I2S_CONFIG_RU (1 << 23) | 1010 | # define I2S_CONFIG_RU (1 << 23) |
1011 | # define I2S_CONFIG_RO (1 << 22) | 1011 | # define I2S_CONFIG_RO (1 << 22) |
1012 | # define I2S_CONFIG_TR (1 << 21) | 1012 | # define I2S_CONFIG_TR (1 << 21) |
1013 | # define I2S_CONFIG_TE (1 << 20) | 1013 | # define I2S_CONFIG_TE (1 << 20) |
1014 | # define I2S_CONFIG_TF (1 << 19) | 1014 | # define I2S_CONFIG_TF (1 << 19) |
1015 | # define I2S_CONFIG_RR (1 << 18) | 1015 | # define I2S_CONFIG_RR (1 << 18) |
1016 | # define I2S_CONFIG_RE (1 << 17) | 1016 | # define I2S_CONFIG_RE (1 << 17) |
1017 | # define I2S_CONFIG_RF (1 << 16) | 1017 | # define I2S_CONFIG_RF (1 << 16) |
1018 | # define I2S_CONFIG_PD (1 << 11) | 1018 | # define I2S_CONFIG_PD (1 << 11) |
1019 | # define I2S_CONFIG_LB (1 << 10) | 1019 | # define I2S_CONFIG_LB (1 << 10) |
1020 | # define I2S_CONFIG_IC (1 << 9) | 1020 | # define I2S_CONFIG_IC (1 << 9) |
1021 | # define I2S_CONFIG_FM_BIT 7 | 1021 | # define I2S_CONFIG_FM_BIT 7 |
1022 | # define I2S_CONFIG_FM_MASK (0x3 << I2S_CONFIG_FM_BIT) | 1022 | # define I2S_CONFIG_FM_MASK (0x3 << I2S_CONFIG_FM_BIT) |
1023 | # define I2S_CONFIG_FM_I2S (0x0 << I2S_CONFIG_FM_BIT) | 1023 | # define I2S_CONFIG_FM_I2S (0x0 << I2S_CONFIG_FM_BIT) |
1024 | # define I2S_CONFIG_FM_LJ (0x1 << I2S_CONFIG_FM_BIT) | 1024 | # define I2S_CONFIG_FM_LJ (0x1 << I2S_CONFIG_FM_BIT) |
1025 | # define I2S_CONFIG_FM_RJ (0x2 << I2S_CONFIG_FM_BIT) | 1025 | # define I2S_CONFIG_FM_RJ (0x2 << I2S_CONFIG_FM_BIT) |
1026 | # define I2S_CONFIG_TN (1 << 6) | 1026 | # define I2S_CONFIG_TN (1 << 6) |
1027 | # define I2S_CONFIG_RN (1 << 5) | 1027 | # define I2S_CONFIG_RN (1 << 5) |
1028 | # define I2S_CONFIG_SZ_BIT 0 | 1028 | # define I2S_CONFIG_SZ_BIT 0 |
1029 | # define I2S_CONFIG_SZ_MASK (0x1F << I2S_CONFIG_SZ_BIT) | 1029 | # define I2S_CONFIG_SZ_MASK (0x1F << I2S_CONFIG_SZ_BIT) |
1030 | 1030 | ||
1031 | #define I2S_CONTROL 0xB1000008 | 1031 | #define I2S_CONTROL 0xB1000008 |
1032 | # define I2S_CONTROL_D (1 << 1) | 1032 | # define I2S_CONTROL_D (1 << 1) |
1033 | # define I2S_CONTROL_CE (1 << 0) | 1033 | # define I2S_CONTROL_CE (1 << 0) |
1034 | 1034 | ||
1035 | 1035 | ||
@@ -1037,16 +1037,16 @@ enum soc_au1200_ints { | |||
1037 | 1037 | ||
1038 | /* 4 byte offsets from AU1000_ETH_BASE */ | 1038 | /* 4 byte offsets from AU1000_ETH_BASE */ |
1039 | #define MAC_CONTROL 0x0 | 1039 | #define MAC_CONTROL 0x0 |
1040 | # define MAC_RX_ENABLE (1 << 2) | 1040 | # define MAC_RX_ENABLE (1 << 2) |
1041 | # define MAC_TX_ENABLE (1 << 3) | 1041 | # define MAC_TX_ENABLE (1 << 3) |
1042 | # define MAC_DEF_CHECK (1 << 5) | 1042 | # define MAC_DEF_CHECK (1 << 5) |
1043 | # define MAC_SET_BL(X) (((X) & 0x3) << 6) | 1043 | # define MAC_SET_BL(X) (((X) & 0x3) << 6) |
1044 | # define MAC_AUTO_PAD (1 << 8) | 1044 | # define MAC_AUTO_PAD (1 << 8) |
1045 | # define MAC_DISABLE_RETRY (1 << 10) | 1045 | # define MAC_DISABLE_RETRY (1 << 10) |
1046 | # define MAC_DISABLE_BCAST (1 << 11) | 1046 | # define MAC_DISABLE_BCAST (1 << 11) |
1047 | # define MAC_LATE_COL (1 << 12) | 1047 | # define MAC_LATE_COL (1 << 12) |
1048 | # define MAC_HASH_MODE (1 << 13) | 1048 | # define MAC_HASH_MODE (1 << 13) |
1049 | # define MAC_HASH_ONLY (1 << 15) | 1049 | # define MAC_HASH_ONLY (1 << 15) |
1050 | # define MAC_PASS_ALL (1 << 16) | 1050 | # define MAC_PASS_ALL (1 << 16) |
1051 | # define MAC_INVERSE_FILTER (1 << 17) | 1051 | # define MAC_INVERSE_FILTER (1 << 17) |
1052 | # define MAC_PROMISCUOUS (1 << 18) | 1052 | # define MAC_PROMISCUOUS (1 << 18) |
@@ -1083,9 +1083,9 @@ enum soc_au1200_ints { | |||
1083 | # define MAC_EN_RESET0 (1 << 1) | 1083 | # define MAC_EN_RESET0 (1 << 1) |
1084 | # define MAC_EN_TOSS (0 << 2) | 1084 | # define MAC_EN_TOSS (0 << 2) |
1085 | # define MAC_EN_CACHEABLE (1 << 3) | 1085 | # define MAC_EN_CACHEABLE (1 << 3) |
1086 | # define MAC_EN_RESET1 (1 << 4) | 1086 | # define MAC_EN_RESET1 (1 << 4) |
1087 | # define MAC_EN_RESET2 (1 << 5) | 1087 | # define MAC_EN_RESET2 (1 << 5) |
1088 | # define MAC_DMA_RESET (1 << 6) | 1088 | # define MAC_DMA_RESET (1 << 6) |
1089 | 1089 | ||
1090 | /* Ethernet Controller DMA Channels */ | 1090 | /* Ethernet Controller DMA Channels */ |
1091 | 1091 | ||
@@ -1095,7 +1095,7 @@ enum soc_au1200_ints { | |||
1095 | #define MAC_TX_BUFF0_STATUS 0x0 | 1095 | #define MAC_TX_BUFF0_STATUS 0x0 |
1096 | # define TX_FRAME_ABORTED (1 << 0) | 1096 | # define TX_FRAME_ABORTED (1 << 0) |
1097 | # define TX_JAB_TIMEOUT (1 << 1) | 1097 | # define TX_JAB_TIMEOUT (1 << 1) |
1098 | # define TX_NO_CARRIER (1 << 2) | 1098 | # define TX_NO_CARRIER (1 << 2) |
1099 | # define TX_LOSS_CARRIER (1 << 3) | 1099 | # define TX_LOSS_CARRIER (1 << 3) |
1100 | # define TX_EXC_DEF (1 << 4) | 1100 | # define TX_EXC_DEF (1 << 4) |
1101 | # define TX_LATE_COLL_ABORT (1 << 5) | 1101 | # define TX_LATE_COLL_ABORT (1 << 5) |
@@ -1106,7 +1106,7 @@ enum soc_au1200_ints { | |||
1106 | # define TX_COLL_CNT_MASK (0xF << 10) | 1106 | # define TX_COLL_CNT_MASK (0xF << 10) |
1107 | # define TX_PKT_RETRY (1 << 31) | 1107 | # define TX_PKT_RETRY (1 << 31) |
1108 | #define MAC_TX_BUFF0_ADDR 0x4 | 1108 | #define MAC_TX_BUFF0_ADDR 0x4 |
1109 | # define TX_DMA_ENABLE (1 << 0) | 1109 | # define TX_DMA_ENABLE (1 << 0) |
1110 | # define TX_T_DONE (1 << 1) | 1110 | # define TX_T_DONE (1 << 1) |
1111 | # define TX_GET_DMA_BUFFER(X) (((X) >> 2) & 0x3) | 1111 | # define TX_GET_DMA_BUFFER(X) (((X) >> 2) & 0x3) |
1112 | #define MAC_TX_BUFF0_LEN 0x8 | 1112 | #define MAC_TX_BUFF0_LEN 0x8 |
@@ -1125,7 +1125,7 @@ enum soc_au1200_ints { | |||
1125 | /* offsets from MAC_RX_RING_ADDR */ | 1125 | /* offsets from MAC_RX_RING_ADDR */ |
1126 | #define MAC_RX_BUFF0_STATUS 0x0 | 1126 | #define MAC_RX_BUFF0_STATUS 0x0 |
1127 | # define RX_FRAME_LEN_MASK 0x3fff | 1127 | # define RX_FRAME_LEN_MASK 0x3fff |
1128 | # define RX_WDOG_TIMER (1 << 14) | 1128 | # define RX_WDOG_TIMER (1 << 14) |
1129 | # define RX_RUNT (1 << 15) | 1129 | # define RX_RUNT (1 << 15) |
1130 | # define RX_OVERLEN (1 << 16) | 1130 | # define RX_OVERLEN (1 << 16) |
1131 | # define RX_COLL (1 << 17) | 1131 | # define RX_COLL (1 << 17) |
@@ -1148,7 +1148,7 @@ enum soc_au1200_ints { | |||
1148 | RX_COLL | RX_MII_ERROR | RX_CRC_ERROR | \ | 1148 | RX_COLL | RX_MII_ERROR | RX_CRC_ERROR | \ |
1149 | RX_LEN_ERROR | RX_U_CNTRL_FRAME | RX_MISSED_FRAME) | 1149 | RX_LEN_ERROR | RX_U_CNTRL_FRAME | RX_MISSED_FRAME) |
1150 | #define MAC_RX_BUFF0_ADDR 0x4 | 1150 | #define MAC_RX_BUFF0_ADDR 0x4 |
1151 | # define RX_DMA_ENABLE (1 << 0) | 1151 | # define RX_DMA_ENABLE (1 << 0) |
1152 | # define RX_T_DONE (1 << 1) | 1152 | # define RX_T_DONE (1 << 1) |
1153 | # define RX_GET_DMA_BUFFER(X) (((X) >> 2) & 0x3) | 1153 | # define RX_GET_DMA_BUFFER(X) (((X) >> 2) & 0x3) |
1154 | # define RX_SET_BUFF_ADDR(X) ((X) & 0xffffffc0) | 1154 | # define RX_SET_BUFF_ADDR(X) ((X) & 0xffffffc0) |
@@ -1173,34 +1173,34 @@ enum soc_au1200_ints { | |||
1173 | 1173 | ||
1174 | /* SSIO */ | 1174 | /* SSIO */ |
1175 | #define SSI0_STATUS 0xB1600000 | 1175 | #define SSI0_STATUS 0xB1600000 |
1176 | # define SSI_STATUS_BF (1 << 4) | 1176 | # define SSI_STATUS_BF (1 << 4) |
1177 | # define SSI_STATUS_OF (1 << 3) | 1177 | # define SSI_STATUS_OF (1 << 3) |
1178 | # define SSI_STATUS_UF (1 << 2) | 1178 | # define SSI_STATUS_UF (1 << 2) |
1179 | # define SSI_STATUS_D (1 << 1) | 1179 | # define SSI_STATUS_D (1 << 1) |
1180 | # define SSI_STATUS_B (1 << 0) | 1180 | # define SSI_STATUS_B (1 << 0) |
1181 | #define SSI0_INT 0xB1600004 | 1181 | #define SSI0_INT 0xB1600004 |
1182 | # define SSI_INT_OI (1 << 3) | 1182 | # define SSI_INT_OI (1 << 3) |
1183 | # define SSI_INT_UI (1 << 2) | 1183 | # define SSI_INT_UI (1 << 2) |
1184 | # define SSI_INT_DI (1 << 1) | 1184 | # define SSI_INT_DI (1 << 1) |
1185 | #define SSI0_INT_ENABLE 0xB1600008 | 1185 | #define SSI0_INT_ENABLE 0xB1600008 |
1186 | # define SSI_INTE_OIE (1 << 3) | 1186 | # define SSI_INTE_OIE (1 << 3) |
1187 | # define SSI_INTE_UIE (1 << 2) | 1187 | # define SSI_INTE_UIE (1 << 2) |
1188 | # define SSI_INTE_DIE (1 << 1) | 1188 | # define SSI_INTE_DIE (1 << 1) |
1189 | #define SSI0_CONFIG 0xB1600020 | 1189 | #define SSI0_CONFIG 0xB1600020 |
1190 | # define SSI_CONFIG_AO (1 << 24) | 1190 | # define SSI_CONFIG_AO (1 << 24) |
1191 | # define SSI_CONFIG_DO (1 << 23) | 1191 | # define SSI_CONFIG_DO (1 << 23) |
1192 | # define SSI_CONFIG_ALEN_BIT 20 | 1192 | # define SSI_CONFIG_ALEN_BIT 20 |
1193 | # define SSI_CONFIG_ALEN_MASK (0x7 << 20) | 1193 | # define SSI_CONFIG_ALEN_MASK (0x7 << 20) |
1194 | # define SSI_CONFIG_DLEN_BIT 16 | 1194 | # define SSI_CONFIG_DLEN_BIT 16 |
1195 | # define SSI_CONFIG_DLEN_MASK (0x7 << 16) | 1195 | # define SSI_CONFIG_DLEN_MASK (0x7 << 16) |
1196 | # define SSI_CONFIG_DD (1 << 11) | 1196 | # define SSI_CONFIG_DD (1 << 11) |
1197 | # define SSI_CONFIG_AD (1 << 10) | 1197 | # define SSI_CONFIG_AD (1 << 10) |
1198 | # define SSI_CONFIG_BM_BIT 8 | 1198 | # define SSI_CONFIG_BM_BIT 8 |
1199 | # define SSI_CONFIG_BM_MASK (0x3 << 8) | 1199 | # define SSI_CONFIG_BM_MASK (0x3 << 8) |
1200 | # define SSI_CONFIG_CE (1 << 7) | 1200 | # define SSI_CONFIG_CE (1 << 7) |
1201 | # define SSI_CONFIG_DP (1 << 6) | 1201 | # define SSI_CONFIG_DP (1 << 6) |
1202 | # define SSI_CONFIG_DL (1 << 5) | 1202 | # define SSI_CONFIG_DL (1 << 5) |
1203 | # define SSI_CONFIG_EP (1 << 4) | 1203 | # define SSI_CONFIG_EP (1 << 4) |
1204 | #define SSI0_ADATA 0xB1600024 | 1204 | #define SSI0_ADATA 0xB1600024 |
1205 | # define SSI_AD_D (1 << 24) | 1205 | # define SSI_AD_D (1 << 24) |
1206 | # define SSI_AD_ADDR_BIT 16 | 1206 | # define SSI_AD_ADDR_BIT 16 |
@@ -1210,12 +1210,12 @@ enum soc_au1200_ints { | |||
1210 | #define SSI0_CLKDIV 0xB1600028 | 1210 | #define SSI0_CLKDIV 0xB1600028 |
1211 | #define SSI0_CONTROL 0xB1600100 | 1211 | #define SSI0_CONTROL 0xB1600100 |
1212 | # define SSI_CONTROL_CD (1 << 1) | 1212 | # define SSI_CONTROL_CD (1 << 1) |
1213 | # define SSI_CONTROL_E (1 << 0) | 1213 | # define SSI_CONTROL_E (1 << 0) |
1214 | 1214 | ||
1215 | /* SSI1 */ | 1215 | /* SSI1 */ |
1216 | #define SSI1_STATUS 0xB1680000 | 1216 | #define SSI1_STATUS 0xB1680000 |
1217 | #define SSI1_INT 0xB1680004 | 1217 | #define SSI1_INT 0xB1680004 |
1218 | #define SSI1_INT_ENABLE 0xB1680008 | 1218 | #define SSI1_INT_ENABLE 0xB1680008 |
1219 | #define SSI1_CONFIG 0xB1680020 | 1219 | #define SSI1_CONFIG 0xB1680020 |
1220 | #define SSI1_ADATA 0xB1680024 | 1220 | #define SSI1_ADATA 0xB1680024 |
1221 | #define SSI1_CLKDIV 0xB1680028 | 1221 | #define SSI1_CLKDIV 0xB1680028 |
@@ -1242,8 +1242,8 @@ enum soc_au1200_ints { | |||
1242 | 1242 | ||
1243 | #define SSI_CONFIG_AO (1 << 24) | 1243 | #define SSI_CONFIG_AO (1 << 24) |
1244 | #define SSI_CONFIG_DO (1 << 23) | 1244 | #define SSI_CONFIG_DO (1 << 23) |
1245 | #define SSI_CONFIG_ALEN (7 << 20) | 1245 | #define SSI_CONFIG_ALEN (7 << 20) |
1246 | #define SSI_CONFIG_DLEN (15 << 16) | 1246 | #define SSI_CONFIG_DLEN (15 << 16) |
1247 | #define SSI_CONFIG_DD (1 << 11) | 1247 | #define SSI_CONFIG_DD (1 << 11) |
1248 | #define SSI_CONFIG_AD (1 << 10) | 1248 | #define SSI_CONFIG_AD (1 << 10) |
1249 | #define SSI_CONFIG_BM (3 << 8) | 1249 | #define SSI_CONFIG_BM (3 << 8) |
@@ -1305,7 +1305,7 @@ struct au1k_irda_platform_data { | |||
1305 | # define SYS_PF_CS (1 << 16) /* EXTCLK0/32KHz to gpio2 */ | 1305 | # define SYS_PF_CS (1 << 16) /* EXTCLK0/32KHz to gpio2 */ |
1306 | # define SYS_PF_EX0 (1 << 9) /* GPIO2/clock */ | 1306 | # define SYS_PF_EX0 (1 << 9) /* GPIO2/clock */ |
1307 | 1307 | ||
1308 | /* Au1550 only. Redefines lots of pins */ | 1308 | /* Au1550 only. Redefines lots of pins */ |
1309 | # define SYS_PF_PSC2_MASK (7 << 17) | 1309 | # define SYS_PF_PSC2_MASK (7 << 17) |
1310 | # define SYS_PF_PSC2_AC97 0 | 1310 | # define SYS_PF_PSC2_AC97 0 |
1311 | # define SYS_PF_PSC2_SPI 0 | 1311 | # define SYS_PF_PSC2_SPI 0 |
@@ -1322,33 +1322,33 @@ struct au1k_irda_platform_data { | |||
1322 | # define SYS_PF_MUST_BE_SET ((1 << 5) | (1 << 2)) | 1322 | # define SYS_PF_MUST_BE_SET ((1 << 5) | (1 << 2)) |
1323 | 1323 | ||
1324 | /* Au1200 only */ | 1324 | /* Au1200 only */ |
1325 | #define SYS_PINFUNC_DMA (1 << 31) | 1325 | #define SYS_PINFUNC_DMA (1 << 31) |
1326 | #define SYS_PINFUNC_S0A (1 << 30) | 1326 | #define SYS_PINFUNC_S0A (1 << 30) |
1327 | #define SYS_PINFUNC_S1A (1 << 29) | 1327 | #define SYS_PINFUNC_S1A (1 << 29) |
1328 | #define SYS_PINFUNC_LP0 (1 << 28) | 1328 | #define SYS_PINFUNC_LP0 (1 << 28) |
1329 | #define SYS_PINFUNC_LP1 (1 << 27) | 1329 | #define SYS_PINFUNC_LP1 (1 << 27) |
1330 | #define SYS_PINFUNC_LD16 (1 << 26) | 1330 | #define SYS_PINFUNC_LD16 (1 << 26) |
1331 | #define SYS_PINFUNC_LD8 (1 << 25) | 1331 | #define SYS_PINFUNC_LD8 (1 << 25) |
1332 | #define SYS_PINFUNC_LD1 (1 << 24) | 1332 | #define SYS_PINFUNC_LD1 (1 << 24) |
1333 | #define SYS_PINFUNC_LD0 (1 << 23) | 1333 | #define SYS_PINFUNC_LD0 (1 << 23) |
1334 | #define SYS_PINFUNC_P1A (3 << 21) | 1334 | #define SYS_PINFUNC_P1A (3 << 21) |
1335 | #define SYS_PINFUNC_P1B (1 << 20) | 1335 | #define SYS_PINFUNC_P1B (1 << 20) |
1336 | #define SYS_PINFUNC_FS3 (1 << 19) | 1336 | #define SYS_PINFUNC_FS3 (1 << 19) |
1337 | #define SYS_PINFUNC_P0A (3 << 17) | 1337 | #define SYS_PINFUNC_P0A (3 << 17) |
1338 | #define SYS_PINFUNC_CS (1 << 16) | 1338 | #define SYS_PINFUNC_CS (1 << 16) |
1339 | #define SYS_PINFUNC_CIM (1 << 15) | 1339 | #define SYS_PINFUNC_CIM (1 << 15) |
1340 | #define SYS_PINFUNC_P1C (1 << 14) | 1340 | #define SYS_PINFUNC_P1C (1 << 14) |
1341 | #define SYS_PINFUNC_U1T (1 << 12) | 1341 | #define SYS_PINFUNC_U1T (1 << 12) |
1342 | #define SYS_PINFUNC_U1R (1 << 11) | 1342 | #define SYS_PINFUNC_U1R (1 << 11) |
1343 | #define SYS_PINFUNC_EX1 (1 << 10) | 1343 | #define SYS_PINFUNC_EX1 (1 << 10) |
1344 | #define SYS_PINFUNC_EX0 (1 << 9) | 1344 | #define SYS_PINFUNC_EX0 (1 << 9) |
1345 | #define SYS_PINFUNC_U0R (1 << 8) | 1345 | #define SYS_PINFUNC_U0R (1 << 8) |
1346 | #define SYS_PINFUNC_MC (1 << 7) | 1346 | #define SYS_PINFUNC_MC (1 << 7) |
1347 | #define SYS_PINFUNC_S0B (1 << 6) | 1347 | #define SYS_PINFUNC_S0B (1 << 6) |
1348 | #define SYS_PINFUNC_S0C (1 << 5) | 1348 | #define SYS_PINFUNC_S0C (1 << 5) |
1349 | #define SYS_PINFUNC_P0B (1 << 4) | 1349 | #define SYS_PINFUNC_P0B (1 << 4) |
1350 | #define SYS_PINFUNC_U0T (1 << 3) | 1350 | #define SYS_PINFUNC_U0T (1 << 3) |
1351 | #define SYS_PINFUNC_S1B (1 << 2) | 1351 | #define SYS_PINFUNC_S1B (1 << 2) |
1352 | 1352 | ||
1353 | /* Power Management */ | 1353 | /* Power Management */ |
1354 | #define SYS_SCRATCH0 0xB1900018 | 1354 | #define SYS_SCRATCH0 0xB1900018 |
@@ -1405,7 +1405,7 @@ struct au1k_irda_platform_data { | |||
1405 | # define SYS_CS_DI2 (1 << 16) | 1405 | # define SYS_CS_DI2 (1 << 16) |
1406 | # define SYS_CS_CI2 (1 << 15) | 1406 | # define SYS_CS_CI2 (1 << 15) |
1407 | 1407 | ||
1408 | # define SYS_CS_ML_BIT 7 | 1408 | # define SYS_CS_ML_BIT 7 |
1409 | # define SYS_CS_ML_MASK (0x7 << SYS_CS_ML_BIT) | 1409 | # define SYS_CS_ML_MASK (0x7 << SYS_CS_ML_BIT) |
1410 | # define SYS_CS_DL (1 << 6) | 1410 | # define SYS_CS_DL (1 << 6) |
1411 | # define SYS_CS_CL (1 << 5) | 1411 | # define SYS_CS_CL (1 << 5) |
@@ -1554,8 +1554,8 @@ struct au1k_irda_platform_data { | |||
1554 | #define PCI_MWMASKDEV_MWMASK(x) (((x) & 0xffff) << 16) | 1554 | #define PCI_MWMASKDEV_MWMASK(x) (((x) & 0xffff) << 16) |
1555 | #define PCI_MWMASKDEV_DEVID(x) ((x) & 0xffff) | 1555 | #define PCI_MWMASKDEV_DEVID(x) ((x) & 0xffff) |
1556 | #define PCI_MWBASEREVCCL_BASE(x) (((x) & 0xffff) << 16) | 1556 | #define PCI_MWBASEREVCCL_BASE(x) (((x) & 0xffff) << 16) |
1557 | #define PCI_MWBASEREVCCL_REV(x) (((x) & 0xff) << 8) | 1557 | #define PCI_MWBASEREVCCL_REV(x) (((x) & 0xff) << 8) |
1558 | #define PCI_MWBASEREVCCL_CCL(x) ((x) & 0xff) | 1558 | #define PCI_MWBASEREVCCL_CCL(x) ((x) & 0xff) |
1559 | #define PCI_ID_DID(x) (((x) & 0xffff) << 16) | 1559 | #define PCI_ID_DID(x) (((x) & 0xffff) << 16) |
1560 | #define PCI_ID_VID(x) ((x) & 0xffff) | 1560 | #define PCI_ID_VID(x) ((x) & 0xffff) |
1561 | #define PCI_STATCMD_STATUS(x) (((x) & 0xffff) << 16) | 1561 | #define PCI_STATCMD_STATUS(x) (((x) & 0xffff) << 16) |
diff --git a/arch/mips/include/asm/mach-au1x00/au1000_dma.h b/arch/mips/include/asm/mach-au1x00/au1000_dma.h index ba4cf0e91c8b..7cedca5a305c 100644 --- a/arch/mips/include/asm/mach-au1x00/au1000_dma.h +++ b/arch/mips/include/asm/mach-au1x00/au1000_dma.h | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/spinlock.h> /* And spinlocks */ | 34 | #include <linux/spinlock.h> /* And spinlocks */ |
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | 36 | ||
37 | #define NUM_AU1000_DMA_CHANNELS 8 | 37 | #define NUM_AU1000_DMA_CHANNELS 8 |
38 | 38 | ||
39 | /* DMA Channel Register Offsets */ | 39 | /* DMA Channel Register Offsets */ |
40 | #define DMA_MODE_SET 0x00000000 | 40 | #define DMA_MODE_SET 0x00000000 |
@@ -47,7 +47,7 @@ | |||
47 | #define DMA_DS (1 << 15) | 47 | #define DMA_DS (1 << 15) |
48 | #define DMA_BE (1 << 13) | 48 | #define DMA_BE (1 << 13) |
49 | #define DMA_DR (1 << 12) | 49 | #define DMA_DR (1 << 12) |
50 | #define DMA_TS8 (1 << 11) | 50 | #define DMA_TS8 (1 << 11) |
51 | #define DMA_DW_BIT 9 | 51 | #define DMA_DW_BIT 9 |
52 | #define DMA_DW_MASK (0x03 << DMA_DW_BIT) | 52 | #define DMA_DW_MASK (0x03 << DMA_DW_BIT) |
53 | #define DMA_DW8 (0 << DMA_DW_BIT) | 53 | #define DMA_DW8 (0 << DMA_DW_BIT) |
@@ -59,9 +59,9 @@ | |||
59 | #define DMA_GO (1 << 5) | 59 | #define DMA_GO (1 << 5) |
60 | #define DMA_AB (1 << 4) | 60 | #define DMA_AB (1 << 4) |
61 | #define DMA_D1 (1 << 3) | 61 | #define DMA_D1 (1 << 3) |
62 | #define DMA_BE1 (1 << 2) | 62 | #define DMA_BE1 (1 << 2) |
63 | #define DMA_D0 (1 << 1) | 63 | #define DMA_D0 (1 << 1) |
64 | #define DMA_BE0 (1 << 0) | 64 | #define DMA_BE0 (1 << 0) |
65 | 65 | ||
66 | #define DMA_PERIPHERAL_ADDR 0x00000008 | 66 | #define DMA_PERIPHERAL_ADDR 0x00000008 |
67 | #define DMA_BUFFER0_START 0x0000000C | 67 | #define DMA_BUFFER0_START 0x0000000C |
@@ -246,7 +246,7 @@ static inline void init_dma(unsigned int dmanr) | |||
246 | mode |= DMA_IE; | 246 | mode |= DMA_IE; |
247 | 247 | ||
248 | au_writel(~mode, chan->io + DMA_MODE_CLEAR); | 248 | au_writel(~mode, chan->io + DMA_MODE_CLEAR); |
249 | au_writel(mode, chan->io + DMA_MODE_SET); | 249 | au_writel(mode, chan->io + DMA_MODE_SET); |
250 | } | 250 | } |
251 | 251 | ||
252 | /* | 252 | /* |
diff --git a/arch/mips/include/asm/mach-au1x00/au1100_mmc.h b/arch/mips/include/asm/mach-au1x00/au1100_mmc.h index e221659f1bca..cadab91cee26 100644 --- a/arch/mips/include/asm/mach-au1x00/au1100_mmc.h +++ b/arch/mips/include/asm/mach-au1x00/au1100_mmc.h | |||
@@ -148,7 +148,7 @@ struct au1xmmc_platform_data { | |||
148 | /* | 148 | /* |
149 | * SD_STATUS bit definitions. | 149 | * SD_STATUS bit definitions. |
150 | */ | 150 | */ |
151 | #define SD_STATUS_DCRCW (0x00000007) | 151 | #define SD_STATUS_DCRCW (0x00000007) |
152 | #define SD_STATUS_xx1 (0x00000008) | 152 | #define SD_STATUS_xx1 (0x00000008) |
153 | #define SD_STATUS_CB (0x00000010) | 153 | #define SD_STATUS_CB (0x00000010) |
154 | #define SD_STATUS_DB (0x00000020) | 154 | #define SD_STATUS_DB (0x00000020) |
diff --git a/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h b/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h index 217810e18361..ca8077afac4a 100644 --- a/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h +++ b/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h | |||
@@ -103,7 +103,7 @@ typedef volatile struct au1xxx_ddma_desc { | |||
103 | * Lets have some SW data following -- make sure it's 32 bytes. | 103 | * Lets have some SW data following -- make sure it's 32 bytes. |
104 | */ | 104 | */ |
105 | u32 sw_status; | 105 | u32 sw_status; |
106 | u32 sw_context; | 106 | u32 sw_context; |
107 | u32 sw_reserved[6]; | 107 | u32 sw_reserved[6]; |
108 | } au1x_ddma_desc_t; | 108 | } au1x_ddma_desc_t; |
109 | 109 | ||
@@ -123,7 +123,7 @@ typedef volatile struct au1xxx_ddma_desc { | |||
123 | #define DSCR_CMD0_CV (0x1 << 2) /* Clear Valid when done */ | 123 | #define DSCR_CMD0_CV (0x1 << 2) /* Clear Valid when done */ |
124 | #define DSCR_CMD0_ST_MASK (0x3 << 0) /* Status instruction */ | 124 | #define DSCR_CMD0_ST_MASK (0x3 << 0) /* Status instruction */ |
125 | 125 | ||
126 | #define SW_STATUS_INUSE (1 << 0) | 126 | #define SW_STATUS_INUSE (1 << 0) |
127 | 127 | ||
128 | /* Command 0 device IDs. */ | 128 | /* Command 0 device IDs. */ |
129 | #define AU1550_DSCR_CMD0_UART0_TX 0 | 129 | #define AU1550_DSCR_CMD0_UART0_TX 0 |
@@ -195,8 +195,8 @@ typedef volatile struct au1xxx_ddma_desc { | |||
195 | #define AU1300_DSCR_CMD0_SDMS_RX0 9 | 195 | #define AU1300_DSCR_CMD0_SDMS_RX0 9 |
196 | #define AU1300_DSCR_CMD0_SDMS_TX1 10 | 196 | #define AU1300_DSCR_CMD0_SDMS_TX1 10 |
197 | #define AU1300_DSCR_CMD0_SDMS_RX1 11 | 197 | #define AU1300_DSCR_CMD0_SDMS_RX1 11 |
198 | #define AU1300_DSCR_CMD0_AES_TX 12 | 198 | #define AU1300_DSCR_CMD0_AES_TX 12 |
199 | #define AU1300_DSCR_CMD0_AES_RX 13 | 199 | #define AU1300_DSCR_CMD0_AES_RX 13 |
200 | #define AU1300_DSCR_CMD0_PSC0_TX 14 | 200 | #define AU1300_DSCR_CMD0_PSC0_TX 14 |
201 | #define AU1300_DSCR_CMD0_PSC0_RX 15 | 201 | #define AU1300_DSCR_CMD0_PSC0_RX 15 |
202 | #define AU1300_DSCR_CMD0_PSC1_TX 16 | 202 | #define AU1300_DSCR_CMD0_PSC1_TX 16 |
@@ -205,12 +205,12 @@ typedef volatile struct au1xxx_ddma_desc { | |||
205 | #define AU1300_DSCR_CMD0_PSC2_RX 19 | 205 | #define AU1300_DSCR_CMD0_PSC2_RX 19 |
206 | #define AU1300_DSCR_CMD0_PSC3_TX 20 | 206 | #define AU1300_DSCR_CMD0_PSC3_TX 20 |
207 | #define AU1300_DSCR_CMD0_PSC3_RX 21 | 207 | #define AU1300_DSCR_CMD0_PSC3_RX 21 |
208 | #define AU1300_DSCR_CMD0_LCD 22 | 208 | #define AU1300_DSCR_CMD0_LCD 22 |
209 | #define AU1300_DSCR_CMD0_NAND_FLASH 23 | 209 | #define AU1300_DSCR_CMD0_NAND_FLASH 23 |
210 | #define AU1300_DSCR_CMD0_SDMS_TX2 24 | 210 | #define AU1300_DSCR_CMD0_SDMS_TX2 24 |
211 | #define AU1300_DSCR_CMD0_SDMS_RX2 25 | 211 | #define AU1300_DSCR_CMD0_SDMS_RX2 25 |
212 | #define AU1300_DSCR_CMD0_CIM_SYNC 26 | 212 | #define AU1300_DSCR_CMD0_CIM_SYNC 26 |
213 | #define AU1300_DSCR_CMD0_UDMA 27 | 213 | #define AU1300_DSCR_CMD0_UDMA 27 |
214 | #define AU1300_DSCR_CMD0_DMA_REQ0 28 | 214 | #define AU1300_DSCR_CMD0_DMA_REQ0 28 |
215 | #define AU1300_DSCR_CMD0_DMA_REQ1 29 | 215 | #define AU1300_DSCR_CMD0_DMA_REQ1 29 |
216 | 216 | ||
@@ -298,7 +298,7 @@ typedef volatile struct au1xxx_ddma_desc { | |||
298 | #define DSCR_NXTPTR_MS (1 << 27) | 298 | #define DSCR_NXTPTR_MS (1 << 27) |
299 | 299 | ||
300 | /* The number of DBDMA channels. */ | 300 | /* The number of DBDMA channels. */ |
301 | #define NUM_DBDMA_CHANS 16 | 301 | #define NUM_DBDMA_CHANS 16 |
302 | 302 | ||
303 | /* | 303 | /* |
304 | * DDMA API definitions | 304 | * DDMA API definitions |
@@ -316,7 +316,7 @@ typedef struct dbdma_device_table { | |||
316 | 316 | ||
317 | 317 | ||
318 | typedef struct dbdma_chan_config { | 318 | typedef struct dbdma_chan_config { |
319 | spinlock_t lock; | 319 | spinlock_t lock; |
320 | 320 | ||
321 | u32 chan_flags; | 321 | u32 chan_flags; |
322 | u32 chan_index; | 322 | u32 chan_index; |
diff --git a/arch/mips/include/asm/mach-au1x00/au1xxx_ide.h b/arch/mips/include/asm/mach-au1x00/au1xxx_ide.h index e306384b1414..bb91b8923a49 100644 --- a/arch/mips/include/asm/mach-au1x00/au1xxx_ide.h +++ b/arch/mips/include/asm/mach-au1x00/au1xxx_ide.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-mips/mach-au1x00/au1xxx_ide.h version 01.30.00 Aug. 02 2005 | 2 | * include/asm-mips/mach-au1x00/au1xxx_ide.h version 01.30.00 Aug. 02 2005 |
3 | * | 3 | * |
4 | * BRIEF MODULE DESCRIPTION | 4 | * BRIEF MODULE DESCRIPTION |
5 | * AMD Alchemy Au1xxx IDE interface routines over the Static Bus | 5 | * AMD Alchemy Au1xxx IDE interface routines over the Static Bus |
@@ -27,14 +27,14 @@ | |||
27 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 27 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
28 | * | 28 | * |
29 | * Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE | 29 | * Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE |
30 | * Interface and Linux Device Driver" Application Note. | 30 | * Interface and Linux Device Driver" Application Note. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | 33 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA |
34 | #define DMA_WAIT_TIMEOUT 100 | 34 | #define DMA_WAIT_TIMEOUT 100 |
35 | #define NUM_DESCRIPTORS PRD_ENTRIES | 35 | #define NUM_DESCRIPTORS PRD_ENTRIES |
36 | #else /* CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA */ | 36 | #else /* CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA */ |
37 | #define NUM_DESCRIPTORS 2 | 37 | #define NUM_DESCRIPTORS 2 |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #ifndef AU1XXX_ATA_RQSIZE | 40 | #ifndef AU1XXX_ATA_RQSIZE |
@@ -84,8 +84,8 @@ typedef struct { | |||
84 | #define TWP_MASK (0x3F << 14) | 84 | #define TWP_MASK (0x3F << 14) |
85 | #define TCSW_MASK (0x0F << 10) | 85 | #define TCSW_MASK (0x0F << 10) |
86 | #define TPM_MASK (0x0F << 6) | 86 | #define TPM_MASK (0x0F << 6) |
87 | #define TA_MASK (0x3F << 0) | 87 | #define TA_MASK (0x3F << 0) |
88 | #define TS_MASK (1 << 8) | 88 | #define TS_MASK (1 << 8) |
89 | 89 | ||
90 | /* Timing parameters PIO mode 0 */ | 90 | /* Timing parameters PIO mode 0 */ |
91 | #define SBC_IDE_PIO0_TCSOE (0x04 << 29) | 91 | #define SBC_IDE_PIO0_TCSOE (0x04 << 29) |
@@ -96,7 +96,7 @@ typedef struct { | |||
96 | #define SBC_IDE_PIO0_TWP (0x10 << 14) | 96 | #define SBC_IDE_PIO0_TWP (0x10 << 14) |
97 | #define SBC_IDE_PIO0_TCSW (0x04 << 10) | 97 | #define SBC_IDE_PIO0_TCSW (0x04 << 10) |
98 | #define SBC_IDE_PIO0_TPM (0x00 << 6) | 98 | #define SBC_IDE_PIO0_TPM (0x00 << 6) |
99 | #define SBC_IDE_PIO0_TA (0x15 << 0) | 99 | #define SBC_IDE_PIO0_TA (0x15 << 0) |
100 | /* Timing parameters PIO mode 1 */ | 100 | /* Timing parameters PIO mode 1 */ |
101 | #define SBC_IDE_PIO1_TCSOE (0x03 << 29) | 101 | #define SBC_IDE_PIO1_TCSOE (0x03 << 29) |
102 | #define SBC_IDE_PIO1_TOECS (0x01 << 26) | 102 | #define SBC_IDE_PIO1_TOECS (0x01 << 26) |
@@ -106,7 +106,7 @@ typedef struct { | |||
106 | #define SBC_IDE_PIO1_TWP (0x08 << 14) | 106 | #define SBC_IDE_PIO1_TWP (0x08 << 14) |
107 | #define SBC_IDE_PIO1_TCSW (0x03 << 10) | 107 | #define SBC_IDE_PIO1_TCSW (0x03 << 10) |
108 | #define SBC_IDE_PIO1_TPM (0x00 << 6) | 108 | #define SBC_IDE_PIO1_TPM (0x00 << 6) |
109 | #define SBC_IDE_PIO1_TA (0x0B << 0) | 109 | #define SBC_IDE_PIO1_TA (0x0B << 0) |
110 | /* Timing parameters PIO mode 2 */ | 110 | /* Timing parameters PIO mode 2 */ |
111 | #define SBC_IDE_PIO2_TCSOE (0x05 << 29) | 111 | #define SBC_IDE_PIO2_TCSOE (0x05 << 29) |
112 | #define SBC_IDE_PIO2_TOECS (0x01 << 26) | 112 | #define SBC_IDE_PIO2_TOECS (0x01 << 26) |
@@ -116,7 +116,7 @@ typedef struct { | |||
116 | #define SBC_IDE_PIO2_TWP (0x1F << 14) | 116 | #define SBC_IDE_PIO2_TWP (0x1F << 14) |
117 | #define SBC_IDE_PIO2_TCSW (0x05 << 10) | 117 | #define SBC_IDE_PIO2_TCSW (0x05 << 10) |
118 | #define SBC_IDE_PIO2_TPM (0x00 << 6) | 118 | #define SBC_IDE_PIO2_TPM (0x00 << 6) |
119 | #define SBC_IDE_PIO2_TA (0x22 << 0) | 119 | #define SBC_IDE_PIO2_TA (0x22 << 0) |
120 | /* Timing parameters PIO mode 3 */ | 120 | /* Timing parameters PIO mode 3 */ |
121 | #define SBC_IDE_PIO3_TCSOE (0x05 << 29) | 121 | #define SBC_IDE_PIO3_TCSOE (0x05 << 29) |
122 | #define SBC_IDE_PIO3_TOECS (0x01 << 26) | 122 | #define SBC_IDE_PIO3_TOECS (0x01 << 26) |
@@ -126,7 +126,7 @@ typedef struct { | |||
126 | #define SBC_IDE_PIO3_TWP (0x15 << 14) | 126 | #define SBC_IDE_PIO3_TWP (0x15 << 14) |
127 | #define SBC_IDE_PIO3_TCSW (0x05 << 10) | 127 | #define SBC_IDE_PIO3_TCSW (0x05 << 10) |
128 | #define SBC_IDE_PIO3_TPM (0x00 << 6) | 128 | #define SBC_IDE_PIO3_TPM (0x00 << 6) |
129 | #define SBC_IDE_PIO3_TA (0x1A << 0) | 129 | #define SBC_IDE_PIO3_TA (0x1A << 0) |
130 | /* Timing parameters PIO mode 4 */ | 130 | /* Timing parameters PIO mode 4 */ |
131 | #define SBC_IDE_PIO4_TCSOE (0x04 << 29) | 131 | #define SBC_IDE_PIO4_TCSOE (0x04 << 29) |
132 | #define SBC_IDE_PIO4_TOECS (0x01 << 26) | 132 | #define SBC_IDE_PIO4_TOECS (0x01 << 26) |
@@ -136,7 +136,7 @@ typedef struct { | |||
136 | #define SBC_IDE_PIO4_TWP (0x0D << 14) | 136 | #define SBC_IDE_PIO4_TWP (0x0D << 14) |
137 | #define SBC_IDE_PIO4_TCSW (0x03 << 10) | 137 | #define SBC_IDE_PIO4_TCSW (0x03 << 10) |
138 | #define SBC_IDE_PIO4_TPM (0x00 << 6) | 138 | #define SBC_IDE_PIO4_TPM (0x00 << 6) |
139 | #define SBC_IDE_PIO4_TA (0x12 << 0) | 139 | #define SBC_IDE_PIO4_TA (0x12 << 0) |
140 | /* Timing parameters MDMA mode 0 */ | 140 | /* Timing parameters MDMA mode 0 */ |
141 | #define SBC_IDE_MDMA0_TCSOE (0x03 << 29) | 141 | #define SBC_IDE_MDMA0_TCSOE (0x03 << 29) |
142 | #define SBC_IDE_MDMA0_TOECS (0x01 << 26) | 142 | #define SBC_IDE_MDMA0_TOECS (0x01 << 26) |
diff --git a/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h b/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h index 4e3f3bc26c60..8a9cd754be2d 100644 --- a/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h +++ b/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h | |||
@@ -53,7 +53,7 @@ | |||
53 | 53 | ||
54 | #define PSC_CTRL_DISABLE 0 | 54 | #define PSC_CTRL_DISABLE 0 |
55 | #define PSC_CTRL_SUSPEND 2 | 55 | #define PSC_CTRL_SUSPEND 2 |
56 | #define PSC_CTRL_ENABLE 3 | 56 | #define PSC_CTRL_ENABLE 3 |
57 | 57 | ||
58 | /* AC97 Registers. */ | 58 | /* AC97 Registers. */ |
59 | #define PSC_AC97CFG_OFFSET 0x00000008 | 59 | #define PSC_AC97CFG_OFFSET 0x00000008 |
@@ -85,8 +85,8 @@ | |||
85 | #define PSC_AC97CFG_SE_ENABLE (1 << 25) | 85 | #define PSC_AC97CFG_SE_ENABLE (1 << 25) |
86 | 86 | ||
87 | #define PSC_AC97CFG_LEN_MASK (0xf << 21) | 87 | #define PSC_AC97CFG_LEN_MASK (0xf << 21) |
88 | #define PSC_AC97CFG_TXSLOT_MASK (0x3ff << 11) | 88 | #define PSC_AC97CFG_TXSLOT_MASK (0x3ff << 11) |
89 | #define PSC_AC97CFG_RXSLOT_MASK (0x3ff << 1) | 89 | #define PSC_AC97CFG_RXSLOT_MASK (0x3ff << 1) |
90 | #define PSC_AC97CFG_GE_ENABLE (1) | 90 | #define PSC_AC97CFG_GE_ENABLE (1) |
91 | 91 | ||
92 | /* Enable slots 3-12. */ | 92 | /* Enable slots 3-12. */ |
@@ -95,7 +95,7 @@ | |||
95 | 95 | ||
96 | /* | 96 | /* |
97 | * The word length equation is ((x) * 2) + 2, so choose 'x' appropriately. | 97 | * The word length equation is ((x) * 2) + 2, so choose 'x' appropriately. |
98 | * The only sensible numbers are 7, 9, or possibly 11. Nah, just do the | 98 | * The only sensible numbers are 7, 9, or possibly 11. Nah, just do the |
99 | * arithmetic in the macro. | 99 | * arithmetic in the macro. |
100 | */ | 100 | */ |
101 | #define PSC_AC97CFG_SET_LEN(x) (((((x) - 2) / 2) & 0xf) << 21) | 101 | #define PSC_AC97CFG_SET_LEN(x) (((((x) - 2) / 2) & 0xf) << 21) |
diff --git a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h index 73853b5a2a31..796afd051c35 100644 --- a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h +++ b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h | |||
@@ -12,14 +12,14 @@ | |||
12 | #include <asm/mach-au1x00/au1000.h> | 12 | #include <asm/mach-au1x00/au1000.h> |
13 | 13 | ||
14 | /* The default GPIO numberspace as documented in the Alchemy manuals. | 14 | /* The default GPIO numberspace as documented in the Alchemy manuals. |
15 | * GPIO0-31 from GPIO1 block, GPIO200-215 from GPIO2 block. | 15 | * GPIO0-31 from GPIO1 block, GPIO200-215 from GPIO2 block. |
16 | */ | 16 | */ |
17 | #define ALCHEMY_GPIO1_BASE 0 | 17 | #define ALCHEMY_GPIO1_BASE 0 |
18 | #define ALCHEMY_GPIO2_BASE 200 | 18 | #define ALCHEMY_GPIO2_BASE 200 |
19 | 19 | ||
20 | #define ALCHEMY_GPIO1_NUM 32 | 20 | #define ALCHEMY_GPIO1_NUM 32 |
21 | #define ALCHEMY_GPIO2_NUM 16 | 21 | #define ALCHEMY_GPIO2_NUM 16 |
22 | #define ALCHEMY_GPIO1_MAX (ALCHEMY_GPIO1_BASE + ALCHEMY_GPIO1_NUM - 1) | 22 | #define ALCHEMY_GPIO1_MAX (ALCHEMY_GPIO1_BASE + ALCHEMY_GPIO1_NUM - 1) |
23 | #define ALCHEMY_GPIO2_MAX (ALCHEMY_GPIO2_BASE + ALCHEMY_GPIO2_NUM - 1) | 23 | #define ALCHEMY_GPIO2_MAX (ALCHEMY_GPIO2_BASE + ALCHEMY_GPIO2_NUM - 1) |
24 | 24 | ||
25 | #define MAKE_IRQ(intc, off) (AU1000_INTC##intc##_INT_BASE + (off)) | 25 | #define MAKE_IRQ(intc, off) (AU1000_INTC##intc##_INT_BASE + (off)) |
@@ -67,7 +67,7 @@ static inline int au1500_gpio1_to_irq(int gpio) | |||
67 | switch (gpio) { | 67 | switch (gpio) { |
68 | case 0 ... 15: | 68 | case 0 ... 15: |
69 | case 20: | 69 | case 20: |
70 | case 23 ... 28: return MAKE_IRQ(1, gpio); | 70 | case 23 ... 28: return MAKE_IRQ(1, gpio); |
71 | } | 71 | } |
72 | 72 | ||
73 | return -ENXIO; | 73 | return -ENXIO; |
@@ -139,8 +139,8 @@ static inline int au1550_gpio1_to_irq(int gpio) | |||
139 | 139 | ||
140 | switch (gpio) { | 140 | switch (gpio) { |
141 | case 0 ... 15: | 141 | case 0 ... 15: |
142 | case 20 ... 28: return MAKE_IRQ(1, gpio); | 142 | case 20 ... 28: return MAKE_IRQ(1, gpio); |
143 | case 16 ... 17: return MAKE_IRQ(1, 18 + gpio - 16); | 143 | case 16 ... 17: return MAKE_IRQ(1, 18 + gpio - 16); |
144 | } | 144 | } |
145 | 145 | ||
146 | return -ENXIO; | 146 | return -ENXIO; |
@@ -152,9 +152,9 @@ static inline int au1550_gpio2_to_irq(int gpio) | |||
152 | 152 | ||
153 | switch (gpio) { | 153 | switch (gpio) { |
154 | case 0: return MAKE_IRQ(1, 16); | 154 | case 0: return MAKE_IRQ(1, 16); |
155 | case 1 ... 5: return MAKE_IRQ(1, 17); /* shared GPIO201_205 */ | 155 | case 1 ... 5: return MAKE_IRQ(1, 17); /* shared GPIO201_205 */ |
156 | case 6 ... 7: return MAKE_IRQ(1, 29 + gpio - 6); | 156 | case 6 ... 7: return MAKE_IRQ(1, 29 + gpio - 6); |
157 | case 8 ... 15: return MAKE_IRQ(1, 31); /* shared GPIO208_215 */ | 157 | case 8 ... 15: return MAKE_IRQ(1, 31); /* shared GPIO208_215 */ |
158 | } | 158 | } |
159 | 159 | ||
160 | return -ENXIO; | 160 | return -ENXIO; |
@@ -190,7 +190,7 @@ static inline int au1200_gpio2_to_irq(int gpio) | |||
190 | case 0 ... 2: return MAKE_IRQ(0, 5 + gpio - 0); | 190 | case 0 ... 2: return MAKE_IRQ(0, 5 + gpio - 0); |
191 | case 3: return MAKE_IRQ(0, 22); | 191 | case 3: return MAKE_IRQ(0, 22); |
192 | case 4 ... 7: return MAKE_IRQ(0, 24 + gpio - 4); | 192 | case 4 ... 7: return MAKE_IRQ(0, 24 + gpio - 4); |
193 | case 8 ... 15: return MAKE_IRQ(0, 28); /* shared GPIO208_215 */ | 193 | case 8 ... 15: return MAKE_IRQ(0, 28); /* shared GPIO208_215 */ |
194 | } | 194 | } |
195 | 195 | ||
196 | return -ENXIO; | 196 | return -ENXIO; |
@@ -428,7 +428,7 @@ static inline void alchemy_gpio2_disable_int(int gpio2) | |||
428 | /** | 428 | /** |
429 | * alchemy_gpio2_enable - Activate GPIO2 block. | 429 | * alchemy_gpio2_enable - Activate GPIO2 block. |
430 | * | 430 | * |
431 | * The GPIO2 block must be enabled excplicitly to work. On systems | 431 | * The GPIO2 block must be enabled excplicitly to work. On systems |
432 | * where this isn't done by the bootloader, this macro can be used. | 432 | * where this isn't done by the bootloader, this macro can be used. |
433 | */ | 433 | */ |
434 | static inline void alchemy_gpio2_enable(void) | 434 | static inline void alchemy_gpio2_enable(void) |
@@ -533,7 +533,7 @@ static inline int alchemy_irq_to_gpio(int irq) | |||
533 | * 2 (1 for Au1000) gpio_chips are registered. | 533 | * 2 (1 for Au1000) gpio_chips are registered. |
534 | * | 534 | * |
535 | *(3) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=y: | 535 | *(3) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=y: |
536 | * the boards' gpio.h must provide the linux gpio wrapper functions, | 536 | * the boards' gpio.h must provide the linux gpio wrapper functions, |
537 | * | 537 | * |
538 | *(4) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=n: | 538 | *(4) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=n: |
539 | * inlinable gpio functions are provided which enable access to the | 539 | * inlinable gpio functions are provided which enable access to the |
diff --git a/arch/mips/include/asm/mach-au1x00/gpio-au1300.h b/arch/mips/include/asm/mach-au1x00/gpio-au1300.h index fb9975c74c57..ce02894271c6 100644 --- a/arch/mips/include/asm/mach-au1x00/gpio-au1300.h +++ b/arch/mips/include/asm/mach-au1x00/gpio-au1300.h | |||
@@ -130,7 +130,7 @@ static inline int au1300_gpio_getinitlvl(unsigned int gpio) | |||
130 | * A gpiochip for the 75 GPIOs is registered. | 130 | * A gpiochip for the 75 GPIOs is registered. |
131 | * | 131 | * |
132 | *(3) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=y: | 132 | *(3) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=y: |
133 | * the boards' gpio.h must provide the linux gpio wrapper functions, | 133 | * the boards' gpio.h must provide the linux gpio wrapper functions, |
134 | * | 134 | * |
135 | *(4) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=n: | 135 | *(4) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=n: |
136 | * inlinable gpio functions are provided which enable access to the | 136 | * inlinable gpio functions are provided which enable access to the |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h index dbd5b5ad07a5..cb922b9cb0e9 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | |||
@@ -182,7 +182,7 @@ enum bcm63xx_regs_set { | |||
182 | #define BCM_6328_PERF_BASE (0xb0000000) | 182 | #define BCM_6328_PERF_BASE (0xb0000000) |
183 | #define BCM_6328_TIMER_BASE (0xb0000040) | 183 | #define BCM_6328_TIMER_BASE (0xb0000040) |
184 | #define BCM_6328_WDT_BASE (0xb000005c) | 184 | #define BCM_6328_WDT_BASE (0xb000005c) |
185 | #define BCM_6328_UART0_BASE (0xb0000100) | 185 | #define BCM_6328_UART0_BASE (0xb0000100) |
186 | #define BCM_6328_UART1_BASE (0xb0000120) | 186 | #define BCM_6328_UART1_BASE (0xb0000120) |
187 | #define BCM_6328_GPIO_BASE (0xb0000080) | 187 | #define BCM_6328_GPIO_BASE (0xb0000080) |
188 | #define BCM_6328_SPI_BASE (0xdeadbeef) | 188 | #define BCM_6328_SPI_BASE (0xdeadbeef) |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h index 03a54df5fb86..7033144aab2d 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h | |||
@@ -88,7 +88,7 @@ | |||
88 | #define bcm_mpi_readl(o) bcm_rset_readl(RSET_MPI, (o)) | 88 | #define bcm_mpi_readl(o) bcm_rset_readl(RSET_MPI, (o)) |
89 | #define bcm_mpi_writel(v, o) bcm_rset_writel(RSET_MPI, (v), (o)) | 89 | #define bcm_mpi_writel(v, o) bcm_rset_writel(RSET_MPI, (v), (o)) |
90 | #define bcm_pcmcia_readl(o) bcm_rset_readl(RSET_PCMCIA, (o)) | 90 | #define bcm_pcmcia_readl(o) bcm_rset_readl(RSET_PCMCIA, (o)) |
91 | #define bcm_pcmcia_writel(v, o) bcm_rset_writel(RSET_PCMCIA, (v), (o)) | 91 | #define bcm_pcmcia_writel(v, o) bcm_rset_writel(RSET_PCMCIA, (v), (o)) |
92 | #define bcm_pcie_readl(o) bcm_rset_readl(RSET_PCIE, (o)) | 92 | #define bcm_pcie_readl(o) bcm_rset_readl(RSET_PCIE, (o)) |
93 | #define bcm_pcie_writel(v, o) bcm_rset_writel(RSET_PCIE, (v), (o)) | 93 | #define bcm_pcie_writel(v, o) bcm_rset_writel(RSET_PCIE, (v), (o)) |
94 | #define bcm_sdram_readl(o) bcm_rset_readl(RSET_SDRAM, (o)) | 94 | #define bcm_sdram_readl(o) bcm_rset_readl(RSET_SDRAM, (o)) |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_iudma.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_iudma.h index a5bbff31c898..1e89df7244bd 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_iudma.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_iudma.h | |||
@@ -19,7 +19,7 @@ struct bcm_enet_desc { | |||
19 | #define DMADESC_SOP_MASK (1 << 13) | 19 | #define DMADESC_SOP_MASK (1 << 13) |
20 | #define DMADESC_ESOP_MASK (DMADESC_EOP_MASK | DMADESC_SOP_MASK) | 20 | #define DMADESC_ESOP_MASK (DMADESC_EOP_MASK | DMADESC_SOP_MASK) |
21 | #define DMADESC_WRAP_MASK (1 << 12) | 21 | #define DMADESC_WRAP_MASK (1 << 12) |
22 | #define DMADESC_USB_NOZERO_MASK (1 << 1) | 22 | #define DMADESC_USB_NOZERO_MASK (1 << 1) |
23 | #define DMADESC_USB_ZERO_MASK (1 << 0) | 23 | #define DMADESC_USB_ZERO_MASK (1 << 0) |
24 | 24 | ||
25 | /* status */ | 25 | /* status */ |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h index c3eeb90b480a..81b4702f792a 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | |||
@@ -143,7 +143,7 @@ | |||
143 | CKCTL_6368_NAND_EN | \ | 143 | CKCTL_6368_NAND_EN | \ |
144 | CKCTL_6368_IPSEC_EN) | 144 | CKCTL_6368_IPSEC_EN) |
145 | 145 | ||
146 | /* System PLL Control register */ | 146 | /* System PLL Control register */ |
147 | #define PERF_SYS_PLL_CTL_REG 0x8 | 147 | #define PERF_SYS_PLL_CTL_REG 0x8 |
148 | #define SYS_PLL_SOFT_RESET 0x1 | 148 | #define SYS_PLL_SOFT_RESET 0x1 |
149 | 149 | ||
@@ -219,7 +219,7 @@ | |||
219 | #define SOFTRESET_6338_DMAMEM_MASK (1 << 6) | 219 | #define SOFTRESET_6338_DMAMEM_MASK (1 << 6) |
220 | #define SOFTRESET_6338_SAR_MASK (1 << 7) | 220 | #define SOFTRESET_6338_SAR_MASK (1 << 7) |
221 | #define SOFTRESET_6338_ACLC_MASK (1 << 8) | 221 | #define SOFTRESET_6338_ACLC_MASK (1 << 8) |
222 | #define SOFTRESET_6338_ADSLMIPSPLL_MASK (1 << 10) | 222 | #define SOFTRESET_6338_ADSLMIPSPLL_MASK (1 << 10) |
223 | #define SOFTRESET_6338_ALL (SOFTRESET_6338_SPI_MASK | \ | 223 | #define SOFTRESET_6338_ALL (SOFTRESET_6338_SPI_MASK | \ |
224 | SOFTRESET_6338_ENET_MASK | \ | 224 | SOFTRESET_6338_ENET_MASK | \ |
225 | SOFTRESET_6338_USBH_MASK | \ | 225 | SOFTRESET_6338_USBH_MASK | \ |
@@ -238,7 +238,7 @@ | |||
238 | #define SOFTRESET_6348_DMAMEM_MASK (1 << 6) | 238 | #define SOFTRESET_6348_DMAMEM_MASK (1 << 6) |
239 | #define SOFTRESET_6348_SAR_MASK (1 << 7) | 239 | #define SOFTRESET_6348_SAR_MASK (1 << 7) |
240 | #define SOFTRESET_6348_ACLC_MASK (1 << 8) | 240 | #define SOFTRESET_6348_ACLC_MASK (1 << 8) |
241 | #define SOFTRESET_6348_ADSLMIPSPLL_MASK (1 << 10) | 241 | #define SOFTRESET_6348_ADSLMIPSPLL_MASK (1 << 10) |
242 | 242 | ||
243 | #define SOFTRESET_6348_ALL (SOFTRESET_6348_SPI_MASK | \ | 243 | #define SOFTRESET_6348_ALL (SOFTRESET_6348_SPI_MASK | \ |
244 | SOFTRESET_6348_ENET_MASK | \ | 244 | SOFTRESET_6348_ENET_MASK | \ |
@@ -560,7 +560,7 @@ | |||
560 | 560 | ||
561 | 561 | ||
562 | #define GPIO_PINMUX_OTHR_REG 0x24 | 562 | #define GPIO_PINMUX_OTHR_REG 0x24 |
563 | #define GPIO_PINMUX_OTHR_6328_USB_SHIFT 12 | 563 | #define GPIO_PINMUX_OTHR_6328_USB_SHIFT 12 |
564 | #define GPIO_PINMUX_OTHR_6328_USB_MASK (3 << GPIO_PINMUX_OTHR_6328_USB_SHIFT) | 564 | #define GPIO_PINMUX_OTHR_6328_USB_MASK (3 << GPIO_PINMUX_OTHR_6328_USB_SHIFT) |
565 | #define GPIO_PINMUX_OTHR_6328_USB_HOST (1 << GPIO_PINMUX_OTHR_6328_USB_SHIFT) | 565 | #define GPIO_PINMUX_OTHR_6328_USB_HOST (1 << GPIO_PINMUX_OTHR_6328_USB_SHIFT) |
566 | #define GPIO_PINMUX_OTHR_6328_USB_DEV (2 << GPIO_PINMUX_OTHR_6328_USB_SHIFT) | 566 | #define GPIO_PINMUX_OTHR_6328_USB_DEV (2 << GPIO_PINMUX_OTHR_6328_USB_SHIFT) |
@@ -572,12 +572,12 @@ | |||
572 | /* those bits must be kept as read in gpio basemode register*/ | 572 | /* those bits must be kept as read in gpio basemode register*/ |
573 | 573 | ||
574 | #define GPIO_STRAPBUS_REG 0x40 | 574 | #define GPIO_STRAPBUS_REG 0x40 |
575 | #define STRAPBUS_6358_BOOT_SEL_PARALLEL (1 << 1) | 575 | #define STRAPBUS_6358_BOOT_SEL_PARALLEL (1 << 1) |
576 | #define STRAPBUS_6358_BOOT_SEL_SERIAL (0 << 1) | 576 | #define STRAPBUS_6358_BOOT_SEL_SERIAL (0 << 1) |
577 | #define STRAPBUS_6368_BOOT_SEL_MASK 0x3 | 577 | #define STRAPBUS_6368_BOOT_SEL_MASK 0x3 |
578 | #define STRAPBUS_6368_BOOT_SEL_NAND 0 | 578 | #define STRAPBUS_6368_BOOT_SEL_NAND 0 |
579 | #define STRAPBUS_6368_BOOT_SEL_SERIAL 1 | 579 | #define STRAPBUS_6368_BOOT_SEL_SERIAL 1 |
580 | #define STRAPBUS_6368_BOOT_SEL_PARALLEL 3 | 580 | #define STRAPBUS_6368_BOOT_SEL_PARALLEL 3 |
581 | 581 | ||
582 | 582 | ||
583 | /************************************************************************* | 583 | /************************************************************************* |
@@ -812,7 +812,7 @@ | |||
812 | #define USBH_PRIV_SWAP_OHCI_DATA_MASK (1 << USBH_PRIV_SWAP_OHCI_DATA_SHIFT) | 812 | #define USBH_PRIV_SWAP_OHCI_DATA_MASK (1 << USBH_PRIV_SWAP_OHCI_DATA_SHIFT) |
813 | 813 | ||
814 | #define USBH_PRIV_UTMI_CTL_6368_REG 0x10 | 814 | #define USBH_PRIV_UTMI_CTL_6368_REG 0x10 |
815 | #define USBH_PRIV_UTMI_CTL_NODRIV_SHIFT 12 | 815 | #define USBH_PRIV_UTMI_CTL_NODRIV_SHIFT 12 |
816 | #define USBH_PRIV_UTMI_CTL_NODRIV_MASK (0xf << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT) | 816 | #define USBH_PRIV_UTMI_CTL_NODRIV_MASK (0xf << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT) |
817 | #define USBH_PRIV_UTMI_CTL_HOSTB_SHIFT 0 | 817 | #define USBH_PRIV_UTMI_CTL_HOSTB_SHIFT 0 |
818 | #define USBH_PRIV_UTMI_CTL_HOSTB_MASK (0xf << USBH_PRIV_UTMI_CTL_HOSTB_SHIFT) | 818 | #define USBH_PRIV_UTMI_CTL_HOSTB_MASK (0xf << USBH_PRIV_UTMI_CTL_HOSTB_SHIFT) |
@@ -841,7 +841,7 @@ | |||
841 | #define USBD_CONTROL_INIT_SEL_MASK (0xf << USBD_CONTROL_INIT_SEL_SHIFT) | 841 | #define USBD_CONTROL_INIT_SEL_MASK (0xf << USBD_CONTROL_INIT_SEL_SHIFT) |
842 | #define USBD_CONTROL_FIFO_RESET_SHIFT 6 | 842 | #define USBD_CONTROL_FIFO_RESET_SHIFT 6 |
843 | #define USBD_CONTROL_FIFO_RESET_MASK (3 << USBD_CONTROL_FIFO_RESET_SHIFT) | 843 | #define USBD_CONTROL_FIFO_RESET_MASK (3 << USBD_CONTROL_FIFO_RESET_SHIFT) |
844 | #define USBD_CONTROL_SETUPERRLOCK_SHIFT 5 | 844 | #define USBD_CONTROL_SETUPERRLOCK_SHIFT 5 |
845 | #define USBD_CONTROL_SETUPERRLOCK_MASK (1 << USBD_CONTROL_SETUPERRLOCK_SHIFT) | 845 | #define USBD_CONTROL_SETUPERRLOCK_MASK (1 << USBD_CONTROL_SETUPERRLOCK_SHIFT) |
846 | #define USBD_CONTROL_DONE_CSRS_SHIFT 0 | 846 | #define USBD_CONTROL_DONE_CSRS_SHIFT 0 |
847 | #define USBD_CONTROL_DONE_CSRS_MASK (1 << USBD_CONTROL_DONE_CSRS_SHIFT) | 847 | #define USBD_CONTROL_DONE_CSRS_MASK (1 << USBD_CONTROL_DONE_CSRS_SHIFT) |
@@ -852,7 +852,7 @@ | |||
852 | #define USBD_STRAPS_APP_SELF_PWR_MASK (1 << USBD_STRAPS_APP_SELF_PWR_SHIFT) | 852 | #define USBD_STRAPS_APP_SELF_PWR_MASK (1 << USBD_STRAPS_APP_SELF_PWR_SHIFT) |
853 | #define USBD_STRAPS_APP_DISCON_SHIFT 9 | 853 | #define USBD_STRAPS_APP_DISCON_SHIFT 9 |
854 | #define USBD_STRAPS_APP_DISCON_MASK (1 << USBD_STRAPS_APP_DISCON_SHIFT) | 854 | #define USBD_STRAPS_APP_DISCON_MASK (1 << USBD_STRAPS_APP_DISCON_SHIFT) |
855 | #define USBD_STRAPS_APP_CSRPRGSUP_SHIFT 8 | 855 | #define USBD_STRAPS_APP_CSRPRGSUP_SHIFT 8 |
856 | #define USBD_STRAPS_APP_CSRPRGSUP_MASK (1 << USBD_STRAPS_APP_CSRPRGSUP_SHIFT) | 856 | #define USBD_STRAPS_APP_CSRPRGSUP_MASK (1 << USBD_STRAPS_APP_CSRPRGSUP_SHIFT) |
857 | #define USBD_STRAPS_APP_RMTWKUP_SHIFT 6 | 857 | #define USBD_STRAPS_APP_RMTWKUP_SHIFT 6 |
858 | #define USBD_STRAPS_APP_RMTWKUP_MASK (1 << USBD_STRAPS_APP_RMTWKUP_SHIFT) | 858 | #define USBD_STRAPS_APP_RMTWKUP_MASK (1 << USBD_STRAPS_APP_RMTWKUP_SHIFT) |
@@ -943,7 +943,7 @@ | |||
943 | #define USBD_EPNUM_TYPEMAP_REG 0x50 | 943 | #define USBD_EPNUM_TYPEMAP_REG 0x50 |
944 | #define USBD_EPNUM_TYPEMAP_TYPE_SHIFT 8 | 944 | #define USBD_EPNUM_TYPEMAP_TYPE_SHIFT 8 |
945 | #define USBD_EPNUM_TYPEMAP_TYPE_MASK (0x3 << USBD_EPNUM_TYPEMAP_TYPE_SHIFT) | 945 | #define USBD_EPNUM_TYPEMAP_TYPE_MASK (0x3 << USBD_EPNUM_TYPEMAP_TYPE_SHIFT) |
946 | #define USBD_EPNUM_TYPEMAP_DMA_CH_SHIFT 0 | 946 | #define USBD_EPNUM_TYPEMAP_DMA_CH_SHIFT 0 |
947 | #define USBD_EPNUM_TYPEMAP_DMA_CH_MASK (0xf << USBD_EPNUM_TYPEMAP_DMACH_SHIFT) | 947 | #define USBD_EPNUM_TYPEMAP_DMA_CH_MASK (0xf << USBD_EPNUM_TYPEMAP_DMACH_SHIFT) |
948 | 948 | ||
949 | /* Misc per-endpoint settings */ | 949 | /* Misc per-endpoint settings */ |
@@ -1048,8 +1048,8 @@ | |||
1048 | #define MPI_L2PREMAP_IS_CARDBUS_MASK (1 << 2) | 1048 | #define MPI_L2PREMAP_IS_CARDBUS_MASK (1 << 2) |
1049 | 1049 | ||
1050 | #define MPI_PCIMODESEL_REG 0x144 | 1050 | #define MPI_PCIMODESEL_REG 0x144 |
1051 | #define MPI_PCIMODESEL_BAR1_NOSWAP_MASK (1 << 0) | 1051 | #define MPI_PCIMODESEL_BAR1_NOSWAP_MASK (1 << 0) |
1052 | #define MPI_PCIMODESEL_BAR2_NOSWAP_MASK (1 << 1) | 1052 | #define MPI_PCIMODESEL_BAR2_NOSWAP_MASK (1 << 1) |
1053 | #define MPI_PCIMODESEL_EXT_ARB_MASK (1 << 2) | 1053 | #define MPI_PCIMODESEL_EXT_ARB_MASK (1 << 2) |
1054 | #define MPI_PCIMODESEL_PREFETCH_SHIFT 4 | 1054 | #define MPI_PCIMODESEL_PREFETCH_SHIFT 4 |
1055 | #define MPI_PCIMODESEL_PREFETCH_MASK (0xf << MPI_PCIMODESEL_PREFETCH_SHIFT) | 1055 | #define MPI_PCIMODESEL_PREFETCH_MASK (0xf << MPI_PCIMODESEL_PREFETCH_SHIFT) |
diff --git a/arch/mips/include/asm/mach-bcm63xx/irq.h b/arch/mips/include/asm/mach-bcm63xx/irq.h index 9332e788a5c9..2bbfc8d1f307 100644 --- a/arch/mips/include/asm/mach-bcm63xx/irq.h +++ b/arch/mips/include/asm/mach-bcm63xx/irq.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_BCM63XX_IRQ_H | 1 | #ifndef __ASM_MACH_BCM63XX_IRQ_H |
2 | #define __ASM_MACH_BCM63XX_IRQ_H | 2 | #define __ASM_MACH_BCM63XX_IRQ_H |
3 | 3 | ||
4 | #define NR_IRQS 128 | 4 | #define NR_IRQS 128 |
5 | #define MIPS_CPU_IRQ_BASE 0 | 5 | #define MIPS_CPU_IRQ_BASE 0 |
6 | 6 | ||
7 | #endif | 7 | #endif |
diff --git a/arch/mips/include/asm/mach-cavium-octeon/irq.h b/arch/mips/include/asm/mach-cavium-octeon/irq.h index 502bb1815ae8..60fc4c347c44 100644 --- a/arch/mips/include/asm/mach-cavium-octeon/irq.h +++ b/arch/mips/include/asm/mach-cavium-octeon/irq.h | |||
@@ -51,8 +51,8 @@ enum octeon_irq { | |||
51 | /* 256 - 511 represent the MSI interrupts 0-255 */ | 51 | /* 256 - 511 represent the MSI interrupts 0-255 */ |
52 | #define OCTEON_IRQ_MSI_BIT0 (256) | 52 | #define OCTEON_IRQ_MSI_BIT0 (256) |
53 | 53 | ||
54 | #define OCTEON_IRQ_MSI_LAST (OCTEON_IRQ_MSI_BIT0 + 255) | 54 | #define OCTEON_IRQ_MSI_LAST (OCTEON_IRQ_MSI_BIT0 + 255) |
55 | #define OCTEON_IRQ_LAST (OCTEON_IRQ_MSI_LAST + 1) | 55 | #define OCTEON_IRQ_LAST (OCTEON_IRQ_MSI_LAST + 1) |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | #endif | 58 | #endif |
diff --git a/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h b/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h index dedef7d2b01f..1e7dbb192657 100644 --- a/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h +++ b/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define CP0_PRID_OCTEON_PASS1 0x000d0000 | 16 | #define CP0_PRID_OCTEON_PASS1 0x000d0000 |
17 | #define CP0_PRID_OCTEON_CN30XX 0x000d0200 | 17 | #define CP0_PRID_OCTEON_CN30XX 0x000d0200 |
18 | 18 | ||
19 | .macro kernel_entry_setup | 19 | .macro kernel_entry_setup |
20 | # Registers set by bootloader: | 20 | # Registers set by bootloader: |
21 | # (only 32 bits set by bootloader, all addresses are physical | 21 | # (only 32 bits set by bootloader, all addresses are physical |
22 | # addresses, and need to have the appropriate memory region set | 22 | # addresses, and need to have the appropriate memory region set |
@@ -28,12 +28,12 @@ | |||
28 | .set push | 28 | .set push |
29 | .set arch=octeon | 29 | .set arch=octeon |
30 | # Read the cavium mem control register | 30 | # Read the cavium mem control register |
31 | dmfc0 v0, CP0_CVMMEMCTL_REG | 31 | dmfc0 v0, CP0_CVMMEMCTL_REG |
32 | # Clear the lower 6 bits, the CVMSEG size | 32 | # Clear the lower 6 bits, the CVMSEG size |
33 | dins v0, $0, 0, 6 | 33 | dins v0, $0, 0, 6 |
34 | ori v0, CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE | 34 | ori v0, CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE |
35 | dmtc0 v0, CP0_CVMMEMCTL_REG # Write the cavium mem control register | 35 | dmtc0 v0, CP0_CVMMEMCTL_REG # Write the cavium mem control register |
36 | dmfc0 v0, CP0_CVMCTL_REG # Read the cavium control register | 36 | dmfc0 v0, CP0_CVMCTL_REG # Read the cavium control register |
37 | #ifdef CONFIG_CAVIUM_OCTEON_HW_FIX_UNALIGNED | 37 | #ifdef CONFIG_CAVIUM_OCTEON_HW_FIX_UNALIGNED |
38 | # Disable unaligned load/store support but leave HW fixup enabled | 38 | # Disable unaligned load/store support but leave HW fixup enabled |
39 | or v0, v0, 0x5001 | 39 | or v0, v0, 0x5001 |
@@ -69,14 +69,14 @@ skip: | |||
69 | and v0, v0, v1 | 69 | and v0, v0, v1 |
70 | ori v0, v0, (6 << 7) | 70 | ori v0, v0, (6 << 7) |
71 | # Write the cavium control register | 71 | # Write the cavium control register |
72 | dmtc0 v0, CP0_CVMCTL_REG | 72 | dmtc0 v0, CP0_CVMCTL_REG |
73 | sync | 73 | sync |
74 | # Flush dcache after config change | 74 | # Flush dcache after config change |
75 | cache 9, 0($0) | 75 | cache 9, 0($0) |
76 | # Get my core id | 76 | # Get my core id |
77 | rdhwr v0, $0 | 77 | rdhwr v0, $0 |
78 | # Jump the master to kernel_entry | 78 | # Jump the master to kernel_entry |
79 | bne a2, zero, octeon_main_processor | 79 | bne a2, zero, octeon_main_processor |
80 | nop | 80 | nop |
81 | 81 | ||
82 | #ifdef CONFIG_SMP | 82 | #ifdef CONFIG_SMP |
@@ -87,21 +87,21 @@ skip: | |||
87 | # | 87 | # |
88 | 88 | ||
89 | # This is the variable where the next core to boot os stored | 89 | # This is the variable where the next core to boot os stored |
90 | PTR_LA t0, octeon_processor_boot | 90 | PTR_LA t0, octeon_processor_boot |
91 | octeon_spin_wait_boot: | 91 | octeon_spin_wait_boot: |
92 | # Get the core id of the next to be booted | 92 | # Get the core id of the next to be booted |
93 | LONG_L t1, (t0) | 93 | LONG_L t1, (t0) |
94 | # Keep looping if it isn't me | 94 | # Keep looping if it isn't me |
95 | bne t1, v0, octeon_spin_wait_boot | 95 | bne t1, v0, octeon_spin_wait_boot |
96 | nop | 96 | nop |
97 | # Get my GP from the global variable | 97 | # Get my GP from the global variable |
98 | PTR_LA t0, octeon_processor_gp | 98 | PTR_LA t0, octeon_processor_gp |
99 | LONG_L gp, (t0) | 99 | LONG_L gp, (t0) |
100 | # Get my SP from the global variable | 100 | # Get my SP from the global variable |
101 | PTR_LA t0, octeon_processor_sp | 101 | PTR_LA t0, octeon_processor_sp |
102 | LONG_L sp, (t0) | 102 | LONG_L sp, (t0) |
103 | # Set the SP global variable to zero so the master knows we've started | 103 | # Set the SP global variable to zero so the master knows we've started |
104 | LONG_S zero, (t0) | 104 | LONG_S zero, (t0) |
105 | #ifdef __OCTEON__ | 105 | #ifdef __OCTEON__ |
106 | syncw | 106 | syncw |
107 | syncw | 107 | syncw |
@@ -130,7 +130,7 @@ octeon_main_processor: | |||
130 | /* | 130 | /* |
131 | * Do SMP slave processor setup necessary before we can savely execute C code. | 131 | * Do SMP slave processor setup necessary before we can savely execute C code. |
132 | */ | 132 | */ |
133 | .macro smp_slave_setup | 133 | .macro smp_slave_setup |
134 | .endm | 134 | .endm |
135 | 135 | ||
136 | #endif /* __ASM_MACH_CAVIUM_OCTEON_KERNEL_ENTRY_H */ | 136 | #endif /* __ASM_MACH_CAVIUM_OCTEON_KERNEL_ENTRY_H */ |
diff --git a/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h b/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h index babc8374e378..71d4bface1dc 100644 --- a/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h | |||
@@ -32,9 +32,9 @@ | |||
32 | #define cpu_scache_line_size() 0 | 32 | #define cpu_scache_line_size() 0 |
33 | 33 | ||
34 | #ifdef CONFIG_64BIT | 34 | #ifdef CONFIG_64BIT |
35 | #define cpu_has_llsc 0 | 35 | #define cpu_has_llsc 0 |
36 | #else | 36 | #else |
37 | #define cpu_has_llsc 1 | 37 | #define cpu_has_llsc 1 |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #define cpu_has_mips16 0 | 40 | #define cpu_has_mips16 0 |
diff --git a/arch/mips/include/asm/mach-cobalt/mach-gt64120.h b/arch/mips/include/asm/mach-cobalt/mach-gt64120.h index f8afec3f2943..6fe475b9e965 100644 --- a/arch/mips/include/asm/mach-cobalt/mach-gt64120.h +++ b/arch/mips/include/asm/mach-cobalt/mach-gt64120.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2006 Yoichi Yuasa <yuasa@linux-mips.org> | 2 | * Copyright (C) 2006 Yoichi Yuasa <yuasa@linux-mips.org> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/include/asm/mach-db1x00/bcsr.h b/arch/mips/include/asm/mach-db1x00/bcsr.h index 16f1cf5982b9..3c3ed4ae45e2 100644 --- a/arch/mips/include/asm/mach-db1x00/bcsr.h +++ b/arch/mips/include/asm/mach-db1x00/bcsr.h | |||
@@ -110,7 +110,7 @@ enum bcsr_whoami_boards { | |||
110 | BCSR_WHOAMI_DB1300, | 110 | BCSR_WHOAMI_DB1300, |
111 | }; | 111 | }; |
112 | 112 | ||
113 | /* STATUS reg. Unless otherwise noted, they're valid on all boards. | 113 | /* STATUS reg. Unless otherwise noted, they're valid on all boards. |
114 | * PB1200 = DB1200. | 114 | * PB1200 = DB1200. |
115 | */ | 115 | */ |
116 | #define BCSR_STATUS_PC0VS 0x0003 | 116 | #define BCSR_STATUS_PC0VS 0x0003 |
@@ -190,7 +190,7 @@ enum bcsr_whoami_boards { | |||
190 | #define BCSR_RESETS_OTPWRPROT 0x1000 /* DB1300 */ | 190 | #define BCSR_RESETS_OTPWRPROT 0x1000 /* DB1300 */ |
191 | #define BCSR_RESETS_OTPCSB 0x2000 /* DB1300 */ | 191 | #define BCSR_RESETS_OTPCSB 0x2000 /* DB1300 */ |
192 | #define BCSR_RESETS_OTGPWR 0x4000 /* DB1300 */ | 192 | #define BCSR_RESETS_OTGPWR 0x4000 /* DB1300 */ |
193 | #define BCSR_RESETS_USBHPWR 0x8000 /* DB1300 */ | 193 | #define BCSR_RESETS_USBHPWR 0x8000 /* DB1300 */ |
194 | 194 | ||
195 | #define BCSR_BOARD_LCDVEE 0x0001 | 195 | #define BCSR_BOARD_LCDVEE 0x0001 |
196 | #define BCSR_BOARD_LCDVDD 0x0002 | 196 | #define BCSR_BOARD_LCDVDD 0x0002 |
diff --git a/arch/mips/include/asm/mach-db1x00/db1200.h b/arch/mips/include/asm/mach-db1x00/db1200.h index b2a8319521e5..d3cce7326dd4 100644 --- a/arch/mips/include/asm/mach-db1x00/db1200.h +++ b/arch/mips/include/asm/mach-db1x00/db1200.h | |||
@@ -63,7 +63,7 @@ | |||
63 | * the interrupt define and subtracting the DB1200_INT_BEGIN value. | 63 | * the interrupt define and subtracting the DB1200_INT_BEGIN value. |
64 | * | 64 | * |
65 | * Example: IDE bis pos is = 64 - 64 | 65 | * Example: IDE bis pos is = 64 - 64 |
66 | * ETH bit pos is = 65 - 64 | 66 | * ETH bit pos is = 65 - 64 |
67 | */ | 67 | */ |
68 | enum external_db1200_ints { | 68 | enum external_db1200_ints { |
69 | DB1200_INT_BEGIN = AU1000_MAX_INTR + 1, | 69 | DB1200_INT_BEGIN = AU1000_MAX_INTR + 1, |
diff --git a/arch/mips/include/asm/mach-db1x00/db1300.h b/arch/mips/include/asm/mach-db1x00/db1300.h index 7fe5fb3ba877..3d1ede46f059 100644 --- a/arch/mips/include/asm/mach-db1x00/db1300.h +++ b/arch/mips/include/asm/mach-db1x00/db1300.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #define DB1300_SD1_INSERT_INT (DB1300_FIRST_INT + 12) | 21 | #define DB1300_SD1_INSERT_INT (DB1300_FIRST_INT + 12) |
22 | #define DB1300_SD1_EJECT_INT (DB1300_FIRST_INT + 13) | 22 | #define DB1300_SD1_EJECT_INT (DB1300_FIRST_INT + 13) |
23 | #define DB1300_OTG_VBUS_OC_INT (DB1300_FIRST_INT + 14) | 23 | #define DB1300_OTG_VBUS_OC_INT (DB1300_FIRST_INT + 14) |
24 | #define DB1300_HOST_VBUS_OC_INT (DB1300_FIRST_INT + 15) | 24 | #define DB1300_HOST_VBUS_OC_INT (DB1300_FIRST_INT + 15) |
25 | #define DB1300_LAST_INT (DB1300_FIRST_INT + 15) | 25 | #define DB1300_LAST_INT (DB1300_FIRST_INT + 15) |
26 | 26 | ||
27 | /* SMSC9210 CS */ | 27 | /* SMSC9210 CS */ |
diff --git a/arch/mips/include/asm/mach-emma2rh/irq.h b/arch/mips/include/asm/mach-emma2rh/irq.h index 5439eb856461..2f7155dade29 100644 --- a/arch/mips/include/asm/mach-emma2rh/irq.h +++ b/arch/mips/include/asm/mach-emma2rh/irq.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #ifndef __ASM_MACH_EMMA2RH_IRQ_H | 8 | #ifndef __ASM_MACH_EMMA2RH_IRQ_H |
9 | #define __ASM_MACH_EMMA2RH_IRQ_H | 9 | #define __ASM_MACH_EMMA2RH_IRQ_H |
10 | 10 | ||
11 | #define NR_IRQS 256 | 11 | #define NR_IRQS 256 |
12 | 12 | ||
13 | #include_next <irq.h> | 13 | #include_next <irq.h> |
14 | 14 | ||
diff --git a/arch/mips/include/asm/mach-generic/cpu-feature-overrides.h b/arch/mips/include/asm/mach-generic/cpu-feature-overrides.h index 7c185bb06f13..42be9e9ced2c 100644 --- a/arch/mips/include/asm/mach-generic/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-generic/cpu-feature-overrides.h | |||
@@ -8,6 +8,6 @@ | |||
8 | #ifndef __ASM_MACH_GENERIC_CPU_FEATURE_OVERRIDES_H | 8 | #ifndef __ASM_MACH_GENERIC_CPU_FEATURE_OVERRIDES_H |
9 | #define __ASM_MACH_GENERIC_CPU_FEATURE_OVERRIDES_H | 9 | #define __ASM_MACH_GENERIC_CPU_FEATURE_OVERRIDES_H |
10 | 10 | ||
11 | /* Intentionally empty file ... */ | 11 | /* Intentionally empty file ... */ |
12 | 12 | ||
13 | #endif /* __ASM_MACH_GENERIC_CPU_FEATURE_OVERRIDES_H */ | 13 | #endif /* __ASM_MACH_GENERIC_CPU_FEATURE_OVERRIDES_H */ |
diff --git a/arch/mips/include/asm/mach-generic/floppy.h b/arch/mips/include/asm/mach-generic/floppy.h index a38f4d43e5e5..5b5cd689a2f7 100644 --- a/arch/mips/include/asm/mach-generic/floppy.h +++ b/arch/mips/include/asm/mach-generic/floppy.h | |||
@@ -98,7 +98,7 @@ static inline void fd_disable_irq(void) | |||
98 | static inline int fd_request_irq(void) | 98 | static inline int fd_request_irq(void) |
99 | { | 99 | { |
100 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | 100 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
101 | 0, "floppy", NULL); | 101 | 0, "floppy", NULL); |
102 | } | 102 | } |
103 | 103 | ||
104 | static inline void fd_free_irq(void) | 104 | static inline void fd_free_irq(void) |
@@ -106,7 +106,7 @@ static inline void fd_free_irq(void) | |||
106 | free_irq(FLOPPY_IRQ, NULL); | 106 | free_irq(FLOPPY_IRQ, NULL); |
107 | } | 107 | } |
108 | 108 | ||
109 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); | 109 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); |
110 | 110 | ||
111 | 111 | ||
112 | static inline unsigned long fd_getfdaddr1(void) | 112 | static inline unsigned long fd_getfdaddr1(void) |
diff --git a/arch/mips/include/asm/mach-generic/ide.h b/arch/mips/include/asm/mach-generic/ide.h index 9c93a5b36f2a..affa66f5c2da 100644 --- a/arch/mips/include/asm/mach-generic/ide.h +++ b/arch/mips/include/asm/mach-generic/ide.h | |||
@@ -51,7 +51,7 @@ static inline void __ide_flush_dcache_range(unsigned long addr, unsigned long si | |||
51 | /* | 51 | /* |
52 | * insw() and gang might be called with interrupts disabled, so we can't | 52 | * insw() and gang might be called with interrupts disabled, so we can't |
53 | * send IPIs for flushing due to the potencial of deadlocks, see the comment | 53 | * send IPIs for flushing due to the potencial of deadlocks, see the comment |
54 | * above smp_call_function() in arch/mips/kernel/smp.c. We work around the | 54 | * above smp_call_function() in arch/mips/kernel/smp.c. We work around the |
55 | * problem by disabling preemption so we know we actually perform the flush | 55 | * problem by disabling preemption so we know we actually perform the flush |
56 | * on the processor that actually has the lines to be flushed which hopefully | 56 | * on the processor that actually has the lines to be flushed which hopefully |
57 | * is even better for performance anyway. | 57 | * is even better for performance anyway. |
@@ -123,7 +123,7 @@ static inline void __ide_mm_outsl(void __iomem * port, void *addr, u32 count) | |||
123 | __ide_flush_epilogue(); | 123 | __ide_flush_epilogue(); |
124 | } | 124 | } |
125 | 125 | ||
126 | /* ide_insw calls insw, not __ide_insw. Why? */ | 126 | /* ide_insw calls insw, not __ide_insw. Why? */ |
127 | #undef insw | 127 | #undef insw |
128 | #undef insl | 128 | #undef insl |
129 | #undef outsw | 129 | #undef outsw |
diff --git a/arch/mips/include/asm/mach-generic/irq.h b/arch/mips/include/asm/mach-generic/irq.h index e014264b2be2..139cd200e79d 100644 --- a/arch/mips/include/asm/mach-generic/irq.h +++ b/arch/mips/include/asm/mach-generic/irq.h | |||
@@ -9,12 +9,12 @@ | |||
9 | #define __ASM_MACH_GENERIC_IRQ_H | 9 | #define __ASM_MACH_GENERIC_IRQ_H |
10 | 10 | ||
11 | #ifndef NR_IRQS | 11 | #ifndef NR_IRQS |
12 | #define NR_IRQS 128 | 12 | #define NR_IRQS 128 |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #ifdef CONFIG_I8259 | 15 | #ifdef CONFIG_I8259 |
16 | #ifndef I8259A_IRQ_BASE | 16 | #ifndef I8259A_IRQ_BASE |
17 | #define I8259A_IRQ_BASE 0 | 17 | #define I8259A_IRQ_BASE 0 |
18 | #endif | 18 | #endif |
19 | #endif | 19 | #endif |
20 | 20 | ||
diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h index d7a9efd3a5ce..73d717a75cb0 100644 --- a/arch/mips/include/asm/mach-generic/spaces.h +++ b/arch/mips/include/asm/mach-generic/spaces.h | |||
@@ -69,7 +69,7 @@ | |||
69 | #define HIGHMEM_START (_AC(1, UL) << _AC(59, UL)) | 69 | #define HIGHMEM_START (_AC(1, UL) << _AC(59, UL)) |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK)) | 72 | #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK)) |
73 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) | 73 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) |
74 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) | 74 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) |
75 | 75 | ||
diff --git a/arch/mips/include/asm/mach-ip27/kernel-entry-init.h b/arch/mips/include/asm/mach-ip27/kernel-entry-init.h index 624d66c7f290..a323efb720dc 100644 --- a/arch/mips/include/asm/mach-ip27/kernel-entry-init.h +++ b/arch/mips/include/asm/mach-ip27/kernel-entry-init.h | |||
@@ -51,8 +51,8 @@ | |||
51 | * We might not get launched at the address the kernel is linked to, | 51 | * We might not get launched at the address the kernel is linked to, |
52 | * so we jump there. | 52 | * so we jump there. |
53 | */ | 53 | */ |
54 | PTR_LA t0, 0f | 54 | PTR_LA t0, 0f |
55 | jr t0 | 55 | jr t0 |
56 | 0: | 56 | 0: |
57 | .endm | 57 | .endm |
58 | 58 | ||
diff --git a/arch/mips/include/asm/mach-ip27/mmzone.h b/arch/mips/include/asm/mach-ip27/mmzone.h index 986a3b9b59a7..ebc9377ff876 100644 --- a/arch/mips/include/asm/mach-ip27/mmzone.h +++ b/arch/mips/include/asm/mach-ip27/mmzone.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | #define pa_to_nid(addr) NASID_TO_COMPACT_NODEID(NASID_GET(addr)) | 8 | #define pa_to_nid(addr) NASID_TO_COMPACT_NODEID(NASID_GET(addr)) |
9 | 9 | ||
10 | #define LEVELS_PER_SLICE 128 | 10 | #define LEVELS_PER_SLICE 128 |
11 | 11 | ||
12 | struct slice_data { | 12 | struct slice_data { |
13 | unsigned long irq_enable_mask[2]; | 13 | unsigned long irq_enable_mask[2]; |
diff --git a/arch/mips/include/asm/mach-ip27/topology.h b/arch/mips/include/asm/mach-ip27/topology.h index b2cf641f206f..defd135e7ac8 100644 --- a/arch/mips/include/asm/mach-ip27/topology.h +++ b/arch/mips/include/asm/mach-ip27/topology.h | |||
@@ -34,7 +34,7 @@ extern int pcibus_to_node(struct pci_bus *); | |||
34 | 34 | ||
35 | extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES]; | 35 | extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES]; |
36 | 36 | ||
37 | #define node_distance(from, to) (__node_distances[(from)][(to)]) | 37 | #define node_distance(from, to) (__node_distances[(from)][(to)]) |
38 | 38 | ||
39 | #include <asm-generic/topology.h> | 39 | #include <asm-generic/topology.h> |
40 | 40 | ||
diff --git a/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h index 50d344ca60a8..65e9c856390d 100644 --- a/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #define cpu_has_ic_fills_f_dc 0 | 28 | #define cpu_has_ic_fills_f_dc 0 |
29 | #define cpu_has_dsp 0 | 29 | #define cpu_has_dsp 0 |
30 | #define cpu_has_dsp2 0 | 30 | #define cpu_has_dsp2 0 |
31 | #define cpu_icache_snoops_remote_store 1 | 31 | #define cpu_icache_snoops_remote_store 1 |
32 | #define cpu_has_mipsmt 0 | 32 | #define cpu_has_mipsmt 0 |
33 | #define cpu_has_userlocal 0 | 33 | #define cpu_has_userlocal 0 |
34 | 34 | ||
diff --git a/arch/mips/include/asm/mach-ip28/spaces.h b/arch/mips/include/asm/mach-ip28/spaces.h index 05aabb27e5e7..5edf05d9dad8 100644 --- a/arch/mips/include/asm/mach-ip28/spaces.h +++ b/arch/mips/include/asm/mach-ip28/spaces.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle | 6 | * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle |
7 | * Copyright (C) 2000, 2002 Maciej W. Rozycki | 7 | * Copyright (C) 2000, 2002 Maciej W. Rozycki |
8 | * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc. |
9 | * 2004 pf | 9 | * 2004 pf |
10 | */ | 10 | */ |
11 | #ifndef _ASM_MACH_IP28_SPACES_H | 11 | #ifndef _ASM_MACH_IP28_SPACES_H |
12 | #define _ASM_MACH_IP28_SPACES_H | 12 | #define _ASM_MACH_IP28_SPACES_H |
diff --git a/arch/mips/include/asm/mach-ip32/dma-coherence.h b/arch/mips/include/asm/mach-ip32/dma-coherence.h index c8fb5aacf50a..073f0c4760ba 100644 --- a/arch/mips/include/asm/mach-ip32/dma-coherence.h +++ b/arch/mips/include/asm/mach-ip32/dma-coherence.h | |||
@@ -50,7 +50,7 @@ static inline dma_addr_t plat_map_dma_mem_page(struct device *dev, | |||
50 | return pa; | 50 | return pa; |
51 | } | 51 | } |
52 | 52 | ||
53 | /* This is almost certainly wrong but it's what dma-ip32.c used to use */ | 53 | /* This is almost certainly wrong but it's what dma-ip32.c used to use */ |
54 | static inline unsigned long plat_dma_addr_to_phys(struct device *dev, | 54 | static inline unsigned long plat_dma_addr_to_phys(struct device *dev, |
55 | dma_addr_t dma_addr) | 55 | dma_addr_t dma_addr) |
56 | { | 56 | { |
diff --git a/arch/mips/include/asm/mach-ip32/war.h b/arch/mips/include/asm/mach-ip32/war.h index 7237a935a133..9807ecda5a88 100644 --- a/arch/mips/include/asm/mach-ip32/war.h +++ b/arch/mips/include/asm/mach-ip32/war.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #define MIPS4K_ICACHE_REFILL_WAR 0 | 17 | #define MIPS4K_ICACHE_REFILL_WAR 0 |
18 | #define MIPS_CACHE_SYNC_WAR 0 | 18 | #define MIPS_CACHE_SYNC_WAR 0 |
19 | #define TX49XX_ICACHE_INDEX_INV_WAR 0 | 19 | #define TX49XX_ICACHE_INDEX_INV_WAR 0 |
20 | #define ICACHE_REFILLS_WORKAROUND_WAR 1 | 20 | #define ICACHE_REFILLS_WORKAROUND_WAR 1 |
21 | #define R10000_LLSC_WAR 0 | 21 | #define R10000_LLSC_WAR 0 |
22 | #define MIPS34K_MISSED_ITLB_WAR 0 | 22 | #define MIPS34K_MISSED_ITLB_WAR 0 |
23 | 23 | ||
diff --git a/arch/mips/include/asm/mach-jazz/floppy.h b/arch/mips/include/asm/mach-jazz/floppy.h index 88b5acb75145..62aa1e287fba 100644 --- a/arch/mips/include/asm/mach-jazz/floppy.h +++ b/arch/mips/include/asm/mach-jazz/floppy.h | |||
@@ -90,7 +90,7 @@ static inline void fd_disable_irq(void) | |||
90 | static inline int fd_request_irq(void) | 90 | static inline int fd_request_irq(void) |
91 | { | 91 | { |
92 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | 92 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
93 | 0, "floppy", NULL); | 93 | 0, "floppy", NULL); |
94 | } | 94 | } |
95 | 95 | ||
96 | static inline void fd_free_irq(void) | 96 | static inline void fd_free_irq(void) |
diff --git a/arch/mips/include/asm/mach-jz4740/clock.h b/arch/mips/include/asm/mach-jz4740/clock.h index 1b7408dd0e23..16659cd76d4e 100644 --- a/arch/mips/include/asm/mach-jz4740/clock.h +++ b/arch/mips/include/asm/mach-jz4740/clock.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> | 2 | * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | * | 8 | * |
diff --git a/arch/mips/include/asm/mach-jz4740/dma.h b/arch/mips/include/asm/mach-jz4740/dma.h index a3be12183599..98b4e7c0dbae 100644 --- a/arch/mips/include/asm/mach-jz4740/dma.h +++ b/arch/mips/include/asm/mach-jz4740/dma.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ7420/JZ4740 DMA definitions | 3 | * JZ7420/JZ4740 DMA definitions |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
@@ -40,9 +40,9 @@ enum jz4740_dma_width { | |||
40 | }; | 40 | }; |
41 | 41 | ||
42 | enum jz4740_dma_transfer_size { | 42 | enum jz4740_dma_transfer_size { |
43 | JZ4740_DMA_TRANSFER_SIZE_4BYTE = 0, | 43 | JZ4740_DMA_TRANSFER_SIZE_4BYTE = 0, |
44 | JZ4740_DMA_TRANSFER_SIZE_1BYTE = 1, | 44 | JZ4740_DMA_TRANSFER_SIZE_1BYTE = 1, |
45 | JZ4740_DMA_TRANSFER_SIZE_2BYTE = 2, | 45 | JZ4740_DMA_TRANSFER_SIZE_2BYTE = 2, |
46 | JZ4740_DMA_TRANSFER_SIZE_16BYTE = 3, | 46 | JZ4740_DMA_TRANSFER_SIZE_16BYTE = 3, |
47 | JZ4740_DMA_TRANSFER_SIZE_32BYTE = 4, | 47 | JZ4740_DMA_TRANSFER_SIZE_32BYTE = 4, |
48 | }; | 48 | }; |
@@ -87,4 +87,4 @@ uint32_t jz4740_dma_get_residue(const struct jz4740_dma_chan *dma); | |||
87 | void jz4740_dma_set_complete_cb(struct jz4740_dma_chan *dma, | 87 | void jz4740_dma_set_complete_cb(struct jz4740_dma_chan *dma, |
88 | jz4740_dma_complete_callback_t cb); | 88 | jz4740_dma_complete_callback_t cb); |
89 | 89 | ||
90 | #endif /* __ASM_JZ4740_DMA_H__ */ | 90 | #endif /* __ASM_JZ4740_DMA_H__ */ |
diff --git a/arch/mips/include/asm/mach-jz4740/gpio.h b/arch/mips/include/asm/mach-jz4740/gpio.h index 1a6482ea0bb3..eaacba79cf18 100644 --- a/arch/mips/include/asm/mach-jz4740/gpio.h +++ b/arch/mips/include/asm/mach-jz4740/gpio.h | |||
@@ -198,7 +198,7 @@ uint32_t jz_gpio_port_get_value(int port, uint32_t mask); | |||
198 | #define JZ_GPIO_FUNC_MEM_ADDR14 JZ_GPIO_FUNC1 | 198 | #define JZ_GPIO_FUNC_MEM_ADDR14 JZ_GPIO_FUNC1 |
199 | #define JZ_GPIO_FUNC_MEM_ADDR15 JZ_GPIO_FUNC1 | 199 | #define JZ_GPIO_FUNC_MEM_ADDR15 JZ_GPIO_FUNC1 |
200 | #define JZ_GPIO_FUNC_MEM_ADDR16 JZ_GPIO_FUNC1 | 200 | #define JZ_GPIO_FUNC_MEM_ADDR16 JZ_GPIO_FUNC1 |
201 | #define JZ_GPIO_FUNC_LCD_CLS JZ_GPIO_FUNC1 | 201 | #define JZ_GPIO_FUNC_LCD_CLS JZ_GPIO_FUNC1 |
202 | #define JZ_GPIO_FUNC_LCD_SPL JZ_GPIO_FUNC1 | 202 | #define JZ_GPIO_FUNC_LCD_SPL JZ_GPIO_FUNC1 |
203 | #define JZ_GPIO_FUNC_MEM_DCS JZ_GPIO_FUNC1 | 203 | #define JZ_GPIO_FUNC_MEM_DCS JZ_GPIO_FUNC1 |
204 | #define JZ_GPIO_FUNC_MEM_RAS JZ_GPIO_FUNC1 | 204 | #define JZ_GPIO_FUNC_MEM_RAS JZ_GPIO_FUNC1 |
diff --git a/arch/mips/include/asm/mach-jz4740/irq.h b/arch/mips/include/asm/mach-jz4740/irq.h index 5ad1a9c113c6..df50736749c1 100644 --- a/arch/mips/include/asm/mach-jz4740/irq.h +++ b/arch/mips/include/asm/mach-jz4740/irq.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 IRQ definitions | 3 | * JZ4740 IRQ definitions |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/include/asm/mach-jz4740/platform.h b/arch/mips/include/asm/mach-jz4740/platform.h index 163e81db880d..72cfebdb5a47 100644 --- a/arch/mips/include/asm/mach-jz4740/platform.h +++ b/arch/mips/include/asm/mach-jz4740/platform.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 platform device definitions | 3 | * JZ4740 platform device definitions |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/include/asm/mach-jz4740/timer.h b/arch/mips/include/asm/mach-jz4740/timer.h index a7759fb1f73d..8750a1d04e22 100644 --- a/arch/mips/include/asm/mach-jz4740/timer.h +++ b/arch/mips/include/asm/mach-jz4740/timer.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 platform timer support | 3 | * JZ4740 platform timer support |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h b/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h index fccac3592651..98d6a2f14aaf 100644 --- a/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h +++ b/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h | |||
@@ -44,7 +44,7 @@ | |||
44 | 44 | ||
45 | /* BOOT_SEL - find what boot media we have */ | 45 | /* BOOT_SEL - find what boot media we have */ |
46 | #define BS_FLASH 0x1 | 46 | #define BS_FLASH 0x1 |
47 | #define BS_SPI 0x4 | 47 | #define BS_SPI 0x4 |
48 | 48 | ||
49 | /* global register ranges */ | 49 | /* global register ranges */ |
50 | extern __iomem void *ltq_ebu_membase; | 50 | extern __iomem void *ltq_ebu_membase; |
diff --git a/arch/mips/include/asm/mach-lantiq/war.h b/arch/mips/include/asm/mach-lantiq/war.h index b6c568c280ef..358ca979c1bd 100644 --- a/arch/mips/include/asm/mach-lantiq/war.h +++ b/arch/mips/include/asm/mach-lantiq/war.h | |||
@@ -7,17 +7,17 @@ | |||
7 | #ifndef __ASM_MIPS_MACH_LANTIQ_WAR_H | 7 | #ifndef __ASM_MIPS_MACH_LANTIQ_WAR_H |
8 | #define __ASM_MIPS_MACH_LANTIQ_WAR_H | 8 | #define __ASM_MIPS_MACH_LANTIQ_WAR_H |
9 | 9 | ||
10 | #define R4600_V1_INDEX_ICACHEOP_WAR 0 | 10 | #define R4600_V1_INDEX_ICACHEOP_WAR 0 |
11 | #define R4600_V1_HIT_CACHEOP_WAR 0 | 11 | #define R4600_V1_HIT_CACHEOP_WAR 0 |
12 | #define R4600_V2_HIT_CACHEOP_WAR 0 | 12 | #define R4600_V2_HIT_CACHEOP_WAR 0 |
13 | #define R5432_CP0_INTERRUPT_WAR 0 | 13 | #define R5432_CP0_INTERRUPT_WAR 0 |
14 | #define BCM1250_M3_WAR 0 | 14 | #define BCM1250_M3_WAR 0 |
15 | #define SIBYTE_1956_WAR 0 | 15 | #define SIBYTE_1956_WAR 0 |
16 | #define MIPS4K_ICACHE_REFILL_WAR 0 | 16 | #define MIPS4K_ICACHE_REFILL_WAR 0 |
17 | #define MIPS_CACHE_SYNC_WAR 0 | 17 | #define MIPS_CACHE_SYNC_WAR 0 |
18 | #define TX49XX_ICACHE_INDEX_INV_WAR 0 | 18 | #define TX49XX_ICACHE_INDEX_INV_WAR 0 |
19 | #define ICACHE_REFILLS_WORKAROUND_WAR 0 | 19 | #define ICACHE_REFILLS_WORKAROUND_WAR 0 |
20 | #define R10000_LLSC_WAR 0 | 20 | #define R10000_LLSC_WAR 0 |
21 | #define MIPS34K_MISSED_ITLB_WAR 0 | 21 | #define MIPS34K_MISSED_ITLB_WAR 0 |
22 | 22 | ||
23 | #endif | 23 | #endif |
diff --git a/arch/mips/include/asm/mach-lantiq/xway/xway_dma.h b/arch/mips/include/asm/mach-lantiq/xway/xway_dma.h index 872943a4b90e..5f8693d5ab12 100644 --- a/arch/mips/include/asm/mach-lantiq/xway/xway_dma.h +++ b/arch/mips/include/asm/mach-lantiq/xway/xway_dma.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #define LTQ_DESC_SIZE 0x08 /* each descriptor is 64bit */ | 21 | #define LTQ_DESC_SIZE 0x08 /* each descriptor is 64bit */ |
22 | #define LTQ_DESC_NUM 0x40 /* 64 descriptors / channel */ | 22 | #define LTQ_DESC_NUM 0x40 /* 64 descriptors / channel */ |
23 | 23 | ||
24 | #define LTQ_DMA_OWN BIT(31) /* owner bit */ | 24 | #define LTQ_DMA_OWN BIT(31) /* owner bit */ |
25 | #define LTQ_DMA_C BIT(30) /* complete bit */ | 25 | #define LTQ_DMA_C BIT(30) /* complete bit */ |
26 | #define LTQ_DMA_SOP BIT(29) /* start of packet */ | 26 | #define LTQ_DMA_SOP BIT(29) /* start of packet */ |
27 | #define LTQ_DMA_EOP BIT(28) /* end of packet */ | 27 | #define LTQ_DMA_EOP BIT(28) /* end of packet */ |
@@ -38,7 +38,7 @@ struct ltq_dma_channel { | |||
38 | int nr; /* the channel number */ | 38 | int nr; /* the channel number */ |
39 | int irq; /* the mapped irq */ | 39 | int irq; /* the mapped irq */ |
40 | int desc; /* the current descriptor */ | 40 | int desc; /* the current descriptor */ |
41 | struct ltq_dma_desc *desc_base; /* the descriptor base */ | 41 | struct ltq_dma_desc *desc_base; /* the descriptor base */ |
42 | int phys; /* physical addr */ | 42 | int phys; /* physical addr */ |
43 | }; | 43 | }; |
44 | 44 | ||
diff --git a/arch/mips/include/asm/mach-lasat/mach-gt64120.h b/arch/mips/include/asm/mach-lasat/mach-gt64120.h index 1a9ad45cc135..c253d3fa5167 100644 --- a/arch/mips/include/asm/mach-lasat/mach-gt64120.h +++ b/arch/mips/include/asm/mach-lasat/mach-gt64120.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This is a direct copy of the ev96100.h file, with a global | 2 | * This is a direct copy of the ev96100.h file, with a global |
3 | * search and replace. The numbers are the same. | 3 | * search and replace. The numbers are the same. |
4 | * | 4 | * |
5 | * The reason I'm duplicating this is so that the 64120/96100 | 5 | * The reason I'm duplicating this is so that the 64120/96100 |
6 | * defines won't be confusing in the source code. | 6 | * defines won't be confusing in the source code. |
@@ -18,8 +18,8 @@ | |||
18 | * | 18 | * |
19 | * (Guessing ...) | 19 | * (Guessing ...) |
20 | */ | 20 | */ |
21 | #define GT_PCI_MEM_BASE 0x12000000UL | 21 | #define GT_PCI_MEM_BASE 0x12000000UL |
22 | #define GT_PCI_MEM_SIZE 0x02000000UL | 22 | #define GT_PCI_MEM_SIZE 0x02000000UL |
23 | #define GT_PCI_IO_BASE 0x10000000UL | 23 | #define GT_PCI_IO_BASE 0x10000000UL |
24 | #define GT_PCI_IO_SIZE 0x02000000UL | 24 | #define GT_PCI_IO_SIZE 0x02000000UL |
25 | #define GT_ISA_IO_BASE PCI_IO_BASE | 25 | #define GT_ISA_IO_BASE PCI_IO_BASE |
diff --git a/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h index 1a05d854e34c..75fd8c0f986e 100644 --- a/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h | |||
@@ -8,9 +8,9 @@ | |||
8 | * Copyright (C) 2009 Zhang Le <r0bertz@gentoo.org> | 8 | * Copyright (C) 2009 Zhang Le <r0bertz@gentoo.org> |
9 | * | 9 | * |
10 | * reference: /proc/cpuinfo, | 10 | * reference: /proc/cpuinfo, |
11 | * arch/mips/kernel/cpu-probe.c(cpu_probe_legacy), | 11 | * arch/mips/kernel/cpu-probe.c(cpu_probe_legacy), |
12 | * arch/mips/kernel/proc.c(show_cpuinfo), | 12 | * arch/mips/kernel/proc.c(show_cpuinfo), |
13 | * loongson2f user manual. | 13 | * loongson2f user manual. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef __ASM_MACH_LOONGSON_CPU_FEATURE_OVERRIDES_H | 16 | #ifndef __ASM_MACH_LOONGSON_CPU_FEATURE_OVERRIDES_H |
@@ -37,7 +37,7 @@ | |||
37 | #define cpu_has_fpu 1 | 37 | #define cpu_has_fpu 1 |
38 | #define cpu_has_ic_fills_f_dc 0 | 38 | #define cpu_has_ic_fills_f_dc 0 |
39 | #define cpu_has_inclusive_pcaches 1 | 39 | #define cpu_has_inclusive_pcaches 1 |
40 | #define cpu_has_llsc 1 | 40 | #define cpu_has_llsc 1 |
41 | #define cpu_has_mcheck 0 | 41 | #define cpu_has_mcheck 0 |
42 | #define cpu_has_mdmx 0 | 42 | #define cpu_has_mdmx 0 |
43 | #define cpu_has_mips16 0 | 43 | #define cpu_has_mips16 0 |
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h index 2a8e2bb5d539..a0ee0cb775ad 100644 --- a/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h +++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h | |||
@@ -5,8 +5,8 @@ | |||
5 | * Author : jlliu <liujl@lemote.com> | 5 | * Author : jlliu <liujl@lemote.com> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef _CS5536_H | 8 | #ifndef _CS5536_H |
9 | #define _CS5536_H | 9 | #define _CS5536_H |
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | 12 | ||
@@ -16,237 +16,237 @@ extern void _wrmsr(u32 msr, u32 hi, u32 lo); | |||
16 | /* | 16 | /* |
17 | * MSR module base | 17 | * MSR module base |
18 | */ | 18 | */ |
19 | #define CS5536_SB_MSR_BASE (0x00000000) | 19 | #define CS5536_SB_MSR_BASE (0x00000000) |
20 | #define CS5536_GLIU_MSR_BASE (0x10000000) | 20 | #define CS5536_GLIU_MSR_BASE (0x10000000) |
21 | #define CS5536_ILLEGAL_MSR_BASE (0x20000000) | 21 | #define CS5536_ILLEGAL_MSR_BASE (0x20000000) |
22 | #define CS5536_USB_MSR_BASE (0x40000000) | 22 | #define CS5536_USB_MSR_BASE (0x40000000) |
23 | #define CS5536_IDE_MSR_BASE (0x60000000) | 23 | #define CS5536_IDE_MSR_BASE (0x60000000) |
24 | #define CS5536_DIVIL_MSR_BASE (0x80000000) | 24 | #define CS5536_DIVIL_MSR_BASE (0x80000000) |
25 | #define CS5536_ACC_MSR_BASE (0xa0000000) | 25 | #define CS5536_ACC_MSR_BASE (0xa0000000) |
26 | #define CS5536_UNUSED_MSR_BASE (0xc0000000) | 26 | #define CS5536_UNUSED_MSR_BASE (0xc0000000) |
27 | #define CS5536_GLCP_MSR_BASE (0xe0000000) | 27 | #define CS5536_GLCP_MSR_BASE (0xe0000000) |
28 | 28 | ||
29 | #define SB_MSR_REG(offset) (CS5536_SB_MSR_BASE | (offset)) | 29 | #define SB_MSR_REG(offset) (CS5536_SB_MSR_BASE | (offset)) |
30 | #define GLIU_MSR_REG(offset) (CS5536_GLIU_MSR_BASE | (offset)) | 30 | #define GLIU_MSR_REG(offset) (CS5536_GLIU_MSR_BASE | (offset)) |
31 | #define ILLEGAL_MSR_REG(offset) (CS5536_ILLEGAL_MSR_BASE | (offset)) | 31 | #define ILLEGAL_MSR_REG(offset) (CS5536_ILLEGAL_MSR_BASE | (offset)) |
32 | #define USB_MSR_REG(offset) (CS5536_USB_MSR_BASE | (offset)) | 32 | #define USB_MSR_REG(offset) (CS5536_USB_MSR_BASE | (offset)) |
33 | #define IDE_MSR_REG(offset) (CS5536_IDE_MSR_BASE | (offset)) | 33 | #define IDE_MSR_REG(offset) (CS5536_IDE_MSR_BASE | (offset)) |
34 | #define DIVIL_MSR_REG(offset) (CS5536_DIVIL_MSR_BASE | (offset)) | 34 | #define DIVIL_MSR_REG(offset) (CS5536_DIVIL_MSR_BASE | (offset)) |
35 | #define ACC_MSR_REG(offset) (CS5536_ACC_MSR_BASE | (offset)) | 35 | #define ACC_MSR_REG(offset) (CS5536_ACC_MSR_BASE | (offset)) |
36 | #define UNUSED_MSR_REG(offset) (CS5536_UNUSED_MSR_BASE | (offset)) | 36 | #define UNUSED_MSR_REG(offset) (CS5536_UNUSED_MSR_BASE | (offset)) |
37 | #define GLCP_MSR_REG(offset) (CS5536_GLCP_MSR_BASE | (offset)) | 37 | #define GLCP_MSR_REG(offset) (CS5536_GLCP_MSR_BASE | (offset)) |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * BAR SPACE OF VIRTUAL PCI : | 40 | * BAR SPACE OF VIRTUAL PCI : |
41 | * range for pci probe use, length is the actual size. | 41 | * range for pci probe use, length is the actual size. |
42 | */ | 42 | */ |
43 | /* IO space for all DIVIL modules */ | 43 | /* IO space for all DIVIL modules */ |
44 | #define CS5536_IRQ_RANGE 0xffffffe0 /* USERD FOR PCI PROBE */ | 44 | #define CS5536_IRQ_RANGE 0xffffffe0 /* USERD FOR PCI PROBE */ |
45 | #define CS5536_IRQ_LENGTH 0x20 /* THE REGS ACTUAL LENGTH */ | 45 | #define CS5536_IRQ_LENGTH 0x20 /* THE REGS ACTUAL LENGTH */ |
46 | #define CS5536_SMB_RANGE 0xfffffff8 | 46 | #define CS5536_SMB_RANGE 0xfffffff8 |
47 | #define CS5536_SMB_LENGTH 0x08 | 47 | #define CS5536_SMB_LENGTH 0x08 |
48 | #define CS5536_GPIO_RANGE 0xffffff00 | 48 | #define CS5536_GPIO_RANGE 0xffffff00 |
49 | #define CS5536_GPIO_LENGTH 0x100 | 49 | #define CS5536_GPIO_LENGTH 0x100 |
50 | #define CS5536_MFGPT_RANGE 0xffffffc0 | 50 | #define CS5536_MFGPT_RANGE 0xffffffc0 |
51 | #define CS5536_MFGPT_LENGTH 0x40 | 51 | #define CS5536_MFGPT_LENGTH 0x40 |
52 | #define CS5536_ACPI_RANGE 0xffffffe0 | 52 | #define CS5536_ACPI_RANGE 0xffffffe0 |
53 | #define CS5536_ACPI_LENGTH 0x20 | 53 | #define CS5536_ACPI_LENGTH 0x20 |
54 | #define CS5536_PMS_RANGE 0xffffff80 | 54 | #define CS5536_PMS_RANGE 0xffffff80 |
55 | #define CS5536_PMS_LENGTH 0x80 | 55 | #define CS5536_PMS_LENGTH 0x80 |
56 | /* IO space for IDE */ | 56 | /* IO space for IDE */ |
57 | #define CS5536_IDE_RANGE 0xfffffff0 | 57 | #define CS5536_IDE_RANGE 0xfffffff0 |
58 | #define CS5536_IDE_LENGTH 0x10 | 58 | #define CS5536_IDE_LENGTH 0x10 |
59 | /* IO space for ACC */ | 59 | /* IO space for ACC */ |
60 | #define CS5536_ACC_RANGE 0xffffff80 | 60 | #define CS5536_ACC_RANGE 0xffffff80 |
61 | #define CS5536_ACC_LENGTH 0x80 | 61 | #define CS5536_ACC_LENGTH 0x80 |
62 | /* MEM space for ALL USB modules */ | 62 | /* MEM space for ALL USB modules */ |
63 | #define CS5536_OHCI_RANGE 0xfffff000 | 63 | #define CS5536_OHCI_RANGE 0xfffff000 |
64 | #define CS5536_OHCI_LENGTH 0x1000 | 64 | #define CS5536_OHCI_LENGTH 0x1000 |
65 | #define CS5536_EHCI_RANGE 0xfffff000 | 65 | #define CS5536_EHCI_RANGE 0xfffff000 |
66 | #define CS5536_EHCI_LENGTH 0x1000 | 66 | #define CS5536_EHCI_LENGTH 0x1000 |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * PCI MSR ACCESS | 69 | * PCI MSR ACCESS |
70 | */ | 70 | */ |
71 | #define PCI_MSR_CTRL 0xF0 | 71 | #define PCI_MSR_CTRL 0xF0 |
72 | #define PCI_MSR_ADDR 0xF4 | 72 | #define PCI_MSR_ADDR 0xF4 |
73 | #define PCI_MSR_DATA_LO 0xF8 | 73 | #define PCI_MSR_DATA_LO 0xF8 |
74 | #define PCI_MSR_DATA_HI 0xFC | 74 | #define PCI_MSR_DATA_HI 0xFC |
75 | 75 | ||
76 | /**************** MSR *****************************/ | 76 | /**************** MSR *****************************/ |
77 | 77 | ||
78 | /* | 78 | /* |
79 | * GLIU STANDARD MSR | 79 | * GLIU STANDARD MSR |
80 | */ | 80 | */ |
81 | #define GLIU_CAP 0x00 | 81 | #define GLIU_CAP 0x00 |
82 | #define GLIU_CONFIG 0x01 | 82 | #define GLIU_CONFIG 0x01 |
83 | #define GLIU_SMI 0x02 | 83 | #define GLIU_SMI 0x02 |
84 | #define GLIU_ERROR 0x03 | 84 | #define GLIU_ERROR 0x03 |
85 | #define GLIU_PM 0x04 | 85 | #define GLIU_PM 0x04 |
86 | #define GLIU_DIAG 0x05 | 86 | #define GLIU_DIAG 0x05 |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * GLIU SPEC. MSR | 89 | * GLIU SPEC. MSR |
90 | */ | 90 | */ |
91 | #define GLIU_P2D_BM0 0x20 | 91 | #define GLIU_P2D_BM0 0x20 |
92 | #define GLIU_P2D_BM1 0x21 | 92 | #define GLIU_P2D_BM1 0x21 |
93 | #define GLIU_P2D_BM2 0x22 | 93 | #define GLIU_P2D_BM2 0x22 |
94 | #define GLIU_P2D_BMK0 0x23 | 94 | #define GLIU_P2D_BMK0 0x23 |
95 | #define GLIU_P2D_BMK1 0x24 | 95 | #define GLIU_P2D_BMK1 0x24 |
96 | #define GLIU_P2D_BM3 0x25 | 96 | #define GLIU_P2D_BM3 0x25 |
97 | #define GLIU_P2D_BM4 0x26 | 97 | #define GLIU_P2D_BM4 0x26 |
98 | #define GLIU_COH 0x80 | 98 | #define GLIU_COH 0x80 |
99 | #define GLIU_PAE 0x81 | 99 | #define GLIU_PAE 0x81 |
100 | #define GLIU_ARB 0x82 | 100 | #define GLIU_ARB 0x82 |
101 | #define GLIU_ASMI 0x83 | 101 | #define GLIU_ASMI 0x83 |
102 | #define GLIU_AERR 0x84 | 102 | #define GLIU_AERR 0x84 |
103 | #define GLIU_DEBUG 0x85 | 103 | #define GLIU_DEBUG 0x85 |
104 | #define GLIU_PHY_CAP 0x86 | 104 | #define GLIU_PHY_CAP 0x86 |
105 | #define GLIU_NOUT_RESP 0x87 | 105 | #define GLIU_NOUT_RESP 0x87 |
106 | #define GLIU_NOUT_WDATA 0x88 | 106 | #define GLIU_NOUT_WDATA 0x88 |
107 | #define GLIU_WHOAMI 0x8B | 107 | #define GLIU_WHOAMI 0x8B |
108 | #define GLIU_SLV_DIS 0x8C | 108 | #define GLIU_SLV_DIS 0x8C |
109 | #define GLIU_IOD_BM0 0xE0 | 109 | #define GLIU_IOD_BM0 0xE0 |
110 | #define GLIU_IOD_BM1 0xE1 | 110 | #define GLIU_IOD_BM1 0xE1 |
111 | #define GLIU_IOD_BM2 0xE2 | 111 | #define GLIU_IOD_BM2 0xE2 |
112 | #define GLIU_IOD_BM3 0xE3 | 112 | #define GLIU_IOD_BM3 0xE3 |
113 | #define GLIU_IOD_BM4 0xE4 | 113 | #define GLIU_IOD_BM4 0xE4 |
114 | #define GLIU_IOD_BM5 0xE5 | 114 | #define GLIU_IOD_BM5 0xE5 |
115 | #define GLIU_IOD_BM6 0xE6 | 115 | #define GLIU_IOD_BM6 0xE6 |
116 | #define GLIU_IOD_BM7 0xE7 | 116 | #define GLIU_IOD_BM7 0xE7 |
117 | #define GLIU_IOD_BM8 0xE8 | 117 | #define GLIU_IOD_BM8 0xE8 |
118 | #define GLIU_IOD_BM9 0xE9 | 118 | #define GLIU_IOD_BM9 0xE9 |
119 | #define GLIU_IOD_SC0 0xEA | 119 | #define GLIU_IOD_SC0 0xEA |
120 | #define GLIU_IOD_SC1 0xEB | 120 | #define GLIU_IOD_SC1 0xEB |
121 | #define GLIU_IOD_SC2 0xEC | 121 | #define GLIU_IOD_SC2 0xEC |
122 | #define GLIU_IOD_SC3 0xED | 122 | #define GLIU_IOD_SC3 0xED |
123 | #define GLIU_IOD_SC4 0xEE | 123 | #define GLIU_IOD_SC4 0xEE |
124 | #define GLIU_IOD_SC5 0xEF | 124 | #define GLIU_IOD_SC5 0xEF |
125 | #define GLIU_IOD_SC6 0xF0 | 125 | #define GLIU_IOD_SC6 0xF0 |
126 | #define GLIU_IOD_SC7 0xF1 | 126 | #define GLIU_IOD_SC7 0xF1 |
127 | 127 | ||
128 | /* | 128 | /* |
129 | * SB STANDARD | 129 | * SB STANDARD |
130 | */ | 130 | */ |
131 | #define SB_CAP 0x00 | 131 | #define SB_CAP 0x00 |
132 | #define SB_CONFIG 0x01 | 132 | #define SB_CONFIG 0x01 |
133 | #define SB_SMI 0x02 | 133 | #define SB_SMI 0x02 |
134 | #define SB_ERROR 0x03 | 134 | #define SB_ERROR 0x03 |
135 | #define SB_MAR_ERR_EN 0x00000001 | 135 | #define SB_MAR_ERR_EN 0x00000001 |
136 | #define SB_TAR_ERR_EN 0x00000002 | 136 | #define SB_TAR_ERR_EN 0x00000002 |
137 | #define SB_RSVD_BIT1 0x00000004 | 137 | #define SB_RSVD_BIT1 0x00000004 |
138 | #define SB_EXCEP_ERR_EN 0x00000008 | 138 | #define SB_EXCEP_ERR_EN 0x00000008 |
139 | #define SB_SYSE_ERR_EN 0x00000010 | 139 | #define SB_SYSE_ERR_EN 0x00000010 |
140 | #define SB_PARE_ERR_EN 0x00000020 | 140 | #define SB_PARE_ERR_EN 0x00000020 |
141 | #define SB_TAS_ERR_EN 0x00000040 | 141 | #define SB_TAS_ERR_EN 0x00000040 |
142 | #define SB_MAR_ERR_FLAG 0x00010000 | 142 | #define SB_MAR_ERR_FLAG 0x00010000 |
143 | #define SB_TAR_ERR_FLAG 0x00020000 | 143 | #define SB_TAR_ERR_FLAG 0x00020000 |
144 | #define SB_RSVD_BIT2 0x00040000 | 144 | #define SB_RSVD_BIT2 0x00040000 |
145 | #define SB_EXCEP_ERR_FLAG 0x00080000 | 145 | #define SB_EXCEP_ERR_FLAG 0x00080000 |
146 | #define SB_SYSE_ERR_FLAG 0x00100000 | 146 | #define SB_SYSE_ERR_FLAG 0x00100000 |
147 | #define SB_PARE_ERR_FLAG 0x00200000 | 147 | #define SB_PARE_ERR_FLAG 0x00200000 |
148 | #define SB_TAS_ERR_FLAG 0x00400000 | 148 | #define SB_TAS_ERR_FLAG 0x00400000 |
149 | #define SB_PM 0x04 | 149 | #define SB_PM 0x04 |
150 | #define SB_DIAG 0x05 | 150 | #define SB_DIAG 0x05 |
151 | 151 | ||
152 | /* | 152 | /* |
153 | * SB SPEC. | 153 | * SB SPEC. |
154 | */ | 154 | */ |
155 | #define SB_CTRL 0x10 | 155 | #define SB_CTRL 0x10 |
156 | #define SB_R0 0x20 | 156 | #define SB_R0 0x20 |
157 | #define SB_R1 0x21 | 157 | #define SB_R1 0x21 |
158 | #define SB_R2 0x22 | 158 | #define SB_R2 0x22 |
159 | #define SB_R3 0x23 | 159 | #define SB_R3 0x23 |
160 | #define SB_R4 0x24 | 160 | #define SB_R4 0x24 |
161 | #define SB_R5 0x25 | 161 | #define SB_R5 0x25 |
162 | #define SB_R6 0x26 | 162 | #define SB_R6 0x26 |
163 | #define SB_R7 0x27 | 163 | #define SB_R7 0x27 |
164 | #define SB_R8 0x28 | 164 | #define SB_R8 0x28 |
165 | #define SB_R9 0x29 | 165 | #define SB_R9 0x29 |
166 | #define SB_R10 0x2A | 166 | #define SB_R10 0x2A |
167 | #define SB_R11 0x2B | 167 | #define SB_R11 0x2B |
168 | #define SB_R12 0x2C | 168 | #define SB_R12 0x2C |
169 | #define SB_R13 0x2D | 169 | #define SB_R13 0x2D |
170 | #define SB_R14 0x2E | 170 | #define SB_R14 0x2E |
171 | #define SB_R15 0x2F | 171 | #define SB_R15 0x2F |
172 | 172 | ||
173 | /* | 173 | /* |
174 | * GLCP STANDARD | 174 | * GLCP STANDARD |
175 | */ | 175 | */ |
176 | #define GLCP_CAP 0x00 | 176 | #define GLCP_CAP 0x00 |
177 | #define GLCP_CONFIG 0x01 | 177 | #define GLCP_CONFIG 0x01 |
178 | #define GLCP_SMI 0x02 | 178 | #define GLCP_SMI 0x02 |
179 | #define GLCP_ERROR 0x03 | 179 | #define GLCP_ERROR 0x03 |
180 | #define GLCP_PM 0x04 | 180 | #define GLCP_PM 0x04 |
181 | #define GLCP_DIAG 0x05 | 181 | #define GLCP_DIAG 0x05 |
182 | 182 | ||
183 | /* | 183 | /* |
184 | * GLCP SPEC. | 184 | * GLCP SPEC. |
185 | */ | 185 | */ |
186 | #define GLCP_CLK_DIS_DELAY 0x08 | 186 | #define GLCP_CLK_DIS_DELAY 0x08 |
187 | #define GLCP_PM_CLK_DISABLE 0x09 | 187 | #define GLCP_PM_CLK_DISABLE 0x09 |
188 | #define GLCP_GLB_PM 0x0B | 188 | #define GLCP_GLB_PM 0x0B |
189 | #define GLCP_DBG_OUT 0x0C | 189 | #define GLCP_DBG_OUT 0x0C |
190 | #define GLCP_RSVD1 0x0D | 190 | #define GLCP_RSVD1 0x0D |
191 | #define GLCP_SOFT_COM 0x0E | 191 | #define GLCP_SOFT_COM 0x0E |
192 | #define SOFT_BAR_SMB_FLAG 0x00000001 | 192 | #define SOFT_BAR_SMB_FLAG 0x00000001 |
193 | #define SOFT_BAR_GPIO_FLAG 0x00000002 | 193 | #define SOFT_BAR_GPIO_FLAG 0x00000002 |
194 | #define SOFT_BAR_MFGPT_FLAG 0x00000004 | 194 | #define SOFT_BAR_MFGPT_FLAG 0x00000004 |
195 | #define SOFT_BAR_IRQ_FLAG 0x00000008 | 195 | #define SOFT_BAR_IRQ_FLAG 0x00000008 |
196 | #define SOFT_BAR_PMS_FLAG 0x00000010 | 196 | #define SOFT_BAR_PMS_FLAG 0x00000010 |
197 | #define SOFT_BAR_ACPI_FLAG 0x00000020 | 197 | #define SOFT_BAR_ACPI_FLAG 0x00000020 |
198 | #define SOFT_BAR_IDE_FLAG 0x00000400 | 198 | #define SOFT_BAR_IDE_FLAG 0x00000400 |
199 | #define SOFT_BAR_ACC_FLAG 0x00000800 | 199 | #define SOFT_BAR_ACC_FLAG 0x00000800 |
200 | #define SOFT_BAR_OHCI_FLAG 0x00001000 | 200 | #define SOFT_BAR_OHCI_FLAG 0x00001000 |
201 | #define SOFT_BAR_EHCI_FLAG 0x00002000 | 201 | #define SOFT_BAR_EHCI_FLAG 0x00002000 |
202 | #define GLCP_RSVD2 0x0F | 202 | #define GLCP_RSVD2 0x0F |
203 | #define GLCP_CLK_OFF 0x10 | 203 | #define GLCP_CLK_OFF 0x10 |
204 | #define GLCP_CLK_ACTIVE 0x11 | 204 | #define GLCP_CLK_ACTIVE 0x11 |
205 | #define GLCP_CLK_DISABLE 0x12 | 205 | #define GLCP_CLK_DISABLE 0x12 |
206 | #define GLCP_CLK4ACK 0x13 | 206 | #define GLCP_CLK4ACK 0x13 |
207 | #define GLCP_SYS_RST 0x14 | 207 | #define GLCP_SYS_RST 0x14 |
208 | #define GLCP_RSVD3 0x15 | 208 | #define GLCP_RSVD3 0x15 |
209 | #define GLCP_DBG_CLK_CTRL 0x16 | 209 | #define GLCP_DBG_CLK_CTRL 0x16 |
210 | #define GLCP_CHIP_REV_ID 0x17 | 210 | #define GLCP_CHIP_REV_ID 0x17 |
211 | 211 | ||
212 | /* PIC */ | 212 | /* PIC */ |
213 | #define PIC_YSEL_LOW 0x20 | 213 | #define PIC_YSEL_LOW 0x20 |
214 | #define PIC_YSEL_LOW_USB_SHIFT 8 | 214 | #define PIC_YSEL_LOW_USB_SHIFT 8 |
215 | #define PIC_YSEL_LOW_ACC_SHIFT 16 | 215 | #define PIC_YSEL_LOW_ACC_SHIFT 16 |
216 | #define PIC_YSEL_LOW_FLASH_SHIFT 24 | 216 | #define PIC_YSEL_LOW_FLASH_SHIFT 24 |
217 | #define PIC_YSEL_HIGH 0x21 | 217 | #define PIC_YSEL_HIGH 0x21 |
218 | #define PIC_ZSEL_LOW 0x22 | 218 | #define PIC_ZSEL_LOW 0x22 |
219 | #define PIC_ZSEL_HIGH 0x23 | 219 | #define PIC_ZSEL_HIGH 0x23 |
220 | #define PIC_IRQM_PRIM 0x24 | 220 | #define PIC_IRQM_PRIM 0x24 |
221 | #define PIC_IRQM_LPC 0x25 | 221 | #define PIC_IRQM_LPC 0x25 |
222 | #define PIC_XIRR_STS_LOW 0x26 | 222 | #define PIC_XIRR_STS_LOW 0x26 |
223 | #define PIC_XIRR_STS_HIGH 0x27 | 223 | #define PIC_XIRR_STS_HIGH 0x27 |
224 | #define PCI_SHDW 0x34 | 224 | #define PCI_SHDW 0x34 |
225 | 225 | ||
226 | /* | 226 | /* |
227 | * DIVIL STANDARD | 227 | * DIVIL STANDARD |
228 | */ | 228 | */ |
229 | #define DIVIL_CAP 0x00 | 229 | #define DIVIL_CAP 0x00 |
230 | #define DIVIL_CONFIG 0x01 | 230 | #define DIVIL_CONFIG 0x01 |
231 | #define DIVIL_SMI 0x02 | 231 | #define DIVIL_SMI 0x02 |
232 | #define DIVIL_ERROR 0x03 | 232 | #define DIVIL_ERROR 0x03 |
233 | #define DIVIL_PM 0x04 | 233 | #define DIVIL_PM 0x04 |
234 | #define DIVIL_DIAG 0x05 | 234 | #define DIVIL_DIAG 0x05 |
235 | 235 | ||
236 | /* | 236 | /* |
237 | * DIVIL SPEC. | 237 | * DIVIL SPEC. |
238 | */ | 238 | */ |
239 | #define DIVIL_LBAR_IRQ 0x08 | 239 | #define DIVIL_LBAR_IRQ 0x08 |
240 | #define DIVIL_LBAR_KEL 0x09 | 240 | #define DIVIL_LBAR_KEL 0x09 |
241 | #define DIVIL_LBAR_SMB 0x0B | 241 | #define DIVIL_LBAR_SMB 0x0B |
242 | #define DIVIL_LBAR_GPIO 0x0C | 242 | #define DIVIL_LBAR_GPIO 0x0C |
243 | #define DIVIL_LBAR_MFGPT 0x0D | 243 | #define DIVIL_LBAR_MFGPT 0x0D |
244 | #define DIVIL_LBAR_ACPI 0x0E | 244 | #define DIVIL_LBAR_ACPI 0x0E |
245 | #define DIVIL_LBAR_PMS 0x0F | 245 | #define DIVIL_LBAR_PMS 0x0F |
246 | #define DIVIL_LEG_IO 0x14 | 246 | #define DIVIL_LEG_IO 0x14 |
247 | #define DIVIL_BALL_OPTS 0x15 | 247 | #define DIVIL_BALL_OPTS 0x15 |
248 | #define DIVIL_SOFT_IRQ 0x16 | 248 | #define DIVIL_SOFT_IRQ 0x16 |
249 | #define DIVIL_SOFT_RESET 0x17 | 249 | #define DIVIL_SOFT_RESET 0x17 |
250 | 250 | ||
251 | /* MFGPT */ | 251 | /* MFGPT */ |
252 | #define MFGPT_IRQ 0x28 | 252 | #define MFGPT_IRQ 0x28 |
@@ -254,52 +254,52 @@ extern void _wrmsr(u32 msr, u32 hi, u32 lo); | |||
254 | /* | 254 | /* |
255 | * IDE STANDARD | 255 | * IDE STANDARD |
256 | */ | 256 | */ |
257 | #define IDE_CAP 0x00 | 257 | #define IDE_CAP 0x00 |
258 | #define IDE_CONFIG 0x01 | 258 | #define IDE_CONFIG 0x01 |
259 | #define IDE_SMI 0x02 | 259 | #define IDE_SMI 0x02 |
260 | #define IDE_ERROR 0x03 | 260 | #define IDE_ERROR 0x03 |
261 | #define IDE_PM 0x04 | 261 | #define IDE_PM 0x04 |
262 | #define IDE_DIAG 0x05 | 262 | #define IDE_DIAG 0x05 |
263 | 263 | ||
264 | /* | 264 | /* |
265 | * IDE SPEC. | 265 | * IDE SPEC. |
266 | */ | 266 | */ |
267 | #define IDE_IO_BAR 0x08 | 267 | #define IDE_IO_BAR 0x08 |
268 | #define IDE_CFG 0x10 | 268 | #define IDE_CFG 0x10 |
269 | #define IDE_DTC 0x12 | 269 | #define IDE_DTC 0x12 |
270 | #define IDE_CAST 0x13 | 270 | #define IDE_CAST 0x13 |
271 | #define IDE_ETC 0x14 | 271 | #define IDE_ETC 0x14 |
272 | #define IDE_INTERNAL_PM 0x15 | 272 | #define IDE_INTERNAL_PM 0x15 |
273 | 273 | ||
274 | /* | 274 | /* |
275 | * ACC STANDARD | 275 | * ACC STANDARD |
276 | */ | 276 | */ |
277 | #define ACC_CAP 0x00 | 277 | #define ACC_CAP 0x00 |
278 | #define ACC_CONFIG 0x01 | 278 | #define ACC_CONFIG 0x01 |
279 | #define ACC_SMI 0x02 | 279 | #define ACC_SMI 0x02 |
280 | #define ACC_ERROR 0x03 | 280 | #define ACC_ERROR 0x03 |
281 | #define ACC_PM 0x04 | 281 | #define ACC_PM 0x04 |
282 | #define ACC_DIAG 0x05 | 282 | #define ACC_DIAG 0x05 |
283 | 283 | ||
284 | /* | 284 | /* |
285 | * USB STANDARD | 285 | * USB STANDARD |
286 | */ | 286 | */ |
287 | #define USB_CAP 0x00 | 287 | #define USB_CAP 0x00 |
288 | #define USB_CONFIG 0x01 | 288 | #define USB_CONFIG 0x01 |
289 | #define USB_SMI 0x02 | 289 | #define USB_SMI 0x02 |
290 | #define USB_ERROR 0x03 | 290 | #define USB_ERROR 0x03 |
291 | #define USB_PM 0x04 | 291 | #define USB_PM 0x04 |
292 | #define USB_DIAG 0x05 | 292 | #define USB_DIAG 0x05 |
293 | 293 | ||
294 | /* | 294 | /* |
295 | * USB SPEC. | 295 | * USB SPEC. |
296 | */ | 296 | */ |
297 | #define USB_OHCI 0x08 | 297 | #define USB_OHCI 0x08 |
298 | #define USB_EHCI 0x09 | 298 | #define USB_EHCI 0x09 |
299 | 299 | ||
300 | /****************** NATIVE ***************************/ | 300 | /****************** NATIVE ***************************/ |
301 | /* GPIO : I/O SPACE; REG : 32BITS */ | 301 | /* GPIO : I/O SPACE; REG : 32BITS */ |
302 | #define GPIOL_OUT_VAL 0x00 | 302 | #define GPIOL_OUT_VAL 0x00 |
303 | #define GPIOL_OUT_EN 0x04 | 303 | #define GPIOL_OUT_EN 0x04 |
304 | 304 | ||
305 | #endif /* _CS5536_H */ | 305 | #endif /* _CS5536_H */ |
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_mfgpt.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_mfgpt.h index 4b493d6772c2..021d0172dad6 100644 --- a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_mfgpt.h +++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_mfgpt.h | |||
@@ -25,7 +25,7 @@ static inline void __maybe_unused enable_mfgpt0_counter(void) | |||
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #define MFGPT_TICK_RATE 14318000 | 27 | #define MFGPT_TICK_RATE 14318000 |
28 | #define COMPARE ((MFGPT_TICK_RATE + HZ/2) / HZ) | 28 | #define COMPARE ((MFGPT_TICK_RATE + HZ/2) / HZ) |
29 | 29 | ||
30 | #define MFGPT_BASE mfgpt_base | 30 | #define MFGPT_BASE mfgpt_base |
31 | #define MFGPT0_CMP2 (MFGPT_BASE + 2) | 31 | #define MFGPT0_CMP2 (MFGPT_BASE + 2) |
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h index 0dca9c89ee7c..8a7ecb4d5c64 100644 --- a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h +++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Author : jlliu, liujl@lemote.com | 8 | * Author : jlliu, liujl@lemote.com |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _CS5536_PCI_H | 11 | #ifndef _CS5536_PCI_H |
12 | #define _CS5536_PCI_H | 12 | #define _CS5536_PCI_H |
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/pci_regs.h> | 15 | #include <linux/pci_regs.h> |
@@ -17,20 +17,20 @@ | |||
17 | extern void cs5536_pci_conf_write4(int function, int reg, u32 value); | 17 | extern void cs5536_pci_conf_write4(int function, int reg, u32 value); |
18 | extern u32 cs5536_pci_conf_read4(int function, int reg); | 18 | extern u32 cs5536_pci_conf_read4(int function, int reg); |
19 | 19 | ||
20 | #define CS5536_ACC_INTR 9 | 20 | #define CS5536_ACC_INTR 9 |
21 | #define CS5536_IDE_INTR 14 | 21 | #define CS5536_IDE_INTR 14 |
22 | #define CS5536_USB_INTR 11 | 22 | #define CS5536_USB_INTR 11 |
23 | #define CS5536_MFGPT_INTR 5 | 23 | #define CS5536_MFGPT_INTR 5 |
24 | #define CS5536_UART1_INTR 4 | 24 | #define CS5536_UART1_INTR 4 |
25 | #define CS5536_UART2_INTR 3 | 25 | #define CS5536_UART2_INTR 3 |
26 | 26 | ||
27 | /************** PCI BUS DEVICE FUNCTION ***************/ | 27 | /************** PCI BUS DEVICE FUNCTION ***************/ |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * PCI bus device function | 30 | * PCI bus device function |
31 | */ | 31 | */ |
32 | #define PCI_BUS_CS5536 0 | 32 | #define PCI_BUS_CS5536 0 |
33 | #define PCI_IDSEL_CS5536 14 | 33 | #define PCI_IDSEL_CS5536 14 |
34 | 34 | ||
35 | /********** STANDARD PCI-2.2 EXPANSION ****************/ | 35 | /********** STANDARD PCI-2.2 EXPANSION ****************/ |
36 | 36 | ||
@@ -45,21 +45,21 @@ extern u32 cs5536_pci_conf_read4(int function, int reg); | |||
45 | (((mod_dev_id) << 16) | (sys_vendor_id)) | 45 | (((mod_dev_id) << 16) | (sys_vendor_id)) |
46 | 46 | ||
47 | /* VENDOR ID */ | 47 | /* VENDOR ID */ |
48 | #define CS5536_VENDOR_ID 0x1022 | 48 | #define CS5536_VENDOR_ID 0x1022 |
49 | 49 | ||
50 | /* DEVICE ID */ | 50 | /* DEVICE ID */ |
51 | #define CS5536_ISA_DEVICE_ID 0x2090 | 51 | #define CS5536_ISA_DEVICE_ID 0x2090 |
52 | #define CS5536_IDE_DEVICE_ID 0x209a | 52 | #define CS5536_IDE_DEVICE_ID 0x209a |
53 | #define CS5536_ACC_DEVICE_ID 0x2093 | 53 | #define CS5536_ACC_DEVICE_ID 0x2093 |
54 | #define CS5536_OHCI_DEVICE_ID 0x2094 | 54 | #define CS5536_OHCI_DEVICE_ID 0x2094 |
55 | #define CS5536_EHCI_DEVICE_ID 0x2095 | 55 | #define CS5536_EHCI_DEVICE_ID 0x2095 |
56 | 56 | ||
57 | /* CLASS CODE : CLASS SUB-CLASS INTERFACE */ | 57 | /* CLASS CODE : CLASS SUB-CLASS INTERFACE */ |
58 | #define CS5536_ISA_CLASS_CODE 0x060100 | 58 | #define CS5536_ISA_CLASS_CODE 0x060100 |
59 | #define CS5536_IDE_CLASS_CODE 0x010180 | 59 | #define CS5536_IDE_CLASS_CODE 0x010180 |
60 | #define CS5536_ACC_CLASS_CODE 0x040100 | 60 | #define CS5536_ACC_CLASS_CODE 0x040100 |
61 | #define CS5536_OHCI_CLASS_CODE 0x0C0310 | 61 | #define CS5536_OHCI_CLASS_CODE 0x0C0310 |
62 | #define CS5536_EHCI_CLASS_CODE 0x0C0320 | 62 | #define CS5536_EHCI_CLASS_CODE 0x0C0320 |
63 | 63 | ||
64 | /* BHLC : BIST HEADER-TYPE LATENCY-TIMER CACHE-LINE-SIZE */ | 64 | /* BHLC : BIST HEADER-TYPE LATENCY-TIMER CACHE-LINE-SIZE */ |
65 | 65 | ||
@@ -67,40 +67,40 @@ extern u32 cs5536_pci_conf_read4(int function, int reg); | |||
67 | ((PCI_NONE_BIST << 24) | ((header_type) << 16) \ | 67 | ((PCI_NONE_BIST << 24) | ((header_type) << 16) \ |
68 | | ((latency_timer) << 8) | PCI_NORMAL_CACHE_LINE_SIZE); | 68 | | ((latency_timer) << 8) | PCI_NORMAL_CACHE_LINE_SIZE); |
69 | 69 | ||
70 | #define PCI_NONE_BIST 0x00 /* RO not implemented yet. */ | 70 | #define PCI_NONE_BIST 0x00 /* RO not implemented yet. */ |
71 | #define PCI_BRIDGE_HEADER_TYPE 0x80 /* RO */ | 71 | #define PCI_BRIDGE_HEADER_TYPE 0x80 /* RO */ |
72 | #define PCI_NORMAL_HEADER_TYPE 0x00 | 72 | #define PCI_NORMAL_HEADER_TYPE 0x00 |
73 | #define PCI_NORMAL_LATENCY_TIMER 0x00 | 73 | #define PCI_NORMAL_LATENCY_TIMER 0x00 |
74 | #define PCI_NORMAL_CACHE_LINE_SIZE 0x08 /* RW */ | 74 | #define PCI_NORMAL_CACHE_LINE_SIZE 0x08 /* RW */ |
75 | 75 | ||
76 | /* BAR */ | 76 | /* BAR */ |
77 | #define PCI_BAR0_REG 0x10 | 77 | #define PCI_BAR0_REG 0x10 |
78 | #define PCI_BAR1_REG 0x14 | 78 | #define PCI_BAR1_REG 0x14 |
79 | #define PCI_BAR2_REG 0x18 | 79 | #define PCI_BAR2_REG 0x18 |
80 | #define PCI_BAR3_REG 0x1c | 80 | #define PCI_BAR3_REG 0x1c |
81 | #define PCI_BAR4_REG 0x20 | 81 | #define PCI_BAR4_REG 0x20 |
82 | #define PCI_BAR5_REG 0x24 | 82 | #define PCI_BAR5_REG 0x24 |
83 | #define PCI_BAR_COUNT 6 | 83 | #define PCI_BAR_COUNT 6 |
84 | #define PCI_BAR_RANGE_MASK 0xFFFFFFFF | 84 | #define PCI_BAR_RANGE_MASK 0xFFFFFFFF |
85 | 85 | ||
86 | /* CARDBUS CIS POINTER */ | 86 | /* CARDBUS CIS POINTER */ |
87 | #define PCI_CARDBUS_CIS_POINTER 0x00000000 | 87 | #define PCI_CARDBUS_CIS_POINTER 0x00000000 |
88 | 88 | ||
89 | /* SUBSYSTEM VENDOR ID */ | 89 | /* SUBSYSTEM VENDOR ID */ |
90 | #define CS5536_SUB_VENDOR_ID CS5536_VENDOR_ID | 90 | #define CS5536_SUB_VENDOR_ID CS5536_VENDOR_ID |
91 | 91 | ||
92 | /* SUBSYSTEM ID */ | 92 | /* SUBSYSTEM ID */ |
93 | #define CS5536_ISA_SUB_ID CS5536_ISA_DEVICE_ID | 93 | #define CS5536_ISA_SUB_ID CS5536_ISA_DEVICE_ID |
94 | #define CS5536_IDE_SUB_ID CS5536_IDE_DEVICE_ID | 94 | #define CS5536_IDE_SUB_ID CS5536_IDE_DEVICE_ID |
95 | #define CS5536_ACC_SUB_ID CS5536_ACC_DEVICE_ID | 95 | #define CS5536_ACC_SUB_ID CS5536_ACC_DEVICE_ID |
96 | #define CS5536_OHCI_SUB_ID CS5536_OHCI_DEVICE_ID | 96 | #define CS5536_OHCI_SUB_ID CS5536_OHCI_DEVICE_ID |
97 | #define CS5536_EHCI_SUB_ID CS5536_EHCI_DEVICE_ID | 97 | #define CS5536_EHCI_SUB_ID CS5536_EHCI_DEVICE_ID |
98 | 98 | ||
99 | /* EXPANSION ROM BAR */ | 99 | /* EXPANSION ROM BAR */ |
100 | #define PCI_EXPANSION_ROM_BAR 0x00000000 | 100 | #define PCI_EXPANSION_ROM_BAR 0x00000000 |
101 | 101 | ||
102 | /* CAPABILITIES POINTER */ | 102 | /* CAPABILITIES POINTER */ |
103 | #define PCI_CAPLIST_POINTER 0x00000000 | 103 | #define PCI_CAPLIST_POINTER 0x00000000 |
104 | #define PCI_CAPLIST_USB_POINTER 0x40 | 104 | #define PCI_CAPLIST_USB_POINTER 0x40 |
105 | /* INTERRUPT */ | 105 | /* INTERRUPT */ |
106 | 106 | ||
@@ -108,46 +108,46 @@ extern u32 cs5536_pci_conf_read4(int function, int reg); | |||
108 | ((PCI_MAX_LATENCY << 24) | (PCI_MIN_GRANT << 16) | \ | 108 | ((PCI_MAX_LATENCY << 24) | (PCI_MIN_GRANT << 16) | \ |
109 | ((pin) << 8) | (mod_intr)) | 109 | ((pin) << 8) | (mod_intr)) |
110 | 110 | ||
111 | #define PCI_MAX_LATENCY 0x40 | 111 | #define PCI_MAX_LATENCY 0x40 |
112 | #define PCI_MIN_GRANT 0x00 | 112 | #define PCI_MIN_GRANT 0x00 |
113 | #define PCI_DEFAULT_PIN 0x01 | 113 | #define PCI_DEFAULT_PIN 0x01 |
114 | 114 | ||
115 | /*********** EXPANSION PCI REG ************************/ | 115 | /*********** EXPANSION PCI REG ************************/ |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * ISA EXPANSION | 118 | * ISA EXPANSION |
119 | */ | 119 | */ |
120 | #define PCI_UART1_INT_REG 0x50 | 120 | #define PCI_UART1_INT_REG 0x50 |
121 | #define PCI_UART2_INT_REG 0x54 | 121 | #define PCI_UART2_INT_REG 0x54 |
122 | #define PCI_ISA_FIXUP_REG 0x58 | 122 | #define PCI_ISA_FIXUP_REG 0x58 |
123 | 123 | ||
124 | /* | 124 | /* |
125 | * IDE EXPANSION | 125 | * IDE EXPANSION |
126 | */ | 126 | */ |
127 | #define PCI_IDE_CFG_REG 0x40 | 127 | #define PCI_IDE_CFG_REG 0x40 |
128 | #define CS5536_IDE_FLASH_SIGNATURE 0xDEADBEEF | 128 | #define CS5536_IDE_FLASH_SIGNATURE 0xDEADBEEF |
129 | #define PCI_IDE_DTC_REG 0x48 | 129 | #define PCI_IDE_DTC_REG 0x48 |
130 | #define PCI_IDE_CAST_REG 0x4C | 130 | #define PCI_IDE_CAST_REG 0x4C |
131 | #define PCI_IDE_ETC_REG 0x50 | 131 | #define PCI_IDE_ETC_REG 0x50 |
132 | #define PCI_IDE_PM_REG 0x54 | 132 | #define PCI_IDE_PM_REG 0x54 |
133 | #define PCI_IDE_INT_REG 0x60 | 133 | #define PCI_IDE_INT_REG 0x60 |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * ACC EXPANSION | 136 | * ACC EXPANSION |
137 | */ | 137 | */ |
138 | #define PCI_ACC_INT_REG 0x50 | 138 | #define PCI_ACC_INT_REG 0x50 |
139 | 139 | ||
140 | /* | 140 | /* |
141 | * OHCI EXPANSION : INTTERUPT IS IMPLEMENTED BY THE OHCI | 141 | * OHCI EXPANSION : INTTERUPT IS IMPLEMENTED BY THE OHCI |
142 | */ | 142 | */ |
143 | #define PCI_OHCI_PM_REG 0x40 | 143 | #define PCI_OHCI_PM_REG 0x40 |
144 | #define PCI_OHCI_INT_REG 0x50 | 144 | #define PCI_OHCI_INT_REG 0x50 |
145 | 145 | ||
146 | /* | 146 | /* |
147 | * EHCI EXPANSION | 147 | * EHCI EXPANSION |
148 | */ | 148 | */ |
149 | #define PCI_EHCI_LEGSMIEN_REG 0x50 | 149 | #define PCI_EHCI_LEGSMIEN_REG 0x50 |
150 | #define PCI_EHCI_LEGSMISTS_REG 0x54 | 150 | #define PCI_EHCI_LEGSMISTS_REG 0x54 |
151 | #define PCI_EHCI_FLADJ_REG 0x60 | 151 | #define PCI_EHCI_FLADJ_REG 0x60 |
152 | 152 | ||
153 | #endif /* _CS5536_PCI_H_ */ | 153 | #endif /* _CS5536_PCI_H_ */ |
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h index 21c4ecedebe7..1f17c1815ee5 100644 --- a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h +++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h | |||
@@ -5,8 +5,8 @@ | |||
5 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> | 5 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef _CS5536_VSM_H | 8 | #ifndef _CS5536_VSM_H |
9 | #define _CS5536_VSM_H | 9 | #define _CS5536_VSM_H |
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | 12 | ||
diff --git a/arch/mips/include/asm/mach-loongson/gpio.h b/arch/mips/include/asm/mach-loongson/gpio.h index e30e73d443df..211a7b7138fe 100644 --- a/arch/mips/include/asm/mach-loongson/gpio.h +++ b/arch/mips/include/asm/mach-loongson/gpio.h | |||
@@ -10,8 +10,8 @@ | |||
10 | * (at your option) any later version. | 10 | * (at your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef __STLS2F_GPIO_H | 13 | #ifndef __STLS2F_GPIO_H |
14 | #define __STLS2F_GPIO_H | 14 | #define __STLS2F_GPIO_H |
15 | 15 | ||
16 | #include <asm-generic/gpio.h> | 16 | #include <asm-generic/gpio.h> |
17 | 17 | ||
diff --git a/arch/mips/include/asm/mach-loongson/loongson.h b/arch/mips/include/asm/mach-loongson/loongson.h index 5222a007bc21..b286534fef08 100644 --- a/arch/mips/include/asm/mach-loongson/loongson.h +++ b/arch/mips/include/asm/mach-loongson/loongson.h | |||
@@ -2,8 +2,8 @@ | |||
2 | * Copyright (C) 2009 Lemote, Inc. | 2 | * Copyright (C) 2009 Lemote, Inc. |
3 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> | 3 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
@@ -52,7 +52,7 @@ extern void mach_irq_dispatch(unsigned int pending); | |||
52 | extern int mach_i8259_irq(void); | 52 | extern int mach_i8259_irq(void); |
53 | 53 | ||
54 | /* We need this in some places... */ | 54 | /* We need this in some places... */ |
55 | #define delay() ({ \ | 55 | #define delay() ({ \ |
56 | int x; \ | 56 | int x; \ |
57 | for (x = 0; x < 100000; x++) \ | 57 | for (x = 0; x < 100000; x++) \ |
58 | __asm__ __volatile__(""); \ | 58 | __asm__ __volatile__(""); \ |
@@ -82,13 +82,13 @@ static inline void do_perfcnt_IRQ(void) | |||
82 | 82 | ||
83 | #define LOONGSON_BOOT_BASE 0x1fc00000 | 83 | #define LOONGSON_BOOT_BASE 0x1fc00000 |
84 | #define LOONGSON_BOOT_SIZE 0x00100000 /* 1M */ | 84 | #define LOONGSON_BOOT_SIZE 0x00100000 /* 1M */ |
85 | #define LOONGSON_BOOT_TOP (LOONGSON_BOOT_BASE+LOONGSON_BOOT_SIZE-1) | 85 | #define LOONGSON_BOOT_TOP (LOONGSON_BOOT_BASE+LOONGSON_BOOT_SIZE-1) |
86 | #define LOONGSON_REG_BASE 0x1fe00000 | 86 | #define LOONGSON_REG_BASE 0x1fe00000 |
87 | #define LOONGSON_REG_SIZE 0x00100000 /* 256Bytes + 256Bytes + ??? */ | 87 | #define LOONGSON_REG_SIZE 0x00100000 /* 256Bytes + 256Bytes + ??? */ |
88 | #define LOONGSON_REG_TOP (LOONGSON_REG_BASE+LOONGSON_REG_SIZE-1) | 88 | #define LOONGSON_REG_TOP (LOONGSON_REG_BASE+LOONGSON_REG_SIZE-1) |
89 | 89 | ||
90 | #define LOONGSON_LIO1_BASE 0x1ff00000 | 90 | #define LOONGSON_LIO1_BASE 0x1ff00000 |
91 | #define LOONGSON_LIO1_SIZE 0x00100000 /* 1M */ | 91 | #define LOONGSON_LIO1_SIZE 0x00100000 /* 1M */ |
92 | #define LOONGSON_LIO1_TOP (LOONGSON_LIO1_BASE+LOONGSON_LIO1_SIZE-1) | 92 | #define LOONGSON_LIO1_TOP (LOONGSON_LIO1_BASE+LOONGSON_LIO1_SIZE-1) |
93 | 93 | ||
94 | #define LOONGSON_PCILO0_BASE 0x10000000 | 94 | #define LOONGSON_PCILO0_BASE 0x10000000 |
@@ -115,13 +115,13 @@ static inline void do_perfcnt_IRQ(void) | |||
115 | #define LOONGSON_PCI_REG(x) LOONGSON_REG(LOONGSON_PCICONFIGBASE + (x)) | 115 | #define LOONGSON_PCI_REG(x) LOONGSON_REG(LOONGSON_PCICONFIGBASE + (x)) |
116 | #define LOONGSON_PCIDID LOONGSON_PCI_REG(0x00) | 116 | #define LOONGSON_PCIDID LOONGSON_PCI_REG(0x00) |
117 | #define LOONGSON_PCICMD LOONGSON_PCI_REG(0x04) | 117 | #define LOONGSON_PCICMD LOONGSON_PCI_REG(0x04) |
118 | #define LOONGSON_PCICLASS LOONGSON_PCI_REG(0x08) | 118 | #define LOONGSON_PCICLASS LOONGSON_PCI_REG(0x08) |
119 | #define LOONGSON_PCILTIMER LOONGSON_PCI_REG(0x0c) | 119 | #define LOONGSON_PCILTIMER LOONGSON_PCI_REG(0x0c) |
120 | #define LOONGSON_PCIBASE0 LOONGSON_PCI_REG(0x10) | 120 | #define LOONGSON_PCIBASE0 LOONGSON_PCI_REG(0x10) |
121 | #define LOONGSON_PCIBASE1 LOONGSON_PCI_REG(0x14) | 121 | #define LOONGSON_PCIBASE1 LOONGSON_PCI_REG(0x14) |
122 | #define LOONGSON_PCIBASE2 LOONGSON_PCI_REG(0x18) | 122 | #define LOONGSON_PCIBASE2 LOONGSON_PCI_REG(0x18) |
123 | #define LOONGSON_PCIBASE3 LOONGSON_PCI_REG(0x1c) | 123 | #define LOONGSON_PCIBASE3 LOONGSON_PCI_REG(0x1c) |
124 | #define LOONGSON_PCIBASE4 LOONGSON_PCI_REG(0x20) | 124 | #define LOONGSON_PCIBASE4 LOONGSON_PCI_REG(0x20) |
125 | #define LOONGSON_PCIEXPRBASE LOONGSON_PCI_REG(0x30) | 125 | #define LOONGSON_PCIEXPRBASE LOONGSON_PCI_REG(0x30) |
126 | #define LOONGSON_PCIINT LOONGSON_PCI_REG(0x3c) | 126 | #define LOONGSON_PCIINT LOONGSON_PCI_REG(0x3c) |
127 | 127 | ||
@@ -132,7 +132,7 @@ static inline void do_perfcnt_IRQ(void) | |||
132 | #define LOONGSON_PCICMD_MABORT_CLR 0x20000000 | 132 | #define LOONGSON_PCICMD_MABORT_CLR 0x20000000 |
133 | #define LOONGSON_PCICMD_MTABORT_CLR 0x10000000 | 133 | #define LOONGSON_PCICMD_MTABORT_CLR 0x10000000 |
134 | #define LOONGSON_PCICMD_TABORT_CLR 0x08000000 | 134 | #define LOONGSON_PCICMD_TABORT_CLR 0x08000000 |
135 | #define LOONGSON_PCICMD_MPERR_CLR 0x01000000 | 135 | #define LOONGSON_PCICMD_MPERR_CLR 0x01000000 |
136 | #define LOONGSON_PCICMD_PERRRESPEN 0x00000040 | 136 | #define LOONGSON_PCICMD_PERRRESPEN 0x00000040 |
137 | #define LOONGSON_PCICMD_ASTEPEN 0x00000080 | 137 | #define LOONGSON_PCICMD_ASTEPEN 0x00000080 |
138 | #define LOONGSON_PCICMD_SERREN 0x00000100 | 138 | #define LOONGSON_PCICMD_SERREN 0x00000100 |
@@ -142,7 +142,7 @@ static inline void do_perfcnt_IRQ(void) | |||
142 | /* Loongson h/w Configuration */ | 142 | /* Loongson h/w Configuration */ |
143 | 143 | ||
144 | #define LOONGSON_GENCFG_OFFSET 0x4 | 144 | #define LOONGSON_GENCFG_OFFSET 0x4 |
145 | #define LOONGSON_GENCFG LOONGSON_REG(LOONGSON_REGBASE + LOONGSON_GENCFG_OFFSET) | 145 | #define LOONGSON_GENCFG LOONGSON_REG(LOONGSON_REGBASE + LOONGSON_GENCFG_OFFSET) |
146 | 146 | ||
147 | #define LOONGSON_GENCFG_DEBUGMODE 0x00000001 | 147 | #define LOONGSON_GENCFG_DEBUGMODE 0x00000001 |
148 | #define LOONGSON_GENCFG_SNOOPEN 0x00000002 | 148 | #define LOONGSON_GENCFG_SNOOPEN 0x00000002 |
@@ -173,25 +173,25 @@ static inline void do_perfcnt_IRQ(void) | |||
173 | 173 | ||
174 | /* GPIO Regs - r/w */ | 174 | /* GPIO Regs - r/w */ |
175 | 175 | ||
176 | #define LOONGSON_GPIODATA LOONGSON_REG(LOONGSON_REGBASE + 0x1c) | 176 | #define LOONGSON_GPIODATA LOONGSON_REG(LOONGSON_REGBASE + 0x1c) |
177 | #define LOONGSON_GPIOIE LOONGSON_REG(LOONGSON_REGBASE + 0x20) | 177 | #define LOONGSON_GPIOIE LOONGSON_REG(LOONGSON_REGBASE + 0x20) |
178 | 178 | ||
179 | /* ICU Configuration Regs - r/w */ | 179 | /* ICU Configuration Regs - r/w */ |
180 | 180 | ||
181 | #define LOONGSON_INTEDGE LOONGSON_REG(LOONGSON_REGBASE + 0x24) | 181 | #define LOONGSON_INTEDGE LOONGSON_REG(LOONGSON_REGBASE + 0x24) |
182 | #define LOONGSON_INTSTEER LOONGSON_REG(LOONGSON_REGBASE + 0x28) | 182 | #define LOONGSON_INTSTEER LOONGSON_REG(LOONGSON_REGBASE + 0x28) |
183 | #define LOONGSON_INTPOL LOONGSON_REG(LOONGSON_REGBASE + 0x2c) | 183 | #define LOONGSON_INTPOL LOONGSON_REG(LOONGSON_REGBASE + 0x2c) |
184 | 184 | ||
185 | /* ICU Enable Regs - IntEn & IntISR are r/o. */ | 185 | /* ICU Enable Regs - IntEn & IntISR are r/o. */ |
186 | 186 | ||
187 | #define LOONGSON_INTENSET LOONGSON_REG(LOONGSON_REGBASE + 0x30) | 187 | #define LOONGSON_INTENSET LOONGSON_REG(LOONGSON_REGBASE + 0x30) |
188 | #define LOONGSON_INTENCLR LOONGSON_REG(LOONGSON_REGBASE + 0x34) | 188 | #define LOONGSON_INTENCLR LOONGSON_REG(LOONGSON_REGBASE + 0x34) |
189 | #define LOONGSON_INTEN LOONGSON_REG(LOONGSON_REGBASE + 0x38) | 189 | #define LOONGSON_INTEN LOONGSON_REG(LOONGSON_REGBASE + 0x38) |
190 | #define LOONGSON_INTISR LOONGSON_REG(LOONGSON_REGBASE + 0x3c) | 190 | #define LOONGSON_INTISR LOONGSON_REG(LOONGSON_REGBASE + 0x3c) |
191 | 191 | ||
192 | /* ICU */ | 192 | /* ICU */ |
193 | #define LOONGSON_ICU_MBOXES 0x0000000f | 193 | #define LOONGSON_ICU_MBOXES 0x0000000f |
194 | #define LOONGSON_ICU_MBOXES_SHIFT 0 | 194 | #define LOONGSON_ICU_MBOXES_SHIFT 0 |
195 | #define LOONGSON_ICU_DMARDY 0x00000010 | 195 | #define LOONGSON_ICU_DMARDY 0x00000010 |
196 | #define LOONGSON_ICU_DMAEMPTY 0x00000020 | 196 | #define LOONGSON_ICU_DMAEMPTY 0x00000020 |
197 | #define LOONGSON_ICU_COPYRDY 0x00000040 | 197 | #define LOONGSON_ICU_COPYRDY 0x00000040 |
@@ -212,10 +212,10 @@ static inline void do_perfcnt_IRQ(void) | |||
212 | 212 | ||
213 | /* PCI prefetch window base & mask */ | 213 | /* PCI prefetch window base & mask */ |
214 | 214 | ||
215 | #define LOONGSON_MEM_WIN_BASE_L LOONGSON_REG(LOONGSON_REGBASE + 0x40) | 215 | #define LOONGSON_MEM_WIN_BASE_L LOONGSON_REG(LOONGSON_REGBASE + 0x40) |
216 | #define LOONGSON_MEM_WIN_BASE_H LOONGSON_REG(LOONGSON_REGBASE + 0x44) | 216 | #define LOONGSON_MEM_WIN_BASE_H LOONGSON_REG(LOONGSON_REGBASE + 0x44) |
217 | #define LOONGSON_MEM_WIN_MASK_L LOONGSON_REG(LOONGSON_REGBASE + 0x48) | 217 | #define LOONGSON_MEM_WIN_MASK_L LOONGSON_REG(LOONGSON_REGBASE + 0x48) |
218 | #define LOONGSON_MEM_WIN_MASK_H LOONGSON_REG(LOONGSON_REGBASE + 0x4c) | 218 | #define LOONGSON_MEM_WIN_MASK_H LOONGSON_REG(LOONGSON_REGBASE + 0x4c) |
219 | 219 | ||
220 | /* PCI_Hit*_Sel_* */ | 220 | /* PCI_Hit*_Sel_* */ |
221 | 221 | ||
diff --git a/arch/mips/include/asm/mach-loongson/machine.h b/arch/mips/include/asm/mach-loongson/machine.h index 43213388c174..3810d5ca84ac 100644 --- a/arch/mips/include/asm/mach-loongson/machine.h +++ b/arch/mips/include/asm/mach-loongson/machine.h | |||
@@ -2,8 +2,8 @@ | |||
2 | * Copyright (C) 2009 Lemote, Inc. | 2 | * Copyright (C) 2009 Lemote, Inc. |
3 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> | 3 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
diff --git a/arch/mips/include/asm/mach-loongson/mem.h b/arch/mips/include/asm/mach-loongson/mem.h index 3b23ee8647d6..f4a36d7dbfab 100644 --- a/arch/mips/include/asm/mach-loongson/mem.h +++ b/arch/mips/include/asm/mach-loongson/mem.h | |||
@@ -2,8 +2,8 @@ | |||
2 | * Copyright (C) 2009 Lemote, Inc. | 2 | * Copyright (C) 2009 Lemote, Inc. |
3 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> | 3 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
diff --git a/arch/mips/include/asm/mach-loongson1/irq.h b/arch/mips/include/asm/mach-loongson1/irq.h index da96ed42f733..96bfb1c1c73d 100644 --- a/arch/mips/include/asm/mach-loongson1/irq.h +++ b/arch/mips/include/asm/mach-loongson1/irq.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * IRQ mappings for Loongson 1 | 4 | * IRQ mappings for Loongson 1 |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
9 | * option) any later version. | 9 | * option) any later version. |
10 | */ | 10 | */ |
diff --git a/arch/mips/include/asm/mach-loongson1/loongson1.h b/arch/mips/include/asm/mach-loongson1/loongson1.h index 4e18e88cebbf..5c437c2ba6b3 100644 --- a/arch/mips/include/asm/mach-loongson1/loongson1.h +++ b/arch/mips/include/asm/mach-loongson1/loongson1.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Register mappings for Loongson 1 | 4 | * Register mappings for Loongson 1 |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
9 | * option) any later version. | 9 | * option) any later version. |
10 | */ | 10 | */ |
diff --git a/arch/mips/include/asm/mach-loongson1/platform.h b/arch/mips/include/asm/mach-loongson1/platform.h index 718a1228a4f3..30c13e508fff 100644 --- a/arch/mips/include/asm/mach-loongson1/platform.h +++ b/arch/mips/include/asm/mach-loongson1/platform.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> | 2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | */ | 8 | */ |
diff --git a/arch/mips/include/asm/mach-loongson1/prom.h b/arch/mips/include/asm/mach-loongson1/prom.h index b871dc41b8d9..34859a4d4ac4 100644 --- a/arch/mips/include/asm/mach-loongson1/prom.h +++ b/arch/mips/include/asm/mach-loongson1/prom.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> | 2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | */ | 8 | */ |
diff --git a/arch/mips/include/asm/mach-loongson1/regs-clk.h b/arch/mips/include/asm/mach-loongson1/regs-clk.h index a81fa3d0dc91..fb6a3ff9318f 100644 --- a/arch/mips/include/asm/mach-loongson1/regs-clk.h +++ b/arch/mips/include/asm/mach-loongson1/regs-clk.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Loongson 1 Clock Register Definitions. | 4 | * Loongson 1 Clock Register Definitions. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
9 | * option) any later version. | 9 | * option) any later version. |
10 | */ | 10 | */ |
diff --git a/arch/mips/include/asm/mach-loongson1/regs-wdt.h b/arch/mips/include/asm/mach-loongson1/regs-wdt.h index f897de68c527..6574568c2084 100644 --- a/arch/mips/include/asm/mach-loongson1/regs-wdt.h +++ b/arch/mips/include/asm/mach-loongson1/regs-wdt.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Loongson 1 watchdog register definitions. | 4 | * Loongson 1 watchdog register definitions. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
9 | * option) any later version. | 9 | * option) any later version. |
10 | */ | 10 | */ |
diff --git a/arch/mips/include/asm/mach-malta/cpu-feature-overrides.h b/arch/mips/include/asm/mach-malta/cpu-feature-overrides.h index 37e3583a9fdd..de3b66a3723e 100644 --- a/arch/mips/include/asm/mach-malta/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-malta/cpu-feature-overrides.h | |||
@@ -23,8 +23,8 @@ | |||
23 | /* #define cpu_has_watch ? */ | 23 | /* #define cpu_has_watch ? */ |
24 | #define cpu_has_divec 1 | 24 | #define cpu_has_divec 1 |
25 | #define cpu_has_vce 0 | 25 | #define cpu_has_vce 0 |
26 | /* #define cpu_has_cache_cdex_p ? */ | 26 | /* #define cpu_has_cache_cdex_p ? */ |
27 | /* #define cpu_has_cache_cdex_s ? */ | 27 | /* #define cpu_has_cache_cdex_s ? */ |
28 | /* #define cpu_has_prefetch ? */ | 28 | /* #define cpu_has_prefetch ? */ |
29 | #define cpu_has_mcheck 1 | 29 | #define cpu_has_mcheck 1 |
30 | /* #define cpu_has_ejtag ? */ | 30 | /* #define cpu_has_ejtag ? */ |
@@ -50,8 +50,8 @@ | |||
50 | /* #define cpu_has_watch ? */ | 50 | /* #define cpu_has_watch ? */ |
51 | #define cpu_has_divec 1 | 51 | #define cpu_has_divec 1 |
52 | #define cpu_has_vce 0 | 52 | #define cpu_has_vce 0 |
53 | /* #define cpu_has_cache_cdex_p ? */ | 53 | /* #define cpu_has_cache_cdex_p ? */ |
54 | /* #define cpu_has_cache_cdex_s ? */ | 54 | /* #define cpu_has_cache_cdex_s ? */ |
55 | /* #define cpu_has_prefetch ? */ | 55 | /* #define cpu_has_prefetch ? */ |
56 | #define cpu_has_mcheck 1 | 56 | #define cpu_has_mcheck 1 |
57 | /* #define cpu_has_ejtag ? */ | 57 | /* #define cpu_has_ejtag ? */ |
diff --git a/arch/mips/include/asm/mach-malta/irq.h b/arch/mips/include/asm/mach-malta/irq.h index 9b9da26683c2..47cfe64efbb0 100644 --- a/arch/mips/include/asm/mach-malta/irq.h +++ b/arch/mips/include/asm/mach-malta/irq.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __ASM_MACH_MIPS_IRQ_H | 2 | #define __ASM_MACH_MIPS_IRQ_H |
3 | 3 | ||
4 | 4 | ||
5 | #define NR_IRQS 256 | 5 | #define NR_IRQS 256 |
6 | 6 | ||
7 | #include_next <irq.h> | 7 | #include_next <irq.h> |
8 | 8 | ||
diff --git a/arch/mips/include/asm/mach-malta/mach-gt64120.h b/arch/mips/include/asm/mach-malta/mach-gt64120.h index 0f863148f3b6..62a4b2889fa7 100644 --- a/arch/mips/include/asm/mach-malta/mach-gt64120.h +++ b/arch/mips/include/asm/mach-malta/mach-gt64120.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This is a direct copy of the ev96100.h file, with a global | 2 | * This is a direct copy of the ev96100.h file, with a global |
3 | * search and replace. The numbers are the same. | 3 | * search and replace. The numbers are the same. |
4 | * | 4 | * |
5 | * The reason I'm duplicating this is so that the 64120/96100 | 5 | * The reason I'm duplicating this is so that the 64120/96100 |
6 | * defines won't be confusing in the source code. | 6 | * defines won't be confusing in the source code. |
diff --git a/arch/mips/include/asm/mach-pnx833x/irq-mapping.h b/arch/mips/include/asm/mach-pnx833x/irq-mapping.h index 6d70264557b2..daa85ce03ef6 100644 --- a/arch/mips/include/asm/mach-pnx833x/irq-mapping.h +++ b/arch/mips/include/asm/mach-pnx833x/irq-mapping.h | |||
@@ -42,15 +42,15 @@ | |||
42 | #define PNX833X_TIMER_IRQ (MIPS_CPU_IRQ_BASE + 7) | 42 | #define PNX833X_TIMER_IRQ (MIPS_CPU_IRQ_BASE + 7) |
43 | 43 | ||
44 | /* Interrupts supported by PIC */ | 44 | /* Interrupts supported by PIC */ |
45 | #define PNX833X_PIC_I2C0_INT (PNX833X_PIC_IRQ_BASE + 1) | 45 | #define PNX833X_PIC_I2C0_INT (PNX833X_PIC_IRQ_BASE + 1) |
46 | #define PNX833X_PIC_I2C1_INT (PNX833X_PIC_IRQ_BASE + 2) | 46 | #define PNX833X_PIC_I2C1_INT (PNX833X_PIC_IRQ_BASE + 2) |
47 | #define PNX833X_PIC_UART0_INT (PNX833X_PIC_IRQ_BASE + 3) | 47 | #define PNX833X_PIC_UART0_INT (PNX833X_PIC_IRQ_BASE + 3) |
48 | #define PNX833X_PIC_UART1_INT (PNX833X_PIC_IRQ_BASE + 4) | 48 | #define PNX833X_PIC_UART1_INT (PNX833X_PIC_IRQ_BASE + 4) |
49 | #define PNX833X_PIC_TS_IN0_DV_INT (PNX833X_PIC_IRQ_BASE + 5) | 49 | #define PNX833X_PIC_TS_IN0_DV_INT (PNX833X_PIC_IRQ_BASE + 5) |
50 | #define PNX833X_PIC_TS_IN0_DMA_INT (PNX833X_PIC_IRQ_BASE + 6) | 50 | #define PNX833X_PIC_TS_IN0_DMA_INT (PNX833X_PIC_IRQ_BASE + 6) |
51 | #define PNX833X_PIC_GPIO_INT (PNX833X_PIC_IRQ_BASE + 7) | 51 | #define PNX833X_PIC_GPIO_INT (PNX833X_PIC_IRQ_BASE + 7) |
52 | #define PNX833X_PIC_AUDIO_DEC_INT (PNX833X_PIC_IRQ_BASE + 8) | 52 | #define PNX833X_PIC_AUDIO_DEC_INT (PNX833X_PIC_IRQ_BASE + 8) |
53 | #define PNX833X_PIC_VIDEO_DEC_INT (PNX833X_PIC_IRQ_BASE + 9) | 53 | #define PNX833X_PIC_VIDEO_DEC_INT (PNX833X_PIC_IRQ_BASE + 9) |
54 | #define PNX833X_PIC_CONFIG_INT (PNX833X_PIC_IRQ_BASE + 10) | 54 | #define PNX833X_PIC_CONFIG_INT (PNX833X_PIC_IRQ_BASE + 10) |
55 | #define PNX833X_PIC_AOI_INT (PNX833X_PIC_IRQ_BASE + 11) | 55 | #define PNX833X_PIC_AOI_INT (PNX833X_PIC_IRQ_BASE + 11) |
56 | #define PNX833X_PIC_SYNC_INT (PNX833X_PIC_IRQ_BASE + 12) | 56 | #define PNX833X_PIC_SYNC_INT (PNX833X_PIC_IRQ_BASE + 12) |
diff --git a/arch/mips/include/asm/mach-pnx833x/pnx833x.h b/arch/mips/include/asm/mach-pnx833x/pnx833x.h index 100f52870e3c..e6fc3a9d594a 100644 --- a/arch/mips/include/asm/mach-pnx833x/pnx833x.h +++ b/arch/mips/include/asm/mach-pnx833x/pnx833x.h | |||
@@ -73,7 +73,7 @@ | |||
73 | 73 | ||
74 | 74 | ||
75 | #define PNX833X_RESET_CONTROL PNX833X_REG(0x8004) | 75 | #define PNX833X_RESET_CONTROL PNX833X_REG(0x8004) |
76 | #define PNX833X_RESET_CONTROL_2 PNX833X_REG(0x8014) | 76 | #define PNX833X_RESET_CONTROL_2 PNX833X_REG(0x8014) |
77 | 77 | ||
78 | #define PNX833X_PIC_REG(offs) PNX833X_REG(0x01000 + (offs)) | 78 | #define PNX833X_PIC_REG(offs) PNX833X_REG(0x01000 + (offs)) |
79 | #define PNX833X_PIC_INT_PRIORITY PNX833X_PIC_REG(0x0) | 79 | #define PNX833X_PIC_INT_PRIORITY PNX833X_PIC_REG(0x0) |
@@ -82,10 +82,10 @@ | |||
82 | #define PNX833X_PIC_INT_SRC_INT_SRC_SHIFT 3 | 82 | #define PNX833X_PIC_INT_SRC_INT_SRC_SHIFT 3 |
83 | #define PNX833X_PIC_INT_REG(irq) PNX833X_PIC_REG(0x10 + 4*(irq)) | 83 | #define PNX833X_PIC_INT_REG(irq) PNX833X_PIC_REG(0x10 + 4*(irq)) |
84 | 84 | ||
85 | #define PNX833X_CLOCK_CPUCP_CTL PNX833X_REG(0x9228) | 85 | #define PNX833X_CLOCK_CPUCP_CTL PNX833X_REG(0x9228) |
86 | #define PNX833X_CLOCK_CPUCP_CTL_EXIT_RESET 0x00000002ul /* bit 1 */ | 86 | #define PNX833X_CLOCK_CPUCP_CTL_EXIT_RESET 0x00000002ul /* bit 1 */ |
87 | #define PNX833X_CLOCK_CPUCP_CTL_DIV_CLOCK_MASK 0x00000018ul /* bits 4:3 */ | 87 | #define PNX833X_CLOCK_CPUCP_CTL_DIV_CLOCK_MASK 0x00000018ul /* bits 4:3 */ |
88 | #define PNX833X_CLOCK_CPUCP_CTL_DIV_CLOCK_SHIFT 3 | 88 | #define PNX833X_CLOCK_CPUCP_CTL_DIV_CLOCK_SHIFT 3 |
89 | 89 | ||
90 | #define PNX8335_CLOCK_PLL_CPU_CTL PNX833X_REG(0x9020) | 90 | #define PNX8335_CLOCK_PLL_CPU_CTL PNX833X_REG(0x9020) |
91 | #define PNX8335_CLOCK_PLL_CPU_CTL_FREQ_MASK 0x1f | 91 | #define PNX8335_CLOCK_PLL_CPU_CTL_FREQ_MASK 0x1f |
@@ -149,7 +149,7 @@ | |||
149 | #define PNX833X_MIU_SEL0_SPI_MODE_ENABLE_MASK (1 << 14) | 149 | #define PNX833X_MIU_SEL0_SPI_MODE_ENABLE_MASK (1 << 14) |
150 | #define PNX833X_MIU_SEL0_SPI_MODE_ENABLE_SHIFT 14 | 150 | #define PNX833X_MIU_SEL0_SPI_MODE_ENABLE_SHIFT 14 |
151 | 151 | ||
152 | #define PNX833X_MIU_SEL0_BURST_MODE_ENABLE_MASK (1 << 7) | 152 | #define PNX833X_MIU_SEL0_BURST_MODE_ENABLE_MASK (1 << 7) |
153 | #define PNX833X_MIU_SEL0_BURST_MODE_ENABLE_SHIFT 7 | 153 | #define PNX833X_MIU_SEL0_BURST_MODE_ENABLE_SHIFT 7 |
154 | 154 | ||
155 | #define PNX833X_MIU_SEL0_BURST_PAGE_LEN_MASK (0xF << 9) | 155 | #define PNX833X_MIU_SEL0_BURST_PAGE_LEN_MASK (0xF << 9) |
@@ -160,10 +160,10 @@ | |||
160 | #define PNX833X_MIU_CONFIG_SPI_OPCODE_MASK (0xFF << 3) | 160 | #define PNX833X_MIU_CONFIG_SPI_OPCODE_MASK (0xFF << 3) |
161 | #define PNX833X_MIU_CONFIG_SPI_OPCODE_SHIFT 3 | 161 | #define PNX833X_MIU_CONFIG_SPI_OPCODE_SHIFT 3 |
162 | 162 | ||
163 | #define PNX833X_MIU_CONFIG_SPI_DATA_ENABLE_MASK (1 << 2) | 163 | #define PNX833X_MIU_CONFIG_SPI_DATA_ENABLE_MASK (1 << 2) |
164 | #define PNX833X_MIU_CONFIG_SPI_DATA_ENABLE_SHIFT 2 | 164 | #define PNX833X_MIU_CONFIG_SPI_DATA_ENABLE_SHIFT 2 |
165 | 165 | ||
166 | #define PNX833X_MIU_CONFIG_SPI_ADDR_ENABLE_MASK (1 << 1) | 166 | #define PNX833X_MIU_CONFIG_SPI_ADDR_ENABLE_MASK (1 << 1) |
167 | #define PNX833X_MIU_CONFIG_SPI_ADDR_ENABLE_SHIFT 1 | 167 | #define PNX833X_MIU_CONFIG_SPI_ADDR_ENABLE_SHIFT 1 |
168 | 168 | ||
169 | #define PNX833X_MIU_CONFIG_SPI_SYNC_MASK (1 << 0) | 169 | #define PNX833X_MIU_CONFIG_SPI_SYNC_MASK (1 << 0) |
diff --git a/arch/mips/include/asm/mach-powertv/asic.h b/arch/mips/include/asm/mach-powertv/asic.h index c7077a64b9a7..b341108d12f1 100644 --- a/arch/mips/include/asm/mach-powertv/asic.h +++ b/arch/mips/include/asm/mach-powertv/asic.h | |||
@@ -23,9 +23,9 @@ | |||
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <asm/mach-powertv/asic_regs.h> | 24 | #include <asm/mach-powertv/asic_regs.h> |
25 | 25 | ||
26 | #define DVR_CAPABLE (1<<0) | 26 | #define DVR_CAPABLE (1<<0) |
27 | #define PCIE_CAPABLE (1<<1) | 27 | #define PCIE_CAPABLE (1<<1) |
28 | #define FFS_CAPABLE (1<<2) | 28 | #define FFS_CAPABLE (1<<2) |
29 | #define DISPLAY_CAPABLE (1<<3) | 29 | #define DISPLAY_CAPABLE (1<<3) |
30 | 30 | ||
31 | /* Platform Family types | 31 | /* Platform Family types |
@@ -111,7 +111,7 @@ enum sys_reboot_type { | |||
111 | * Older drivers may report as | 111 | * Older drivers may report as |
112 | * userReboot. */ | 112 | * userReboot. */ |
113 | sys_hardware_reset = 0x09, /* HW watchdog or front-panel | 113 | sys_hardware_reset = 0x09, /* HW watchdog or front-panel |
114 | * reset button reset. Older | 114 | * reset button reset. Older |
115 | * drivers may report as | 115 | * drivers may report as |
116 | * userReboot. */ | 116 | * userReboot. */ |
117 | sys_watchdogInterrupt = 0x0A /* Pre-watchdog interrupt */ | 117 | sys_watchdogInterrupt = 0x0A /* Pre-watchdog interrupt */ |
diff --git a/arch/mips/include/asm/mach-powertv/asic_regs.h b/arch/mips/include/asm/mach-powertv/asic_regs.h index deecb26a077e..06712abb3e55 100644 --- a/arch/mips/include/asm/mach-powertv/asic_regs.h +++ b/arch/mips/include/asm/mach-powertv/asic_regs.h | |||
@@ -49,8 +49,8 @@ enum asic_type { | |||
49 | #define UART1_INTEN uart1_inten | 49 | #define UART1_INTEN uart1_inten |
50 | #define UART1_CONFIG1 uart1_config1 | 50 | #define UART1_CONFIG1 uart1_config1 |
51 | #define UART1_CONFIG2 uart1_config2 | 51 | #define UART1_CONFIG2 uart1_config2 |
52 | #define UART1_DIVISORHI uart1_divisorhi | 52 | #define UART1_DIVISORHI uart1_divisorhi |
53 | #define UART1_DIVISORLO uart1_divisorlo | 53 | #define UART1_DIVISORLO uart1_divisorlo |
54 | #define UART1_DATA uart1_data | 54 | #define UART1_DATA uart1_data |
55 | #define UART1_STATUS uart1_status | 55 | #define UART1_STATUS uart1_status |
56 | 56 | ||
diff --git a/arch/mips/include/asm/mach-powertv/dma-coherence.h b/arch/mips/include/asm/mach-powertv/dma-coherence.h index 35371641575d..f8316720a218 100644 --- a/arch/mips/include/asm/mach-powertv/dma-coherence.h +++ b/arch/mips/include/asm/mach-powertv/dma-coherence.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Version from mach-generic modified to support PowerTV port | 6 | * Version from mach-generic modified to support PowerTV port |
7 | * Portions Copyright (C) 2009 Cisco Systems, Inc. | 7 | * Portions Copyright (C) 2009 Cisco Systems, Inc. |
8 | * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> | 8 | * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> |
9 | * | 9 | * |
10 | */ | 10 | */ |
diff --git a/arch/mips/include/asm/mach-powertv/interrupts.h b/arch/mips/include/asm/mach-powertv/interrupts.h index 4fd652ceb52a..6c463be62156 100644 --- a/arch/mips/include/asm/mach-powertv/interrupts.h +++ b/arch/mips/include/asm/mach-powertv/interrupts.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #ifndef _ASM_MACH_POWERTV_INTERRUPTS_H_ | 19 | #ifndef _ASM_MACH_POWERTV_INTERRUPTS_H_ |
20 | #define _ASM_MACH_POWERTV_INTERRUPTS_H_ | 20 | #define _ASM_MACH_POWERTV_INTERRUPTS_H_ |
21 | 21 | ||
22 | /* | 22 | /* |
@@ -49,9 +49,9 @@ | |||
49 | * glue logic inside SPARC ILC | 49 | * glue logic inside SPARC ILC |
50 | * (see INT_SBAG_STAT, below, | 50 | * (see INT_SBAG_STAT, below, |
51 | * for individual interrupts) */ | 51 | * for individual interrupts) */ |
52 | #define irq_qam_b_fec (ibase+116) /* QAM B FEC Interrupt */ | 52 | #define irq_qam_b_fec (ibase+116) /* QAM B FEC Interrupt */ |
53 | #define irq_qam_a_fec (ibase+115) /* QAM A FEC Interrupt */ | 53 | #define irq_qam_a_fec (ibase+115) /* QAM A FEC Interrupt */ |
54 | /* 114 unused (bit 18) */ | 54 | /* 114 unused (bit 18) */ |
55 | #define irq_mailbox (ibase+113) /* Mailbox Debug Interrupt -- | 55 | #define irq_mailbox (ibase+113) /* Mailbox Debug Interrupt -- |
56 | * Ored by glue logic inside | 56 | * Ored by glue logic inside |
57 | * SPARC ILC (see | 57 | * SPARC ILC (see |
@@ -99,9 +99,9 @@ | |||
99 | #define irq_sata1 (ibase+87) /* SATA 1 Interrupt */ | 99 | #define irq_sata1 (ibase+87) /* SATA 1 Interrupt */ |
100 | #define irq_dtcp (ibase+86) /* DTCP Interrupt */ | 100 | #define irq_dtcp (ibase+86) /* DTCP Interrupt */ |
101 | #define irq_pciexp1 (ibase+85) /* PCI Express 1 Interrupt */ | 101 | #define irq_pciexp1 (ibase+85) /* PCI Express 1 Interrupt */ |
102 | /* 84 unused (bit 20) */ | 102 | /* 84 unused (bit 20) */ |
103 | /* 83 unused (bit 19) */ | 103 | /* 83 unused (bit 19) */ |
104 | /* 82 unused (bit 18) */ | 104 | /* 82 unused (bit 18) */ |
105 | #define irq_sata2 (ibase+81) /* SATA2 Interrupt */ | 105 | #define irq_sata2 (ibase+81) /* SATA2 Interrupt */ |
106 | #define irq_uart2 (ibase+80) /* UART2 Interrupt */ | 106 | #define irq_uart2 (ibase+80) /* UART2 Interrupt */ |
107 | #define irq_legacy_usb (ibase+79) /* Legacy USB Host ISR (1.1 | 107 | #define irq_legacy_usb (ibase+79) /* Legacy USB Host ISR (1.1 |
@@ -117,22 +117,22 @@ | |||
117 | #define irq_mod_dma (ibase+70) /* Modulator DMA Interrupt */ | 117 | #define irq_mod_dma (ibase+70) /* Modulator DMA Interrupt */ |
118 | #define irq_byte_eng1 (ibase+69) /* Byte Engine Interrupt [1] */ | 118 | #define irq_byte_eng1 (ibase+69) /* Byte Engine Interrupt [1] */ |
119 | #define irq_byte_eng0 (ibase+68) /* Byte Engine Interrupt [0] */ | 119 | #define irq_byte_eng0 (ibase+68) /* Byte Engine Interrupt [0] */ |
120 | /* 67 unused (bit 03) */ | 120 | /* 67 unused (bit 03) */ |
121 | /* 66 unused (bit 02) */ | 121 | /* 66 unused (bit 02) */ |
122 | /* 65 unused (bit 01) */ | 122 | /* 65 unused (bit 01) */ |
123 | /* 64 unused (bit 00) */ | 123 | /* 64 unused (bit 00) */ |
124 | /*------------- Register: int_stat_1 */ | 124 | /*------------- Register: int_stat_1 */ |
125 | /* 63 unused (bit 31) */ | 125 | /* 63 unused (bit 31) */ |
126 | /* 62 unused (bit 30) */ | 126 | /* 62 unused (bit 30) */ |
127 | /* 61 unused (bit 29) */ | 127 | /* 61 unused (bit 29) */ |
128 | /* 60 unused (bit 28) */ | 128 | /* 60 unused (bit 28) */ |
129 | /* 59 unused (bit 27) */ | 129 | /* 59 unused (bit 27) */ |
130 | /* 58 unused (bit 26) */ | 130 | /* 58 unused (bit 26) */ |
131 | /* 57 unused (bit 25) */ | 131 | /* 57 unused (bit 25) */ |
132 | /* 56 unused (bit 24) */ | 132 | /* 56 unused (bit 24) */ |
133 | #define irq_buf_dma_mem2mem (ibase+55) /* BufDMA Memory to Memory | 133 | #define irq_buf_dma_mem2mem (ibase+55) /* BufDMA Memory to Memory |
134 | * Interrupt */ | 134 | * Interrupt */ |
135 | #define irq_buf_dma_usbtransmit (ibase+54) /* BufDMA USB Transmit | 135 | #define irq_buf_dma_usbtransmit (ibase+54) /* BufDMA USB Transmit |
136 | * Interrupt */ | 136 | * Interrupt */ |
137 | #define irq_buf_dma_qpskpodtransmit (ibase+53) /* BufDMA QPSK/POD Tramsit | 137 | #define irq_buf_dma_qpskpodtransmit (ibase+53) /* BufDMA QPSK/POD Tramsit |
138 | * Interrupt */ | 138 | * Interrupt */ |
@@ -140,7 +140,7 @@ | |||
140 | * Interrupt */ | 140 | * Interrupt */ |
141 | #define irq_buf_dma_usbrecv (ibase+51) /* BufDMA USB Receive | 141 | #define irq_buf_dma_usbrecv (ibase+51) /* BufDMA USB Receive |
142 | * Interrupt */ | 142 | * Interrupt */ |
143 | #define irq_buf_dma_qpskpodrecv (ibase+50) /* BufDMA QPSK/POD Receive | 143 | #define irq_buf_dma_qpskpodrecv (ibase+50) /* BufDMA QPSK/POD Receive |
144 | * Interrupt */ | 144 | * Interrupt */ |
145 | #define irq_buf_dma_recv_error (ibase+49) /* BufDMA Receive Error | 145 | #define irq_buf_dma_recv_error (ibase+49) /* BufDMA Receive Error |
146 | * Interrupt */ | 146 | * Interrupt */ |
@@ -166,7 +166,7 @@ | |||
166 | * Module */ | 166 | * Module */ |
167 | #define irq_gpio2 (ibase+37) /* GP I/O IRQ 2 - From GP I/O | 167 | #define irq_gpio2 (ibase+37) /* GP I/O IRQ 2 - From GP I/O |
168 | * Module (ABE_intN) */ | 168 | * Module (ABE_intN) */ |
169 | #define irq_pcrcmplt1 (ibase+36) /* PCR Capture Complete or | 169 | #define irq_pcrcmplt1 (ibase+36) /* PCR Capture Complete or |
170 | * Discontinuity 1 */ | 170 | * Discontinuity 1 */ |
171 | #define irq_pcrcmplt2 (ibase+35) /* PCR Capture Complete or | 171 | #define irq_pcrcmplt2 (ibase+35) /* PCR Capture Complete or |
172 | * Discontinuity 2 */ | 172 | * Discontinuity 2 */ |
@@ -217,18 +217,18 @@ | |||
217 | #define irq_qpsk_hecerr (ibase+11) /* QPSK HEC Error Interrupt */ | 217 | #define irq_qpsk_hecerr (ibase+11) /* QPSK HEC Error Interrupt */ |
218 | #define irq_qpsk_crcerr (ibase+10) /* QPSK AAL-5 CRC Error | 218 | #define irq_qpsk_crcerr (ibase+10) /* QPSK AAL-5 CRC Error |
219 | * Interrupt */ | 219 | * Interrupt */ |
220 | /* 9 unused (bit 09) */ | 220 | /* 9 unused (bit 09) */ |
221 | /* 8 unused (bit 08) */ | 221 | /* 8 unused (bit 08) */ |
222 | #define irq_psicrcerr (ibase+7) /* QAM PSI CRC Error | 222 | #define irq_psicrcerr (ibase+7) /* QAM PSI CRC Error |
223 | * Interrupt */ | 223 | * Interrupt */ |
224 | #define irq_psilength_err (ibase+6) /* QAM PSI Length Error | 224 | #define irq_psilength_err (ibase+6) /* QAM PSI Length Error |
225 | * Interrupt */ | 225 | * Interrupt */ |
226 | #define irq_esfforward (ibase+5) /* ESF Interrupt Mark From | 226 | #define irq_esfforward (ibase+5) /* ESF Interrupt Mark From |
227 | * Forward Path Reference - | 227 | * Forward Path Reference - |
228 | * every 3ms when forward Mbits | 228 | * every 3ms when forward Mbits |
229 | * and forward slot control | 229 | * and forward slot control |
230 | * bytes are updated. */ | 230 | * bytes are updated. */ |
231 | #define irq_esfreverse (ibase+4) /* ESF Interrupt Mark from | 231 | #define irq_esfreverse (ibase+4) /* ESF Interrupt Mark from |
232 | * Reverse Path Reference - | 232 | * Reverse Path Reference - |
233 | * delayed from forward mark by | 233 | * delayed from forward mark by |
234 | * the ranging delay plus a | 234 | * the ranging delay plus a |
@@ -239,15 +239,15 @@ | |||
239 | * 1.554 M upstream rates and | 239 | * 1.554 M upstream rates and |
240 | * every 6 ms for 256K upstream | 240 | * every 6 ms for 256K upstream |
241 | * rate. */ | 241 | * rate. */ |
242 | #define irq_aloha_timeout (ibase+3) /* Slotted-Aloha timeout on | 242 | #define irq_aloha_timeout (ibase+3) /* Slotted-Aloha timeout on |
243 | * Channel 1. */ | 243 | * Channel 1. */ |
244 | #define irq_reservation (ibase+2) /* Partial (or Incremental) | 244 | #define irq_reservation (ibase+2) /* Partial (or Incremental) |
245 | * Reservation Message Completed | 245 | * Reservation Message Completed |
246 | * or Slotted aloha verify for | 246 | * or Slotted aloha verify for |
247 | * channel 1. */ | 247 | * channel 1. */ |
248 | #define irq_aloha3 (ibase+1) /* Slotted-Aloha Message Verify | 248 | #define irq_aloha3 (ibase+1) /* Slotted-Aloha Message Verify |
249 | * Interrupt or Reservation | 249 | * Interrupt or Reservation |
250 | * increment completed for | 250 | * increment completed for |
251 | * channel 3. */ | 251 | * channel 3. */ |
252 | #define irq_mpeg_d (ibase+0) /* MPEG Decoder Interrupt */ | 252 | #define irq_mpeg_d (ibase+0) /* MPEG Decoder Interrupt */ |
253 | #endif /* _ASM_MACH_POWERTV_INTERRUPTS_H_ */ | 253 | #endif /* _ASM_MACH_POWERTV_INTERRUPTS_H_ */ |
diff --git a/arch/mips/include/asm/mach-rc32434/ddr.h b/arch/mips/include/asm/mach-rc32434/ddr.h index 291e2cf9dde0..e1cad0c7fd52 100644 --- a/arch/mips/include/asm/mach-rc32434/ddr.h +++ b/arch/mips/include/asm/mach-rc32434/ddr.h | |||
@@ -138,4 +138,4 @@ struct ddr_ram { | |||
138 | #define RC32434_DLLED_DBE_BIT 0 | 138 | #define RC32434_DLLED_DBE_BIT 0 |
139 | #define RC32434_DLLED_DTE_BIT 1 | 139 | #define RC32434_DLLED_DTE_BIT 1 |
140 | 140 | ||
141 | #endif /* _ASM_RC32434_DDR_H_ */ | 141 | #endif /* _ASM_RC32434_DDR_H_ */ |
diff --git a/arch/mips/include/asm/mach-rc32434/dma.h b/arch/mips/include/asm/mach-rc32434/dma.h index 5f898b5873f7..4322191e46bf 100644 --- a/arch/mips/include/asm/mach-rc32434/dma.h +++ b/arch/mips/include/asm/mach-rc32434/dma.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * DMA register definition. | 5 | * DMA register definition. |
6 | * | 6 | * |
7 | * Author : ryan.holmQVist@idt.com | 7 | * Author : ryan.holmQVist@idt.com |
8 | * Date : 20011005 | 8 | * Date : 20011005 |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __ASM_RC32434_DMA_H | 11 | #ifndef __ASM_RC32434_DMA_H |
@@ -71,10 +71,10 @@ struct dma_reg { | |||
71 | #define DMA_CHAN_DONE_BIT (1 << 1) | 71 | #define DMA_CHAN_DONE_BIT (1 << 1) |
72 | #define DMA_CHAN_MODE_BIT (1 << 2) | 72 | #define DMA_CHAN_MODE_BIT (1 << 2) |
73 | #define DMA_CHAN_MODE_MSK 0x0000000c | 73 | #define DMA_CHAN_MODE_MSK 0x0000000c |
74 | #define DMA_CHAN_MODE_AUTO 0 | 74 | #define DMA_CHAN_MODE_AUTO 0 |
75 | #define DMA_CHAN_MODE_BURST 1 | 75 | #define DMA_CHAN_MODE_BURST 1 |
76 | #define DMA_CHAN_MODE_XFRT 2 | 76 | #define DMA_CHAN_MODE_XFRT 2 |
77 | #define DMA_CHAN_MODE_RSVD 3 | 77 | #define DMA_CHAN_MODE_RSVD 3 |
78 | #define DMA_CHAN_ACT_BIT (1 << 4) | 78 | #define DMA_CHAN_ACT_BIT (1 << 4) |
79 | 79 | ||
80 | /* DMA status registers */ | 80 | /* DMA status registers */ |
@@ -100,4 +100,4 @@ struct dma_channel { | |||
100 | struct dma_reg ch[DMA_CHAN_COUNT]; | 100 | struct dma_reg ch[DMA_CHAN_COUNT]; |
101 | }; | 101 | }; |
102 | 102 | ||
103 | #endif /* __ASM_RC32434_DMA_H */ | 103 | #endif /* __ASM_RC32434_DMA_H */ |
diff --git a/arch/mips/include/asm/mach-rc32434/dma_v.h b/arch/mips/include/asm/mach-rc32434/dma_v.h index 173a9f9146cd..28c54063a345 100644 --- a/arch/mips/include/asm/mach-rc32434/dma_v.h +++ b/arch/mips/include/asm/mach-rc32434/dma_v.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * DMA register definition. | 5 | * DMA register definition. |
6 | * | 6 | * |
7 | * Author : ryan.holmQVist@idt.com | 7 | * Author : ryan.holmQVist@idt.com |
8 | * Date : 20011005 | 8 | * Date : 20011005 |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _ASM_RC32434_DMA_V_H_ | 11 | #ifndef _ASM_RC32434_DMA_V_H_ |
@@ -49,4 +49,4 @@ static inline void rc32434_chain_dma(struct dma_reg *ch, u32 dma_addr) | |||
49 | __raw_writel(dma_addr, &ch->dmandptr); | 49 | __raw_writel(dma_addr, &ch->dmandptr); |
50 | } | 50 | } |
51 | 51 | ||
52 | #endif /* _ASM_RC32434_DMA_V_H_ */ | 52 | #endif /* _ASM_RC32434_DMA_V_H_ */ |
diff --git a/arch/mips/include/asm/mach-rc32434/eth.h b/arch/mips/include/asm/mach-rc32434/eth.h index a25cbc56173d..c2645faadf57 100644 --- a/arch/mips/include/asm/mach-rc32434/eth.h +++ b/arch/mips/include/asm/mach-rc32434/eth.h | |||
@@ -26,8 +26,8 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef __ASM_RC32434_ETH_H | 29 | #ifndef __ASM_RC32434_ETH_H |
30 | #define __ASM_RC32434_ETH_H | 30 | #define __ASM_RC32434_ETH_H |
31 | 31 | ||
32 | 32 | ||
33 | #define ETH0_BASE_ADDR 0x18060000 | 33 | #define ETH0_BASE_ADDR 0x18060000 |
@@ -217,4 +217,4 @@ struct eth_regs { | |||
217 | #define ETH_TX_LE (1 << 16) | 217 | #define ETH_TX_LE (1 << 16) |
218 | #define ETH_TX_CC 0x001E0000 | 218 | #define ETH_TX_CC 0x001E0000 |
219 | 219 | ||
220 | #endif /* __ASM_RC32434_ETH_H */ | 220 | #endif /* __ASM_RC32434_ETH_H */ |
diff --git a/arch/mips/include/asm/mach-rc32434/gpio.h b/arch/mips/include/asm/mach-rc32434/gpio.h index 12ee8d510160..4dee0a34250c 100644 --- a/arch/mips/include/asm/mach-rc32434/gpio.h +++ b/arch/mips/include/asm/mach-rc32434/gpio.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * GPIO register definition. | 5 | * GPIO register definition. |
6 | * | 6 | * |
7 | * Author : ryan.holmQVist@idt.com | 7 | * Author : ryan.holmQVist@idt.com |
8 | * Date : 20011005 | 8 | * Date : 20011005 |
9 | * Copyright (C) 2001, 2002 Ryan Holm <ryan.holmQVist@idt.com> | 9 | * Copyright (C) 2001, 2002 Ryan Holm <ryan.holmQVist@idt.com> |
10 | * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org> | 10 | * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org> |
11 | */ | 11 | */ |
@@ -26,9 +26,9 @@ | |||
26 | #define irq_to_gpio(irq) (irq - (8 + 4 * 32)) | 26 | #define irq_to_gpio(irq) (irq - (8 + 4 * 32)) |
27 | 27 | ||
28 | struct rb532_gpio_reg { | 28 | struct rb532_gpio_reg { |
29 | u32 gpiofunc; /* GPIO Function Register | 29 | u32 gpiofunc; /* GPIO Function Register |
30 | * gpiofunc[x]==0 bit = gpio | 30 | * gpiofunc[x]==0 bit = gpio |
31 | * func[x]==1 bit = altfunc | 31 | * func[x]==1 bit = altfunc |
32 | */ | 32 | */ |
33 | u32 gpiocfg; /* GPIO Configuration Register | 33 | u32 gpiocfg; /* GPIO Configuration Register |
34 | * gpiocfg[x]==0 bit = input | 34 | * gpiocfg[x]==0 bit = input |
diff --git a/arch/mips/include/asm/mach-rc32434/irq.h b/arch/mips/include/asm/mach-rc32434/irq.h index 023a5b100ed0..b76dec95c04e 100644 --- a/arch/mips/include/asm/mach-rc32434/irq.h +++ b/arch/mips/include/asm/mach-rc32434/irq.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ASM_RC32434_IRQ_H | 1 | #ifndef __ASM_RC32434_IRQ_H |
2 | #define __ASM_RC32434_IRQ_H | 2 | #define __ASM_RC32434_IRQ_H |
3 | 3 | ||
4 | #define NR_IRQS 256 | 4 | #define NR_IRQS 256 |
5 | 5 | ||
6 | #include <asm/mach-generic/irq.h> | 6 | #include <asm/mach-generic/irq.h> |
7 | #include <asm/mach-rc32434/rb.h> | 7 | #include <asm/mach-rc32434/rb.h> |
@@ -25,12 +25,12 @@ | |||
25 | 25 | ||
26 | #define UART0_IRQ (GROUP3_IRQ_BASE + 0) | 26 | #define UART0_IRQ (GROUP3_IRQ_BASE + 0) |
27 | 27 | ||
28 | #define ETH0_DMA_RX_IRQ (GROUP1_IRQ_BASE + 0) | 28 | #define ETH0_DMA_RX_IRQ (GROUP1_IRQ_BASE + 0) |
29 | #define ETH0_DMA_TX_IRQ (GROUP1_IRQ_BASE + 1) | 29 | #define ETH0_DMA_TX_IRQ (GROUP1_IRQ_BASE + 1) |
30 | #define ETH0_RX_OVR_IRQ (GROUP3_IRQ_BASE + 9) | 30 | #define ETH0_RX_OVR_IRQ (GROUP3_IRQ_BASE + 9) |
31 | #define ETH0_TX_UND_IRQ (GROUP3_IRQ_BASE + 10) | 31 | #define ETH0_TX_UND_IRQ (GROUP3_IRQ_BASE + 10) |
32 | 32 | ||
33 | #define GPIO_MAPPED_IRQ_BASE GROUP4_IRQ_BASE | 33 | #define GPIO_MAPPED_IRQ_BASE GROUP4_IRQ_BASE |
34 | #define GPIO_MAPPED_IRQ_GROUP 4 | 34 | #define GPIO_MAPPED_IRQ_GROUP 4 |
35 | 35 | ||
36 | #endif /* __ASM_RC32434_IRQ_H */ | 36 | #endif /* __ASM_RC32434_IRQ_H */ |
diff --git a/arch/mips/include/asm/mach-rc32434/pci.h b/arch/mips/include/asm/mach-rc32434/pci.h index 410638f2af74..6f40d1515580 100644 --- a/arch/mips/include/asm/mach-rc32434/pci.h +++ b/arch/mips/include/asm/mach-rc32434/pci.h | |||
@@ -151,11 +151,11 @@ struct pci_msu { | |||
151 | #define PCI_CFGA_REG_PBA2 (0x18 >> 2) /* use PCIPBA_ */ | 151 | #define PCI_CFGA_REG_PBA2 (0x18 >> 2) /* use PCIPBA_ */ |
152 | #define PCI_CFGA_REG_PBA3 (0x1c >> 2) /* use PCIPBA_ */ | 152 | #define PCI_CFGA_REG_PBA3 (0x1c >> 2) /* use PCIPBA_ */ |
153 | #define PCI_CFGA_REG_SUBSYS (0x2c >> 2) /* use PCFGSS_ */ | 153 | #define PCI_CFGA_REG_SUBSYS (0x2c >> 2) /* use PCFGSS_ */ |
154 | #define PCI_CFGA_REG_3C (0x3C >> 2) /* use PCFG3C_ */ | 154 | #define PCI_CFGA_REG_3C (0x3C >> 2) /* use PCFG3C_ */ |
155 | #define PCI_CFGA_REG_PBBA0C (0x44 >> 2) /* use PCIPBAC_ */ | 155 | #define PCI_CFGA_REG_PBBA0C (0x44 >> 2) /* use PCIPBAC_ */ |
156 | #define PCI_CFGA_REG_PBA0M (0x48 >> 2) | 156 | #define PCI_CFGA_REG_PBA0M (0x48 >> 2) |
157 | #define PCI_CFGA_REG_PBA1C (0x4c >> 2) /* use PCIPBAC_ */ | 157 | #define PCI_CFGA_REG_PBA1C (0x4c >> 2) /* use PCIPBAC_ */ |
158 | #define PCI_CFGA_REG_PBA1M (0x50 >> 2) | 158 | #define PCI_CFGA_REG_PBA1M (0x50 >> 2) |
159 | #define PCI_CFGA_REG_PBA2C (0x54 >> 2) /* use PCIPBAC_ */ | 159 | #define PCI_CFGA_REG_PBA2C (0x54 >> 2) /* use PCIPBAC_ */ |
160 | #define PCI_CFGA_REG_PBA2M (0x58 >> 2) | 160 | #define PCI_CFGA_REG_PBA2M (0x58 >> 2) |
161 | #define PCI_CFGA_REG_PBA3C (0x5c >> 2) /* use PCIPBAC_ */ | 161 | #define PCI_CFGA_REG_PBA3C (0x5c >> 2) /* use PCIPBAC_ */ |
@@ -164,9 +164,9 @@ struct pci_msu { | |||
164 | #define PCI_CFGA_FUNC_BIT 8 | 164 | #define PCI_CFGA_FUNC_BIT 8 |
165 | #define PCI_CFGA_FUNC 0x00000700 | 165 | #define PCI_CFGA_FUNC 0x00000700 |
166 | #define PCI_CFGA_DEV_BIT 11 | 166 | #define PCI_CFGA_DEV_BIT 11 |
167 | #define PCI_CFGA_DEV 0x0000f800 | 167 | #define PCI_CFGA_DEV 0x0000f800 |
168 | #define PCI_CFGA_DEV_INTERN 0 | 168 | #define PCI_CFGA_DEV_INTERN 0 |
169 | #define PCI_CFGA_BUS_BIT 16 | 169 | #define PCI_CFGA_BUS_BIT 16 |
170 | #define PCI CFGA_BUS 0x00ff0000 | 170 | #define PCI CFGA_BUS 0x00ff0000 |
171 | #define PCI_CFGA_BUS_TYPE0 0 | 171 | #define PCI_CFGA_BUS_TYPE0 0 |
172 | #define PCI_CFGA_EN (1 << 31) | 172 | #define PCI_CFGA_EN (1 << 31) |
@@ -201,13 +201,13 @@ struct pci_msu { | |||
201 | #define PCI_PBAC_P (1 << 1) | 201 | #define PCI_PBAC_P (1 << 1) |
202 | #define PCI_PBAC_SIZE_BIT 2 | 202 | #define PCI_PBAC_SIZE_BIT 2 |
203 | #define PCI_PBAC_SIZE 0x0000007c | 203 | #define PCI_PBAC_SIZE 0x0000007c |
204 | #define PCI_PBAC_SB (1 << 7) | 204 | #define PCI_PBAC_SB (1 << 7) |
205 | #define PCI_PBAC_PP (1 << 8) | 205 | #define PCI_PBAC_PP (1 << 8) |
206 | #define PCI_PBAC_MR_BIT 9 | 206 | #define PCI_PBAC_MR_BIT 9 |
207 | #define PCI_PBAC_MR 0x00000600 | 207 | #define PCI_PBAC_MR 0x00000600 |
208 | #define PCI_PBAC_MR_RD 0 | 208 | #define PCI_PBAC_MR_RD 0 |
209 | #define PCI_PBAC_MR_RD_LINE 1 | 209 | #define PCI_PBAC_MR_RD_LINE 1 |
210 | #define PCI_PBAC_MR_RD_MULT 2 | 210 | #define PCI_PBAC_MR_RD_MULT 2 |
211 | #define PCI_PBAC_MRL (1 << 11) | 211 | #define PCI_PBAC_MRL (1 << 11) |
212 | #define PCI_PBAC_MRM (1 << 12) | 212 | #define PCI_PBAC_MRM (1 << 12) |
213 | #define PCI_PBAC_TRP (1 << 13) | 213 | #define PCI_PBAC_TRP (1 << 13) |
@@ -227,14 +227,14 @@ struct pci_msu { | |||
227 | */ | 227 | */ |
228 | 228 | ||
229 | #define PCI_LBAC_MSI (1 << 0) | 229 | #define PCI_LBAC_MSI (1 << 0) |
230 | #define PCI_LBAC_MSI_MEM 0 | 230 | #define PCI_LBAC_MSI_MEM 0 |
231 | #define PCI_LBAC_MSI_IO 1 | 231 | #define PCI_LBAC_MSI_IO 1 |
232 | #define PCI_LBAC_SIZE_BIT 2 | 232 | #define PCI_LBAC_SIZE_BIT 2 |
233 | #define PCI_LBAC_SIZE 0x0000007c | 233 | #define PCI_LBAC_SIZE 0x0000007c |
234 | #define PCI_LBAC_SB (1 << 7) | 234 | #define PCI_LBAC_SB (1 << 7) |
235 | #define PCI_LBAC_RT (1 << 8) | 235 | #define PCI_LBAC_RT (1 << 8) |
236 | #define PCI_LBAC_RT_NO_PREF 0 | 236 | #define PCI_LBAC_RT_NO_PREF 0 |
237 | #define PCI_LBAC_RT_PREF 1 | 237 | #define PCI_LBAC_RT_PREF 1 |
238 | 238 | ||
239 | /* | 239 | /* |
240 | * PCI Local Base Address [0|1|2|3] Mapping Register | 240 | * PCI Local Base Address [0|1|2|3] Mapping Register |
@@ -279,16 +279,16 @@ struct pci_msu { | |||
279 | #define PCI_DMAD_PT 0x00c00000 /* preferred transaction field */ | 279 | #define PCI_DMAD_PT 0x00c00000 /* preferred transaction field */ |
280 | /* These are for reads (DMA channel 8) */ | 280 | /* These are for reads (DMA channel 8) */ |
281 | #define PCI_DMAD_DEVCMD_MR 0 /* memory read */ | 281 | #define PCI_DMAD_DEVCMD_MR 0 /* memory read */ |
282 | #define PCI_DMAD_DEVCMD_MRL 1 /* memory read line */ | 282 | #define PCI_DMAD_DEVCMD_MRL 1 /* memory read line */ |
283 | #define PCI_DMAD_DEVCMD_MRM 2 /* memory read multiple */ | 283 | #define PCI_DMAD_DEVCMD_MRM 2 /* memory read multiple */ |
284 | #define PCI_DMAD_DEVCMD_IOR 3 /* I/O read */ | 284 | #define PCI_DMAD_DEVCMD_IOR 3 /* I/O read */ |
285 | /* These are for writes (DMA channel 9) */ | 285 | /* These are for writes (DMA channel 9) */ |
286 | #define PCI_DMAD_DEVCMD_MW 0 /* memory write */ | 286 | #define PCI_DMAD_DEVCMD_MW 0 /* memory write */ |
287 | #define PCI_DMAD_DEVCMD_MWI 1 /* memory write invalidate */ | 287 | #define PCI_DMAD_DEVCMD_MWI 1 /* memory write invalidate */ |
288 | #define PCI_DMAD_DEVCMD_IOW 3 /* I/O write */ | 288 | #define PCI_DMAD_DEVCMD_IOW 3 /* I/O write */ |
289 | 289 | ||
290 | /* Swap byte field applies to both DMA channel 8 and 9 */ | 290 | /* Swap byte field applies to both DMA channel 8 and 9 */ |
291 | #define PCI_DMAD_SB (1 << 24) /* swap byte field */ | 291 | #define PCI_DMAD_SB (1 << 24) /* swap byte field */ |
292 | 292 | ||
293 | 293 | ||
294 | /* | 294 | /* |
@@ -309,7 +309,7 @@ struct pci_msu { | |||
309 | #define PCI_MSU_M1 (1 << 1) | 309 | #define PCI_MSU_M1 (1 << 1) |
310 | #define PCI_MSU_DB (1 << 2) | 310 | #define PCI_MSU_DB (1 << 2) |
311 | 311 | ||
312 | #define PCI_MSG_ADDR 0xB8088010 | 312 | #define PCI_MSG_ADDR 0xB8088010 |
313 | #define PCI0_ADDR 0xB8080000 | 313 | #define PCI0_ADDR 0xB8080000 |
314 | #define rc32434_pci ((struct pci_reg *) PCI0_ADDR) | 314 | #define rc32434_pci ((struct pci_reg *) PCI0_ADDR) |
315 | #define rc32434_pci_msg ((struct pci_msu *) PCI_MSG_ADDR) | 315 | #define rc32434_pci_msg ((struct pci_msu *) PCI_MSG_ADDR) |
@@ -331,9 +331,9 @@ struct pci_msu { | |||
331 | #define PCILBA_SIZE_MASK 0x1F | 331 | #define PCILBA_SIZE_MASK 0x1F |
332 | #define SIZE_256MB 0x1C | 332 | #define SIZE_256MB 0x1C |
333 | #define SIZE_128MB 0x1B | 333 | #define SIZE_128MB 0x1B |
334 | #define SIZE_64MB 0x1A | 334 | #define SIZE_64MB 0x1A |
335 | #define SIZE_32MB 0x19 | 335 | #define SIZE_32MB 0x19 |
336 | #define SIZE_16MB 0x18 | 336 | #define SIZE_16MB 0x18 |
337 | #define SIZE_4MB 0x16 | 337 | #define SIZE_4MB 0x16 |
338 | #define SIZE_2MB 0x15 | 338 | #define SIZE_2MB 0x15 |
339 | #define SIZE_1MB 0x14 | 339 | #define SIZE_1MB 0x14 |
@@ -363,7 +363,7 @@ struct pci_msu { | |||
363 | #define KORINA_CONFIG23_ADDR 0x8000005C | 363 | #define KORINA_CONFIG23_ADDR 0x8000005C |
364 | #define KORINA_CONFIG24_ADDR 0x80000060 | 364 | #define KORINA_CONFIG24_ADDR 0x80000060 |
365 | #define KORINA_CONFIG25_ADDR 0x80000064 | 365 | #define KORINA_CONFIG25_ADDR 0x80000064 |
366 | #define KORINA_CMD (PCI_CFG04_CMD_IO_ENA | \ | 366 | #define KORINA_CMD (PCI_CFG04_CMD_IO_ENA | \ |
367 | PCI_CFG04_CMD_MEM_ENA | \ | 367 | PCI_CFG04_CMD_MEM_ENA | \ |
368 | PCI_CFG04_CMD_BM_ENA | \ | 368 | PCI_CFG04_CMD_BM_ENA | \ |
369 | PCI_CFG04_CMD_MW_INV | \ | 369 | PCI_CFG04_CMD_MW_INV | \ |
@@ -401,8 +401,8 @@ struct pci_msu { | |||
401 | #define KORINA_BAR3 0x48000008 /* Spare 128 MB Memory */ | 401 | #define KORINA_BAR3 0x48000008 /* Spare 128 MB Memory */ |
402 | 402 | ||
403 | #define KORINA_CNFG4 KORINA_BAR0 | 403 | #define KORINA_CNFG4 KORINA_BAR0 |
404 | #define KORINA_CNFG5 KORINA_BAR1 | 404 | #define KORINA_CNFG5 KORINA_BAR1 |
405 | #define KORINA_CNFG6 KORINA_BAR2 | 405 | #define KORINA_CNFG6 KORINA_BAR2 |
406 | #define KORINA_CNFG7 KORINA_BAR3 | 406 | #define KORINA_CNFG7 KORINA_BAR3 |
407 | 407 | ||
408 | #define KORINA_SUBSYS_VENDOR_ID 0x011d | 408 | #define KORINA_SUBSYS_VENDOR_ID 0x011d |
@@ -410,20 +410,20 @@ struct pci_msu { | |||
410 | #define KORINA_CNFG8 0 | 410 | #define KORINA_CNFG8 0 |
411 | #define KORINA_CNFG9 0 | 411 | #define KORINA_CNFG9 0 |
412 | #define KORINA_CNFG10 0 | 412 | #define KORINA_CNFG10 0 |
413 | #define KORINA_CNFG11 ((KORINA_SUBSYS_VENDOR_ID<<16) | \ | 413 | #define KORINA_CNFG11 ((KORINA_SUBSYS_VENDOR_ID<<16) | \ |
414 | KORINA_SUBSYSTEM_ID) | 414 | KORINA_SUBSYSTEM_ID) |
415 | #define KORINA_INT_LINE 1 | 415 | #define KORINA_INT_LINE 1 |
416 | #define KORINA_INT_PIN 1 | 416 | #define KORINA_INT_PIN 1 |
417 | #define KORINA_MIN_GNT 8 | 417 | #define KORINA_MIN_GNT 8 |
418 | #define KORINA_MAX_LAT 0x38 | 418 | #define KORINA_MAX_LAT 0x38 |
419 | #define KORINA_CNFG12 0 | 419 | #define KORINA_CNFG12 0 |
420 | #define KORINA_CNFG13 0 | 420 | #define KORINA_CNFG13 0 |
421 | #define KORINA_CNFG14 0 | 421 | #define KORINA_CNFG14 0 |
422 | #define KORINA_CNFG15 ((KORINA_MAX_LAT<<24) | \ | 422 | #define KORINA_CNFG15 ((KORINA_MAX_LAT<<24) | \ |
423 | (KORINA_MIN_GNT<<16) | \ | 423 | (KORINA_MIN_GNT<<16) | \ |
424 | (KORINA_INT_PIN<<8) | \ | 424 | (KORINA_INT_PIN<<8) | \ |
425 | KORINA_INT_LINE) | 425 | KORINA_INT_LINE) |
426 | #define KORINA_RETRY_LIMIT 0x80 | 426 | #define KORINA_RETRY_LIMIT 0x80 |
427 | #define KORINA_TRDY_LIMIT 0x80 | 427 | #define KORINA_TRDY_LIMIT 0x80 |
428 | #define KORINA_CNFG16 ((KORINA_RETRY_LIMIT<<8) | \ | 428 | #define KORINA_CNFG16 ((KORINA_RETRY_LIMIT<<8) | \ |
429 | KORINA_TRDY_LIMIT) | 429 | KORINA_TRDY_LIMIT) |
@@ -475,7 +475,7 @@ struct pci_msu { | |||
475 | #define KORINA_PBA3M 0 | 475 | #define KORINA_PBA3M 0 |
476 | #define KORINA_CNFG24 KORINA_PBA3M | 476 | #define KORINA_CNFG24 KORINA_PBA3M |
477 | 477 | ||
478 | #define PCITC_DTIMER_VAL 8 | 478 | #define PCITC_DTIMER_VAL 8 |
479 | #define PCITC_RTIMER_VAL 0x10 | 479 | #define PCITC_RTIMER_VAL 0x10 |
480 | 480 | ||
481 | #endif /* __ASM_RC32434_PCI_H */ | 481 | #endif /* __ASM_RC32434_PCI_H */ |
diff --git a/arch/mips/include/asm/mach-rc32434/rb.h b/arch/mips/include/asm/mach-rc32434/rb.h index 6dc5f8df1f3e..aac8ce8902e7 100644 --- a/arch/mips/include/asm/mach-rc32434/rb.h +++ b/arch/mips/include/asm/mach-rc32434/rb.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/genhd.h> | 18 | #include <linux/genhd.h> |
19 | 19 | ||
20 | #define REGBASE 0x18000000 | 20 | #define REGBASE 0x18000000 |
21 | #define IDT434_REG_BASE ((volatile void *) KSEG1ADDR(REGBASE)) | 21 | #define IDT434_REG_BASE ((volatile void *) KSEG1ADDR(REGBASE)) |
22 | #define UART0BASE 0x58000 | 22 | #define UART0BASE 0x58000 |
23 | #define RST (1 << 15) | 23 | #define RST (1 << 15) |
24 | #define DEV0BASE 0x010000 | 24 | #define DEV0BASE 0x010000 |
@@ -80,10 +80,10 @@ struct cf_device { | |||
80 | struct mpmc_device { | 80 | struct mpmc_device { |
81 | unsigned char state; | 81 | unsigned char state; |
82 | spinlock_t lock; | 82 | spinlock_t lock; |
83 | void __iomem *base; | 83 | void __iomem *base; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | extern void set_latch_u5(unsigned char or_mask, unsigned char nand_mask); | 86 | extern void set_latch_u5(unsigned char or_mask, unsigned char nand_mask); |
87 | extern unsigned char get_latch_u5(void); | 87 | extern unsigned char get_latch_u5(void); |
88 | 88 | ||
89 | #endif /* __ASM_RC32434_RB_H */ | 89 | #endif /* __ASM_RC32434_RB_H */ |
diff --git a/arch/mips/include/asm/mach-rc32434/rc32434.h b/arch/mips/include/asm/mach-rc32434/rc32434.h index fce25d4231fc..02fd32b4be16 100644 --- a/arch/mips/include/asm/mach-rc32434/rc32434.h +++ b/arch/mips/include/asm/mach-rc32434/rc32434.h | |||
@@ -16,4 +16,4 @@ static inline void rc32434_sync(void) | |||
16 | __asm__ volatile ("sync"); | 16 | __asm__ volatile ("sync"); |
17 | } | 17 | } |
18 | 18 | ||
19 | #endif /* _ASM_RC32434_RC32434_H_ */ | 19 | #endif /* _ASM_RC32434_RC32434_H_ */ |
diff --git a/arch/mips/include/asm/mach-rc32434/timer.h b/arch/mips/include/asm/mach-rc32434/timer.h index e49b1d57a017..cda26bb9eead 100644 --- a/arch/mips/include/asm/mach-rc32434/timer.h +++ b/arch/mips/include/asm/mach-rc32434/timer.h | |||
@@ -51,15 +51,15 @@ struct timer { | |||
51 | #define RC32434_CTC_TO_BIT 1 | 51 | #define RC32434_CTC_TO_BIT 1 |
52 | 52 | ||
53 | /* Real time clock registers */ | 53 | /* Real time clock registers */ |
54 | #define RC32434_RTC_MSK(x) BIT_TO_MASK(x) | 54 | #define RC32434_RTC_MSK(x) BIT_TO_MASK(x) |
55 | #define RC32434_RTC_CE_BIT 0 | 55 | #define RC32434_RTC_CE_BIT 0 |
56 | #define RC32434_RTC_TO_BIT 1 | 56 | #define RC32434_RTC_TO_BIT 1 |
57 | #define RC32434_RTC_RQE_BIT 2 | 57 | #define RC32434_RTC_RQE_BIT 2 |
58 | 58 | ||
59 | /* Counter registers */ | 59 | /* Counter registers */ |
60 | #define RC32434_RCOUNT_BIT 0 | 60 | #define RC32434_RCOUNT_BIT 0 |
61 | #define RC32434_RCOUNT_MSK 0x0000ffff | 61 | #define RC32434_RCOUNT_MSK 0x0000ffff |
62 | #define RC32434_RCOMP_BIT 0 | 62 | #define RC32434_RCOMP_BIT 0 |
63 | #define RC32434_RCOMP_MSK 0x0000ffff | 63 | #define RC32434_RCOMP_MSK 0x0000ffff |
64 | 64 | ||
65 | #endif /* __ASM_RC32434_TIMER_H */ | 65 | #endif /* __ASM_RC32434_TIMER_H */ |
diff --git a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h index 7f3e3f9bd23a..d9c828419037 100644 --- a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h | |||
@@ -23,8 +23,8 @@ | |||
23 | /* #define cpu_has_watch ? */ | 23 | /* #define cpu_has_watch ? */ |
24 | #define cpu_has_divec 1 | 24 | #define cpu_has_divec 1 |
25 | #define cpu_has_vce 0 | 25 | #define cpu_has_vce 0 |
26 | /* #define cpu_has_cache_cdex_p ? */ | 26 | /* #define cpu_has_cache_cdex_p ? */ |
27 | /* #define cpu_has_cache_cdex_s ? */ | 27 | /* #define cpu_has_cache_cdex_s ? */ |
28 | /* #define cpu_has_prefetch ? */ | 28 | /* #define cpu_has_prefetch ? */ |
29 | #define cpu_has_mcheck 1 | 29 | #define cpu_has_mcheck 1 |
30 | /* #define cpu_has_ejtag ? */ | 30 | /* #define cpu_has_ejtag ? */ |
@@ -53,8 +53,8 @@ | |||
53 | /* #define cpu_has_watch ? */ | 53 | /* #define cpu_has_watch ? */ |
54 | #define cpu_has_divec 1 | 54 | #define cpu_has_divec 1 |
55 | #define cpu_has_vce 0 | 55 | #define cpu_has_vce 0 |
56 | /* #define cpu_has_cache_cdex_p ? */ | 56 | /* #define cpu_has_cache_cdex_p ? */ |
57 | /* #define cpu_has_cache_cdex_s ? */ | 57 | /* #define cpu_has_cache_cdex_s ? */ |
58 | /* #define cpu_has_prefetch ? */ | 58 | /* #define cpu_has_prefetch ? */ |
59 | #define cpu_has_mcheck 1 | 59 | #define cpu_has_mcheck 1 |
60 | /* #define cpu_has_ejtag ? */ | 60 | /* #define cpu_has_ejtag ? */ |
diff --git a/arch/mips/include/asm/mach-sead3/irq.h b/arch/mips/include/asm/mach-sead3/irq.h index 652ea4c38cda..5d154cfbcf4c 100644 --- a/arch/mips/include/asm/mach-sead3/irq.h +++ b/arch/mips/include/asm/mach-sead3/irq.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_MIPS_IRQ_H | 1 | #ifndef __ASM_MACH_MIPS_IRQ_H |
2 | #define __ASM_MACH_MIPS_IRQ_H | 2 | #define __ASM_MACH_MIPS_IRQ_H |
3 | 3 | ||
4 | #define NR_IRQS 256 | 4 | #define NR_IRQS 256 |
5 | 5 | ||
6 | 6 | ||
7 | #include_next <irq.h> | 7 | #include_next <irq.h> |
diff --git a/arch/mips/include/asm/mach-sibyte/war.h b/arch/mips/include/asm/mach-sibyte/war.h index 176f5b32dc69..0a227d426b9c 100644 --- a/arch/mips/include/asm/mach-sibyte/war.h +++ b/arch/mips/include/asm/mach-sibyte/war.h | |||
@@ -21,12 +21,12 @@ extern int sb1250_m3_workaround_needed(void); | |||
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #define BCM1250_M3_WAR sb1250_m3_workaround_needed() | 23 | #define BCM1250_M3_WAR sb1250_m3_workaround_needed() |
24 | #define SIBYTE_1956_WAR 1 | 24 | #define SIBYTE_1956_WAR 1 |
25 | 25 | ||
26 | #else | 26 | #else |
27 | 27 | ||
28 | #define BCM1250_M3_WAR 0 | 28 | #define BCM1250_M3_WAR 0 |
29 | #define SIBYTE_1956_WAR 0 | 29 | #define SIBYTE_1956_WAR 0 |
30 | 30 | ||
31 | #endif | 31 | #endif |
32 | 32 | ||
diff --git a/arch/mips/include/asm/mach-wrppmc/mach-gt64120.h b/arch/mips/include/asm/mach-wrppmc/mach-gt64120.h index 83746b84a5ec..00fa3684ac98 100644 --- a/arch/mips/include/asm/mach-wrppmc/mach-gt64120.h +++ b/arch/mips/include/asm/mach-wrppmc/mach-gt64120.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This is a direct copy of the ev96100.h file, with a global | 2 | * This is a direct copy of the ev96100.h file, with a global |
3 | * search and replace. The numbers are the same. | 3 | * search and replace. The numbers are the same. |
4 | * | 4 | * |
5 | * The reason I'm duplicating this is so that the 64120/96100 | 5 | * The reason I'm duplicating this is so that the 64120/96100 |
6 | * defines won't be confusing in the source code. | 6 | * defines won't be confusing in the source code. |
@@ -11,11 +11,11 @@ | |||
11 | /* | 11 | /* |
12 | * This is the CPU physical memory map of PPMC Board: | 12 | * This is the CPU physical memory map of PPMC Board: |
13 | * | 13 | * |
14 | * 0x00000000-0x03FFFFFF - 64MB SDRAM (SCS[0]#) | 14 | * 0x00000000-0x03FFFFFF - 64MB SDRAM (SCS[0]#) |
15 | * 0x1C000000-0x1C000000 - LED (CS0) | 15 | * 0x1C000000-0x1C000000 - LED (CS0) |
16 | * 0x1C800000-0x1C800007 - UART 16550 port (CS1) | 16 | * 0x1C800000-0x1C800007 - UART 16550 port (CS1) |
17 | * 0x1F000000-0x1F000000 - MailBox (CS3) | 17 | * 0x1F000000-0x1F000000 - MailBox (CS3) |
18 | * 0x1FC00000-0x20000000 - 4MB Flash (BOOT CS) | 18 | * 0x1FC00000-0x20000000 - 4MB Flash (BOOT CS) |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define WRPPMC_SDRAM_SCS0_BASE 0x00000000 | 21 | #define WRPPMC_SDRAM_SCS0_BASE 0x00000000 |
@@ -39,8 +39,8 @@ | |||
39 | * | 39 | * |
40 | * NOTE: We only have PCI_0 hose interface | 40 | * NOTE: We only have PCI_0 hose interface |
41 | */ | 41 | */ |
42 | #define GT_PCI_MEM_BASE 0x13000000UL | 42 | #define GT_PCI_MEM_BASE 0x13000000UL |
43 | #define GT_PCI_MEM_SIZE 0x02000000UL | 43 | #define GT_PCI_MEM_SIZE 0x02000000UL |
44 | #define GT_PCI_IO_BASE 0x11000000UL | 44 | #define GT_PCI_IO_BASE 0x11000000UL |
45 | #define GT_PCI_IO_SIZE 0x02000000UL | 45 | #define GT_PCI_IO_SIZE 0x02000000UL |
46 | 46 | ||
diff --git a/arch/mips/include/asm/mc146818-time.h b/arch/mips/include/asm/mc146818-time.h index 4a08dbe37db8..9e1ad26abdc0 100644 --- a/arch/mips/include/asm/mc146818-time.h +++ b/arch/mips/include/asm/mc146818-time.h | |||
@@ -26,7 +26,7 @@ | |||
26 | * MC146818A or Dallas DS12887 data sheet for details. | 26 | * MC146818A or Dallas DS12887 data sheet for details. |
27 | * | 27 | * |
28 | * BUG: This routine does not handle hour overflow properly; it just | 28 | * BUG: This routine does not handle hour overflow properly; it just |
29 | * sets the minutes. Usually you'll only notice that after reboot! | 29 | * sets the minutes. Usually you'll only notice that after reboot! |
30 | */ | 30 | */ |
31 | static inline int mc146818_set_rtc_mmss(unsigned long nowtime) | 31 | static inline int mc146818_set_rtc_mmss(unsigned long nowtime) |
32 | { | 32 | { |
@@ -77,7 +77,7 @@ static inline int mc146818_set_rtc_mmss(unsigned long nowtime) | |||
77 | * battery and quartz) will not reset the oscillator and will not | 77 | * battery and quartz) will not reset the oscillator and will not |
78 | * update precisely 500 ms later. You won't find this mentioned in | 78 | * update precisely 500 ms later. You won't find this mentioned in |
79 | * the Dallas Semiconductor data sheets, but who believes data | 79 | * the Dallas Semiconductor data sheets, but who believes data |
80 | * sheets anyway ... -- Markus Kuhn | 80 | * sheets anyway ... -- Markus Kuhn |
81 | */ | 81 | */ |
82 | CMOS_WRITE(save_control, RTC_CONTROL); | 82 | CMOS_WRITE(save_control, RTC_CONTROL); |
83 | CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); | 83 | CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); |
diff --git a/arch/mips/include/asm/mips-boards/bonito64.h b/arch/mips/include/asm/mips-boards/bonito64.h index d14e2adc4be5..b2048d1bcc1c 100644 --- a/arch/mips/include/asm/mips-boards/bonito64.h +++ b/arch/mips/include/asm/mips-boards/bonito64.h | |||
@@ -41,18 +41,18 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
41 | 41 | ||
42 | #define BONITO_BOOT_BASE 0x1fc00000 | 42 | #define BONITO_BOOT_BASE 0x1fc00000 |
43 | #define BONITO_BOOT_SIZE 0x00100000 | 43 | #define BONITO_BOOT_SIZE 0x00100000 |
44 | #define BONITO_BOOT_TOP (BONITO_BOOT_BASE+BONITO_BOOT_SIZE-1) | 44 | #define BONITO_BOOT_TOP (BONITO_BOOT_BASE+BONITO_BOOT_SIZE-1) |
45 | #define BONITO_FLASH_BASE 0x1c000000 | 45 | #define BONITO_FLASH_BASE 0x1c000000 |
46 | #define BONITO_FLASH_SIZE 0x03000000 | 46 | #define BONITO_FLASH_SIZE 0x03000000 |
47 | #define BONITO_FLASH_TOP (BONITO_FLASH_BASE+BONITO_FLASH_SIZE-1) | 47 | #define BONITO_FLASH_TOP (BONITO_FLASH_BASE+BONITO_FLASH_SIZE-1) |
48 | #define BONITO_SOCKET_BASE 0x1f800000 | 48 | #define BONITO_SOCKET_BASE 0x1f800000 |
49 | #define BONITO_SOCKET_SIZE 0x00400000 | 49 | #define BONITO_SOCKET_SIZE 0x00400000 |
50 | #define BONITO_SOCKET_TOP (BONITO_SOCKET_BASE+BONITO_SOCKET_SIZE-1) | 50 | #define BONITO_SOCKET_TOP (BONITO_SOCKET_BASE+BONITO_SOCKET_SIZE-1) |
51 | #define BONITO_REG_BASE 0x1fe00000 | 51 | #define BONITO_REG_BASE 0x1fe00000 |
52 | #define BONITO_REG_SIZE 0x00040000 | 52 | #define BONITO_REG_SIZE 0x00040000 |
53 | #define BONITO_REG_TOP (BONITO_REG_BASE+BONITO_REG_SIZE-1) | 53 | #define BONITO_REG_TOP (BONITO_REG_BASE+BONITO_REG_SIZE-1) |
54 | #define BONITO_DEV_BASE 0x1ff00000 | 54 | #define BONITO_DEV_BASE 0x1ff00000 |
55 | #define BONITO_DEV_SIZE 0x00100000 | 55 | #define BONITO_DEV_SIZE 0x00100000 |
56 | #define BONITO_DEV_TOP (BONITO_DEV_BASE+BONITO_DEV_SIZE-1) | 56 | #define BONITO_DEV_TOP (BONITO_DEV_BASE+BONITO_DEV_SIZE-1) |
57 | #define BONITO_PCILO_BASE 0x10000000 | 57 | #define BONITO_PCILO_BASE 0x10000000 |
58 | #define BONITO_PCILO_SIZE 0x0c000000 | 58 | #define BONITO_PCILO_SIZE 0x0c000000 |
@@ -79,14 +79,14 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
79 | 79 | ||
80 | /* PCI Configuration Registers */ | 80 | /* PCI Configuration Registers */ |
81 | 81 | ||
82 | #define BONITO_PCI_REG(x) BONITO(BONITO_PCICONFIGBASE + (x)) | 82 | #define BONITO_PCI_REG(x) BONITO(BONITO_PCICONFIGBASE + (x)) |
83 | #define BONITO_PCIDID BONITO_PCI_REG(0x00) | 83 | #define BONITO_PCIDID BONITO_PCI_REG(0x00) |
84 | #define BONITO_PCICMD BONITO_PCI_REG(0x04) | 84 | #define BONITO_PCICMD BONITO_PCI_REG(0x04) |
85 | #define BONITO_PCICLASS BONITO_PCI_REG(0x08) | 85 | #define BONITO_PCICLASS BONITO_PCI_REG(0x08) |
86 | #define BONITO_PCILTIMER BONITO_PCI_REG(0x0c) | 86 | #define BONITO_PCILTIMER BONITO_PCI_REG(0x0c) |
87 | #define BONITO_PCIBASE0 BONITO_PCI_REG(0x10) | 87 | #define BONITO_PCIBASE0 BONITO_PCI_REG(0x10) |
88 | #define BONITO_PCIBASE1 BONITO_PCI_REG(0x14) | 88 | #define BONITO_PCIBASE1 BONITO_PCI_REG(0x14) |
89 | #define BONITO_PCIBASE2 BONITO_PCI_REG(0x18) | 89 | #define BONITO_PCIBASE2 BONITO_PCI_REG(0x18) |
90 | #define BONITO_PCIEXPRBASE BONITO_PCI_REG(0x30) | 90 | #define BONITO_PCIEXPRBASE BONITO_PCI_REG(0x30) |
91 | #define BONITO_PCIINT BONITO_PCI_REG(0x3c) | 91 | #define BONITO_PCIINT BONITO_PCI_REG(0x3c) |
92 | 92 | ||
@@ -95,7 +95,7 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
95 | #define BONITO_PCICMD_MABORT_CLR 0x20000000 | 95 | #define BONITO_PCICMD_MABORT_CLR 0x20000000 |
96 | #define BONITO_PCICMD_MTABORT_CLR 0x10000000 | 96 | #define BONITO_PCICMD_MTABORT_CLR 0x10000000 |
97 | #define BONITO_PCICMD_TABORT_CLR 0x08000000 | 97 | #define BONITO_PCICMD_TABORT_CLR 0x08000000 |
98 | #define BONITO_PCICMD_MPERR_CLR 0x01000000 | 98 | #define BONITO_PCICMD_MPERR_CLR 0x01000000 |
99 | #define BONITO_PCICMD_PERRRESPEN 0x00000040 | 99 | #define BONITO_PCICMD_PERRRESPEN 0x00000040 |
100 | #define BONITO_PCICMD_ASTEPEN 0x00000080 | 100 | #define BONITO_PCICMD_ASTEPEN 0x00000080 |
101 | #define BONITO_PCICMD_SERREN 0x00000100 | 101 | #define BONITO_PCICMD_SERREN 0x00000100 |
@@ -139,7 +139,7 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
139 | 139 | ||
140 | /* Other Bonito configuration */ | 140 | /* Other Bonito configuration */ |
141 | 141 | ||
142 | #define BONITO_BONGENCFG_OFFSET 0x4 | 142 | #define BONITO_BONGENCFG_OFFSET 0x4 |
143 | #define BONITO_BONGENCFG BONITO(BONITO_REGBASE + BONITO_BONGENCFG_OFFSET) | 143 | #define BONITO_BONGENCFG BONITO(BONITO_REGBASE + BONITO_BONGENCFG_OFFSET) |
144 | 144 | ||
145 | #define BONITO_BONGENCFG_DEBUGMODE 0x00000001 | 145 | #define BONITO_BONGENCFG_DEBUGMODE 0x00000001 |
@@ -165,7 +165,7 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
165 | 165 | ||
166 | /* 2. IO & IDE configuration */ | 166 | /* 2. IO & IDE configuration */ |
167 | 167 | ||
168 | #define BONITO_IODEVCFG BONITO(BONITO_REGBASE + 0x08) | 168 | #define BONITO_IODEVCFG BONITO(BONITO_REGBASE + 0x08) |
169 | 169 | ||
170 | /* 3. IO & IDE configuration */ | 170 | /* 3. IO & IDE configuration */ |
171 | 171 | ||
@@ -181,33 +181,33 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
181 | 181 | ||
182 | /* GPIO Regs - r/w */ | 182 | /* GPIO Regs - r/w */ |
183 | 183 | ||
184 | #define BONITO_GPIODATA_OFFSET 0x1c | 184 | #define BONITO_GPIODATA_OFFSET 0x1c |
185 | #define BONITO_GPIODATA BONITO(BONITO_REGBASE + BONITO_GPIODATA_OFFSET) | 185 | #define BONITO_GPIODATA BONITO(BONITO_REGBASE + BONITO_GPIODATA_OFFSET) |
186 | #define BONITO_GPIOIE BONITO(BONITO_REGBASE + 0x20) | 186 | #define BONITO_GPIOIE BONITO(BONITO_REGBASE + 0x20) |
187 | 187 | ||
188 | /* ICU Configuration Regs - r/w */ | 188 | /* ICU Configuration Regs - r/w */ |
189 | 189 | ||
190 | #define BONITO_INTEDGE BONITO(BONITO_REGBASE + 0x24) | 190 | #define BONITO_INTEDGE BONITO(BONITO_REGBASE + 0x24) |
191 | #define BONITO_INTSTEER BONITO(BONITO_REGBASE + 0x28) | 191 | #define BONITO_INTSTEER BONITO(BONITO_REGBASE + 0x28) |
192 | #define BONITO_INTPOL BONITO(BONITO_REGBASE + 0x2c) | 192 | #define BONITO_INTPOL BONITO(BONITO_REGBASE + 0x2c) |
193 | 193 | ||
194 | /* ICU Enable Regs - IntEn & IntISR are r/o. */ | 194 | /* ICU Enable Regs - IntEn & IntISR are r/o. */ |
195 | 195 | ||
196 | #define BONITO_INTENSET BONITO(BONITO_REGBASE + 0x30) | 196 | #define BONITO_INTENSET BONITO(BONITO_REGBASE + 0x30) |
197 | #define BONITO_INTENCLR BONITO(BONITO_REGBASE + 0x34) | 197 | #define BONITO_INTENCLR BONITO(BONITO_REGBASE + 0x34) |
198 | #define BONITO_INTEN BONITO(BONITO_REGBASE + 0x38) | 198 | #define BONITO_INTEN BONITO(BONITO_REGBASE + 0x38) |
199 | #define BONITO_INTISR BONITO(BONITO_REGBASE + 0x3c) | 199 | #define BONITO_INTISR BONITO(BONITO_REGBASE + 0x3c) |
200 | 200 | ||
201 | /* PCI mail boxes */ | 201 | /* PCI mail boxes */ |
202 | 202 | ||
203 | #define BONITO_PCIMAIL0_OFFSET 0x40 | 203 | #define BONITO_PCIMAIL0_OFFSET 0x40 |
204 | #define BONITO_PCIMAIL1_OFFSET 0x44 | 204 | #define BONITO_PCIMAIL1_OFFSET 0x44 |
205 | #define BONITO_PCIMAIL2_OFFSET 0x48 | 205 | #define BONITO_PCIMAIL2_OFFSET 0x48 |
206 | #define BONITO_PCIMAIL3_OFFSET 0x4c | 206 | #define BONITO_PCIMAIL3_OFFSET 0x4c |
207 | #define BONITO_PCIMAIL0 BONITO(BONITO_REGBASE + 0x40) | 207 | #define BONITO_PCIMAIL0 BONITO(BONITO_REGBASE + 0x40) |
208 | #define BONITO_PCIMAIL1 BONITO(BONITO_REGBASE + 0x44) | 208 | #define BONITO_PCIMAIL1 BONITO(BONITO_REGBASE + 0x44) |
209 | #define BONITO_PCIMAIL2 BONITO(BONITO_REGBASE + 0x48) | 209 | #define BONITO_PCIMAIL2 BONITO(BONITO_REGBASE + 0x48) |
210 | #define BONITO_PCIMAIL3 BONITO(BONITO_REGBASE + 0x4c) | 210 | #define BONITO_PCIMAIL3 BONITO(BONITO_REGBASE + 0x4c) |
211 | 211 | ||
212 | 212 | ||
213 | /* 6. PCI cache */ | 213 | /* 6. PCI cache */ |
@@ -216,7 +216,7 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
216 | #define BONITO_PCICACHETAG BONITO(BONITO_REGBASE + 0x54) | 216 | #define BONITO_PCICACHETAG BONITO(BONITO_REGBASE + 0x54) |
217 | 217 | ||
218 | #define BONITO_PCIBADADDR BONITO(BONITO_REGBASE + 0x58) | 218 | #define BONITO_PCIBADADDR BONITO(BONITO_REGBASE + 0x58) |
219 | #define BONITO_PCIMSTAT BONITO(BONITO_REGBASE + 0x5c) | 219 | #define BONITO_PCIMSTAT BONITO(BONITO_REGBASE + 0x5c) |
220 | 220 | ||
221 | 221 | ||
222 | /* | 222 | /* |
@@ -228,20 +228,20 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
228 | 228 | ||
229 | #define BONITO_CONFIGBASE 0x000 | 229 | #define BONITO_CONFIGBASE 0x000 |
230 | #define BONITO_BONITOBASE 0x100 | 230 | #define BONITO_BONITOBASE 0x100 |
231 | #define BONITO_LDMABASE 0x200 | 231 | #define BONITO_LDMABASE 0x200 |
232 | #define BONITO_COPBASE 0x300 | 232 | #define BONITO_COPBASE 0x300 |
233 | #define BONITO_REG_BLOCKMASK 0x300 | 233 | #define BONITO_REG_BLOCKMASK 0x300 |
234 | 234 | ||
235 | #define BONITO_LDMACTRL BONITO(BONITO_LDMABASE + 0x0) | 235 | #define BONITO_LDMACTRL BONITO(BONITO_LDMABASE + 0x0) |
236 | #define BONITO_LDMASTAT BONITO(BONITO_LDMABASE + 0x0) | 236 | #define BONITO_LDMASTAT BONITO(BONITO_LDMABASE + 0x0) |
237 | #define BONITO_LDMAADDR BONITO(BONITO_LDMABASE + 0x4) | 237 | #define BONITO_LDMAADDR BONITO(BONITO_LDMABASE + 0x4) |
238 | #define BONITO_LDMAGO BONITO(BONITO_LDMABASE + 0x8) | 238 | #define BONITO_LDMAGO BONITO(BONITO_LDMABASE + 0x8) |
239 | #define BONITO_LDMADATA BONITO(BONITO_LDMABASE + 0xc) | 239 | #define BONITO_LDMADATA BONITO(BONITO_LDMABASE + 0xc) |
240 | 240 | ||
241 | #define BONITO_COPCTRL BONITO(BONITO_COPBASE + 0x0) | 241 | #define BONITO_COPCTRL BONITO(BONITO_COPBASE + 0x0) |
242 | #define BONITO_COPSTAT BONITO(BONITO_COPBASE + 0x0) | 242 | #define BONITO_COPSTAT BONITO(BONITO_COPBASE + 0x0) |
243 | #define BONITO_COPPADDR BONITO(BONITO_COPBASE + 0x4) | 243 | #define BONITO_COPPADDR BONITO(BONITO_COPBASE + 0x4) |
244 | #define BONITO_COPDADDR BONITO(BONITO_COPBASE + 0x8) | 244 | #define BONITO_COPDADDR BONITO(BONITO_COPBASE + 0x8) |
245 | #define BONITO_COPGO BONITO(BONITO_COPBASE + 0xc) | 245 | #define BONITO_COPGO BONITO(BONITO_COPBASE + 0xc) |
246 | 246 | ||
247 | 247 | ||
@@ -257,7 +257,7 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
257 | #define BONITO_IDECOPGO_DMA_SIZE_SHIFT 0 | 257 | #define BONITO_IDECOPGO_DMA_SIZE_SHIFT 0 |
258 | #define BONITO_IDECOPGO_DMA_WRITE 0x00010000 | 258 | #define BONITO_IDECOPGO_DMA_WRITE 0x00010000 |
259 | #define BONITO_IDECOPGO_DMAWCOUNT 0x000f0000 | 259 | #define BONITO_IDECOPGO_DMAWCOUNT 0x000f0000 |
260 | #define BONITO_IDECOPGO_DMAWCOUNT_SHIFT 16 | 260 | #define BONITO_IDECOPGO_DMAWCOUNT_SHIFT 16 |
261 | 261 | ||
262 | #define BONITO_IDECOPCTRL_DMA_STARTBIT 0x80000000 | 262 | #define BONITO_IDECOPCTRL_DMA_STARTBIT 0x80000000 |
263 | #define BONITO_IDECOPCTRL_DMA_RSTBIT 0x40000000 | 263 | #define BONITO_IDECOPCTRL_DMA_RSTBIT 0x40000000 |
@@ -291,11 +291,11 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
291 | #define BONITO_SDCFG_DRAMMODESET 0x00200000 | 291 | #define BONITO_SDCFG_DRAMMODESET 0x00200000 |
292 | /* --- */ | 292 | /* --- */ |
293 | #define BONITO_SDCFG_DRAMEXTREGS 0x00400000 | 293 | #define BONITO_SDCFG_DRAMEXTREGS 0x00400000 |
294 | #define BONITO_SDCFG_DRAMPARITY 0x00800000 | 294 | #define BONITO_SDCFG_DRAMPARITY 0x00800000 |
295 | /* Added by RPF 11-9-00 */ | 295 | /* Added by RPF 11-9-00 */ |
296 | #define BONITO_SDCFG_DRAMBURSTLEN 0x03000000 | 296 | #define BONITO_SDCFG_DRAMBURSTLEN 0x03000000 |
297 | #define BONITO_SDCFG_DRAMBURSTLEN_SHIFT 24 | 297 | #define BONITO_SDCFG_DRAMBURSTLEN_SHIFT 24 |
298 | #define BONITO_SDCFG_DRAMMODESET_DONE 0x80000000 | 298 | #define BONITO_SDCFG_DRAMMODESET_DONE 0x80000000 |
299 | /* --- */ | 299 | /* --- */ |
300 | 300 | ||
301 | /* PCI Cache - pciCacheCtrl */ | 301 | /* PCI Cache - pciCacheCtrl */ |
@@ -308,7 +308,7 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
308 | 308 | ||
309 | #define BONITO_PCICACHECTRL_IOBCCOH_PRES 0x00000100 | 309 | #define BONITO_PCICACHECTRL_IOBCCOH_PRES 0x00000100 |
310 | #define BONITO_PCICACHECTRL_IOBCCOH_EN 0x00000200 | 310 | #define BONITO_PCICACHECTRL_IOBCCOH_EN 0x00000200 |
311 | #define BONITO_PCICACHECTRL_CPUCOH_PRES 0x00000400 | 311 | #define BONITO_PCICACHECTRL_CPUCOH_PRES 0x00000400 |
312 | #define BONITO_PCICACHECTRL_CPUCOH_EN 0x00000800 | 312 | #define BONITO_PCICACHECTRL_CPUCOH_EN 0x00000800 |
313 | 313 | ||
314 | #define BONITO_IODEVCFG_BUFFBIT_CS0 0x00000001 | 314 | #define BONITO_IODEVCFG_BUFFBIT_CS0 0x00000001 |
@@ -343,18 +343,18 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
343 | 343 | ||
344 | /* gpio */ | 344 | /* gpio */ |
345 | #define BONITO_GPIO_GPIOW 0x000003ff | 345 | #define BONITO_GPIO_GPIOW 0x000003ff |
346 | #define BONITO_GPIO_GPIOW_SHIFT 0 | 346 | #define BONITO_GPIO_GPIOW_SHIFT 0 |
347 | #define BONITO_GPIO_GPIOR 0x01ff0000 | 347 | #define BONITO_GPIO_GPIOR 0x01ff0000 |
348 | #define BONITO_GPIO_GPIOR_SHIFT 16 | 348 | #define BONITO_GPIO_GPIOR_SHIFT 16 |
349 | #define BONITO_GPIO_GPINR 0xfe000000 | 349 | #define BONITO_GPIO_GPINR 0xfe000000 |
350 | #define BONITO_GPIO_GPINR_SHIFT 25 | 350 | #define BONITO_GPIO_GPINR_SHIFT 25 |
351 | #define BONITO_GPIO_IOW(N) (1<<(BONITO_GPIO_GPIOW_SHIFT+(N))) | 351 | #define BONITO_GPIO_IOW(N) (1<<(BONITO_GPIO_GPIOW_SHIFT+(N))) |
352 | #define BONITO_GPIO_IOR(N) (1<<(BONITO_GPIO_GPIOR_SHIFT+(N))) | 352 | #define BONITO_GPIO_IOR(N) (1<<(BONITO_GPIO_GPIOR_SHIFT+(N))) |
353 | #define BONITO_GPIO_INR(N) (1<<(BONITO_GPIO_GPINR_SHIFT+(N))) | 353 | #define BONITO_GPIO_INR(N) (1<<(BONITO_GPIO_GPINR_SHIFT+(N))) |
354 | 354 | ||
355 | /* ICU */ | 355 | /* ICU */ |
356 | #define BONITO_ICU_MBOXES 0x0000000f | 356 | #define BONITO_ICU_MBOXES 0x0000000f |
357 | #define BONITO_ICU_MBOXES_SHIFT 0 | 357 | #define BONITO_ICU_MBOXES_SHIFT 0 |
358 | #define BONITO_ICU_DMARDY 0x00000010 | 358 | #define BONITO_ICU_DMARDY 0x00000010 |
359 | #define BONITO_ICU_DMAEMPTY 0x00000020 | 359 | #define BONITO_ICU_DMAEMPTY 0x00000020 |
360 | #define BONITO_ICU_COPYRDY 0x00000040 | 360 | #define BONITO_ICU_COPYRDY 0x00000040 |
@@ -384,13 +384,13 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
384 | #define BONITO_PCIMAP_PCIMAP_2 0x00040000 | 384 | #define BONITO_PCIMAP_PCIMAP_2 0x00040000 |
385 | #define BONITO_PCIMAP_WIN(WIN, ADDR) ((((ADDR)>>26) & BONITO_PCIMAP_PCIMAP_LO0) << ((WIN)*6)) | 385 | #define BONITO_PCIMAP_WIN(WIN, ADDR) ((((ADDR)>>26) & BONITO_PCIMAP_PCIMAP_LO0) << ((WIN)*6)) |
386 | 386 | ||
387 | #define BONITO_PCIMAP_WINSIZE (1<<26) | 387 | #define BONITO_PCIMAP_WINSIZE (1<<26) |
388 | #define BONITO_PCIMAP_WINOFFSET(ADDR) ((ADDR) & (BONITO_PCIMAP_WINSIZE - 1)) | 388 | #define BONITO_PCIMAP_WINOFFSET(ADDR) ((ADDR) & (BONITO_PCIMAP_WINSIZE - 1)) |
389 | #define BONITO_PCIMAP_WINBASE(ADDR) ((ADDR) << 26) | 389 | #define BONITO_PCIMAP_WINBASE(ADDR) ((ADDR) << 26) |
390 | 390 | ||
391 | /* pcimembaseCfg */ | 391 | /* pcimembaseCfg */ |
392 | 392 | ||
393 | #define BONITO_PCIMEMBASECFG_MASK 0xf0000000 | 393 | #define BONITO_PCIMEMBASECFG_MASK 0xf0000000 |
394 | #define BONITO_PCIMEMBASECFG_MEMBASE0_MASK 0x0000001f | 394 | #define BONITO_PCIMEMBASECFG_MEMBASE0_MASK 0x0000001f |
395 | #define BONITO_PCIMEMBASECFG_MEMBASE0_MASK_SHIFT 0 | 395 | #define BONITO_PCIMEMBASECFG_MEMBASE0_MASK_SHIFT 0 |
396 | #define BONITO_PCIMEMBASECFG_MEMBASE0_TRANS 0x000003e0 | 396 | #define BONITO_PCIMEMBASECFG_MEMBASE0_TRANS 0x000003e0 |
@@ -406,21 +406,21 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
406 | #define BONITO_PCIMEMBASECFG_MEMBASE1_IO 0x00800000 | 406 | #define BONITO_PCIMEMBASECFG_MEMBASE1_IO 0x00800000 |
407 | 407 | ||
408 | #define BONITO_PCIMEMBASECFG_ASHIFT 23 | 408 | #define BONITO_PCIMEMBASECFG_ASHIFT 23 |
409 | #define BONITO_PCIMEMBASECFG_AMASK 0x007fffff | 409 | #define BONITO_PCIMEMBASECFG_AMASK 0x007fffff |
410 | #define BONITO_PCIMEMBASECFGSIZE(WIN, SIZE) (((~((SIZE)-1))>>(BONITO_PCIMEMBASECFG_ASHIFT-BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) | 410 | #define BONITO_PCIMEMBASECFGSIZE(WIN, SIZE) (((~((SIZE)-1))>>(BONITO_PCIMEMBASECFG_ASHIFT-BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) |
411 | #define BONITO_PCIMEMBASECFGBASE(WIN, BASE) (((BASE)>>(BONITO_PCIMEMBASECFG_ASHIFT-BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS_SHIFT)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS) | 411 | #define BONITO_PCIMEMBASECFGBASE(WIN, BASE) (((BASE)>>(BONITO_PCIMEMBASECFG_ASHIFT-BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS_SHIFT)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS) |
412 | 412 | ||
413 | #define BONITO_PCIMEMBASECFG_SIZE(WIN, CFG) (((((~(CFG)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK)) << (BONITO_PCIMEMBASECFG_ASHIFT - BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT)) | BONITO_PCIMEMBASECFG_AMASK) | 413 | #define BONITO_PCIMEMBASECFG_SIZE(WIN, CFG) (((((~(CFG)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK)) << (BONITO_PCIMEMBASECFG_ASHIFT - BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT)) | BONITO_PCIMEMBASECFG_AMASK) |
414 | 414 | ||
415 | 415 | ||
416 | #define BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT) | 416 | #define BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT) |
417 | #define BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT) | 417 | #define BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT) |
418 | #define BONITO_PCIMEMBASECFG_ADDRTRANS(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT) | 418 | #define BONITO_PCIMEMBASECFG_ADDRTRANS(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT) |
419 | 419 | ||
420 | #define BONITO_PCITOPHYS(WIN, ADDR, CFG) ( \ | 420 | #define BONITO_PCITOPHYS(WIN, ADDR, CFG) ( \ |
421 | (((ADDR) & (~(BONITO_PCIMEMBASECFG_MASK))) & (~(BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG)))) | \ | 421 | (((ADDR) & (~(BONITO_PCIMEMBASECFG_MASK))) & (~(BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG)))) | \ |
422 | (BONITO_PCIMEMBASECFG_ADDRTRANS(WIN, CFG)) \ | 422 | (BONITO_PCIMEMBASECFG_ADDRTRANS(WIN, CFG)) \ |
423 | ) | 423 | ) |
424 | 424 | ||
425 | /* PCICmd */ | 425 | /* PCICmd */ |
426 | 426 | ||
diff --git a/arch/mips/include/asm/mips-boards/generic.h b/arch/mips/include/asm/mips-boards/generic.h index c01e286394da..1465b1193b12 100644 --- a/arch/mips/include/asm/mips-boards/generic.h +++ b/arch/mips/include/asm/mips-boards/generic.h | |||
@@ -27,39 +27,39 @@ | |||
27 | /* | 27 | /* |
28 | * Display register base. | 28 | * Display register base. |
29 | */ | 29 | */ |
30 | #define ASCII_DISPLAY_WORD_BASE 0x1f000410 | 30 | #define ASCII_DISPLAY_WORD_BASE 0x1f000410 |
31 | #define ASCII_DISPLAY_POS_BASE 0x1f000418 | 31 | #define ASCII_DISPLAY_POS_BASE 0x1f000418 |
32 | 32 | ||
33 | 33 | ||
34 | /* | 34 | /* |
35 | * Yamon Prom print address. | 35 | * Yamon Prom print address. |
36 | */ | 36 | */ |
37 | #define YAMON_PROM_PRINT_ADDR 0x1fc00504 | 37 | #define YAMON_PROM_PRINT_ADDR 0x1fc00504 |
38 | 38 | ||
39 | 39 | ||
40 | /* | 40 | /* |
41 | * Reset register. | 41 | * Reset register. |
42 | */ | 42 | */ |
43 | #define SOFTRES_REG 0x1f000500 | 43 | #define SOFTRES_REG 0x1f000500 |
44 | #define GORESET 0x42 | 44 | #define GORESET 0x42 |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * Revision register. | 47 | * Revision register. |
48 | */ | 48 | */ |
49 | #define MIPS_REVISION_REG 0x1fc00010 | 49 | #define MIPS_REVISION_REG 0x1fc00010 |
50 | #define MIPS_REVISION_CORID_QED_RM5261 0 | 50 | #define MIPS_REVISION_CORID_QED_RM5261 0 |
51 | #define MIPS_REVISION_CORID_CORE_LV 1 | 51 | #define MIPS_REVISION_CORID_CORE_LV 1 |
52 | #define MIPS_REVISION_CORID_BONITO64 2 | 52 | #define MIPS_REVISION_CORID_BONITO64 2 |
53 | #define MIPS_REVISION_CORID_CORE_20K 3 | 53 | #define MIPS_REVISION_CORID_CORE_20K 3 |
54 | #define MIPS_REVISION_CORID_CORE_FPGA 4 | 54 | #define MIPS_REVISION_CORID_CORE_FPGA 4 |
55 | #define MIPS_REVISION_CORID_CORE_MSC 5 | 55 | #define MIPS_REVISION_CORID_CORE_MSC 5 |
56 | #define MIPS_REVISION_CORID_CORE_EMUL 6 | 56 | #define MIPS_REVISION_CORID_CORE_EMUL 6 |
57 | #define MIPS_REVISION_CORID_CORE_FPGA2 7 | 57 | #define MIPS_REVISION_CORID_CORE_FPGA2 7 |
58 | #define MIPS_REVISION_CORID_CORE_FPGAR2 8 | 58 | #define MIPS_REVISION_CORID_CORE_FPGAR2 8 |
59 | #define MIPS_REVISION_CORID_CORE_FPGA3 9 | 59 | #define MIPS_REVISION_CORID_CORE_FPGA3 9 |
60 | #define MIPS_REVISION_CORID_CORE_24K 10 | 60 | #define MIPS_REVISION_CORID_CORE_24K 10 |
61 | #define MIPS_REVISION_CORID_CORE_FPGA4 11 | 61 | #define MIPS_REVISION_CORID_CORE_FPGA4 11 |
62 | #define MIPS_REVISION_CORID_CORE_FPGA5 12 | 62 | #define MIPS_REVISION_CORID_CORE_FPGA5 12 |
63 | 63 | ||
64 | /**** Artificial corid defines ****/ | 64 | /**** Artificial corid defines ****/ |
65 | /* | 65 | /* |
@@ -97,4 +97,4 @@ extern void mips_pcibios_init(void); | |||
97 | #define mips_pcibios_init() do { } while (0) | 97 | #define mips_pcibios_init() do { } while (0) |
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | #endif /* __ASM_MIPS_BOARDS_GENERIC_H */ | 100 | #endif /* __ASM_MIPS_BOARDS_GENERIC_H */ |
diff --git a/arch/mips/include/asm/mips-boards/launch.h b/arch/mips/include/asm/mips-boards/launch.h index d8ae7f95a522..653477e4074d 100644 --- a/arch/mips/include/asm/mips-boards/launch.h +++ b/arch/mips/include/asm/mips-boards/launch.h | |||
@@ -16,11 +16,11 @@ struct cpulaunch { | |||
16 | #else | 16 | #else |
17 | 17 | ||
18 | #define LOG2CPULAUNCH 5 | 18 | #define LOG2CPULAUNCH 5 |
19 | #define LAUNCH_PC 0 | 19 | #define LAUNCH_PC 0 |
20 | #define LAUNCH_GP 4 | 20 | #define LAUNCH_GP 4 |
21 | #define LAUNCH_SP 8 | 21 | #define LAUNCH_SP 8 |
22 | #define LAUNCH_A0 12 | 22 | #define LAUNCH_A0 12 |
23 | #define LAUNCH_FLAGS 28 | 23 | #define LAUNCH_FLAGS 28 |
24 | 24 | ||
25 | #endif | 25 | #endif |
26 | 26 | ||
diff --git a/arch/mips/include/asm/mips-boards/malta.h b/arch/mips/include/asm/mips-boards/malta.h index c1891578fa65..722bc889eab5 100644 --- a/arch/mips/include/asm/mips-boards/malta.h +++ b/arch/mips/include/asm/mips-boards/malta.h | |||
@@ -33,9 +33,9 @@ | |||
33 | * Malta I/O ports base address for the Galileo GT64120 and Algorithmics | 33 | * Malta I/O ports base address for the Galileo GT64120 and Algorithmics |
34 | * Bonito system controllers. | 34 | * Bonito system controllers. |
35 | */ | 35 | */ |
36 | #define MALTA_GT_PORT_BASE get_gt_port_base(GT_PCI0IOLD_OFS) | 36 | #define MALTA_GT_PORT_BASE get_gt_port_base(GT_PCI0IOLD_OFS) |
37 | #define MALTA_BONITO_PORT_BASE ((unsigned long)ioremap (0x1fd00000, 0x10000)) | 37 | #define MALTA_BONITO_PORT_BASE ((unsigned long)ioremap (0x1fd00000, 0x10000)) |
38 | #define MALTA_MSC_PORT_BASE get_msc_port_base(MSC01_PCI_SC2PIOBASL) | 38 | #define MALTA_MSC_PORT_BASE get_msc_port_base(MSC01_PCI_SC2PIOBASL) |
39 | 39 | ||
40 | static inline unsigned long get_gt_port_base(unsigned long reg) | 40 | static inline unsigned long get_gt_port_base(unsigned long reg) |
41 | { | 41 | { |
@@ -77,8 +77,8 @@ static inline unsigned long get_msc_port_base(unsigned long reg) | |||
77 | /* | 77 | /* |
78 | * Malta RTC-device indirect register access. | 78 | * Malta RTC-device indirect register access. |
79 | */ | 79 | */ |
80 | #define MALTA_RTC_ADR_REG 0x70 | 80 | #define MALTA_RTC_ADR_REG 0x70 |
81 | #define MALTA_RTC_DAT_REG 0x71 | 81 | #define MALTA_RTC_DAT_REG 0x71 |
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Malta SMSC FDC37M817 Super I/O Controller register. | 84 | * Malta SMSC FDC37M817 Super I/O Controller register. |
diff --git a/arch/mips/include/asm/mips-boards/maltaint.h b/arch/mips/include/asm/mips-boards/maltaint.h index 669244815753..e330732ddf98 100644 --- a/arch/mips/include/asm/mips-boards/maltaint.h +++ b/arch/mips/include/asm/mips-boards/maltaint.h | |||
@@ -4,8 +4,8 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2000,2012 MIPS Technologies, Inc. All rights reserved. | 6 | * Copyright (C) 2000,2012 MIPS Technologies, Inc. All rights reserved. |
7 | * Carsten Langgaard <carstenl@mips.com> | 7 | * Carsten Langgaard <carstenl@mips.com> |
8 | * Steven J. Hill <sjhill@mips.com> | 8 | * Steven J. Hill <sjhill@mips.com> |
9 | */ | 9 | */ |
10 | #ifndef _MIPS_MALTAINT_H | 10 | #ifndef _MIPS_MALTAINT_H |
11 | #define _MIPS_MALTAINT_H | 11 | #define _MIPS_MALTAINT_H |
@@ -24,9 +24,9 @@ | |||
24 | #define MIPSCPU_INT_I8259A MIPSCPU_INT_MB0 | 24 | #define MIPSCPU_INT_I8259A MIPSCPU_INT_MB0 |
25 | #define MIPSCPU_INT_MB1 3 | 25 | #define MIPSCPU_INT_MB1 3 |
26 | #define MIPSCPU_INT_SMI MIPSCPU_INT_MB1 | 26 | #define MIPSCPU_INT_SMI MIPSCPU_INT_MB1 |
27 | #define MIPSCPU_INT_IPI0 MIPSCPU_INT_MB1 /* GIC IPI */ | 27 | #define MIPSCPU_INT_IPI0 MIPSCPU_INT_MB1 /* GIC IPI */ |
28 | #define MIPSCPU_INT_MB2 4 | 28 | #define MIPSCPU_INT_MB2 4 |
29 | #define MIPSCPU_INT_IPI1 MIPSCPU_INT_MB2 /* GIC IPI */ | 29 | #define MIPSCPU_INT_IPI1 MIPSCPU_INT_MB2 /* GIC IPI */ |
30 | #define MIPSCPU_INT_MB3 5 | 30 | #define MIPSCPU_INT_MB3 5 |
31 | #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3 | 31 | #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3 |
32 | #define MIPSCPU_INT_MB4 6 | 32 | #define MIPSCPU_INT_MB4 6 |
diff --git a/arch/mips/include/asm/mips-boards/piix4.h b/arch/mips/include/asm/mips-boards/piix4.h index 2971d60f2e95..a02596cf1abd 100644 --- a/arch/mips/include/asm/mips-boards/piix4.h +++ b/arch/mips/include/asm/mips-boards/piix4.h | |||
@@ -53,7 +53,7 @@ | |||
53 | #define PIIX4_OCW2_SP (0x6 << 5) | 53 | #define PIIX4_OCW2_SP (0x6 << 5) |
54 | #define PIIX4_OCW2_NOP (0x2 << 5) | 54 | #define PIIX4_OCW2_NOP (0x2 << 5) |
55 | 55 | ||
56 | #define PIIX4_OCW2_SEL (0x0 << 3) | 56 | #define PIIX4_OCW2_SEL (0x0 << 3) |
57 | 57 | ||
58 | #define PIIX4_OCW2_ILS_0 0 | 58 | #define PIIX4_OCW2_ILS_0 0 |
59 | #define PIIX4_OCW2_ILS_1 1 | 59 | #define PIIX4_OCW2_ILS_1 1 |
@@ -72,9 +72,9 @@ | |||
72 | #define PIIX4_OCW2_ILS_14 6 | 72 | #define PIIX4_OCW2_ILS_14 6 |
73 | #define PIIX4_OCW2_ILS_15 7 | 73 | #define PIIX4_OCW2_ILS_15 7 |
74 | 74 | ||
75 | #define PIIX4_OCW3_SEL (0x1 << 3) | 75 | #define PIIX4_OCW3_SEL (0x1 << 3) |
76 | 76 | ||
77 | #define PIIX4_OCW3_IRR 0x2 | 77 | #define PIIX4_OCW3_IRR 0x2 |
78 | #define PIIX4_OCW3_ISR 0x3 | 78 | #define PIIX4_OCW3_ISR 0x3 |
79 | 79 | ||
80 | #endif /* __ASM_MIPS_BOARDS_PIIX4_H */ | 80 | #endif /* __ASM_MIPS_BOARDS_PIIX4_H */ |
diff --git a/arch/mips/include/asm/mips-boards/prom.h b/arch/mips/include/asm/mips-boards/prom.h index a9db576a9768..e7aed3e4ff58 100644 --- a/arch/mips/include/asm/mips-boards/prom.h +++ b/arch/mips/include/asm/mips-boards/prom.h | |||
@@ -39,9 +39,9 @@ extern int get_ethernet_addr(char *ethernet_addr); | |||
39 | /* Memory descriptor management. */ | 39 | /* Memory descriptor management. */ |
40 | #define PROM_MAX_PMEMBLOCKS 32 | 40 | #define PROM_MAX_PMEMBLOCKS 32 |
41 | struct prom_pmemblock { | 41 | struct prom_pmemblock { |
42 | unsigned long base; /* Within KSEG0. */ | 42 | unsigned long base; /* Within KSEG0. */ |
43 | unsigned int size; /* In bytes. */ | 43 | unsigned int size; /* In bytes. */ |
44 | unsigned int type; /* free or prom memory */ | 44 | unsigned int type; /* free or prom memory */ |
45 | }; | 45 | }; |
46 | 46 | ||
47 | #endif /* !(_MIPS_PROM_H) */ | 47 | #endif /* !(_MIPS_PROM_H) */ |
diff --git a/arch/mips/include/asm/mips-boards/sead3int.h b/arch/mips/include/asm/mips-boards/sead3int.h index d634d9a807f6..6b17aaf7d901 100644 --- a/arch/mips/include/asm/mips-boards/sead3int.h +++ b/arch/mips/include/asm/mips-boards/sead3int.h | |||
@@ -4,8 +4,8 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2000,2012 MIPS Technologies, Inc. All rights reserved. | 6 | * Copyright (C) 2000,2012 MIPS Technologies, Inc. All rights reserved. |
7 | * Douglas Leung <douglas@mips.com> | 7 | * Douglas Leung <douglas@mips.com> |
8 | * Steven J. Hill <sjhill@mips.com> | 8 | * Steven J. Hill <sjhill@mips.com> |
9 | */ | 9 | */ |
10 | #ifndef _MIPS_SEAD3INT_H | 10 | #ifndef _MIPS_SEAD3INT_H |
11 | #define _MIPS_SEAD3INT_H | 11 | #define _MIPS_SEAD3INT_H |
diff --git a/arch/mips/include/asm/mips-boards/sim.h b/arch/mips/include/asm/mips-boards/sim.h index acb7c2331d98..b112fdc9f77d 100644 --- a/arch/mips/include/asm/mips-boards/sim.h +++ b/arch/mips/include/asm/mips-boards/sim.h | |||
@@ -19,18 +19,18 @@ | |||
19 | #ifndef _ASM_MIPS_BOARDS_SIM_H | 19 | #ifndef _ASM_MIPS_BOARDS_SIM_H |
20 | #define _ASM_MIPS_BOARDS_SIM_H | 20 | #define _ASM_MIPS_BOARDS_SIM_H |
21 | 21 | ||
22 | #define STATS_ON 1 | 22 | #define STATS_ON 1 |
23 | #define STATS_OFF 2 | 23 | #define STATS_OFF 2 |
24 | #define STATS_CLEAR 3 | 24 | #define STATS_CLEAR 3 |
25 | #define STATS_DUMP 4 | 25 | #define STATS_DUMP 4 |
26 | #define TRACE_ON 5 | 26 | #define TRACE_ON 5 |
27 | #define TRACE_OFF 6 | 27 | #define TRACE_OFF 6 |
28 | 28 | ||
29 | 29 | ||
30 | #define simcfg(code) \ | 30 | #define simcfg(code) \ |
31 | ({ \ | 31 | ({ \ |
32 | __asm__ __volatile__( \ | 32 | __asm__ __volatile__( \ |
33 | "sltiu $0,$0, %0" \ | 33 | "sltiu $0,$0, %0" \ |
34 | ::"i"(code) \ | 34 | ::"i"(code) \ |
35 | ); \ | 35 | ); \ |
36 | }) | 36 | }) |
diff --git a/arch/mips/include/asm/mipsmtregs.h b/arch/mips/include/asm/mipsmtregs.h index 5b3cb8553e9a..38b7704ee376 100644 --- a/arch/mips/include/asm/mipsmtregs.h +++ b/arch/mips/include/asm/mipsmtregs.h | |||
@@ -270,14 +270,14 @@ static inline void ehb(void) | |||
270 | 270 | ||
271 | #define mftc0(rt,sel) \ | 271 | #define mftc0(rt,sel) \ |
272 | ({ \ | 272 | ({ \ |
273 | unsigned long __res; \ | 273 | unsigned long __res; \ |
274 | \ | 274 | \ |
275 | __asm__ __volatile__( \ | 275 | __asm__ __volatile__( \ |
276 | " .set push \n" \ | 276 | " .set push \n" \ |
277 | " .set mips32r2 \n" \ | 277 | " .set mips32r2 \n" \ |
278 | " .set noat \n" \ | 278 | " .set noat \n" \ |
279 | " # mftc0 $1, $" #rt ", " #sel " \n" \ | 279 | " # mftc0 $1, $" #rt ", " #sel " \n" \ |
280 | " .word 0x41000800 | (" #rt " << 16) | " #sel " \n" \ | 280 | " .word 0x41000800 | (" #rt " << 16) | " #sel " \n" \ |
281 | " move %0, $1 \n" \ | 281 | " move %0, $1 \n" \ |
282 | " .set pop \n" \ | 282 | " .set pop \n" \ |
283 | : "=r" (__res)); \ | 283 | : "=r" (__res)); \ |
@@ -334,7 +334,7 @@ do { \ | |||
334 | " .set noat \n" \ | 334 | " .set noat \n" \ |
335 | " move $1, %0 \n" \ | 335 | " move $1, %0 \n" \ |
336 | " # mttc0 %0," #rd ", " #sel " \n" \ | 336 | " # mttc0 %0," #rd ", " #sel " \n" \ |
337 | " .word 0x41810000 | (" #rd " << 11) | " #sel " \n" \ | 337 | " .word 0x41810000 | (" #rd " << 11) | " #sel " \n" \ |
338 | " .set pop \n" \ | 338 | " .set pop \n" \ |
339 | : \ | 339 | : \ |
340 | : "r" (v)); \ | 340 | : "r" (v)); \ |
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 1ad3e34e18e6..2145162674b9 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
@@ -123,16 +123,16 @@ | |||
123 | * Status Register Values | 123 | * Status Register Values |
124 | */ | 124 | */ |
125 | 125 | ||
126 | #define FPU_CSR_FLUSH 0x01000000 /* flush denormalised results to 0 */ | 126 | #define FPU_CSR_FLUSH 0x01000000 /* flush denormalised results to 0 */ |
127 | #define FPU_CSR_COND 0x00800000 /* $fcc0 */ | 127 | #define FPU_CSR_COND 0x00800000 /* $fcc0 */ |
128 | #define FPU_CSR_COND0 0x00800000 /* $fcc0 */ | 128 | #define FPU_CSR_COND0 0x00800000 /* $fcc0 */ |
129 | #define FPU_CSR_COND1 0x02000000 /* $fcc1 */ | 129 | #define FPU_CSR_COND1 0x02000000 /* $fcc1 */ |
130 | #define FPU_CSR_COND2 0x04000000 /* $fcc2 */ | 130 | #define FPU_CSR_COND2 0x04000000 /* $fcc2 */ |
131 | #define FPU_CSR_COND3 0x08000000 /* $fcc3 */ | 131 | #define FPU_CSR_COND3 0x08000000 /* $fcc3 */ |
132 | #define FPU_CSR_COND4 0x10000000 /* $fcc4 */ | 132 | #define FPU_CSR_COND4 0x10000000 /* $fcc4 */ |
133 | #define FPU_CSR_COND5 0x20000000 /* $fcc5 */ | 133 | #define FPU_CSR_COND5 0x20000000 /* $fcc5 */ |
134 | #define FPU_CSR_COND6 0x40000000 /* $fcc6 */ | 134 | #define FPU_CSR_COND6 0x40000000 /* $fcc6 */ |
135 | #define FPU_CSR_COND7 0x80000000 /* $fcc7 */ | 135 | #define FPU_CSR_COND7 0x80000000 /* $fcc7 */ |
136 | 136 | ||
137 | /* | 137 | /* |
138 | * Bits 18 - 20 of the FPU Status Register will be read as 0, | 138 | * Bits 18 - 20 of the FPU Status Register will be read as 0, |
@@ -145,34 +145,34 @@ | |||
145 | * E the exception enable | 145 | * E the exception enable |
146 | * S the sticky/flag bit | 146 | * S the sticky/flag bit |
147 | */ | 147 | */ |
148 | #define FPU_CSR_ALL_X 0x0003f000 | 148 | #define FPU_CSR_ALL_X 0x0003f000 |
149 | #define FPU_CSR_UNI_X 0x00020000 | 149 | #define FPU_CSR_UNI_X 0x00020000 |
150 | #define FPU_CSR_INV_X 0x00010000 | 150 | #define FPU_CSR_INV_X 0x00010000 |
151 | #define FPU_CSR_DIV_X 0x00008000 | 151 | #define FPU_CSR_DIV_X 0x00008000 |
152 | #define FPU_CSR_OVF_X 0x00004000 | 152 | #define FPU_CSR_OVF_X 0x00004000 |
153 | #define FPU_CSR_UDF_X 0x00002000 | 153 | #define FPU_CSR_UDF_X 0x00002000 |
154 | #define FPU_CSR_INE_X 0x00001000 | 154 | #define FPU_CSR_INE_X 0x00001000 |
155 | 155 | ||
156 | #define FPU_CSR_ALL_E 0x00000f80 | 156 | #define FPU_CSR_ALL_E 0x00000f80 |
157 | #define FPU_CSR_INV_E 0x00000800 | 157 | #define FPU_CSR_INV_E 0x00000800 |
158 | #define FPU_CSR_DIV_E 0x00000400 | 158 | #define FPU_CSR_DIV_E 0x00000400 |
159 | #define FPU_CSR_OVF_E 0x00000200 | 159 | #define FPU_CSR_OVF_E 0x00000200 |
160 | #define FPU_CSR_UDF_E 0x00000100 | 160 | #define FPU_CSR_UDF_E 0x00000100 |
161 | #define FPU_CSR_INE_E 0x00000080 | 161 | #define FPU_CSR_INE_E 0x00000080 |
162 | 162 | ||
163 | #define FPU_CSR_ALL_S 0x0000007c | 163 | #define FPU_CSR_ALL_S 0x0000007c |
164 | #define FPU_CSR_INV_S 0x00000040 | 164 | #define FPU_CSR_INV_S 0x00000040 |
165 | #define FPU_CSR_DIV_S 0x00000020 | 165 | #define FPU_CSR_DIV_S 0x00000020 |
166 | #define FPU_CSR_OVF_S 0x00000010 | 166 | #define FPU_CSR_OVF_S 0x00000010 |
167 | #define FPU_CSR_UDF_S 0x00000008 | 167 | #define FPU_CSR_UDF_S 0x00000008 |
168 | #define FPU_CSR_INE_S 0x00000004 | 168 | #define FPU_CSR_INE_S 0x00000004 |
169 | 169 | ||
170 | /* Bits 0 and 1 of FPU Status Register specify the rounding mode */ | 170 | /* Bits 0 and 1 of FPU Status Register specify the rounding mode */ |
171 | #define FPU_CSR_RM 0x00000003 | 171 | #define FPU_CSR_RM 0x00000003 |
172 | #define FPU_CSR_RN 0x0 /* nearest */ | 172 | #define FPU_CSR_RN 0x0 /* nearest */ |
173 | #define FPU_CSR_RZ 0x1 /* towards zero */ | 173 | #define FPU_CSR_RZ 0x1 /* towards zero */ |
174 | #define FPU_CSR_RU 0x2 /* towards +Infinity */ | 174 | #define FPU_CSR_RU 0x2 /* towards +Infinity */ |
175 | #define FPU_CSR_RD 0x3 /* towards -Infinity */ | 175 | #define FPU_CSR_RD 0x3 /* towards -Infinity */ |
176 | 176 | ||
177 | 177 | ||
178 | /* | 178 | /* |
@@ -214,15 +214,15 @@ | |||
214 | * Default page size for a given kernel configuration | 214 | * Default page size for a given kernel configuration |
215 | */ | 215 | */ |
216 | #ifdef CONFIG_PAGE_SIZE_4KB | 216 | #ifdef CONFIG_PAGE_SIZE_4KB |
217 | #define PM_DEFAULT_MASK PM_4K | 217 | #define PM_DEFAULT_MASK PM_4K |
218 | #elif defined(CONFIG_PAGE_SIZE_8KB) | 218 | #elif defined(CONFIG_PAGE_SIZE_8KB) |
219 | #define PM_DEFAULT_MASK PM_8K | 219 | #define PM_DEFAULT_MASK PM_8K |
220 | #elif defined(CONFIG_PAGE_SIZE_16KB) | 220 | #elif defined(CONFIG_PAGE_SIZE_16KB) |
221 | #define PM_DEFAULT_MASK PM_16K | 221 | #define PM_DEFAULT_MASK PM_16K |
222 | #elif defined(CONFIG_PAGE_SIZE_32KB) | 222 | #elif defined(CONFIG_PAGE_SIZE_32KB) |
223 | #define PM_DEFAULT_MASK PM_32K | 223 | #define PM_DEFAULT_MASK PM_32K |
224 | #elif defined(CONFIG_PAGE_SIZE_64KB) | 224 | #elif defined(CONFIG_PAGE_SIZE_64KB) |
225 | #define PM_DEFAULT_MASK PM_64K | 225 | #define PM_DEFAULT_MASK PM_64K |
226 | #else | 226 | #else |
227 | #error Bad page size configuration! | 227 | #error Bad page size configuration! |
228 | #endif | 228 | #endif |
@@ -260,34 +260,34 @@ | |||
260 | /* | 260 | /* |
261 | * PageGrain bits | 261 | * PageGrain bits |
262 | */ | 262 | */ |
263 | #define PG_RIE (_ULCAST_(1) << 31) | 263 | #define PG_RIE (_ULCAST_(1) << 31) |
264 | #define PG_XIE (_ULCAST_(1) << 30) | 264 | #define PG_XIE (_ULCAST_(1) << 30) |
265 | #define PG_ELPA (_ULCAST_(1) << 29) | 265 | #define PG_ELPA (_ULCAST_(1) << 29) |
266 | #define PG_ESP (_ULCAST_(1) << 28) | 266 | #define PG_ESP (_ULCAST_(1) << 28) |
267 | 267 | ||
268 | /* | 268 | /* |
269 | * R4x00 interrupt enable / cause bits | 269 | * R4x00 interrupt enable / cause bits |
270 | */ | 270 | */ |
271 | #define IE_SW0 (_ULCAST_(1) << 8) | 271 | #define IE_SW0 (_ULCAST_(1) << 8) |
272 | #define IE_SW1 (_ULCAST_(1) << 9) | 272 | #define IE_SW1 (_ULCAST_(1) << 9) |
273 | #define IE_IRQ0 (_ULCAST_(1) << 10) | 273 | #define IE_IRQ0 (_ULCAST_(1) << 10) |
274 | #define IE_IRQ1 (_ULCAST_(1) << 11) | 274 | #define IE_IRQ1 (_ULCAST_(1) << 11) |
275 | #define IE_IRQ2 (_ULCAST_(1) << 12) | 275 | #define IE_IRQ2 (_ULCAST_(1) << 12) |
276 | #define IE_IRQ3 (_ULCAST_(1) << 13) | 276 | #define IE_IRQ3 (_ULCAST_(1) << 13) |
277 | #define IE_IRQ4 (_ULCAST_(1) << 14) | 277 | #define IE_IRQ4 (_ULCAST_(1) << 14) |
278 | #define IE_IRQ5 (_ULCAST_(1) << 15) | 278 | #define IE_IRQ5 (_ULCAST_(1) << 15) |
279 | 279 | ||
280 | /* | 280 | /* |
281 | * R4x00 interrupt cause bits | 281 | * R4x00 interrupt cause bits |
282 | */ | 282 | */ |
283 | #define C_SW0 (_ULCAST_(1) << 8) | 283 | #define C_SW0 (_ULCAST_(1) << 8) |
284 | #define C_SW1 (_ULCAST_(1) << 9) | 284 | #define C_SW1 (_ULCAST_(1) << 9) |
285 | #define C_IRQ0 (_ULCAST_(1) << 10) | 285 | #define C_IRQ0 (_ULCAST_(1) << 10) |
286 | #define C_IRQ1 (_ULCAST_(1) << 11) | 286 | #define C_IRQ1 (_ULCAST_(1) << 11) |
287 | #define C_IRQ2 (_ULCAST_(1) << 12) | 287 | #define C_IRQ2 (_ULCAST_(1) << 12) |
288 | #define C_IRQ3 (_ULCAST_(1) << 13) | 288 | #define C_IRQ3 (_ULCAST_(1) << 13) |
289 | #define C_IRQ4 (_ULCAST_(1) << 14) | 289 | #define C_IRQ4 (_ULCAST_(1) << 14) |
290 | #define C_IRQ5 (_ULCAST_(1) << 15) | 290 | #define C_IRQ5 (_ULCAST_(1) << 15) |
291 | 291 | ||
292 | /* | 292 | /* |
293 | * Bitfields in the R4xx0 cp0 status register | 293 | * Bitfields in the R4xx0 cp0 status register |
@@ -301,7 +301,7 @@ | |||
301 | # define KSU_KERNEL 0x00000000 | 301 | # define KSU_KERNEL 0x00000000 |
302 | #define ST0_UX 0x00000020 | 302 | #define ST0_UX 0x00000020 |
303 | #define ST0_SX 0x00000040 | 303 | #define ST0_SX 0x00000040 |
304 | #define ST0_KX 0x00000080 | 304 | #define ST0_KX 0x00000080 |
305 | #define ST0_DE 0x00010000 | 305 | #define ST0_DE 0x00010000 |
306 | #define ST0_CE 0x00020000 | 306 | #define ST0_CE 0x00020000 |
307 | 307 | ||
@@ -315,7 +315,7 @@ | |||
315 | /* | 315 | /* |
316 | * Bitfields in the R[23]000 cp0 status register. | 316 | * Bitfields in the R[23]000 cp0 status register. |
317 | */ | 317 | */ |
318 | #define ST0_IEC 0x00000001 | 318 | #define ST0_IEC 0x00000001 |
319 | #define ST0_KUC 0x00000002 | 319 | #define ST0_KUC 0x00000002 |
320 | #define ST0_IEP 0x00000004 | 320 | #define ST0_IEP 0x00000004 |
321 | #define ST0_KUP 0x00000008 | 321 | #define ST0_KUP 0x00000008 |
@@ -329,7 +329,7 @@ | |||
329 | /* | 329 | /* |
330 | * Bits specific to the R4640/R4650 | 330 | * Bits specific to the R4640/R4650 |
331 | */ | 331 | */ |
332 | #define ST0_UM (_ULCAST_(1) << 4) | 332 | #define ST0_UM (_ULCAST_(1) << 4) |
333 | #define ST0_IL (_ULCAST_(1) << 23) | 333 | #define ST0_IL (_ULCAST_(1) << 23) |
334 | #define ST0_DL (_ULCAST_(1) << 24) | 334 | #define ST0_DL (_ULCAST_(1) << 24) |
335 | 335 | ||
@@ -343,22 +343,22 @@ | |||
343 | */ | 343 | */ |
344 | #define TX39_CONF_ICS_SHIFT 19 | 344 | #define TX39_CONF_ICS_SHIFT 19 |
345 | #define TX39_CONF_ICS_MASK 0x00380000 | 345 | #define TX39_CONF_ICS_MASK 0x00380000 |
346 | #define TX39_CONF_ICS_1KB 0x00000000 | 346 | #define TX39_CONF_ICS_1KB 0x00000000 |
347 | #define TX39_CONF_ICS_2KB 0x00080000 | 347 | #define TX39_CONF_ICS_2KB 0x00080000 |
348 | #define TX39_CONF_ICS_4KB 0x00100000 | 348 | #define TX39_CONF_ICS_4KB 0x00100000 |
349 | #define TX39_CONF_ICS_8KB 0x00180000 | 349 | #define TX39_CONF_ICS_8KB 0x00180000 |
350 | #define TX39_CONF_ICS_16KB 0x00200000 | 350 | #define TX39_CONF_ICS_16KB 0x00200000 |
351 | 351 | ||
352 | #define TX39_CONF_DCS_SHIFT 16 | 352 | #define TX39_CONF_DCS_SHIFT 16 |
353 | #define TX39_CONF_DCS_MASK 0x00070000 | 353 | #define TX39_CONF_DCS_MASK 0x00070000 |
354 | #define TX39_CONF_DCS_1KB 0x00000000 | 354 | #define TX39_CONF_DCS_1KB 0x00000000 |
355 | #define TX39_CONF_DCS_2KB 0x00010000 | 355 | #define TX39_CONF_DCS_2KB 0x00010000 |
356 | #define TX39_CONF_DCS_4KB 0x00020000 | 356 | #define TX39_CONF_DCS_4KB 0x00020000 |
357 | #define TX39_CONF_DCS_8KB 0x00030000 | 357 | #define TX39_CONF_DCS_8KB 0x00030000 |
358 | #define TX39_CONF_DCS_16KB 0x00040000 | 358 | #define TX39_CONF_DCS_16KB 0x00040000 |
359 | 359 | ||
360 | #define TX39_CONF_CWFON 0x00004000 | 360 | #define TX39_CONF_CWFON 0x00004000 |
361 | #define TX39_CONF_WBON 0x00002000 | 361 | #define TX39_CONF_WBON 0x00002000 |
362 | #define TX39_CONF_RF_SHIFT 10 | 362 | #define TX39_CONF_RF_SHIFT 10 |
363 | #define TX39_CONF_RF_MASK 0x00000c00 | 363 | #define TX39_CONF_RF_MASK 0x00000c00 |
364 | #define TX39_CONF_DOZE 0x00000200 | 364 | #define TX39_CONF_DOZE 0x00000200 |
@@ -375,38 +375,38 @@ | |||
375 | * Status register bits available in all MIPS CPUs. | 375 | * Status register bits available in all MIPS CPUs. |
376 | */ | 376 | */ |
377 | #define ST0_IM 0x0000ff00 | 377 | #define ST0_IM 0x0000ff00 |
378 | #define STATUSB_IP0 8 | 378 | #define STATUSB_IP0 8 |
379 | #define STATUSF_IP0 (_ULCAST_(1) << 8) | 379 | #define STATUSF_IP0 (_ULCAST_(1) << 8) |
380 | #define STATUSB_IP1 9 | 380 | #define STATUSB_IP1 9 |
381 | #define STATUSF_IP1 (_ULCAST_(1) << 9) | 381 | #define STATUSF_IP1 (_ULCAST_(1) << 9) |
382 | #define STATUSB_IP2 10 | 382 | #define STATUSB_IP2 10 |
383 | #define STATUSF_IP2 (_ULCAST_(1) << 10) | 383 | #define STATUSF_IP2 (_ULCAST_(1) << 10) |
384 | #define STATUSB_IP3 11 | 384 | #define STATUSB_IP3 11 |
385 | #define STATUSF_IP3 (_ULCAST_(1) << 11) | 385 | #define STATUSF_IP3 (_ULCAST_(1) << 11) |
386 | #define STATUSB_IP4 12 | 386 | #define STATUSB_IP4 12 |
387 | #define STATUSF_IP4 (_ULCAST_(1) << 12) | 387 | #define STATUSF_IP4 (_ULCAST_(1) << 12) |
388 | #define STATUSB_IP5 13 | 388 | #define STATUSB_IP5 13 |
389 | #define STATUSF_IP5 (_ULCAST_(1) << 13) | 389 | #define STATUSF_IP5 (_ULCAST_(1) << 13) |
390 | #define STATUSB_IP6 14 | 390 | #define STATUSB_IP6 14 |
391 | #define STATUSF_IP6 (_ULCAST_(1) << 14) | 391 | #define STATUSF_IP6 (_ULCAST_(1) << 14) |
392 | #define STATUSB_IP7 15 | 392 | #define STATUSB_IP7 15 |
393 | #define STATUSF_IP7 (_ULCAST_(1) << 15) | 393 | #define STATUSF_IP7 (_ULCAST_(1) << 15) |
394 | #define STATUSB_IP8 0 | 394 | #define STATUSB_IP8 0 |
395 | #define STATUSF_IP8 (_ULCAST_(1) << 0) | 395 | #define STATUSF_IP8 (_ULCAST_(1) << 0) |
396 | #define STATUSB_IP9 1 | 396 | #define STATUSB_IP9 1 |
397 | #define STATUSF_IP9 (_ULCAST_(1) << 1) | 397 | #define STATUSF_IP9 (_ULCAST_(1) << 1) |
398 | #define STATUSB_IP10 2 | 398 | #define STATUSB_IP10 2 |
399 | #define STATUSF_IP10 (_ULCAST_(1) << 2) | 399 | #define STATUSF_IP10 (_ULCAST_(1) << 2) |
400 | #define STATUSB_IP11 3 | 400 | #define STATUSB_IP11 3 |
401 | #define STATUSF_IP11 (_ULCAST_(1) << 3) | 401 | #define STATUSF_IP11 (_ULCAST_(1) << 3) |
402 | #define STATUSB_IP12 4 | 402 | #define STATUSB_IP12 4 |
403 | #define STATUSF_IP12 (_ULCAST_(1) << 4) | 403 | #define STATUSF_IP12 (_ULCAST_(1) << 4) |
404 | #define STATUSB_IP13 5 | 404 | #define STATUSB_IP13 5 |
405 | #define STATUSF_IP13 (_ULCAST_(1) << 5) | 405 | #define STATUSF_IP13 (_ULCAST_(1) << 5) |
406 | #define STATUSB_IP14 6 | 406 | #define STATUSB_IP14 6 |
407 | #define STATUSF_IP14 (_ULCAST_(1) << 6) | 407 | #define STATUSF_IP14 (_ULCAST_(1) << 6) |
408 | #define STATUSB_IP15 7 | 408 | #define STATUSB_IP15 7 |
409 | #define STATUSF_IP15 (_ULCAST_(1) << 7) | 409 | #define STATUSF_IP15 (_ULCAST_(1) << 7) |
410 | #define ST0_CH 0x00040000 | 410 | #define ST0_CH 0x00040000 |
411 | #define ST0_NMI 0x00080000 | 411 | #define ST0_NMI 0x00080000 |
412 | #define ST0_SR 0x00100000 | 412 | #define ST0_SR 0x00100000 |
@@ -436,36 +436,36 @@ | |||
436 | * | 436 | * |
437 | * Refer to your MIPS R4xx0 manual, chapter 5 for explanation. | 437 | * Refer to your MIPS R4xx0 manual, chapter 5 for explanation. |
438 | */ | 438 | */ |
439 | #define CAUSEB_EXCCODE 2 | 439 | #define CAUSEB_EXCCODE 2 |
440 | #define CAUSEF_EXCCODE (_ULCAST_(31) << 2) | 440 | #define CAUSEF_EXCCODE (_ULCAST_(31) << 2) |
441 | #define CAUSEB_IP 8 | 441 | #define CAUSEB_IP 8 |
442 | #define CAUSEF_IP (_ULCAST_(255) << 8) | 442 | #define CAUSEF_IP (_ULCAST_(255) << 8) |
443 | #define CAUSEB_IP0 8 | 443 | #define CAUSEB_IP0 8 |
444 | #define CAUSEF_IP0 (_ULCAST_(1) << 8) | 444 | #define CAUSEF_IP0 (_ULCAST_(1) << 8) |
445 | #define CAUSEB_IP1 9 | 445 | #define CAUSEB_IP1 9 |
446 | #define CAUSEF_IP1 (_ULCAST_(1) << 9) | 446 | #define CAUSEF_IP1 (_ULCAST_(1) << 9) |
447 | #define CAUSEB_IP2 10 | 447 | #define CAUSEB_IP2 10 |
448 | #define CAUSEF_IP2 (_ULCAST_(1) << 10) | 448 | #define CAUSEF_IP2 (_ULCAST_(1) << 10) |
449 | #define CAUSEB_IP3 11 | 449 | #define CAUSEB_IP3 11 |
450 | #define CAUSEF_IP3 (_ULCAST_(1) << 11) | 450 | #define CAUSEF_IP3 (_ULCAST_(1) << 11) |
451 | #define CAUSEB_IP4 12 | 451 | #define CAUSEB_IP4 12 |
452 | #define CAUSEF_IP4 (_ULCAST_(1) << 12) | 452 | #define CAUSEF_IP4 (_ULCAST_(1) << 12) |
453 | #define CAUSEB_IP5 13 | 453 | #define CAUSEB_IP5 13 |
454 | #define CAUSEF_IP5 (_ULCAST_(1) << 13) | 454 | #define CAUSEF_IP5 (_ULCAST_(1) << 13) |
455 | #define CAUSEB_IP6 14 | 455 | #define CAUSEB_IP6 14 |
456 | #define CAUSEF_IP6 (_ULCAST_(1) << 14) | 456 | #define CAUSEF_IP6 (_ULCAST_(1) << 14) |
457 | #define CAUSEB_IP7 15 | 457 | #define CAUSEB_IP7 15 |
458 | #define CAUSEF_IP7 (_ULCAST_(1) << 15) | 458 | #define CAUSEF_IP7 (_ULCAST_(1) << 15) |
459 | #define CAUSEB_IV 23 | 459 | #define CAUSEB_IV 23 |
460 | #define CAUSEF_IV (_ULCAST_(1) << 23) | 460 | #define CAUSEF_IV (_ULCAST_(1) << 23) |
461 | #define CAUSEB_PCI 26 | 461 | #define CAUSEB_PCI 26 |
462 | #define CAUSEF_PCI (_ULCAST_(1) << 26) | 462 | #define CAUSEF_PCI (_ULCAST_(1) << 26) |
463 | #define CAUSEB_CE 28 | 463 | #define CAUSEB_CE 28 |
464 | #define CAUSEF_CE (_ULCAST_(3) << 28) | 464 | #define CAUSEF_CE (_ULCAST_(3) << 28) |
465 | #define CAUSEB_TI 30 | 465 | #define CAUSEB_TI 30 |
466 | #define CAUSEF_TI (_ULCAST_(1) << 30) | 466 | #define CAUSEF_TI (_ULCAST_(1) << 30) |
467 | #define CAUSEB_BD 31 | 467 | #define CAUSEB_BD 31 |
468 | #define CAUSEF_BD (_ULCAST_(1) << 31) | 468 | #define CAUSEF_BD (_ULCAST_(1) << 31) |
469 | 469 | ||
470 | /* | 470 | /* |
471 | * Bits in the coprocessor 0 config register. | 471 | * Bits in the coprocessor 0 config register. |
@@ -483,11 +483,11 @@ | |||
483 | #define CONF_BE (_ULCAST_(1) << 15) | 483 | #define CONF_BE (_ULCAST_(1) << 15) |
484 | 484 | ||
485 | /* Bits common to various processors. */ | 485 | /* Bits common to various processors. */ |
486 | #define CONF_CU (_ULCAST_(1) << 3) | 486 | #define CONF_CU (_ULCAST_(1) << 3) |
487 | #define CONF_DB (_ULCAST_(1) << 4) | 487 | #define CONF_DB (_ULCAST_(1) << 4) |
488 | #define CONF_IB (_ULCAST_(1) << 5) | 488 | #define CONF_IB (_ULCAST_(1) << 5) |
489 | #define CONF_DC (_ULCAST_(7) << 6) | 489 | #define CONF_DC (_ULCAST_(7) << 6) |
490 | #define CONF_IC (_ULCAST_(7) << 9) | 490 | #define CONF_IC (_ULCAST_(7) << 9) |
491 | #define CONF_EB (_ULCAST_(1) << 13) | 491 | #define CONF_EB (_ULCAST_(1) << 13) |
492 | #define CONF_EM (_ULCAST_(1) << 14) | 492 | #define CONF_EM (_ULCAST_(1) << 14) |
493 | #define CONF_SM (_ULCAST_(1) << 16) | 493 | #define CONF_SM (_ULCAST_(1) << 16) |
@@ -497,29 +497,29 @@ | |||
497 | #define CONF_EC (_ULCAST_(7) << 28) | 497 | #define CONF_EC (_ULCAST_(7) << 28) |
498 | #define CONF_CM (_ULCAST_(1) << 31) | 498 | #define CONF_CM (_ULCAST_(1) << 31) |
499 | 499 | ||
500 | /* Bits specific to the R4xx0. */ | 500 | /* Bits specific to the R4xx0. */ |
501 | #define R4K_CONF_SW (_ULCAST_(1) << 20) | 501 | #define R4K_CONF_SW (_ULCAST_(1) << 20) |
502 | #define R4K_CONF_SS (_ULCAST_(1) << 21) | 502 | #define R4K_CONF_SS (_ULCAST_(1) << 21) |
503 | #define R4K_CONF_SB (_ULCAST_(3) << 22) | 503 | #define R4K_CONF_SB (_ULCAST_(3) << 22) |
504 | 504 | ||
505 | /* Bits specific to the R5000. */ | 505 | /* Bits specific to the R5000. */ |
506 | #define R5K_CONF_SE (_ULCAST_(1) << 12) | 506 | #define R5K_CONF_SE (_ULCAST_(1) << 12) |
507 | #define R5K_CONF_SS (_ULCAST_(3) << 20) | 507 | #define R5K_CONF_SS (_ULCAST_(3) << 20) |
508 | 508 | ||
509 | /* Bits specific to the RM7000. */ | 509 | /* Bits specific to the RM7000. */ |
510 | #define RM7K_CONF_SE (_ULCAST_(1) << 3) | 510 | #define RM7K_CONF_SE (_ULCAST_(1) << 3) |
511 | #define RM7K_CONF_TE (_ULCAST_(1) << 12) | 511 | #define RM7K_CONF_TE (_ULCAST_(1) << 12) |
512 | #define RM7K_CONF_CLK (_ULCAST_(1) << 16) | 512 | #define RM7K_CONF_CLK (_ULCAST_(1) << 16) |
513 | #define RM7K_CONF_TC (_ULCAST_(1) << 17) | 513 | #define RM7K_CONF_TC (_ULCAST_(1) << 17) |
514 | #define RM7K_CONF_SI (_ULCAST_(3) << 20) | 514 | #define RM7K_CONF_SI (_ULCAST_(3) << 20) |
515 | #define RM7K_CONF_SC (_ULCAST_(1) << 31) | 515 | #define RM7K_CONF_SC (_ULCAST_(1) << 31) |
516 | 516 | ||
517 | /* Bits specific to the R10000. */ | 517 | /* Bits specific to the R10000. */ |
518 | #define R10K_CONF_DN (_ULCAST_(3) << 3) | 518 | #define R10K_CONF_DN (_ULCAST_(3) << 3) |
519 | #define R10K_CONF_CT (_ULCAST_(1) << 5) | 519 | #define R10K_CONF_CT (_ULCAST_(1) << 5) |
520 | #define R10K_CONF_PE (_ULCAST_(1) << 6) | 520 | #define R10K_CONF_PE (_ULCAST_(1) << 6) |
521 | #define R10K_CONF_PM (_ULCAST_(3) << 7) | 521 | #define R10K_CONF_PM (_ULCAST_(3) << 7) |
522 | #define R10K_CONF_EC (_ULCAST_(15)<< 9) | 522 | #define R10K_CONF_EC (_ULCAST_(15)<< 9) |
523 | #define R10K_CONF_SB (_ULCAST_(1) << 13) | 523 | #define R10K_CONF_SB (_ULCAST_(1) << 13) |
524 | #define R10K_CONF_SK (_ULCAST_(1) << 14) | 524 | #define R10K_CONF_SK (_ULCAST_(1) << 14) |
525 | #define R10K_CONF_SS (_ULCAST_(7) << 16) | 525 | #define R10K_CONF_SS (_ULCAST_(7) << 16) |
@@ -527,14 +527,14 @@ | |||
527 | #define R10K_CONF_DC (_ULCAST_(7) << 26) | 527 | #define R10K_CONF_DC (_ULCAST_(7) << 26) |
528 | #define R10K_CONF_IC (_ULCAST_(7) << 29) | 528 | #define R10K_CONF_IC (_ULCAST_(7) << 29) |
529 | 529 | ||
530 | /* Bits specific to the VR41xx. */ | 530 | /* Bits specific to the VR41xx. */ |
531 | #define VR41_CONF_CS (_ULCAST_(1) << 12) | 531 | #define VR41_CONF_CS (_ULCAST_(1) << 12) |
532 | #define VR41_CONF_P4K (_ULCAST_(1) << 13) | 532 | #define VR41_CONF_P4K (_ULCAST_(1) << 13) |
533 | #define VR41_CONF_BP (_ULCAST_(1) << 16) | 533 | #define VR41_CONF_BP (_ULCAST_(1) << 16) |
534 | #define VR41_CONF_M16 (_ULCAST_(1) << 20) | 534 | #define VR41_CONF_M16 (_ULCAST_(1) << 20) |
535 | #define VR41_CONF_AD (_ULCAST_(1) << 23) | 535 | #define VR41_CONF_AD (_ULCAST_(1) << 23) |
536 | 536 | ||
537 | /* Bits specific to the R30xx. */ | 537 | /* Bits specific to the R30xx. */ |
538 | #define R30XX_CONF_FDM (_ULCAST_(1) << 19) | 538 | #define R30XX_CONF_FDM (_ULCAST_(1) << 19) |
539 | #define R30XX_CONF_REV (_ULCAST_(1) << 22) | 539 | #define R30XX_CONF_REV (_ULCAST_(1) << 22) |
540 | #define R30XX_CONF_AC (_ULCAST_(1) << 23) | 540 | #define R30XX_CONF_AC (_ULCAST_(1) << 23) |
@@ -551,8 +551,8 @@ | |||
551 | #define TX49_CONF_HALT (_ULCAST_(1) << 18) | 551 | #define TX49_CONF_HALT (_ULCAST_(1) << 18) |
552 | #define TX49_CONF_CWFON (_ULCAST_(1) << 27) | 552 | #define TX49_CONF_CWFON (_ULCAST_(1) << 27) |
553 | 553 | ||
554 | /* Bits specific to the MIPS32/64 PRA. */ | 554 | /* Bits specific to the MIPS32/64 PRA. */ |
555 | #define MIPS_CONF_MT (_ULCAST_(7) << 7) | 555 | #define MIPS_CONF_MT (_ULCAST_(7) << 7) |
556 | #define MIPS_CONF_AR (_ULCAST_(7) << 10) | 556 | #define MIPS_CONF_AR (_ULCAST_(7) << 10) |
557 | #define MIPS_CONF_AT (_ULCAST_(3) << 13) | 557 | #define MIPS_CONF_AT (_ULCAST_(3) << 13) |
558 | #define MIPS_CONF_M (_ULCAST_(1) << 31) | 558 | #define MIPS_CONF_M (_ULCAST_(1) << 31) |
@@ -560,14 +560,14 @@ | |||
560 | /* | 560 | /* |
561 | * Bits in the MIPS32/64 PRA coprocessor 0 config registers 1 and above. | 561 | * Bits in the MIPS32/64 PRA coprocessor 0 config registers 1 and above. |
562 | */ | 562 | */ |
563 | #define MIPS_CONF1_FP (_ULCAST_(1) << 0) | 563 | #define MIPS_CONF1_FP (_ULCAST_(1) << 0) |
564 | #define MIPS_CONF1_EP (_ULCAST_(1) << 1) | 564 | #define MIPS_CONF1_EP (_ULCAST_(1) << 1) |
565 | #define MIPS_CONF1_CA (_ULCAST_(1) << 2) | 565 | #define MIPS_CONF1_CA (_ULCAST_(1) << 2) |
566 | #define MIPS_CONF1_WR (_ULCAST_(1) << 3) | 566 | #define MIPS_CONF1_WR (_ULCAST_(1) << 3) |
567 | #define MIPS_CONF1_PC (_ULCAST_(1) << 4) | 567 | #define MIPS_CONF1_PC (_ULCAST_(1) << 4) |
568 | #define MIPS_CONF1_MD (_ULCAST_(1) << 5) | 568 | #define MIPS_CONF1_MD (_ULCAST_(1) << 5) |
569 | #define MIPS_CONF1_C2 (_ULCAST_(1) << 6) | 569 | #define MIPS_CONF1_C2 (_ULCAST_(1) << 6) |
570 | #define MIPS_CONF1_DA (_ULCAST_(7) << 7) | 570 | #define MIPS_CONF1_DA (_ULCAST_(7) << 7) |
571 | #define MIPS_CONF1_DL (_ULCAST_(7) << 10) | 571 | #define MIPS_CONF1_DL (_ULCAST_(7) << 10) |
572 | #define MIPS_CONF1_DS (_ULCAST_(7) << 13) | 572 | #define MIPS_CONF1_DS (_ULCAST_(7) << 13) |
573 | #define MIPS_CONF1_IA (_ULCAST_(7) << 16) | 573 | #define MIPS_CONF1_IA (_ULCAST_(7) << 16) |
@@ -575,22 +575,22 @@ | |||
575 | #define MIPS_CONF1_IS (_ULCAST_(7) << 22) | 575 | #define MIPS_CONF1_IS (_ULCAST_(7) << 22) |
576 | #define MIPS_CONF1_TLBS (_ULCAST_(63)<< 25) | 576 | #define MIPS_CONF1_TLBS (_ULCAST_(63)<< 25) |
577 | 577 | ||
578 | #define MIPS_CONF2_SA (_ULCAST_(15)<< 0) | 578 | #define MIPS_CONF2_SA (_ULCAST_(15)<< 0) |
579 | #define MIPS_CONF2_SL (_ULCAST_(15)<< 4) | 579 | #define MIPS_CONF2_SL (_ULCAST_(15)<< 4) |
580 | #define MIPS_CONF2_SS (_ULCAST_(15)<< 8) | 580 | #define MIPS_CONF2_SS (_ULCAST_(15)<< 8) |
581 | #define MIPS_CONF2_SU (_ULCAST_(15)<< 12) | 581 | #define MIPS_CONF2_SU (_ULCAST_(15)<< 12) |
582 | #define MIPS_CONF2_TA (_ULCAST_(15)<< 16) | 582 | #define MIPS_CONF2_TA (_ULCAST_(15)<< 16) |
583 | #define MIPS_CONF2_TL (_ULCAST_(15)<< 20) | 583 | #define MIPS_CONF2_TL (_ULCAST_(15)<< 20) |
584 | #define MIPS_CONF2_TS (_ULCAST_(15)<< 24) | 584 | #define MIPS_CONF2_TS (_ULCAST_(15)<< 24) |
585 | #define MIPS_CONF2_TU (_ULCAST_(7) << 28) | 585 | #define MIPS_CONF2_TU (_ULCAST_(7) << 28) |
586 | 586 | ||
587 | #define MIPS_CONF3_TL (_ULCAST_(1) << 0) | 587 | #define MIPS_CONF3_TL (_ULCAST_(1) << 0) |
588 | #define MIPS_CONF3_SM (_ULCAST_(1) << 1) | 588 | #define MIPS_CONF3_SM (_ULCAST_(1) << 1) |
589 | #define MIPS_CONF3_MT (_ULCAST_(1) << 2) | 589 | #define MIPS_CONF3_MT (_ULCAST_(1) << 2) |
590 | #define MIPS_CONF3_SP (_ULCAST_(1) << 4) | 590 | #define MIPS_CONF3_SP (_ULCAST_(1) << 4) |
591 | #define MIPS_CONF3_VINT (_ULCAST_(1) << 5) | 591 | #define MIPS_CONF3_VINT (_ULCAST_(1) << 5) |
592 | #define MIPS_CONF3_VEIC (_ULCAST_(1) << 6) | 592 | #define MIPS_CONF3_VEIC (_ULCAST_(1) << 6) |
593 | #define MIPS_CONF3_LPA (_ULCAST_(1) << 7) | 593 | #define MIPS_CONF3_LPA (_ULCAST_(1) << 7) |
594 | #define MIPS_CONF3_DSP (_ULCAST_(1) << 10) | 594 | #define MIPS_CONF3_DSP (_ULCAST_(1) << 10) |
595 | #define MIPS_CONF3_DSP2P (_ULCAST_(1) << 11) | 595 | #define MIPS_CONF3_DSP2P (_ULCAST_(1) << 11) |
596 | #define MIPS_CONF3_RXI (_ULCAST_(1) << 12) | 596 | #define MIPS_CONF3_RXI (_ULCAST_(1) << 12) |
@@ -621,7 +621,7 @@ | |||
621 | #ifndef __ASSEMBLY__ | 621 | #ifndef __ASSEMBLY__ |
622 | 622 | ||
623 | /* | 623 | /* |
624 | * Functions to access the R10000 performance counters. These are basically | 624 | * Functions to access the R10000 performance counters. These are basically |
625 | * mfc0 and mtc0 instructions from and to coprocessor register with a 5-bit | 625 | * mfc0 and mtc0 instructions from and to coprocessor register with a 5-bit |
626 | * performance counter number encoded into bits 1 ... 5 of the instruction. | 626 | * performance counter number encoded into bits 1 ... 5 of the instruction. |
627 | * Only performance counters 0 to 1 actually exist, so for a non-R10000 aware | 627 | * Only performance counters 0 to 1 actually exist, so for a non-R10000 aware |
@@ -632,13 +632,13 @@ | |||
632 | unsigned int __res; \ | 632 | unsigned int __res; \ |
633 | __asm__ __volatile__( \ | 633 | __asm__ __volatile__( \ |
634 | "mfpc\t%0, %1" \ | 634 | "mfpc\t%0, %1" \ |
635 | : "=r" (__res) \ | 635 | : "=r" (__res) \ |
636 | : "i" (counter)); \ | 636 | : "i" (counter)); \ |
637 | \ | 637 | \ |
638 | __res; \ | 638 | __res; \ |
639 | }) | 639 | }) |
640 | 640 | ||
641 | #define write_r10k_perf_cntr(counter,val) \ | 641 | #define write_r10k_perf_cntr(counter,val) \ |
642 | do { \ | 642 | do { \ |
643 | __asm__ __volatile__( \ | 643 | __asm__ __volatile__( \ |
644 | "mtpc\t%0, %1" \ | 644 | "mtpc\t%0, %1" \ |
@@ -651,13 +651,13 @@ do { \ | |||
651 | unsigned int __res; \ | 651 | unsigned int __res; \ |
652 | __asm__ __volatile__( \ | 652 | __asm__ __volatile__( \ |
653 | "mfps\t%0, %1" \ | 653 | "mfps\t%0, %1" \ |
654 | : "=r" (__res) \ | 654 | : "=r" (__res) \ |
655 | : "i" (counter)); \ | 655 | : "i" (counter)); \ |
656 | \ | 656 | \ |
657 | __res; \ | 657 | __res; \ |
658 | }) | 658 | }) |
659 | 659 | ||
660 | #define write_r10k_perf_cntl(counter,val) \ | 660 | #define write_r10k_perf_cntl(counter,val) \ |
661 | do { \ | 661 | do { \ |
662 | __asm__ __volatile__( \ | 662 | __asm__ __volatile__( \ |
663 | "mtps\t%0, %1" \ | 663 | "mtps\t%0, %1" \ |
@@ -847,20 +847,20 @@ do { \ | |||
847 | #define write_c0_context(val) __write_ulong_c0_register($4, 0, val) | 847 | #define write_c0_context(val) __write_ulong_c0_register($4, 0, val) |
848 | 848 | ||
849 | #define read_c0_userlocal() __read_ulong_c0_register($4, 2) | 849 | #define read_c0_userlocal() __read_ulong_c0_register($4, 2) |
850 | #define write_c0_userlocal(val) __write_ulong_c0_register($4, 2, val) | 850 | #define write_c0_userlocal(val) __write_ulong_c0_register($4, 2, val) |
851 | 851 | ||
852 | #define read_c0_pagemask() __read_32bit_c0_register($5, 0) | 852 | #define read_c0_pagemask() __read_32bit_c0_register($5, 0) |
853 | #define write_c0_pagemask(val) __write_32bit_c0_register($5, 0, val) | 853 | #define write_c0_pagemask(val) __write_32bit_c0_register($5, 0, val) |
854 | 854 | ||
855 | #define read_c0_pagegrain() __read_32bit_c0_register($5, 1) | 855 | #define read_c0_pagegrain() __read_32bit_c0_register($5, 1) |
856 | #define write_c0_pagegrain(val) __write_32bit_c0_register($5, 1, val) | 856 | #define write_c0_pagegrain(val) __write_32bit_c0_register($5, 1, val) |
857 | 857 | ||
858 | #define read_c0_wired() __read_32bit_c0_register($6, 0) | 858 | #define read_c0_wired() __read_32bit_c0_register($6, 0) |
859 | #define write_c0_wired(val) __write_32bit_c0_register($6, 0, val) | 859 | #define write_c0_wired(val) __write_32bit_c0_register($6, 0, val) |
860 | 860 | ||
861 | #define read_c0_info() __read_32bit_c0_register($7, 0) | 861 | #define read_c0_info() __read_32bit_c0_register($7, 0) |
862 | 862 | ||
863 | #define read_c0_cache() __read_32bit_c0_register($7, 0) /* TX39xx */ | 863 | #define read_c0_cache() __read_32bit_c0_register($7, 0) /* TX39xx */ |
864 | #define write_c0_cache(val) __write_32bit_c0_register($7, 0, val) | 864 | #define write_c0_cache(val) __write_32bit_c0_register($7, 0, val) |
865 | 865 | ||
866 | #define read_c0_badvaddr() __read_ulong_c0_register($8, 0) | 866 | #define read_c0_badvaddr() __read_ulong_c0_register($8, 0) |
@@ -975,7 +975,7 @@ do { \ | |||
975 | #define write_c0_intcontrol(val) __write_32bit_c0_ctrl_register($20, val) | 975 | #define write_c0_intcontrol(val) __write_32bit_c0_ctrl_register($20, val) |
976 | 976 | ||
977 | #define read_c0_framemask() __read_32bit_c0_register($21, 0) | 977 | #define read_c0_framemask() __read_32bit_c0_register($21, 0) |
978 | #define write_c0_framemask(val) __write_32bit_c0_register($21, 0, val) | 978 | #define write_c0_framemask(val) __write_32bit_c0_register($21, 0, val) |
979 | 979 | ||
980 | #define read_c0_diag() __read_32bit_c0_register($22, 0) | 980 | #define read_c0_diag() __read_32bit_c0_register($22, 0) |
981 | #define write_c0_diag(val) __write_32bit_c0_register($22, 0, val) | 981 | #define write_c0_diag(val) __write_32bit_c0_register($22, 0, val) |
@@ -1005,27 +1005,27 @@ do { \ | |||
1005 | * MIPS32 / MIPS64 performance counters | 1005 | * MIPS32 / MIPS64 performance counters |
1006 | */ | 1006 | */ |
1007 | #define read_c0_perfctrl0() __read_32bit_c0_register($25, 0) | 1007 | #define read_c0_perfctrl0() __read_32bit_c0_register($25, 0) |
1008 | #define write_c0_perfctrl0(val) __write_32bit_c0_register($25, 0, val) | 1008 | #define write_c0_perfctrl0(val) __write_32bit_c0_register($25, 0, val) |
1009 | #define read_c0_perfcntr0() __read_32bit_c0_register($25, 1) | 1009 | #define read_c0_perfcntr0() __read_32bit_c0_register($25, 1) |
1010 | #define write_c0_perfcntr0(val) __write_32bit_c0_register($25, 1, val) | 1010 | #define write_c0_perfcntr0(val) __write_32bit_c0_register($25, 1, val) |
1011 | #define read_c0_perfcntr0_64() __read_64bit_c0_register($25, 1) | 1011 | #define read_c0_perfcntr0_64() __read_64bit_c0_register($25, 1) |
1012 | #define write_c0_perfcntr0_64(val) __write_64bit_c0_register($25, 1, val) | 1012 | #define write_c0_perfcntr0_64(val) __write_64bit_c0_register($25, 1, val) |
1013 | #define read_c0_perfctrl1() __read_32bit_c0_register($25, 2) | 1013 | #define read_c0_perfctrl1() __read_32bit_c0_register($25, 2) |
1014 | #define write_c0_perfctrl1(val) __write_32bit_c0_register($25, 2, val) | 1014 | #define write_c0_perfctrl1(val) __write_32bit_c0_register($25, 2, val) |
1015 | #define read_c0_perfcntr1() __read_32bit_c0_register($25, 3) | 1015 | #define read_c0_perfcntr1() __read_32bit_c0_register($25, 3) |
1016 | #define write_c0_perfcntr1(val) __write_32bit_c0_register($25, 3, val) | 1016 | #define write_c0_perfcntr1(val) __write_32bit_c0_register($25, 3, val) |
1017 | #define read_c0_perfcntr1_64() __read_64bit_c0_register($25, 3) | 1017 | #define read_c0_perfcntr1_64() __read_64bit_c0_register($25, 3) |
1018 | #define write_c0_perfcntr1_64(val) __write_64bit_c0_register($25, 3, val) | 1018 | #define write_c0_perfcntr1_64(val) __write_64bit_c0_register($25, 3, val) |
1019 | #define read_c0_perfctrl2() __read_32bit_c0_register($25, 4) | 1019 | #define read_c0_perfctrl2() __read_32bit_c0_register($25, 4) |
1020 | #define write_c0_perfctrl2(val) __write_32bit_c0_register($25, 4, val) | 1020 | #define write_c0_perfctrl2(val) __write_32bit_c0_register($25, 4, val) |
1021 | #define read_c0_perfcntr2() __read_32bit_c0_register($25, 5) | 1021 | #define read_c0_perfcntr2() __read_32bit_c0_register($25, 5) |
1022 | #define write_c0_perfcntr2(val) __write_32bit_c0_register($25, 5, val) | 1022 | #define write_c0_perfcntr2(val) __write_32bit_c0_register($25, 5, val) |
1023 | #define read_c0_perfcntr2_64() __read_64bit_c0_register($25, 5) | 1023 | #define read_c0_perfcntr2_64() __read_64bit_c0_register($25, 5) |
1024 | #define write_c0_perfcntr2_64(val) __write_64bit_c0_register($25, 5, val) | 1024 | #define write_c0_perfcntr2_64(val) __write_64bit_c0_register($25, 5, val) |
1025 | #define read_c0_perfctrl3() __read_32bit_c0_register($25, 6) | 1025 | #define read_c0_perfctrl3() __read_32bit_c0_register($25, 6) |
1026 | #define write_c0_perfctrl3(val) __write_32bit_c0_register($25, 6, val) | 1026 | #define write_c0_perfctrl3(val) __write_32bit_c0_register($25, 6, val) |
1027 | #define read_c0_perfcntr3() __read_32bit_c0_register($25, 7) | 1027 | #define read_c0_perfcntr3() __read_32bit_c0_register($25, 7) |
1028 | #define write_c0_perfcntr3(val) __write_32bit_c0_register($25, 7, val) | 1028 | #define write_c0_perfcntr3(val) __write_32bit_c0_register($25, 7, val) |
1029 | #define read_c0_perfcntr3_64() __read_64bit_c0_register($25, 7) | 1029 | #define read_c0_perfcntr3_64() __read_64bit_c0_register($25, 7) |
1030 | #define write_c0_perfcntr3_64(val) __write_64bit_c0_register($25, 7, val) | 1030 | #define write_c0_perfcntr3_64(val) __write_64bit_c0_register($25, 7, val) |
1031 | 1031 | ||
@@ -1033,12 +1033,12 @@ do { \ | |||
1033 | #define write_c0_ecc(val) __write_32bit_c0_register($26, 0, val) | 1033 | #define write_c0_ecc(val) __write_32bit_c0_register($26, 0, val) |
1034 | 1034 | ||
1035 | #define read_c0_derraddr0() __read_ulong_c0_register($26, 1) | 1035 | #define read_c0_derraddr0() __read_ulong_c0_register($26, 1) |
1036 | #define write_c0_derraddr0(val) __write_ulong_c0_register($26, 1, val) | 1036 | #define write_c0_derraddr0(val) __write_ulong_c0_register($26, 1, val) |
1037 | 1037 | ||
1038 | #define read_c0_cacheerr() __read_32bit_c0_register($27, 0) | 1038 | #define read_c0_cacheerr() __read_32bit_c0_register($27, 0) |
1039 | 1039 | ||
1040 | #define read_c0_derraddr1() __read_ulong_c0_register($27, 1) | 1040 | #define read_c0_derraddr1() __read_ulong_c0_register($27, 1) |
1041 | #define write_c0_derraddr1(val) __write_ulong_c0_register($27, 1, val) | 1041 | #define write_c0_derraddr1(val) __write_ulong_c0_register($27, 1, val) |
1042 | 1042 | ||
1043 | #define read_c0_taglo() __read_32bit_c0_register($28, 0) | 1043 | #define read_c0_taglo() __read_32bit_c0_register($28, 0) |
1044 | #define write_c0_taglo(val) __write_32bit_c0_register($28, 0, val) | 1044 | #define write_c0_taglo(val) __write_32bit_c0_register($28, 0, val) |
@@ -1083,9 +1083,9 @@ do { \ | |||
1083 | #define write_c0_cvmctl(val) __write_64bit_c0_register($9, 7, val) | 1083 | #define write_c0_cvmctl(val) __write_64bit_c0_register($9, 7, val) |
1084 | 1084 | ||
1085 | #define read_c0_cvmmemctl() __read_64bit_c0_register($11, 7) | 1085 | #define read_c0_cvmmemctl() __read_64bit_c0_register($11, 7) |
1086 | #define write_c0_cvmmemctl(val) __write_64bit_c0_register($11, 7, val) | 1086 | #define write_c0_cvmmemctl(val) __write_64bit_c0_register($11, 7, val) |
1087 | /* | 1087 | /* |
1088 | * The cacheerr registers are not standardized. On OCTEON, they are | 1088 | * The cacheerr registers are not standardized. On OCTEON, they are |
1089 | * 64 bits wide. | 1089 | * 64 bits wide. |
1090 | */ | 1090 | */ |
1091 | #define read_octeon_c0_icacheerr() __read_64bit_c0_register($27, 0) | 1091 | #define read_octeon_c0_icacheerr() __read_64bit_c0_register($27, 0) |
@@ -1183,7 +1183,7 @@ do { \ | |||
1183 | " # wrdsp $1, %x1 \n" \ | 1183 | " # wrdsp $1, %x1 \n" \ |
1184 | " .word 0x7c2004f8 | (%x1 << 11) \n" \ | 1184 | " .word 0x7c2004f8 | (%x1 << 11) \n" \ |
1185 | " .set pop \n" \ | 1185 | " .set pop \n" \ |
1186 | : \ | 1186 | : \ |
1187 | : "r" (val), "i" (mask)); \ | 1187 | : "r" (val), "i" (mask)); \ |
1188 | } while (0) | 1188 | } while (0) |
1189 | 1189 | ||
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h index 45cfa1ad86a6..e81d719efcd1 100644 --- a/arch/mips/include/asm/mmu_context.h +++ b/arch/mips/include/asm/mmu_context.h | |||
@@ -77,7 +77,7 @@ extern unsigned long pgd_current[]; | |||
77 | #define ASID_INC 0x1 | 77 | #define ASID_INC 0x1 |
78 | extern unsigned long smtc_asid_mask; | 78 | extern unsigned long smtc_asid_mask; |
79 | #define ASID_MASK (smtc_asid_mask) | 79 | #define ASID_MASK (smtc_asid_mask) |
80 | #define HW_ASID_MASK 0xff | 80 | #define HW_ASID_MASK 0xff |
81 | /* End SMTC/34K debug hack */ | 81 | /* End SMTC/34K debug hack */ |
82 | #else /* FIXME: not correct for R6000 */ | 82 | #else /* FIXME: not correct for R6000 */ |
83 | 83 | ||
@@ -140,7 +140,7 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 142 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, |
143 | struct task_struct *tsk) | 143 | struct task_struct *tsk) |
144 | { | 144 | { |
145 | unsigned int cpu = smp_processor_id(); | 145 | unsigned int cpu = smp_processor_id(); |
146 | unsigned long flags; | 146 | unsigned long flags; |
@@ -238,7 +238,7 @@ activate_mm(struct mm_struct *prev, struct mm_struct *next) | |||
238 | } | 238 | } |
239 | /* See comments for similar code above */ | 239 | /* See comments for similar code above */ |
240 | write_c0_entryhi((read_c0_entryhi() & ~HW_ASID_MASK) | | 240 | write_c0_entryhi((read_c0_entryhi() & ~HW_ASID_MASK) | |
241 | cpu_asid(cpu, next)); | 241 | cpu_asid(cpu, next)); |
242 | ehb(); /* Make sure it propagates to TCStatus */ | 242 | ehb(); /* Make sure it propagates to TCStatus */ |
243 | evpe(mtflags); | 243 | evpe(mtflags); |
244 | #else | 244 | #else |
diff --git a/arch/mips/include/asm/msc01_ic.h b/arch/mips/include/asm/msc01_ic.h index d92406ae2841..ff7f074d073c 100644 --- a/arch/mips/include/asm/msc01_ic.h +++ b/arch/mips/include/asm/msc01_ic.h | |||
@@ -15,45 +15,45 @@ | |||
15 | * Register offset addresses | 15 | * Register offset addresses |
16 | *****************************************************************************/ | 16 | *****************************************************************************/ |
17 | 17 | ||
18 | #define MSC01_IC_RST_OFS 0x00008 /* Software reset */ | 18 | #define MSC01_IC_RST_OFS 0x00008 /* Software reset */ |
19 | #define MSC01_IC_ENAL_OFS 0x00100 /* Int_in enable mask 31:0 */ | 19 | #define MSC01_IC_ENAL_OFS 0x00100 /* Int_in enable mask 31:0 */ |
20 | #define MSC01_IC_ENAH_OFS 0x00108 /* Int_in enable mask 63:32 */ | 20 | #define MSC01_IC_ENAH_OFS 0x00108 /* Int_in enable mask 63:32 */ |
21 | #define MSC01_IC_DISL_OFS 0x00120 /* Int_in disable mask 31:0 */ | 21 | #define MSC01_IC_DISL_OFS 0x00120 /* Int_in disable mask 31:0 */ |
22 | #define MSC01_IC_DISH_OFS 0x00128 /* Int_in disable mask 63:32 */ | 22 | #define MSC01_IC_DISH_OFS 0x00128 /* Int_in disable mask 63:32 */ |
23 | #define MSC01_IC_ISBL_OFS 0x00140 /* Raw int_in 31:0 */ | 23 | #define MSC01_IC_ISBL_OFS 0x00140 /* Raw int_in 31:0 */ |
24 | #define MSC01_IC_ISBH_OFS 0x00148 /* Raw int_in 63:32 */ | 24 | #define MSC01_IC_ISBH_OFS 0x00148 /* Raw int_in 63:32 */ |
25 | #define MSC01_IC_ISAL_OFS 0x00160 /* Masked int_in 31:0 */ | 25 | #define MSC01_IC_ISAL_OFS 0x00160 /* Masked int_in 31:0 */ |
26 | #define MSC01_IC_ISAH_OFS 0x00168 /* Masked int_in 63:32 */ | 26 | #define MSC01_IC_ISAH_OFS 0x00168 /* Masked int_in 63:32 */ |
27 | #define MSC01_IC_LVL_OFS 0x00180 /* Disable priority int_out */ | 27 | #define MSC01_IC_LVL_OFS 0x00180 /* Disable priority int_out */ |
28 | #define MSC01_IC_RAMW_OFS 0x00180 /* Shadow set RAM (EI) */ | 28 | #define MSC01_IC_RAMW_OFS 0x00180 /* Shadow set RAM (EI) */ |
29 | #define MSC01_IC_OSB_OFS 0x00188 /* Raw int_out */ | 29 | #define MSC01_IC_OSB_OFS 0x00188 /* Raw int_out */ |
30 | #define MSC01_IC_OSA_OFS 0x00190 /* Masked int_out */ | 30 | #define MSC01_IC_OSA_OFS 0x00190 /* Masked int_out */ |
31 | #define MSC01_IC_GENA_OFS 0x00198 /* Global HW int enable */ | 31 | #define MSC01_IC_GENA_OFS 0x00198 /* Global HW int enable */ |
32 | #define MSC01_IC_BASE_OFS 0x001a0 /* Base address of IC_VEC */ | 32 | #define MSC01_IC_BASE_OFS 0x001a0 /* Base address of IC_VEC */ |
33 | #define MSC01_IC_VEC_OFS 0x001b0 /* Active int's vector address */ | 33 | #define MSC01_IC_VEC_OFS 0x001b0 /* Active int's vector address */ |
34 | #define MSC01_IC_EOI_OFS 0x001c0 /* Enable lower level ints */ | 34 | #define MSC01_IC_EOI_OFS 0x001c0 /* Enable lower level ints */ |
35 | #define MSC01_IC_CFG_OFS 0x001c8 /* Configuration register */ | 35 | #define MSC01_IC_CFG_OFS 0x001c8 /* Configuration register */ |
36 | #define MSC01_IC_TRLD_OFS 0x001d0 /* Interval timer reload val */ | 36 | #define MSC01_IC_TRLD_OFS 0x001d0 /* Interval timer reload val */ |
37 | #define MSC01_IC_TVAL_OFS 0x001e0 /* Interval timer current val */ | 37 | #define MSC01_IC_TVAL_OFS 0x001e0 /* Interval timer current val */ |
38 | #define MSC01_IC_TCFG_OFS 0x001f0 /* Interval timer config */ | 38 | #define MSC01_IC_TCFG_OFS 0x001f0 /* Interval timer config */ |
39 | #define MSC01_IC_SUP_OFS 0x00200 /* Set up int_in line 0 */ | 39 | #define MSC01_IC_SUP_OFS 0x00200 /* Set up int_in line 0 */ |
40 | #define MSC01_IC_ENA_OFS 0x00800 /* Int_in enable mask 63:0 */ | 40 | #define MSC01_IC_ENA_OFS 0x00800 /* Int_in enable mask 63:0 */ |
41 | #define MSC01_IC_DIS_OFS 0x00820 /* Int_in disable mask 63:0 */ | 41 | #define MSC01_IC_DIS_OFS 0x00820 /* Int_in disable mask 63:0 */ |
42 | #define MSC01_IC_ISB_OFS 0x00840 /* Raw int_in 63:0 */ | 42 | #define MSC01_IC_ISB_OFS 0x00840 /* Raw int_in 63:0 */ |
43 | #define MSC01_IC_ISA_OFS 0x00860 /* Masked int_in 63:0 */ | 43 | #define MSC01_IC_ISA_OFS 0x00860 /* Masked int_in 63:0 */ |
44 | 44 | ||
45 | /***************************************************************************** | 45 | /***************************************************************************** |
46 | * Register field encodings | 46 | * Register field encodings |
47 | *****************************************************************************/ | 47 | *****************************************************************************/ |
48 | 48 | ||
49 | #define MSC01_IC_RST_RST_SHF 0 | 49 | #define MSC01_IC_RST_RST_SHF 0 |
50 | #define MSC01_IC_RST_RST_MSK 0x00000001 | 50 | #define MSC01_IC_RST_RST_MSK 0x00000001 |
51 | #define MSC01_IC_RST_RST_BIT MSC01_IC_RST_RST_MSK | 51 | #define MSC01_IC_RST_RST_BIT MSC01_IC_RST_RST_MSK |
52 | #define MSC01_IC_LVL_LVL_SHF 0 | 52 | #define MSC01_IC_LVL_LVL_SHF 0 |
53 | #define MSC01_IC_LVL_LVL_MSK 0x000000ff | 53 | #define MSC01_IC_LVL_LVL_MSK 0x000000ff |
54 | #define MSC01_IC_LVL_SPUR_SHF 16 | 54 | #define MSC01_IC_LVL_SPUR_SHF 16 |
55 | #define MSC01_IC_LVL_SPUR_MSK 0x00010000 | 55 | #define MSC01_IC_LVL_SPUR_MSK 0x00010000 |
56 | #define MSC01_IC_LVL_SPUR_BIT MSC01_IC_LVL_SPUR_MSK | 56 | #define MSC01_IC_LVL_SPUR_BIT MSC01_IC_LVL_SPUR_MSK |
57 | #define MSC01_IC_RAMW_RIPL_SHF 0 | 57 | #define MSC01_IC_RAMW_RIPL_SHF 0 |
58 | #define MSC01_IC_RAMW_RIPL_MSK 0x0000003f | 58 | #define MSC01_IC_RAMW_RIPL_MSK 0x0000003f |
59 | #define MSC01_IC_RAMW_DATA_SHF 6 | 59 | #define MSC01_IC_RAMW_DATA_SHF 6 |
@@ -63,33 +63,33 @@ | |||
63 | #define MSC01_IC_RAMW_READ_SHF 31 | 63 | #define MSC01_IC_RAMW_READ_SHF 31 |
64 | #define MSC01_IC_RAMW_READ_MSK 0x80000000 | 64 | #define MSC01_IC_RAMW_READ_MSK 0x80000000 |
65 | #define MSC01_IC_RAMW_READ_BIT MSC01_IC_RAMW_READ_MSK | 65 | #define MSC01_IC_RAMW_READ_BIT MSC01_IC_RAMW_READ_MSK |
66 | #define MSC01_IC_OSB_OSB_SHF 0 | 66 | #define MSC01_IC_OSB_OSB_SHF 0 |
67 | #define MSC01_IC_OSB_OSB_MSK 0x000000ff | 67 | #define MSC01_IC_OSB_OSB_MSK 0x000000ff |
68 | #define MSC01_IC_OSA_OSA_SHF 0 | 68 | #define MSC01_IC_OSA_OSA_SHF 0 |
69 | #define MSC01_IC_OSA_OSA_MSK 0x000000ff | 69 | #define MSC01_IC_OSA_OSA_MSK 0x000000ff |
70 | #define MSC01_IC_GENA_GENA_SHF 0 | 70 | #define MSC01_IC_GENA_GENA_SHF 0 |
71 | #define MSC01_IC_GENA_GENA_MSK 0x00000001 | 71 | #define MSC01_IC_GENA_GENA_MSK 0x00000001 |
72 | #define MSC01_IC_GENA_GENA_BIT MSC01_IC_GENA_GENA_MSK | 72 | #define MSC01_IC_GENA_GENA_BIT MSC01_IC_GENA_GENA_MSK |
73 | #define MSC01_IC_CFG_DIS_SHF 0 | 73 | #define MSC01_IC_CFG_DIS_SHF 0 |
74 | #define MSC01_IC_CFG_DIS_MSK 0x00000001 | 74 | #define MSC01_IC_CFG_DIS_MSK 0x00000001 |
75 | #define MSC01_IC_CFG_DIS_BIT MSC01_IC_CFG_DIS_MSK | 75 | #define MSC01_IC_CFG_DIS_BIT MSC01_IC_CFG_DIS_MSK |
76 | #define MSC01_IC_CFG_SHFT_SHF 8 | 76 | #define MSC01_IC_CFG_SHFT_SHF 8 |
77 | #define MSC01_IC_CFG_SHFT_MSK 0x00000f00 | 77 | #define MSC01_IC_CFG_SHFT_MSK 0x00000f00 |
78 | #define MSC01_IC_TCFG_ENA_SHF 0 | 78 | #define MSC01_IC_TCFG_ENA_SHF 0 |
79 | #define MSC01_IC_TCFG_ENA_MSK 0x00000001 | 79 | #define MSC01_IC_TCFG_ENA_MSK 0x00000001 |
80 | #define MSC01_IC_TCFG_ENA_BIT MSC01_IC_TCFG_ENA_MSK | 80 | #define MSC01_IC_TCFG_ENA_BIT MSC01_IC_TCFG_ENA_MSK |
81 | #define MSC01_IC_TCFG_INT_SHF 8 | 81 | #define MSC01_IC_TCFG_INT_SHF 8 |
82 | #define MSC01_IC_TCFG_INT_MSK 0x00000100 | 82 | #define MSC01_IC_TCFG_INT_MSK 0x00000100 |
83 | #define MSC01_IC_TCFG_INT_BIT MSC01_IC_TCFG_INT_MSK | 83 | #define MSC01_IC_TCFG_INT_BIT MSC01_IC_TCFG_INT_MSK |
84 | #define MSC01_IC_TCFG_EDGE_SHF 16 | 84 | #define MSC01_IC_TCFG_EDGE_SHF 16 |
85 | #define MSC01_IC_TCFG_EDGE_MSK 0x00010000 | 85 | #define MSC01_IC_TCFG_EDGE_MSK 0x00010000 |
86 | #define MSC01_IC_TCFG_EDGE_BIT MSC01_IC_TCFG_EDGE_MSK | 86 | #define MSC01_IC_TCFG_EDGE_BIT MSC01_IC_TCFG_EDGE_MSK |
87 | #define MSC01_IC_SUP_PRI_SHF 0 | 87 | #define MSC01_IC_SUP_PRI_SHF 0 |
88 | #define MSC01_IC_SUP_PRI_MSK 0x00000007 | 88 | #define MSC01_IC_SUP_PRI_MSK 0x00000007 |
89 | #define MSC01_IC_SUP_EDGE_SHF 8 | 89 | #define MSC01_IC_SUP_EDGE_SHF 8 |
90 | #define MSC01_IC_SUP_EDGE_MSK 0x00000100 | 90 | #define MSC01_IC_SUP_EDGE_MSK 0x00000100 |
91 | #define MSC01_IC_SUP_EDGE_BIT MSC01_IC_SUP_EDGE_MSK | 91 | #define MSC01_IC_SUP_EDGE_BIT MSC01_IC_SUP_EDGE_MSK |
92 | #define MSC01_IC_SUP_STEP 8 | 92 | #define MSC01_IC_SUP_STEP 8 |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * MIPS System controller interrupt register base. | 95 | * MIPS System controller interrupt register base. |
@@ -100,32 +100,32 @@ | |||
100 | * Absolute register addresses | 100 | * Absolute register addresses |
101 | *****************************************************************************/ | 101 | *****************************************************************************/ |
102 | 102 | ||
103 | #define MSC01_IC_RST (MSC01_IC_REG_BASE + MSC01_IC_RST_OFS) | 103 | #define MSC01_IC_RST (MSC01_IC_REG_BASE + MSC01_IC_RST_OFS) |
104 | #define MSC01_IC_ENAL (MSC01_IC_REG_BASE + MSC01_IC_ENAL_OFS) | 104 | #define MSC01_IC_ENAL (MSC01_IC_REG_BASE + MSC01_IC_ENAL_OFS) |
105 | #define MSC01_IC_ENAH (MSC01_IC_REG_BASE + MSC01_IC_ENAH_OFS) | 105 | #define MSC01_IC_ENAH (MSC01_IC_REG_BASE + MSC01_IC_ENAH_OFS) |
106 | #define MSC01_IC_DISL (MSC01_IC_REG_BASE + MSC01_IC_DISL_OFS) | 106 | #define MSC01_IC_DISL (MSC01_IC_REG_BASE + MSC01_IC_DISL_OFS) |
107 | #define MSC01_IC_DISH (MSC01_IC_REG_BASE + MSC01_IC_DISH_OFS) | 107 | #define MSC01_IC_DISH (MSC01_IC_REG_BASE + MSC01_IC_DISH_OFS) |
108 | #define MSC01_IC_ISBL (MSC01_IC_REG_BASE + MSC01_IC_ISBL_OFS) | 108 | #define MSC01_IC_ISBL (MSC01_IC_REG_BASE + MSC01_IC_ISBL_OFS) |
109 | #define MSC01_IC_ISBH (MSC01_IC_REG_BASE + MSC01_IC_ISBH_OFS) | 109 | #define MSC01_IC_ISBH (MSC01_IC_REG_BASE + MSC01_IC_ISBH_OFS) |
110 | #define MSC01_IC_ISAL (MSC01_IC_REG_BASE + MSC01_IC_ISAL_OFS) | 110 | #define MSC01_IC_ISAL (MSC01_IC_REG_BASE + MSC01_IC_ISAL_OFS) |
111 | #define MSC01_IC_ISAH (MSC01_IC_REG_BASE + MSC01_IC_ISAH_OFS) | 111 | #define MSC01_IC_ISAH (MSC01_IC_REG_BASE + MSC01_IC_ISAH_OFS) |
112 | #define MSC01_IC_LVL (MSC01_IC_REG_BASE + MSC01_IC_LVL_OFS) | 112 | #define MSC01_IC_LVL (MSC01_IC_REG_BASE + MSC01_IC_LVL_OFS) |
113 | #define MSC01_IC_RAMW (MSC01_IC_REG_BASE + MSC01_IC_RAMW_OFS) | 113 | #define MSC01_IC_RAMW (MSC01_IC_REG_BASE + MSC01_IC_RAMW_OFS) |
114 | #define MSC01_IC_OSB (MSC01_IC_REG_BASE + MSC01_IC_OSB_OFS) | 114 | #define MSC01_IC_OSB (MSC01_IC_REG_BASE + MSC01_IC_OSB_OFS) |
115 | #define MSC01_IC_OSA (MSC01_IC_REG_BASE + MSC01_IC_OSA_OFS) | 115 | #define MSC01_IC_OSA (MSC01_IC_REG_BASE + MSC01_IC_OSA_OFS) |
116 | #define MSC01_IC_GENA (MSC01_IC_REG_BASE + MSC01_IC_GENA_OFS) | 116 | #define MSC01_IC_GENA (MSC01_IC_REG_BASE + MSC01_IC_GENA_OFS) |
117 | #define MSC01_IC_BASE (MSC01_IC_REG_BASE + MSC01_IC_BASE_OFS) | 117 | #define MSC01_IC_BASE (MSC01_IC_REG_BASE + MSC01_IC_BASE_OFS) |
118 | #define MSC01_IC_VEC (MSC01_IC_REG_BASE + MSC01_IC_VEC_OFS) | 118 | #define MSC01_IC_VEC (MSC01_IC_REG_BASE + MSC01_IC_VEC_OFS) |
119 | #define MSC01_IC_EOI (MSC01_IC_REG_BASE + MSC01_IC_EOI_OFS) | 119 | #define MSC01_IC_EOI (MSC01_IC_REG_BASE + MSC01_IC_EOI_OFS) |
120 | #define MSC01_IC_CFG (MSC01_IC_REG_BASE + MSC01_IC_CFG_OFS) | 120 | #define MSC01_IC_CFG (MSC01_IC_REG_BASE + MSC01_IC_CFG_OFS) |
121 | #define MSC01_IC_TRLD (MSC01_IC_REG_BASE + MSC01_IC_TRLD_OFS) | 121 | #define MSC01_IC_TRLD (MSC01_IC_REG_BASE + MSC01_IC_TRLD_OFS) |
122 | #define MSC01_IC_TVAL (MSC01_IC_REG_BASE + MSC01_IC_TVAL_OFS) | 122 | #define MSC01_IC_TVAL (MSC01_IC_REG_BASE + MSC01_IC_TVAL_OFS) |
123 | #define MSC01_IC_TCFG (MSC01_IC_REG_BASE + MSC01_IC_TCFG_OFS) | 123 | #define MSC01_IC_TCFG (MSC01_IC_REG_BASE + MSC01_IC_TCFG_OFS) |
124 | #define MSC01_IC_SUP (MSC01_IC_REG_BASE + MSC01_IC_SUP_OFS) | 124 | #define MSC01_IC_SUP (MSC01_IC_REG_BASE + MSC01_IC_SUP_OFS) |
125 | #define MSC01_IC_ENA (MSC01_IC_REG_BASE + MSC01_IC_ENA_OFS) | 125 | #define MSC01_IC_ENA (MSC01_IC_REG_BASE + MSC01_IC_ENA_OFS) |
126 | #define MSC01_IC_DIS (MSC01_IC_REG_BASE + MSC01_IC_DIS_OFS) | 126 | #define MSC01_IC_DIS (MSC01_IC_REG_BASE + MSC01_IC_DIS_OFS) |
127 | #define MSC01_IC_ISB (MSC01_IC_REG_BASE + MSC01_IC_ISB_OFS) | 127 | #define MSC01_IC_ISB (MSC01_IC_REG_BASE + MSC01_IC_ISB_OFS) |
128 | #define MSC01_IC_ISA (MSC01_IC_REG_BASE + MSC01_IC_ISA_OFS) | 128 | #define MSC01_IC_ISA (MSC01_IC_REG_BASE + MSC01_IC_ISA_OFS) |
129 | 129 | ||
130 | /* | 130 | /* |
131 | * Soc-it interrupts are configurable. | 131 | * Soc-it interrupts are configurable. |
diff --git a/arch/mips/include/asm/netlogic/common.h b/arch/mips/include/asm/netlogic/common.h index 42bfd5f1eeec..aef560a51a7e 100644 --- a/arch/mips/include/asm/netlogic/common.h +++ b/arch/mips/include/asm/netlogic/common.h | |||
@@ -38,11 +38,11 @@ | |||
38 | /* | 38 | /* |
39 | * Common SMP definitions | 39 | * Common SMP definitions |
40 | */ | 40 | */ |
41 | #define RESET_VEC_PHYS 0x1fc00000 | 41 | #define RESET_VEC_PHYS 0x1fc00000 |
42 | #define RESET_DATA_PHYS (RESET_VEC_PHYS + (1<<10)) | 42 | #define RESET_DATA_PHYS (RESET_VEC_PHYS + (1<<10)) |
43 | #define BOOT_THREAD_MODE 0 | 43 | #define BOOT_THREAD_MODE 0 |
44 | #define BOOT_NMI_LOCK 4 | 44 | #define BOOT_NMI_LOCK 4 |
45 | #define BOOT_NMI_HANDLER 8 | 45 | #define BOOT_NMI_HANDLER 8 |
46 | 46 | ||
47 | #ifndef __ASSEMBLY__ | 47 | #ifndef __ASSEMBLY__ |
48 | #include <linux/cpumask.h> | 48 | #include <linux/cpumask.h> |
@@ -80,7 +80,7 @@ extern unsigned int nlm_threads_per_core; | |||
80 | extern cpumask_t nlm_cpumask; | 80 | extern cpumask_t nlm_cpumask; |
81 | 81 | ||
82 | struct nlm_soc_info { | 82 | struct nlm_soc_info { |
83 | unsigned long coremask; /* cores enabled on the soc */ | 83 | unsigned long coremask; /* cores enabled on the soc */ |
84 | unsigned long ebase; | 84 | unsigned long ebase; |
85 | uint64_t irqmask; | 85 | uint64_t irqmask; |
86 | uint64_t sysbase; /* only for XLP */ | 86 | uint64_t sysbase; /* only for XLP */ |
@@ -88,9 +88,9 @@ struct nlm_soc_info { | |||
88 | spinlock_t piclock; | 88 | spinlock_t piclock; |
89 | }; | 89 | }; |
90 | 90 | ||
91 | #define nlm_get_node(i) (&nlm_nodes[i]) | 91 | #define nlm_get_node(i) (&nlm_nodes[i]) |
92 | #ifdef CONFIG_CPU_XLR | 92 | #ifdef CONFIG_CPU_XLR |
93 | #define nlm_current_node() (&nlm_nodes[0]) | 93 | #define nlm_current_node() (&nlm_nodes[0]) |
94 | #else | 94 | #else |
95 | #define nlm_current_node() (&nlm_nodes[nlm_nodeid()]) | 95 | #define nlm_current_node() (&nlm_nodes[nlm_nodeid()]) |
96 | #endif | 96 | #endif |
diff --git a/arch/mips/include/asm/netlogic/haldefs.h b/arch/mips/include/asm/netlogic/haldefs.h index 72a0c788b472..419d8aef8569 100644 --- a/arch/mips/include/asm/netlogic/haldefs.h +++ b/arch/mips/include/asm/netlogic/haldefs.h | |||
@@ -48,7 +48,7 @@ | |||
48 | * access 64 bit addresses or data. | 48 | * access 64 bit addresses or data. |
49 | * | 49 | * |
50 | * We need to disable interrupts because we save just the lower 32 bits of | 50 | * We need to disable interrupts because we save just the lower 32 bits of |
51 | * registers in interrupt handling. So if we get hit by an interrupt while | 51 | * registers in interrupt handling. So if we get hit by an interrupt while |
52 | * using the upper 32 bits of a register, we lose. | 52 | * using the upper 32 bits of a register, we lose. |
53 | */ | 53 | */ |
54 | static inline uint32_t nlm_save_flags_kx(void) | 54 | static inline uint32_t nlm_save_flags_kx(void) |
diff --git a/arch/mips/include/asm/netlogic/mips-extns.h b/arch/mips/include/asm/netlogic/mips-extns.h index 32ba6d95d47c..8ffae43107e6 100644 --- a/arch/mips/include/asm/netlogic/mips-extns.h +++ b/arch/mips/include/asm/netlogic/mips-extns.h | |||
@@ -49,7 +49,7 @@ | |||
49 | */ | 49 | */ |
50 | #define write_c0_eimr(val) \ | 50 | #define write_c0_eimr(val) \ |
51 | do { \ | 51 | do { \ |
52 | if (sizeof(unsigned long) == 4) { \ | 52 | if (sizeof(unsigned long) == 4) { \ |
53 | unsigned long __flags; \ | 53 | unsigned long __flags; \ |
54 | \ | 54 | \ |
55 | local_irq_save(__flags); \ | 55 | local_irq_save(__flags); \ |
@@ -208,7 +208,7 @@ do { \ | |||
208 | ".set\tmips0\n\t" \ | 208 | ".set\tmips0\n\t" \ |
209 | : : "Jr" (value)); \ | 209 | : : "Jr" (value)); \ |
210 | else \ | 210 | else \ |
211 | __asm__ __volatile__( \ | 211 | __asm__ __volatile__( \ |
212 | ".set\tmips32\n\t" \ | 212 | ".set\tmips32\n\t" \ |
213 | "mtc2\t%z0, " #reg ", " #sel "\n\t" \ | 213 | "mtc2\t%z0, " #reg ", " #sel "\n\t" \ |
214 | ".set\tmips0\n\t" \ | 214 | ".set\tmips0\n\t" \ |
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/bridge.h b/arch/mips/include/asm/netlogic/xlp-hal/bridge.h index ca95133f1ad1..790f0f1e55c6 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/bridge.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/bridge.h | |||
@@ -178,9 +178,9 @@ | |||
178 | 178 | ||
179 | #define nlm_read_bridge_reg(b, r) nlm_read_reg(b, r) | 179 | #define nlm_read_bridge_reg(b, r) nlm_read_reg(b, r) |
180 | #define nlm_write_bridge_reg(b, r, v) nlm_write_reg(b, r, v) | 180 | #define nlm_write_bridge_reg(b, r, v) nlm_write_reg(b, r, v) |
181 | #define nlm_get_bridge_pcibase(node) \ | 181 | #define nlm_get_bridge_pcibase(node) \ |
182 | nlm_pcicfg_base(XLP_IO_BRIDGE_OFFSET(node)) | 182 | nlm_pcicfg_base(XLP_IO_BRIDGE_OFFSET(node)) |
183 | #define nlm_get_bridge_regbase(node) \ | 183 | #define nlm_get_bridge_regbase(node) \ |
184 | (nlm_get_bridge_pcibase(node) + XLP_IO_PCI_HDRSZ) | 184 | (nlm_get_bridge_pcibase(node) + XLP_IO_PCI_HDRSZ) |
185 | 185 | ||
186 | #endif /* __ASSEMBLY__ */ | 186 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/iomap.h b/arch/mips/include/asm/netlogic/xlp-hal/iomap.h index 2c63f9754640..9fac46fb7913 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/iomap.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/iomap.h | |||
@@ -35,12 +35,12 @@ | |||
35 | #ifndef __NLM_HAL_IOMAP_H__ | 35 | #ifndef __NLM_HAL_IOMAP_H__ |
36 | #define __NLM_HAL_IOMAP_H__ | 36 | #define __NLM_HAL_IOMAP_H__ |
37 | 37 | ||
38 | #define XLP_DEFAULT_IO_BASE 0x18000000 | 38 | #define XLP_DEFAULT_IO_BASE 0x18000000 |
39 | #define XLP_DEFAULT_PCI_ECFG_BASE XLP_DEFAULT_IO_BASE | 39 | #define XLP_DEFAULT_PCI_ECFG_BASE XLP_DEFAULT_IO_BASE |
40 | #define XLP_DEFAULT_PCI_CFG_BASE 0x1c000000 | 40 | #define XLP_DEFAULT_PCI_CFG_BASE 0x1c000000 |
41 | 41 | ||
42 | #define NMI_BASE 0xbfc00000 | 42 | #define NMI_BASE 0xbfc00000 |
43 | #define XLP_IO_CLK 133333333 | 43 | #define XLP_IO_CLK 133333333 |
44 | 44 | ||
45 | #define XLP_PCIE_CFG_SIZE 0x1000 /* 4K */ | 45 | #define XLP_PCIE_CFG_SIZE 0x1000 /* 4K */ |
46 | #define XLP_PCIE_DEV_BLK_SIZE (8 * XLP_PCIE_CFG_SIZE) | 46 | #define XLP_PCIE_DEV_BLK_SIZE (8 * XLP_PCIE_CFG_SIZE) |
@@ -96,8 +96,8 @@ | |||
96 | #define XLP_IO_NAND_OFFSET(node) XLP_HDR_OFFSET(node, 0, 7, 1) | 96 | #define XLP_IO_NAND_OFFSET(node) XLP_HDR_OFFSET(node, 0, 7, 1) |
97 | #define XLP_IO_SPI_OFFSET(node) XLP_HDR_OFFSET(node, 0, 7, 2) | 97 | #define XLP_IO_SPI_OFFSET(node) XLP_HDR_OFFSET(node, 0, 7, 2) |
98 | /* SD flash */ | 98 | /* SD flash */ |
99 | #define XLP_IO_SD_OFFSET(node) XLP_HDR_OFFSET(node, 0, 7, 3) | 99 | #define XLP_IO_SD_OFFSET(node) XLP_HDR_OFFSET(node, 0, 7, 3) |
100 | #define XLP_IO_MMC_OFFSET(node, slot) \ | 100 | #define XLP_IO_MMC_OFFSET(node, slot) \ |
101 | ((XLP_IO_SD_OFFSET(node))+(slot*0x100)+XLP_IO_PCI_HDRSZ) | 101 | ((XLP_IO_SD_OFFSET(node))+(slot*0x100)+XLP_IO_PCI_HDRSZ) |
102 | 102 | ||
103 | /* PCI config header register id's */ | 103 | /* PCI config header register id's */ |
@@ -125,26 +125,26 @@ | |||
125 | #define XLP_PCI_SBB_WT_REG 0x3f | 125 | #define XLP_PCI_SBB_WT_REG 0x3f |
126 | 126 | ||
127 | /* PCI IDs for SoC device */ | 127 | /* PCI IDs for SoC device */ |
128 | #define PCI_VENDOR_NETLOGIC 0x184e | 128 | #define PCI_VENDOR_NETLOGIC 0x184e |
129 | 129 | ||
130 | #define PCI_DEVICE_ID_NLM_ROOT 0x1001 | 130 | #define PCI_DEVICE_ID_NLM_ROOT 0x1001 |
131 | #define PCI_DEVICE_ID_NLM_ICI 0x1002 | 131 | #define PCI_DEVICE_ID_NLM_ICI 0x1002 |
132 | #define PCI_DEVICE_ID_NLM_PIC 0x1003 | 132 | #define PCI_DEVICE_ID_NLM_PIC 0x1003 |
133 | #define PCI_DEVICE_ID_NLM_PCIE 0x1004 | 133 | #define PCI_DEVICE_ID_NLM_PCIE 0x1004 |
134 | #define PCI_DEVICE_ID_NLM_EHCI 0x1007 | 134 | #define PCI_DEVICE_ID_NLM_EHCI 0x1007 |
135 | #define PCI_DEVICE_ID_NLM_OHCI 0x1008 | 135 | #define PCI_DEVICE_ID_NLM_OHCI 0x1008 |
136 | #define PCI_DEVICE_ID_NLM_NAE 0x1009 | 136 | #define PCI_DEVICE_ID_NLM_NAE 0x1009 |
137 | #define PCI_DEVICE_ID_NLM_POE 0x100A | 137 | #define PCI_DEVICE_ID_NLM_POE 0x100A |
138 | #define PCI_DEVICE_ID_NLM_FMN 0x100B | 138 | #define PCI_DEVICE_ID_NLM_FMN 0x100B |
139 | #define PCI_DEVICE_ID_NLM_RAID 0x100D | 139 | #define PCI_DEVICE_ID_NLM_RAID 0x100D |
140 | #define PCI_DEVICE_ID_NLM_SAE 0x100D | 140 | #define PCI_DEVICE_ID_NLM_SAE 0x100D |
141 | #define PCI_DEVICE_ID_NLM_RSA 0x100E | 141 | #define PCI_DEVICE_ID_NLM_RSA 0x100E |
142 | #define PCI_DEVICE_ID_NLM_CMP 0x100F | 142 | #define PCI_DEVICE_ID_NLM_CMP 0x100F |
143 | #define PCI_DEVICE_ID_NLM_UART 0x1010 | 143 | #define PCI_DEVICE_ID_NLM_UART 0x1010 |
144 | #define PCI_DEVICE_ID_NLM_I2C 0x1011 | 144 | #define PCI_DEVICE_ID_NLM_I2C 0x1011 |
145 | #define PCI_DEVICE_ID_NLM_NOR 0x1015 | 145 | #define PCI_DEVICE_ID_NLM_NOR 0x1015 |
146 | #define PCI_DEVICE_ID_NLM_NAND 0x1016 | 146 | #define PCI_DEVICE_ID_NLM_NAND 0x1016 |
147 | #define PCI_DEVICE_ID_NLM_MMC 0x1018 | 147 | #define PCI_DEVICE_ID_NLM_MMC 0x1018 |
148 | 148 | ||
149 | #ifndef __ASSEMBLY__ | 149 | #ifndef __ASSEMBLY__ |
150 | 150 | ||
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h b/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h index 66c323d1bd7d..b559cb9f56ea 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h | |||
@@ -33,42 +33,42 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #ifndef __NLM_HAL_PCIBUS_H__ | 35 | #ifndef __NLM_HAL_PCIBUS_H__ |
36 | #define __NLM_HAL_PCIBUS_H__ | 36 | #define __NLM_HAL_PCIBUS_H__ |
37 | 37 | ||
38 | /* PCIE Memory and IO regions */ | 38 | /* PCIE Memory and IO regions */ |
39 | #define PCIE_MEM_BASE 0xd0000000ULL | 39 | #define PCIE_MEM_BASE 0xd0000000ULL |
40 | #define PCIE_MEM_LIMIT 0xdfffffffULL | 40 | #define PCIE_MEM_LIMIT 0xdfffffffULL |
41 | #define PCIE_IO_BASE 0x14000000ULL | 41 | #define PCIE_IO_BASE 0x14000000ULL |
42 | #define PCIE_IO_LIMIT 0x15ffffffULL | 42 | #define PCIE_IO_LIMIT 0x15ffffffULL |
43 | 43 | ||
44 | #define PCIE_BRIDGE_CMD 0x1 | 44 | #define PCIE_BRIDGE_CMD 0x1 |
45 | #define PCIE_BRIDGE_MSI_CAP 0x14 | 45 | #define PCIE_BRIDGE_MSI_CAP 0x14 |
46 | #define PCIE_BRIDGE_MSI_ADDRL 0x15 | 46 | #define PCIE_BRIDGE_MSI_ADDRL 0x15 |
47 | #define PCIE_BRIDGE_MSI_ADDRH 0x16 | 47 | #define PCIE_BRIDGE_MSI_ADDRH 0x16 |
48 | #define PCIE_BRIDGE_MSI_DATA 0x17 | 48 | #define PCIE_BRIDGE_MSI_DATA 0x17 |
49 | 49 | ||
50 | /* XLP Global PCIE configuration space registers */ | 50 | /* XLP Global PCIE configuration space registers */ |
51 | #define PCIE_BYTE_SWAP_MEM_BASE 0x247 | 51 | #define PCIE_BYTE_SWAP_MEM_BASE 0x247 |
52 | #define PCIE_BYTE_SWAP_MEM_LIM 0x248 | 52 | #define PCIE_BYTE_SWAP_MEM_LIM 0x248 |
53 | #define PCIE_BYTE_SWAP_IO_BASE 0x249 | 53 | #define PCIE_BYTE_SWAP_IO_BASE 0x249 |
54 | #define PCIE_BYTE_SWAP_IO_LIM 0x24A | 54 | #define PCIE_BYTE_SWAP_IO_LIM 0x24A |
55 | #define PCIE_MSI_STATUS 0x25A | 55 | #define PCIE_MSI_STATUS 0x25A |
56 | #define PCIE_MSI_EN 0x25B | 56 | #define PCIE_MSI_EN 0x25B |
57 | #define PCIE_INT_EN0 0x261 | 57 | #define PCIE_INT_EN0 0x261 |
58 | 58 | ||
59 | /* PCIE_MSI_EN */ | 59 | /* PCIE_MSI_EN */ |
60 | #define PCIE_MSI_VECTOR_INT_EN 0xFFFFFFFF | 60 | #define PCIE_MSI_VECTOR_INT_EN 0xFFFFFFFF |
61 | 61 | ||
62 | /* PCIE_INT_EN0 */ | 62 | /* PCIE_INT_EN0 */ |
63 | #define PCIE_MSI_INT_EN (1 << 9) | 63 | #define PCIE_MSI_INT_EN (1 << 9) |
64 | 64 | ||
65 | #ifndef __ASSEMBLY__ | 65 | #ifndef __ASSEMBLY__ |
66 | 66 | ||
67 | #define nlm_read_pcie_reg(b, r) nlm_read_reg(b, r) | 67 | #define nlm_read_pcie_reg(b, r) nlm_read_reg(b, r) |
68 | #define nlm_write_pcie_reg(b, r, v) nlm_write_reg(b, r, v) | 68 | #define nlm_write_pcie_reg(b, r, v) nlm_write_reg(b, r, v) |
69 | #define nlm_get_pcie_base(node, inst) \ | 69 | #define nlm_get_pcie_base(node, inst) \ |
70 | nlm_pcicfg_base(XLP_IO_PCIE_OFFSET(node, inst)) | 70 | nlm_pcicfg_base(XLP_IO_PCIE_OFFSET(node, inst)) |
71 | #define nlm_get_pcie_regbase(node, inst) \ | 71 | #define nlm_get_pcie_regbase(node, inst) \ |
72 | (nlm_get_pcie_base(node, inst) + XLP_IO_PCI_HDRSZ) | 72 | (nlm_get_pcie_base(node, inst) + XLP_IO_PCI_HDRSZ) |
73 | 73 | ||
74 | int xlp_pcie_link_irt(int link); | 74 | int xlp_pcie_link_irt(int link); |
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/pic.h b/arch/mips/include/asm/netlogic/xlp-hal/pic.h index b2e53a5383ab..46ace0ca26d8 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/pic.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/pic.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define _NLM_HAL_PIC_H | 36 | #define _NLM_HAL_PIC_H |
37 | 37 | ||
38 | /* PIC Specific registers */ | 38 | /* PIC Specific registers */ |
39 | #define PIC_CTRL 0x00 | 39 | #define PIC_CTRL 0x00 |
40 | 40 | ||
41 | /* PIC control register defines */ | 41 | /* PIC control register defines */ |
42 | #define PIC_CTRL_ITV 32 /* interrupt timeout value */ | 42 | #define PIC_CTRL_ITV 32 /* interrupt timeout value */ |
@@ -71,41 +71,41 @@ | |||
71 | #define PIC_IRT_DB 16 /* Destination base */ | 71 | #define PIC_IRT_DB 16 /* Destination base */ |
72 | #define PIC_IRT_DTE 0 /* Destination thread enables */ | 72 | #define PIC_IRT_DTE 0 /* Destination thread enables */ |
73 | 73 | ||
74 | #define PIC_BYTESWAP 0x02 | 74 | #define PIC_BYTESWAP 0x02 |
75 | #define PIC_STATUS 0x04 | 75 | #define PIC_STATUS 0x04 |
76 | #define PIC_INTR_TIMEOUT 0x06 | 76 | #define PIC_INTR_TIMEOUT 0x06 |
77 | #define PIC_ICI0_INTR_TIMEOUT 0x08 | 77 | #define PIC_ICI0_INTR_TIMEOUT 0x08 |
78 | #define PIC_ICI1_INTR_TIMEOUT 0x0a | 78 | #define PIC_ICI1_INTR_TIMEOUT 0x0a |
79 | #define PIC_ICI2_INTR_TIMEOUT 0x0c | 79 | #define PIC_ICI2_INTR_TIMEOUT 0x0c |
80 | #define PIC_IPI_CTL 0x0e | 80 | #define PIC_IPI_CTL 0x0e |
81 | #define PIC_INT_ACK 0x10 | 81 | #define PIC_INT_ACK 0x10 |
82 | #define PIC_INT_PENDING0 0x12 | 82 | #define PIC_INT_PENDING0 0x12 |
83 | #define PIC_INT_PENDING1 0x14 | 83 | #define PIC_INT_PENDING1 0x14 |
84 | #define PIC_INT_PENDING2 0x16 | 84 | #define PIC_INT_PENDING2 0x16 |
85 | 85 | ||
86 | #define PIC_WDOG0_MAXVAL 0x18 | 86 | #define PIC_WDOG0_MAXVAL 0x18 |
87 | #define PIC_WDOG0_COUNT 0x1a | 87 | #define PIC_WDOG0_COUNT 0x1a |
88 | #define PIC_WDOG0_ENABLE0 0x1c | 88 | #define PIC_WDOG0_ENABLE0 0x1c |
89 | #define PIC_WDOG0_ENABLE1 0x1e | 89 | #define PIC_WDOG0_ENABLE1 0x1e |
90 | #define PIC_WDOG0_BEATCMD 0x20 | 90 | #define PIC_WDOG0_BEATCMD 0x20 |
91 | #define PIC_WDOG0_BEAT0 0x22 | 91 | #define PIC_WDOG0_BEAT0 0x22 |
92 | #define PIC_WDOG0_BEAT1 0x24 | 92 | #define PIC_WDOG0_BEAT1 0x24 |
93 | 93 | ||
94 | #define PIC_WDOG1_MAXVAL 0x26 | 94 | #define PIC_WDOG1_MAXVAL 0x26 |
95 | #define PIC_WDOG1_COUNT 0x28 | 95 | #define PIC_WDOG1_COUNT 0x28 |
96 | #define PIC_WDOG1_ENABLE0 0x2a | 96 | #define PIC_WDOG1_ENABLE0 0x2a |
97 | #define PIC_WDOG1_ENABLE1 0x2c | 97 | #define PIC_WDOG1_ENABLE1 0x2c |
98 | #define PIC_WDOG1_BEATCMD 0x2e | 98 | #define PIC_WDOG1_BEATCMD 0x2e |
99 | #define PIC_WDOG1_BEAT0 0x30 | 99 | #define PIC_WDOG1_BEAT0 0x30 |
100 | #define PIC_WDOG1_BEAT1 0x32 | 100 | #define PIC_WDOG1_BEAT1 0x32 |
101 | 101 | ||
102 | #define PIC_WDOG_MAXVAL(i) (PIC_WDOG0_MAXVAL + ((i) ? 7 : 0)) | 102 | #define PIC_WDOG_MAXVAL(i) (PIC_WDOG0_MAXVAL + ((i) ? 7 : 0)) |
103 | #define PIC_WDOG_COUNT(i) (PIC_WDOG0_COUNT + ((i) ? 7 : 0)) | 103 | #define PIC_WDOG_COUNT(i) (PIC_WDOG0_COUNT + ((i) ? 7 : 0)) |
104 | #define PIC_WDOG_ENABLE0(i) (PIC_WDOG0_ENABLE0 + ((i) ? 7 : 0)) | 104 | #define PIC_WDOG_ENABLE0(i) (PIC_WDOG0_ENABLE0 + ((i) ? 7 : 0)) |
105 | #define PIC_WDOG_ENABLE1(i) (PIC_WDOG0_ENABLE1 + ((i) ? 7 : 0)) | 105 | #define PIC_WDOG_ENABLE1(i) (PIC_WDOG0_ENABLE1 + ((i) ? 7 : 0)) |
106 | #define PIC_WDOG_BEATCMD(i) (PIC_WDOG0_BEATCMD + ((i) ? 7 : 0)) | 106 | #define PIC_WDOG_BEATCMD(i) (PIC_WDOG0_BEATCMD + ((i) ? 7 : 0)) |
107 | #define PIC_WDOG_BEAT0(i) (PIC_WDOG0_BEAT0 + ((i) ? 7 : 0)) | 107 | #define PIC_WDOG_BEAT0(i) (PIC_WDOG0_BEAT0 + ((i) ? 7 : 0)) |
108 | #define PIC_WDOG_BEAT1(i) (PIC_WDOG0_BEAT1 + ((i) ? 7 : 0)) | 108 | #define PIC_WDOG_BEAT1(i) (PIC_WDOG0_BEAT1 + ((i) ? 7 : 0)) |
109 | 109 | ||
110 | #define PIC_TIMER0_MAXVAL 0x34 | 110 | #define PIC_TIMER0_MAXVAL 0x34 |
111 | #define PIC_TIMER1_MAXVAL 0x36 | 111 | #define PIC_TIMER1_MAXVAL 0x36 |
@@ -127,28 +127,28 @@ | |||
127 | #define PIC_TIMER7_COUNT 0x52 | 127 | #define PIC_TIMER7_COUNT 0x52 |
128 | #define PIC_TIMER_COUNT(i) (PIC_TIMER0_COUNT + ((i) * 2)) | 128 | #define PIC_TIMER_COUNT(i) (PIC_TIMER0_COUNT + ((i) * 2)) |
129 | 129 | ||
130 | #define PIC_ITE0_N0_N1 0x54 | 130 | #define PIC_ITE0_N0_N1 0x54 |
131 | #define PIC_ITE1_N0_N1 0x58 | 131 | #define PIC_ITE1_N0_N1 0x58 |
132 | #define PIC_ITE2_N0_N1 0x5c | 132 | #define PIC_ITE2_N0_N1 0x5c |
133 | #define PIC_ITE3_N0_N1 0x60 | 133 | #define PIC_ITE3_N0_N1 0x60 |
134 | #define PIC_ITE4_N0_N1 0x64 | 134 | #define PIC_ITE4_N0_N1 0x64 |
135 | #define PIC_ITE5_N0_N1 0x68 | 135 | #define PIC_ITE5_N0_N1 0x68 |
136 | #define PIC_ITE6_N0_N1 0x6c | 136 | #define PIC_ITE6_N0_N1 0x6c |
137 | #define PIC_ITE7_N0_N1 0x70 | 137 | #define PIC_ITE7_N0_N1 0x70 |
138 | #define PIC_ITE_N0_N1(i) (PIC_ITE0_N0_N1 + ((i) * 4)) | 138 | #define PIC_ITE_N0_N1(i) (PIC_ITE0_N0_N1 + ((i) * 4)) |
139 | 139 | ||
140 | #define PIC_ITE0_N2_N3 0x56 | 140 | #define PIC_ITE0_N2_N3 0x56 |
141 | #define PIC_ITE1_N2_N3 0x5a | 141 | #define PIC_ITE1_N2_N3 0x5a |
142 | #define PIC_ITE2_N2_N3 0x5e | 142 | #define PIC_ITE2_N2_N3 0x5e |
143 | #define PIC_ITE3_N2_N3 0x62 | 143 | #define PIC_ITE3_N2_N3 0x62 |
144 | #define PIC_ITE4_N2_N3 0x66 | 144 | #define PIC_ITE4_N2_N3 0x66 |
145 | #define PIC_ITE5_N2_N3 0x6a | 145 | #define PIC_ITE5_N2_N3 0x6a |
146 | #define PIC_ITE6_N2_N3 0x6e | 146 | #define PIC_ITE6_N2_N3 0x6e |
147 | #define PIC_ITE7_N2_N3 0x72 | 147 | #define PIC_ITE7_N2_N3 0x72 |
148 | #define PIC_ITE_N2_N3(i) (PIC_ITE0_N2_N3 + ((i) * 4)) | 148 | #define PIC_ITE_N2_N3(i) (PIC_ITE0_N2_N3 + ((i) * 4)) |
149 | 149 | ||
150 | #define PIC_IRT0 0x74 | 150 | #define PIC_IRT0 0x74 |
151 | #define PIC_IRT(i) (PIC_IRT0 + ((i) * 2)) | 151 | #define PIC_IRT(i) (PIC_IRT0 + ((i) * 2)) |
152 | 152 | ||
153 | #define TIMER_CYCLES_MAXVAL 0xffffffffffffffffULL | 153 | #define TIMER_CYCLES_MAXVAL 0xffffffffffffffffULL |
154 | 154 | ||
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/sys.h b/arch/mips/include/asm/netlogic/xlp-hal/sys.h index 258e8cc00e99..470e52bfc061 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/sys.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/sys.h | |||
@@ -40,89 +40,89 @@ | |||
40 | * @author Netlogic Microsystems | 40 | * @author Netlogic Microsystems |
41 | * @brief HAL for System configuration registers | 41 | * @brief HAL for System configuration registers |
42 | */ | 42 | */ |
43 | #define SYS_CHIP_RESET 0x00 | 43 | #define SYS_CHIP_RESET 0x00 |
44 | #define SYS_POWER_ON_RESET_CFG 0x01 | 44 | #define SYS_POWER_ON_RESET_CFG 0x01 |
45 | #define SYS_EFUSE_DEVICE_CFG_STATUS0 0x02 | 45 | #define SYS_EFUSE_DEVICE_CFG_STATUS0 0x02 |
46 | #define SYS_EFUSE_DEVICE_CFG_STATUS1 0x03 | 46 | #define SYS_EFUSE_DEVICE_CFG_STATUS1 0x03 |
47 | #define SYS_EFUSE_DEVICE_CFG_STATUS2 0x04 | 47 | #define SYS_EFUSE_DEVICE_CFG_STATUS2 0x04 |
48 | #define SYS_EFUSE_DEVICE_CFG3 0x05 | 48 | #define SYS_EFUSE_DEVICE_CFG3 0x05 |
49 | #define SYS_EFUSE_DEVICE_CFG4 0x06 | 49 | #define SYS_EFUSE_DEVICE_CFG4 0x06 |
50 | #define SYS_EFUSE_DEVICE_CFG5 0x07 | 50 | #define SYS_EFUSE_DEVICE_CFG5 0x07 |
51 | #define SYS_EFUSE_DEVICE_CFG6 0x08 | 51 | #define SYS_EFUSE_DEVICE_CFG6 0x08 |
52 | #define SYS_EFUSE_DEVICE_CFG7 0x09 | 52 | #define SYS_EFUSE_DEVICE_CFG7 0x09 |
53 | #define SYS_PLL_CTRL 0x0a | 53 | #define SYS_PLL_CTRL 0x0a |
54 | #define SYS_CPU_RESET 0x0b | 54 | #define SYS_CPU_RESET 0x0b |
55 | #define SYS_CPU_NONCOHERENT_MODE 0x0d | 55 | #define SYS_CPU_NONCOHERENT_MODE 0x0d |
56 | #define SYS_CORE_DFS_DIS_CTRL 0x0e | 56 | #define SYS_CORE_DFS_DIS_CTRL 0x0e |
57 | #define SYS_CORE_DFS_RST_CTRL 0x0f | 57 | #define SYS_CORE_DFS_RST_CTRL 0x0f |
58 | #define SYS_CORE_DFS_BYP_CTRL 0x10 | 58 | #define SYS_CORE_DFS_BYP_CTRL 0x10 |
59 | #define SYS_CORE_DFS_PHA_CTRL 0x11 | 59 | #define SYS_CORE_DFS_PHA_CTRL 0x11 |
60 | #define SYS_CORE_DFS_DIV_INC_CTRL 0x12 | 60 | #define SYS_CORE_DFS_DIV_INC_CTRL 0x12 |
61 | #define SYS_CORE_DFS_DIV_DEC_CTRL 0x13 | 61 | #define SYS_CORE_DFS_DIV_DEC_CTRL 0x13 |
62 | #define SYS_CORE_DFS_DIV_VALUE 0x14 | 62 | #define SYS_CORE_DFS_DIV_VALUE 0x14 |
63 | #define SYS_RESET 0x15 | 63 | #define SYS_RESET 0x15 |
64 | #define SYS_DFS_DIS_CTRL 0x16 | 64 | #define SYS_DFS_DIS_CTRL 0x16 |
65 | #define SYS_DFS_RST_CTRL 0x17 | 65 | #define SYS_DFS_RST_CTRL 0x17 |
66 | #define SYS_DFS_BYP_CTRL 0x18 | 66 | #define SYS_DFS_BYP_CTRL 0x18 |
67 | #define SYS_DFS_DIV_INC_CTRL 0x19 | 67 | #define SYS_DFS_DIV_INC_CTRL 0x19 |
68 | #define SYS_DFS_DIV_DEC_CTRL 0x1a | 68 | #define SYS_DFS_DIV_DEC_CTRL 0x1a |
69 | #define SYS_DFS_DIV_VALUE0 0x1b | 69 | #define SYS_DFS_DIV_VALUE0 0x1b |
70 | #define SYS_DFS_DIV_VALUE1 0x1c | 70 | #define SYS_DFS_DIV_VALUE1 0x1c |
71 | #define SYS_SENSE_AMP_DLY 0x1d | 71 | #define SYS_SENSE_AMP_DLY 0x1d |
72 | #define SYS_SOC_SENSE_AMP_DLY 0x1e | 72 | #define SYS_SOC_SENSE_AMP_DLY 0x1e |
73 | #define SYS_CTRL0 0x1f | 73 | #define SYS_CTRL0 0x1f |
74 | #define SYS_CTRL1 0x20 | 74 | #define SYS_CTRL1 0x20 |
75 | #define SYS_TIMEOUT_BS1 0x21 | 75 | #define SYS_TIMEOUT_BS1 0x21 |
76 | #define SYS_BYTE_SWAP 0x22 | 76 | #define SYS_BYTE_SWAP 0x22 |
77 | #define SYS_VRM_VID 0x23 | 77 | #define SYS_VRM_VID 0x23 |
78 | #define SYS_PWR_RAM_CMD 0x24 | 78 | #define SYS_PWR_RAM_CMD 0x24 |
79 | #define SYS_PWR_RAM_ADDR 0x25 | 79 | #define SYS_PWR_RAM_ADDR 0x25 |
80 | #define SYS_PWR_RAM_DATA0 0x26 | 80 | #define SYS_PWR_RAM_DATA0 0x26 |
81 | #define SYS_PWR_RAM_DATA1 0x27 | 81 | #define SYS_PWR_RAM_DATA1 0x27 |
82 | #define SYS_PWR_RAM_DATA2 0x28 | 82 | #define SYS_PWR_RAM_DATA2 0x28 |
83 | #define SYS_PWR_UCODE 0x29 | 83 | #define SYS_PWR_UCODE 0x29 |
84 | #define SYS_CPU0_PWR_STATUS 0x2a | 84 | #define SYS_CPU0_PWR_STATUS 0x2a |
85 | #define SYS_CPU1_PWR_STATUS 0x2b | 85 | #define SYS_CPU1_PWR_STATUS 0x2b |
86 | #define SYS_CPU2_PWR_STATUS 0x2c | 86 | #define SYS_CPU2_PWR_STATUS 0x2c |
87 | #define SYS_CPU3_PWR_STATUS 0x2d | 87 | #define SYS_CPU3_PWR_STATUS 0x2d |
88 | #define SYS_CPU4_PWR_STATUS 0x2e | 88 | #define SYS_CPU4_PWR_STATUS 0x2e |
89 | #define SYS_CPU5_PWR_STATUS 0x2f | 89 | #define SYS_CPU5_PWR_STATUS 0x2f |
90 | #define SYS_CPU6_PWR_STATUS 0x30 | 90 | #define SYS_CPU6_PWR_STATUS 0x30 |
91 | #define SYS_CPU7_PWR_STATUS 0x31 | 91 | #define SYS_CPU7_PWR_STATUS 0x31 |
92 | #define SYS_STATUS 0x32 | 92 | #define SYS_STATUS 0x32 |
93 | #define SYS_INT_POL 0x33 | 93 | #define SYS_INT_POL 0x33 |
94 | #define SYS_INT_TYPE 0x34 | 94 | #define SYS_INT_TYPE 0x34 |
95 | #define SYS_INT_STATUS 0x35 | 95 | #define SYS_INT_STATUS 0x35 |
96 | #define SYS_INT_MASK0 0x36 | 96 | #define SYS_INT_MASK0 0x36 |
97 | #define SYS_INT_MASK1 0x37 | 97 | #define SYS_INT_MASK1 0x37 |
98 | #define SYS_UCO_S_ECC 0x38 | 98 | #define SYS_UCO_S_ECC 0x38 |
99 | #define SYS_UCO_M_ECC 0x39 | 99 | #define SYS_UCO_M_ECC 0x39 |
100 | #define SYS_UCO_ADDR 0x3a | 100 | #define SYS_UCO_ADDR 0x3a |
101 | #define SYS_UCO_INSTR 0x3b | 101 | #define SYS_UCO_INSTR 0x3b |
102 | #define SYS_MEM_BIST0 0x3c | 102 | #define SYS_MEM_BIST0 0x3c |
103 | #define SYS_MEM_BIST1 0x3d | 103 | #define SYS_MEM_BIST1 0x3d |
104 | #define SYS_MEM_BIST2 0x3e | 104 | #define SYS_MEM_BIST2 0x3e |
105 | #define SYS_MEM_BIST3 0x3f | 105 | #define SYS_MEM_BIST3 0x3f |
106 | #define SYS_MEM_BIST4 0x40 | 106 | #define SYS_MEM_BIST4 0x40 |
107 | #define SYS_MEM_BIST5 0x41 | 107 | #define SYS_MEM_BIST5 0x41 |
108 | #define SYS_MEM_BIST6 0x42 | 108 | #define SYS_MEM_BIST6 0x42 |
109 | #define SYS_MEM_BIST7 0x43 | 109 | #define SYS_MEM_BIST7 0x43 |
110 | #define SYS_MEM_BIST8 0x44 | 110 | #define SYS_MEM_BIST8 0x44 |
111 | #define SYS_MEM_BIST9 0x45 | 111 | #define SYS_MEM_BIST9 0x45 |
112 | #define SYS_MEM_BIST10 0x46 | 112 | #define SYS_MEM_BIST10 0x46 |
113 | #define SYS_MEM_BIST11 0x47 | 113 | #define SYS_MEM_BIST11 0x47 |
114 | #define SYS_MEM_BIST12 0x48 | 114 | #define SYS_MEM_BIST12 0x48 |
115 | #define SYS_SCRTCH0 0x49 | 115 | #define SYS_SCRTCH0 0x49 |
116 | #define SYS_SCRTCH1 0x4a | 116 | #define SYS_SCRTCH1 0x4a |
117 | #define SYS_SCRTCH2 0x4b | 117 | #define SYS_SCRTCH2 0x4b |
118 | #define SYS_SCRTCH3 0x4c | 118 | #define SYS_SCRTCH3 0x4c |
119 | 119 | ||
120 | #ifndef __ASSEMBLY__ | 120 | #ifndef __ASSEMBLY__ |
121 | 121 | ||
122 | #define nlm_read_sys_reg(b, r) nlm_read_reg(b, r) | 122 | #define nlm_read_sys_reg(b, r) nlm_read_reg(b, r) |
123 | #define nlm_write_sys_reg(b, r, v) nlm_write_reg(b, r, v) | 123 | #define nlm_write_sys_reg(b, r, v) nlm_write_reg(b, r, v) |
124 | #define nlm_get_sys_pcibase(node) nlm_pcicfg_base(XLP_IO_SYS_OFFSET(node)) | 124 | #define nlm_get_sys_pcibase(node) nlm_pcicfg_base(XLP_IO_SYS_OFFSET(node)) |
125 | #define nlm_get_sys_regbase(node) (nlm_get_sys_pcibase(node) + XLP_IO_PCI_HDRSZ) | 125 | #define nlm_get_sys_regbase(node) (nlm_get_sys_pcibase(node) + XLP_IO_PCI_HDRSZ) |
126 | 126 | ||
127 | #endif | 127 | #endif |
128 | #endif | 128 | #endif |
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/uart.h b/arch/mips/include/asm/netlogic/xlp-hal/uart.h index 6a7046ca094d..86d16e1e6072 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/uart.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/uart.h | |||
@@ -91,8 +91,8 @@ | |||
91 | 91 | ||
92 | #if !defined(LOCORE) && !defined(__ASSEMBLY__) | 92 | #if !defined(LOCORE) && !defined(__ASSEMBLY__) |
93 | 93 | ||
94 | #define nlm_read_uart_reg(b, r) nlm_read_reg(b, r) | 94 | #define nlm_read_uart_reg(b, r) nlm_read_reg(b, r) |
95 | #define nlm_write_uart_reg(b, r, v) nlm_write_reg(b, r, v) | 95 | #define nlm_write_uart_reg(b, r, v) nlm_write_reg(b, r, v) |
96 | #define nlm_get_uart_pcibase(node, inst) \ | 96 | #define nlm_get_uart_pcibase(node, inst) \ |
97 | nlm_pcicfg_base(XLP_IO_UART_OFFSET(node, inst)) | 97 | nlm_pcicfg_base(XLP_IO_UART_OFFSET(node, inst)) |
98 | #define nlm_get_uart_regbase(node, inst) \ | 98 | #define nlm_get_uart_regbase(node, inst) \ |
diff --git a/arch/mips/include/asm/netlogic/xlr/fmn.h b/arch/mips/include/asm/netlogic/xlr/fmn.h index 68d5167c86bb..2a78929cef73 100644 --- a/arch/mips/include/asm/netlogic/xlr/fmn.h +++ b/arch/mips/include/asm/netlogic/xlr/fmn.h | |||
@@ -38,108 +38,108 @@ | |||
38 | #include <asm/netlogic/mips-extns.h> /* for COP2 access */ | 38 | #include <asm/netlogic/mips-extns.h> /* for COP2 access */ |
39 | 39 | ||
40 | /* Station IDs */ | 40 | /* Station IDs */ |
41 | #define FMN_STNID_CPU0 0x00 | 41 | #define FMN_STNID_CPU0 0x00 |
42 | #define FMN_STNID_CPU1 0x08 | 42 | #define FMN_STNID_CPU1 0x08 |
43 | #define FMN_STNID_CPU2 0x10 | 43 | #define FMN_STNID_CPU2 0x10 |
44 | #define FMN_STNID_CPU3 0x18 | 44 | #define FMN_STNID_CPU3 0x18 |
45 | #define FMN_STNID_CPU4 0x20 | 45 | #define FMN_STNID_CPU4 0x20 |
46 | #define FMN_STNID_CPU5 0x28 | 46 | #define FMN_STNID_CPU5 0x28 |
47 | #define FMN_STNID_CPU6 0x30 | 47 | #define FMN_STNID_CPU6 0x30 |
48 | #define FMN_STNID_CPU7 0x38 | 48 | #define FMN_STNID_CPU7 0x38 |
49 | 49 | ||
50 | #define FMN_STNID_XGS0_TX 64 | 50 | #define FMN_STNID_XGS0_TX 64 |
51 | #define FMN_STNID_XMAC0_00_TX 64 | 51 | #define FMN_STNID_XMAC0_00_TX 64 |
52 | #define FMN_STNID_XMAC0_01_TX 65 | 52 | #define FMN_STNID_XMAC0_01_TX 65 |
53 | #define FMN_STNID_XMAC0_02_TX 66 | 53 | #define FMN_STNID_XMAC0_02_TX 66 |
54 | #define FMN_STNID_XMAC0_03_TX 67 | 54 | #define FMN_STNID_XMAC0_03_TX 67 |
55 | #define FMN_STNID_XMAC0_04_TX 68 | 55 | #define FMN_STNID_XMAC0_04_TX 68 |
56 | #define FMN_STNID_XMAC0_05_TX 69 | 56 | #define FMN_STNID_XMAC0_05_TX 69 |
57 | #define FMN_STNID_XMAC0_06_TX 70 | 57 | #define FMN_STNID_XMAC0_06_TX 70 |
58 | #define FMN_STNID_XMAC0_07_TX 71 | 58 | #define FMN_STNID_XMAC0_07_TX 71 |
59 | #define FMN_STNID_XMAC0_08_TX 72 | 59 | #define FMN_STNID_XMAC0_08_TX 72 |
60 | #define FMN_STNID_XMAC0_09_TX 73 | 60 | #define FMN_STNID_XMAC0_09_TX 73 |
61 | #define FMN_STNID_XMAC0_10_TX 74 | 61 | #define FMN_STNID_XMAC0_10_TX 74 |
62 | #define FMN_STNID_XMAC0_11_TX 75 | 62 | #define FMN_STNID_XMAC0_11_TX 75 |
63 | #define FMN_STNID_XMAC0_12_TX 76 | 63 | #define FMN_STNID_XMAC0_12_TX 76 |
64 | #define FMN_STNID_XMAC0_13_TX 77 | 64 | #define FMN_STNID_XMAC0_13_TX 77 |
65 | #define FMN_STNID_XMAC0_14_TX 78 | 65 | #define FMN_STNID_XMAC0_14_TX 78 |
66 | #define FMN_STNID_XMAC0_15_TX 79 | 66 | #define FMN_STNID_XMAC0_15_TX 79 |
67 | 67 | ||
68 | #define FMN_STNID_XGS1_TX 80 | 68 | #define FMN_STNID_XGS1_TX 80 |
69 | #define FMN_STNID_XMAC1_00_TX 80 | 69 | #define FMN_STNID_XMAC1_00_TX 80 |
70 | #define FMN_STNID_XMAC1_01_TX 81 | 70 | #define FMN_STNID_XMAC1_01_TX 81 |
71 | #define FMN_STNID_XMAC1_02_TX 82 | 71 | #define FMN_STNID_XMAC1_02_TX 82 |
72 | #define FMN_STNID_XMAC1_03_TX 83 | 72 | #define FMN_STNID_XMAC1_03_TX 83 |
73 | #define FMN_STNID_XMAC1_04_TX 84 | 73 | #define FMN_STNID_XMAC1_04_TX 84 |
74 | #define FMN_STNID_XMAC1_05_TX 85 | 74 | #define FMN_STNID_XMAC1_05_TX 85 |
75 | #define FMN_STNID_XMAC1_06_TX 86 | 75 | #define FMN_STNID_XMAC1_06_TX 86 |
76 | #define FMN_STNID_XMAC1_07_TX 87 | 76 | #define FMN_STNID_XMAC1_07_TX 87 |
77 | #define FMN_STNID_XMAC1_08_TX 88 | 77 | #define FMN_STNID_XMAC1_08_TX 88 |
78 | #define FMN_STNID_XMAC1_09_TX 89 | 78 | #define FMN_STNID_XMAC1_09_TX 89 |
79 | #define FMN_STNID_XMAC1_10_TX 90 | 79 | #define FMN_STNID_XMAC1_10_TX 90 |
80 | #define FMN_STNID_XMAC1_11_TX 91 | 80 | #define FMN_STNID_XMAC1_11_TX 91 |
81 | #define FMN_STNID_XMAC1_12_TX 92 | 81 | #define FMN_STNID_XMAC1_12_TX 92 |
82 | #define FMN_STNID_XMAC1_13_TX 93 | 82 | #define FMN_STNID_XMAC1_13_TX 93 |
83 | #define FMN_STNID_XMAC1_14_TX 94 | 83 | #define FMN_STNID_XMAC1_14_TX 94 |
84 | #define FMN_STNID_XMAC1_15_TX 95 | 84 | #define FMN_STNID_XMAC1_15_TX 95 |
85 | 85 | ||
86 | #define FMN_STNID_GMAC 96 | 86 | #define FMN_STNID_GMAC 96 |
87 | #define FMN_STNID_GMACJFR_0 96 | 87 | #define FMN_STNID_GMACJFR_0 96 |
88 | #define FMN_STNID_GMACRFR_0 97 | 88 | #define FMN_STNID_GMACRFR_0 97 |
89 | #define FMN_STNID_GMACTX0 98 | 89 | #define FMN_STNID_GMACTX0 98 |
90 | #define FMN_STNID_GMACTX1 99 | 90 | #define FMN_STNID_GMACTX1 99 |
91 | #define FMN_STNID_GMACTX2 100 | 91 | #define FMN_STNID_GMACTX2 100 |
92 | #define FMN_STNID_GMACTX3 101 | 92 | #define FMN_STNID_GMACTX3 101 |
93 | #define FMN_STNID_GMACJFR_1 102 | 93 | #define FMN_STNID_GMACJFR_1 102 |
94 | #define FMN_STNID_GMACRFR_1 103 | 94 | #define FMN_STNID_GMACRFR_1 103 |
95 | 95 | ||
96 | #define FMN_STNID_DMA 104 | 96 | #define FMN_STNID_DMA 104 |
97 | #define FMN_STNID_DMA_0 104 | 97 | #define FMN_STNID_DMA_0 104 |
98 | #define FMN_STNID_DMA_1 105 | 98 | #define FMN_STNID_DMA_1 105 |
99 | #define FMN_STNID_DMA_2 106 | 99 | #define FMN_STNID_DMA_2 106 |
100 | #define FMN_STNID_DMA_3 107 | 100 | #define FMN_STNID_DMA_3 107 |
101 | 101 | ||
102 | #define FMN_STNID_XGS0FR 112 | 102 | #define FMN_STNID_XGS0FR 112 |
103 | #define FMN_STNID_XMAC0JFR 112 | 103 | #define FMN_STNID_XMAC0JFR 112 |
104 | #define FMN_STNID_XMAC0RFR 113 | 104 | #define FMN_STNID_XMAC0RFR 113 |
105 | 105 | ||
106 | #define FMN_STNID_XGS1FR 114 | 106 | #define FMN_STNID_XGS1FR 114 |
107 | #define FMN_STNID_XMAC1JFR 114 | 107 | #define FMN_STNID_XMAC1JFR 114 |
108 | #define FMN_STNID_XMAC1RFR 115 | 108 | #define FMN_STNID_XMAC1RFR 115 |
109 | #define FMN_STNID_SEC 120 | 109 | #define FMN_STNID_SEC 120 |
110 | #define FMN_STNID_SEC0 120 | 110 | #define FMN_STNID_SEC0 120 |
111 | #define FMN_STNID_SEC1 121 | 111 | #define FMN_STNID_SEC1 121 |
112 | #define FMN_STNID_SEC2 122 | 112 | #define FMN_STNID_SEC2 122 |
113 | #define FMN_STNID_SEC3 123 | 113 | #define FMN_STNID_SEC3 123 |
114 | #define FMN_STNID_PK0 124 | 114 | #define FMN_STNID_PK0 124 |
115 | #define FMN_STNID_SEC_RSA 124 | 115 | #define FMN_STNID_SEC_RSA 124 |
116 | #define FMN_STNID_SEC_RSVD0 125 | 116 | #define FMN_STNID_SEC_RSVD0 125 |
117 | #define FMN_STNID_SEC_RSVD1 126 | 117 | #define FMN_STNID_SEC_RSVD1 126 |
118 | #define FMN_STNID_SEC_RSVD2 127 | 118 | #define FMN_STNID_SEC_RSVD2 127 |
119 | 119 | ||
120 | #define FMN_STNID_GMAC1 80 | 120 | #define FMN_STNID_GMAC1 80 |
121 | #define FMN_STNID_GMAC1_FR_0 81 | 121 | #define FMN_STNID_GMAC1_FR_0 81 |
122 | #define FMN_STNID_GMAC1_TX0 82 | 122 | #define FMN_STNID_GMAC1_TX0 82 |
123 | #define FMN_STNID_GMAC1_TX1 83 | 123 | #define FMN_STNID_GMAC1_TX1 83 |
124 | #define FMN_STNID_GMAC1_TX2 84 | 124 | #define FMN_STNID_GMAC1_TX2 84 |
125 | #define FMN_STNID_GMAC1_TX3 85 | 125 | #define FMN_STNID_GMAC1_TX3 85 |
126 | #define FMN_STNID_GMAC1_FR_1 87 | 126 | #define FMN_STNID_GMAC1_FR_1 87 |
127 | #define FMN_STNID_GMAC0 96 | 127 | #define FMN_STNID_GMAC0 96 |
128 | #define FMN_STNID_GMAC0_FR_0 97 | 128 | #define FMN_STNID_GMAC0_FR_0 97 |
129 | #define FMN_STNID_GMAC0_TX0 98 | 129 | #define FMN_STNID_GMAC0_TX0 98 |
130 | #define FMN_STNID_GMAC0_TX1 99 | 130 | #define FMN_STNID_GMAC0_TX1 99 |
131 | #define FMN_STNID_GMAC0_TX2 100 | 131 | #define FMN_STNID_GMAC0_TX2 100 |
132 | #define FMN_STNID_GMAC0_TX3 101 | 132 | #define FMN_STNID_GMAC0_TX3 101 |
133 | #define FMN_STNID_GMAC0_FR_1 103 | 133 | #define FMN_STNID_GMAC0_FR_1 103 |
134 | #define FMN_STNID_CMP_0 108 | 134 | #define FMN_STNID_CMP_0 108 |
135 | #define FMN_STNID_CMP_1 109 | 135 | #define FMN_STNID_CMP_1 109 |
136 | #define FMN_STNID_CMP_2 110 | 136 | #define FMN_STNID_CMP_2 110 |
137 | #define FMN_STNID_CMP_3 111 | 137 | #define FMN_STNID_CMP_3 111 |
138 | #define FMN_STNID_PCIE_0 116 | 138 | #define FMN_STNID_PCIE_0 116 |
139 | #define FMN_STNID_PCIE_1 117 | 139 | #define FMN_STNID_PCIE_1 117 |
140 | #define FMN_STNID_PCIE_2 118 | 140 | #define FMN_STNID_PCIE_2 118 |
141 | #define FMN_STNID_PCIE_3 119 | 141 | #define FMN_STNID_PCIE_3 119 |
142 | #define FMN_STNID_XLS_PK0 121 | 142 | #define FMN_STNID_XLS_PK0 121 |
143 | 143 | ||
144 | #define nlm_read_c2_cc0(s) __read_32bit_c2_register($16, s) | 144 | #define nlm_read_c2_cc0(s) __read_32bit_c2_register($16, s) |
145 | #define nlm_read_c2_cc1(s) __read_32bit_c2_register($17, s) | 145 | #define nlm_read_c2_cc1(s) __read_32bit_c2_register($17, s) |
@@ -175,25 +175,25 @@ | |||
175 | #define nlm_write_c2_cc14(s, v) __write_32bit_c2_register($30, s, v) | 175 | #define nlm_write_c2_cc14(s, v) __write_32bit_c2_register($30, s, v) |
176 | #define nlm_write_c2_cc15(s, v) __write_32bit_c2_register($31, s, v) | 176 | #define nlm_write_c2_cc15(s, v) __write_32bit_c2_register($31, s, v) |
177 | 177 | ||
178 | #define nlm_read_c2_status(sel) __read_32bit_c2_register($2, 0) | 178 | #define nlm_read_c2_status(sel) __read_32bit_c2_register($2, 0) |
179 | #define nlm_read_c2_config() __read_32bit_c2_register($3, 0) | 179 | #define nlm_read_c2_config() __read_32bit_c2_register($3, 0) |
180 | #define nlm_write_c2_config(v) __write_32bit_c2_register($3, 0, v) | 180 | #define nlm_write_c2_config(v) __write_32bit_c2_register($3, 0, v) |
181 | #define nlm_read_c2_bucksize(b) __read_32bit_c2_register($4, b) | 181 | #define nlm_read_c2_bucksize(b) __read_32bit_c2_register($4, b) |
182 | #define nlm_write_c2_bucksize(b, v) __write_32bit_c2_register($4, b, v) | 182 | #define nlm_write_c2_bucksize(b, v) __write_32bit_c2_register($4, b, v) |
183 | 183 | ||
184 | #define nlm_read_c2_rx_msg0() __read_64bit_c2_register($1, 0) | 184 | #define nlm_read_c2_rx_msg0() __read_64bit_c2_register($1, 0) |
185 | #define nlm_read_c2_rx_msg1() __read_64bit_c2_register($1, 1) | 185 | #define nlm_read_c2_rx_msg1() __read_64bit_c2_register($1, 1) |
186 | #define nlm_read_c2_rx_msg2() __read_64bit_c2_register($1, 2) | 186 | #define nlm_read_c2_rx_msg2() __read_64bit_c2_register($1, 2) |
187 | #define nlm_read_c2_rx_msg3() __read_64bit_c2_register($1, 3) | 187 | #define nlm_read_c2_rx_msg3() __read_64bit_c2_register($1, 3) |
188 | 188 | ||
189 | #define nlm_write_c2_tx_msg0(v) __write_64bit_c2_register($0, 0, v) | 189 | #define nlm_write_c2_tx_msg0(v) __write_64bit_c2_register($0, 0, v) |
190 | #define nlm_write_c2_tx_msg1(v) __write_64bit_c2_register($0, 1, v) | 190 | #define nlm_write_c2_tx_msg1(v) __write_64bit_c2_register($0, 1, v) |
191 | #define nlm_write_c2_tx_msg2(v) __write_64bit_c2_register($0, 2, v) | 191 | #define nlm_write_c2_tx_msg2(v) __write_64bit_c2_register($0, 2, v) |
192 | #define nlm_write_c2_tx_msg3(v) __write_64bit_c2_register($0, 3, v) | 192 | #define nlm_write_c2_tx_msg3(v) __write_64bit_c2_register($0, 3, v) |
193 | 193 | ||
194 | #define FMN_STN_RX_QSIZE 256 | 194 | #define FMN_STN_RX_QSIZE 256 |
195 | #define FMN_NSTATIONS 128 | 195 | #define FMN_NSTATIONS 128 |
196 | #define FMN_CORE_NBUCKETS 8 | 196 | #define FMN_CORE_NBUCKETS 8 |
197 | 197 | ||
198 | static inline void nlm_msgsnd(unsigned int stid) | 198 | static inline void nlm_msgsnd(unsigned int stid) |
199 | { | 199 | { |
diff --git a/arch/mips/include/asm/netlogic/xlr/iomap.h b/arch/mips/include/asm/netlogic/xlr/iomap.h index 2e768f032e83..ff4533d6ee64 100644 --- a/arch/mips/include/asm/netlogic/xlr/iomap.h +++ b/arch/mips/include/asm/netlogic/xlr/iomap.h | |||
@@ -35,66 +35,66 @@ | |||
35 | #ifndef _ASM_NLM_IOMAP_H | 35 | #ifndef _ASM_NLM_IOMAP_H |
36 | #define _ASM_NLM_IOMAP_H | 36 | #define _ASM_NLM_IOMAP_H |
37 | 37 | ||
38 | #define DEFAULT_NETLOGIC_IO_BASE CKSEG1ADDR(0x1ef00000) | 38 | #define DEFAULT_NETLOGIC_IO_BASE CKSEG1ADDR(0x1ef00000) |
39 | #define NETLOGIC_IO_DDR2_CHN0_OFFSET 0x01000 | 39 | #define NETLOGIC_IO_DDR2_CHN0_OFFSET 0x01000 |
40 | #define NETLOGIC_IO_DDR2_CHN1_OFFSET 0x02000 | 40 | #define NETLOGIC_IO_DDR2_CHN1_OFFSET 0x02000 |
41 | #define NETLOGIC_IO_DDR2_CHN2_OFFSET 0x03000 | 41 | #define NETLOGIC_IO_DDR2_CHN2_OFFSET 0x03000 |
42 | #define NETLOGIC_IO_DDR2_CHN3_OFFSET 0x04000 | 42 | #define NETLOGIC_IO_DDR2_CHN3_OFFSET 0x04000 |
43 | #define NETLOGIC_IO_PIC_OFFSET 0x08000 | 43 | #define NETLOGIC_IO_PIC_OFFSET 0x08000 |
44 | #define NETLOGIC_IO_UART_0_OFFSET 0x14000 | 44 | #define NETLOGIC_IO_UART_0_OFFSET 0x14000 |
45 | #define NETLOGIC_IO_UART_1_OFFSET 0x15100 | 45 | #define NETLOGIC_IO_UART_1_OFFSET 0x15100 |
46 | 46 | ||
47 | #define NETLOGIC_IO_SIZE 0x1000 | 47 | #define NETLOGIC_IO_SIZE 0x1000 |
48 | 48 | ||
49 | #define NETLOGIC_IO_BRIDGE_OFFSET 0x00000 | 49 | #define NETLOGIC_IO_BRIDGE_OFFSET 0x00000 |
50 | 50 | ||
51 | #define NETLOGIC_IO_RLD2_CHN0_OFFSET 0x05000 | 51 | #define NETLOGIC_IO_RLD2_CHN0_OFFSET 0x05000 |
52 | #define NETLOGIC_IO_RLD2_CHN1_OFFSET 0x06000 | 52 | #define NETLOGIC_IO_RLD2_CHN1_OFFSET 0x06000 |
53 | 53 | ||
54 | #define NETLOGIC_IO_SRAM_OFFSET 0x07000 | 54 | #define NETLOGIC_IO_SRAM_OFFSET 0x07000 |
55 | 55 | ||
56 | #define NETLOGIC_IO_PCIX_OFFSET 0x09000 | 56 | #define NETLOGIC_IO_PCIX_OFFSET 0x09000 |
57 | #define NETLOGIC_IO_HT_OFFSET 0x0A000 | 57 | #define NETLOGIC_IO_HT_OFFSET 0x0A000 |
58 | 58 | ||
59 | #define NETLOGIC_IO_SECURITY_OFFSET 0x0B000 | 59 | #define NETLOGIC_IO_SECURITY_OFFSET 0x0B000 |
60 | 60 | ||
61 | #define NETLOGIC_IO_GMAC_0_OFFSET 0x0C000 | 61 | #define NETLOGIC_IO_GMAC_0_OFFSET 0x0C000 |
62 | #define NETLOGIC_IO_GMAC_1_OFFSET 0x0D000 | 62 | #define NETLOGIC_IO_GMAC_1_OFFSET 0x0D000 |
63 | #define NETLOGIC_IO_GMAC_2_OFFSET 0x0E000 | 63 | #define NETLOGIC_IO_GMAC_2_OFFSET 0x0E000 |
64 | #define NETLOGIC_IO_GMAC_3_OFFSET 0x0F000 | 64 | #define NETLOGIC_IO_GMAC_3_OFFSET 0x0F000 |
65 | 65 | ||
66 | /* XLS devices */ | 66 | /* XLS devices */ |
67 | #define NETLOGIC_IO_GMAC_4_OFFSET 0x20000 | 67 | #define NETLOGIC_IO_GMAC_4_OFFSET 0x20000 |
68 | #define NETLOGIC_IO_GMAC_5_OFFSET 0x21000 | 68 | #define NETLOGIC_IO_GMAC_5_OFFSET 0x21000 |
69 | #define NETLOGIC_IO_GMAC_6_OFFSET 0x22000 | 69 | #define NETLOGIC_IO_GMAC_6_OFFSET 0x22000 |
70 | #define NETLOGIC_IO_GMAC_7_OFFSET 0x23000 | 70 | #define NETLOGIC_IO_GMAC_7_OFFSET 0x23000 |
71 | 71 | ||
72 | #define NETLOGIC_IO_PCIE_0_OFFSET 0x1E000 | 72 | #define NETLOGIC_IO_PCIE_0_OFFSET 0x1E000 |
73 | #define NETLOGIC_IO_PCIE_1_OFFSET 0x1F000 | 73 | #define NETLOGIC_IO_PCIE_1_OFFSET 0x1F000 |
74 | #define NETLOGIC_IO_SRIO_0_OFFSET 0x1E000 | 74 | #define NETLOGIC_IO_SRIO_0_OFFSET 0x1E000 |
75 | #define NETLOGIC_IO_SRIO_1_OFFSET 0x1F000 | 75 | #define NETLOGIC_IO_SRIO_1_OFFSET 0x1F000 |
76 | 76 | ||
77 | #define NETLOGIC_IO_USB_0_OFFSET 0x24000 | 77 | #define NETLOGIC_IO_USB_0_OFFSET 0x24000 |
78 | #define NETLOGIC_IO_USB_1_OFFSET 0x25000 | 78 | #define NETLOGIC_IO_USB_1_OFFSET 0x25000 |
79 | 79 | ||
80 | #define NETLOGIC_IO_COMP_OFFSET 0x1D000 | 80 | #define NETLOGIC_IO_COMP_OFFSET 0x1D000 |
81 | /* end XLS devices */ | 81 | /* end XLS devices */ |
82 | 82 | ||
83 | /* XLR devices */ | 83 | /* XLR devices */ |
84 | #define NETLOGIC_IO_SPI4_0_OFFSET 0x10000 | 84 | #define NETLOGIC_IO_SPI4_0_OFFSET 0x10000 |
85 | #define NETLOGIC_IO_XGMAC_0_OFFSET 0x11000 | 85 | #define NETLOGIC_IO_XGMAC_0_OFFSET 0x11000 |
86 | #define NETLOGIC_IO_SPI4_1_OFFSET 0x12000 | 86 | #define NETLOGIC_IO_SPI4_1_OFFSET 0x12000 |
87 | #define NETLOGIC_IO_XGMAC_1_OFFSET 0x13000 | 87 | #define NETLOGIC_IO_XGMAC_1_OFFSET 0x13000 |
88 | /* end XLR devices */ | 88 | /* end XLR devices */ |
89 | 89 | ||
90 | #define NETLOGIC_IO_I2C_0_OFFSET 0x16000 | 90 | #define NETLOGIC_IO_I2C_0_OFFSET 0x16000 |
91 | #define NETLOGIC_IO_I2C_1_OFFSET 0x17000 | 91 | #define NETLOGIC_IO_I2C_1_OFFSET 0x17000 |
92 | 92 | ||
93 | #define NETLOGIC_IO_GPIO_OFFSET 0x18000 | 93 | #define NETLOGIC_IO_GPIO_OFFSET 0x18000 |
94 | #define NETLOGIC_IO_FLASH_OFFSET 0x19000 | 94 | #define NETLOGIC_IO_FLASH_OFFSET 0x19000 |
95 | #define NETLOGIC_IO_TB_OFFSET 0x1C000 | 95 | #define NETLOGIC_IO_TB_OFFSET 0x1C000 |
96 | 96 | ||
97 | #define NETLOGIC_CPLD_OFFSET KSEG1ADDR(0x1d840000) | 97 | #define NETLOGIC_CPLD_OFFSET KSEG1ADDR(0x1d840000) |
98 | 98 | ||
99 | /* | 99 | /* |
100 | * Base Address (Virtual) of the PCI Config address space | 100 | * Base Address (Virtual) of the PCI Config address space |
@@ -102,8 +102,8 @@ | |||
102 | * Config space spans 256 (num of buses) * 256 (num functions) * 256 bytes | 102 | * Config space spans 256 (num of buses) * 256 (num functions) * 256 bytes |
103 | * ie 1<<24 = 16M | 103 | * ie 1<<24 = 16M |
104 | */ | 104 | */ |
105 | #define DEFAULT_PCI_CONFIG_BASE 0x18000000 | 105 | #define DEFAULT_PCI_CONFIG_BASE 0x18000000 |
106 | #define DEFAULT_HT_TYPE0_CFG_BASE 0x16000000 | 106 | #define DEFAULT_HT_TYPE0_CFG_BASE 0x16000000 |
107 | #define DEFAULT_HT_TYPE1_CFG_BASE 0x17000000 | 107 | #define DEFAULT_HT_TYPE1_CFG_BASE 0x17000000 |
108 | 108 | ||
109 | #endif | 109 | #endif |
diff --git a/arch/mips/include/asm/netlogic/xlr/msidef.h b/arch/mips/include/asm/netlogic/xlr/msidef.h index 7e39d40be4f5..c95d18edf12f 100644 --- a/arch/mips/include/asm/netlogic/xlr/msidef.h +++ b/arch/mips/include/asm/netlogic/xlr/msidef.h | |||
@@ -45,21 +45,21 @@ | |||
45 | */ | 45 | */ |
46 | 46 | ||
47 | #define MSI_DATA_VECTOR_SHIFT 0 | 47 | #define MSI_DATA_VECTOR_SHIFT 0 |
48 | #define MSI_DATA_VECTOR_MASK 0x000000ff | 48 | #define MSI_DATA_VECTOR_MASK 0x000000ff |
49 | #define MSI_DATA_VECTOR(v) (((v) << MSI_DATA_VECTOR_SHIFT) & \ | 49 | #define MSI_DATA_VECTOR(v) (((v) << MSI_DATA_VECTOR_SHIFT) & \ |
50 | MSI_DATA_VECTOR_MASK) | 50 | MSI_DATA_VECTOR_MASK) |
51 | 51 | ||
52 | #define MSI_DATA_DELIVERY_MODE_SHIFT 8 | 52 | #define MSI_DATA_DELIVERY_MODE_SHIFT 8 |
53 | #define MSI_DATA_DELIVERY_FIXED (0 << MSI_DATA_DELIVERY_MODE_SHIFT) | 53 | #define MSI_DATA_DELIVERY_FIXED (0 << MSI_DATA_DELIVERY_MODE_SHIFT) |
54 | #define MSI_DATA_DELIVERY_LOWPRI (1 << MSI_DATA_DELIVERY_MODE_SHIFT) | 54 | #define MSI_DATA_DELIVERY_LOWPRI (1 << MSI_DATA_DELIVERY_MODE_SHIFT) |
55 | 55 | ||
56 | #define MSI_DATA_LEVEL_SHIFT 14 | 56 | #define MSI_DATA_LEVEL_SHIFT 14 |
57 | #define MSI_DATA_LEVEL_DEASSERT (0 << MSI_DATA_LEVEL_SHIFT) | 57 | #define MSI_DATA_LEVEL_DEASSERT (0 << MSI_DATA_LEVEL_SHIFT) |
58 | #define MSI_DATA_LEVEL_ASSERT (1 << MSI_DATA_LEVEL_SHIFT) | 58 | #define MSI_DATA_LEVEL_ASSERT (1 << MSI_DATA_LEVEL_SHIFT) |
59 | 59 | ||
60 | #define MSI_DATA_TRIGGER_SHIFT 15 | 60 | #define MSI_DATA_TRIGGER_SHIFT 15 |
61 | #define MSI_DATA_TRIGGER_EDGE (0 << MSI_DATA_TRIGGER_SHIFT) | 61 | #define MSI_DATA_TRIGGER_EDGE (0 << MSI_DATA_TRIGGER_SHIFT) |
62 | #define MSI_DATA_TRIGGER_LEVEL (1 << MSI_DATA_TRIGGER_SHIFT) | 62 | #define MSI_DATA_TRIGGER_LEVEL (1 << MSI_DATA_TRIGGER_SHIFT) |
63 | 63 | ||
64 | /* | 64 | /* |
65 | * Shift/mask fields for msi address | 65 | * Shift/mask fields for msi address |
@@ -69,16 +69,16 @@ | |||
69 | #define MSI_ADDR_BASE_LO 0xfee00000 | 69 | #define MSI_ADDR_BASE_LO 0xfee00000 |
70 | 70 | ||
71 | #define MSI_ADDR_DEST_MODE_SHIFT 2 | 71 | #define MSI_ADDR_DEST_MODE_SHIFT 2 |
72 | #define MSI_ADDR_DEST_MODE_PHYSICAL (0 << MSI_ADDR_DEST_MODE_SHIFT) | 72 | #define MSI_ADDR_DEST_MODE_PHYSICAL (0 << MSI_ADDR_DEST_MODE_SHIFT) |
73 | #define MSI_ADDR_DEST_MODE_LOGICAL (1 << MSI_ADDR_DEST_MODE_SHIFT) | 73 | #define MSI_ADDR_DEST_MODE_LOGICAL (1 << MSI_ADDR_DEST_MODE_SHIFT) |
74 | 74 | ||
75 | #define MSI_ADDR_REDIRECTION_SHIFT 3 | 75 | #define MSI_ADDR_REDIRECTION_SHIFT 3 |
76 | #define MSI_ADDR_REDIRECTION_CPU (0 << MSI_ADDR_REDIRECTION_SHIFT) | 76 | #define MSI_ADDR_REDIRECTION_CPU (0 << MSI_ADDR_REDIRECTION_SHIFT) |
77 | #define MSI_ADDR_REDIRECTION_LOWPRI (1 << MSI_ADDR_REDIRECTION_SHIFT) | 77 | #define MSI_ADDR_REDIRECTION_LOWPRI (1 << MSI_ADDR_REDIRECTION_SHIFT) |
78 | 78 | ||
79 | #define MSI_ADDR_DEST_ID_SHIFT 12 | 79 | #define MSI_ADDR_DEST_ID_SHIFT 12 |
80 | #define MSI_ADDR_DEST_ID_MASK 0x00ffff0 | 80 | #define MSI_ADDR_DEST_ID_MASK 0x00ffff0 |
81 | #define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \ | 81 | #define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \ |
82 | MSI_ADDR_DEST_ID_MASK) | 82 | MSI_ADDR_DEST_ID_MASK) |
83 | 83 | ||
84 | #endif /* ASM_RMI_MSIDEF_H */ | 84 | #endif /* ASM_RMI_MSIDEF_H */ |
diff --git a/arch/mips/include/asm/netlogic/xlr/pic.h b/arch/mips/include/asm/netlogic/xlr/pic.h index 9a691b1f91ba..2f549453585e 100644 --- a/arch/mips/include/asm/netlogic/xlr/pic.h +++ b/arch/mips/include/asm/netlogic/xlr/pic.h | |||
@@ -116,7 +116,7 @@ | |||
116 | #define PIC_TIMER_COUNT_0_BASE 0x120 | 116 | #define PIC_TIMER_COUNT_0_BASE 0x120 |
117 | #define PIC_TIMER_COUNT_1_BASE 0x130 | 117 | #define PIC_TIMER_COUNT_1_BASE 0x130 |
118 | 118 | ||
119 | #define PIC_IRT_0(picintr) (PIC_IRT_0_BASE + (picintr)) | 119 | #define PIC_IRT_0(picintr) (PIC_IRT_0_BASE + (picintr)) |
120 | #define PIC_IRT_1(picintr) (PIC_IRT_1_BASE + (picintr)) | 120 | #define PIC_IRT_1(picintr) (PIC_IRT_1_BASE + (picintr)) |
121 | 121 | ||
122 | #define PIC_TIMER_MAXVAL_0(i) (PIC_TIMER_MAXVAL_0_BASE + (i)) | 122 | #define PIC_TIMER_MAXVAL_0(i) (PIC_TIMER_MAXVAL_0_BASE + (i)) |
@@ -130,9 +130,9 @@ | |||
130 | * 8-39. This leaves the IRQ 0-7 for cpu interrupts like | 130 | * 8-39. This leaves the IRQ 0-7 for cpu interrupts like |
131 | * count/compare and FMN | 131 | * count/compare and FMN |
132 | */ | 132 | */ |
133 | #define PIC_IRQ_BASE 8 | 133 | #define PIC_IRQ_BASE 8 |
134 | #define PIC_INTR_TO_IRQ(i) (PIC_IRQ_BASE + (i)) | 134 | #define PIC_INTR_TO_IRQ(i) (PIC_IRQ_BASE + (i)) |
135 | #define PIC_IRQ_TO_INTR(i) ((i) - PIC_IRQ_BASE) | 135 | #define PIC_IRQ_TO_INTR(i) ((i) - PIC_IRQ_BASE) |
136 | 136 | ||
137 | #define PIC_IRT_FIRST_IRQ PIC_IRQ_BASE | 137 | #define PIC_IRT_FIRST_IRQ PIC_IRQ_BASE |
138 | #define PIC_WD_IRQ PIC_INTR_TO_IRQ(PIC_IRT_WD_INDEX) | 138 | #define PIC_WD_IRQ PIC_INTR_TO_IRQ(PIC_IRT_WD_INDEX) |
@@ -168,7 +168,7 @@ | |||
168 | #define PIC_BRIDGE_AERR_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_AERR_INDEX) | 168 | #define PIC_BRIDGE_AERR_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_AERR_INDEX) |
169 | #define PIC_BRIDGE_BERR_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_BERR_INDEX) | 169 | #define PIC_BRIDGE_BERR_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_BERR_INDEX) |
170 | #define PIC_BRIDGE_TB_XLR_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_TB_XLR_INDEX) | 170 | #define PIC_BRIDGE_TB_XLR_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_TB_XLR_INDEX) |
171 | #define PIC_BRIDGE_AERR_NMI_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_AERR_NMI_INDEX) | 171 | #define PIC_BRIDGE_AERR_NMI_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_AERR_NMI_INDEX) |
172 | /* XLS defines */ | 172 | /* XLS defines */ |
173 | #define PIC_GMAC_4_IRQ PIC_INTR_TO_IRQ(PIC_IRT_GMAC4_INDEX) | 173 | #define PIC_GMAC_4_IRQ PIC_INTR_TO_IRQ(PIC_IRT_GMAC4_INDEX) |
174 | #define PIC_GMAC_5_IRQ PIC_INTR_TO_IRQ(PIC_IRT_GMAC5_INDEX) | 174 | #define PIC_GMAC_5_IRQ PIC_INTR_TO_IRQ(PIC_IRT_GMAC5_INDEX) |
diff --git a/arch/mips/include/asm/nile4.h b/arch/mips/include/asm/nile4.h index af0e51a9f68a..2e2436d0e94e 100644 --- a/arch/mips/include/asm/nile4.h +++ b/arch/mips/include/asm/nile4.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * asm-mips/nile4.h -- NEC Vrc-5074 Nile 4 definitions | 2 | * asm-mips/nile4.h -- NEC Vrc-5074 Nile 4 definitions |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com> | 4 | * Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com> |
5 | * Sony Software Development Center Europe (SDCE), Brussels | 5 | * Sony Software Development Center Europe (SDCE), Brussels |
6 | * | 6 | * |
7 | * This file is based on the following documentation: | 7 | * This file is based on the following documentation: |
8 | * | 8 | * |
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | 18 | ||
19 | /* | 19 | /* |
20 | * Physical Device Address Registers (PDARs) | 20 | * Physical Device Address Registers (PDARs) |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #define NILE4_SDRAM0 0x0000 /* SDRAM Bank 0 [R/W] */ | 23 | #define NILE4_SDRAM0 0x0000 /* SDRAM Bank 0 [R/W] */ |
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | 38 | ||
39 | /* | 39 | /* |
40 | * CPU Interface Registers | 40 | * CPU Interface Registers |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #define NILE4_CPUSTAT 0x0080 /* CPU Status [R/W] */ | 43 | #define NILE4_CPUSTAT 0x0080 /* CPU Status [R/W] */ |
@@ -50,7 +50,7 @@ | |||
50 | 50 | ||
51 | 51 | ||
52 | /* | 52 | /* |
53 | * Memory-Interface Registers | 53 | * Memory-Interface Registers |
54 | */ | 54 | */ |
55 | 55 | ||
56 | #define NILE4_MEMCTRL 0x00C0 /* Memory Control */ | 56 | #define NILE4_MEMCTRL 0x00C0 /* Memory Control */ |
@@ -59,7 +59,7 @@ | |||
59 | 59 | ||
60 | 60 | ||
61 | /* | 61 | /* |
62 | * PCI-Bus Registers | 62 | * PCI-Bus Registers |
63 | */ | 63 | */ |
64 | 64 | ||
65 | #define NILE4_PCICTRL 0x00E0 /* PCI Control [R/W] */ | 65 | #define NILE4_PCICTRL 0x00E0 /* PCI Control [R/W] */ |
@@ -70,7 +70,7 @@ | |||
70 | 70 | ||
71 | 71 | ||
72 | /* | 72 | /* |
73 | * Local-Bus Registers | 73 | * Local-Bus Registers |
74 | */ | 74 | */ |
75 | 75 | ||
76 | #define NILE4_LCNFG 0x0100 /* Local Bus Configuration [R/W] */ | 76 | #define NILE4_LCNFG 0x0100 /* Local Bus Configuration [R/W] */ |
@@ -88,7 +88,7 @@ | |||
88 | 88 | ||
89 | 89 | ||
90 | /* | 90 | /* |
91 | * DMA Registers | 91 | * DMA Registers |
92 | */ | 92 | */ |
93 | 93 | ||
94 | #define NILE4_DMACTRL0 0x0180 /* DMA Control 0 [R/W] */ | 94 | #define NILE4_DMACTRL0 0x0180 /* DMA Control 0 [R/W] */ |
@@ -100,7 +100,7 @@ | |||
100 | 100 | ||
101 | 101 | ||
102 | /* | 102 | /* |
103 | * Timer Registers | 103 | * Timer Registers |
104 | */ | 104 | */ |
105 | 105 | ||
106 | #define NILE4_T0CTRL 0x01C0 /* SDRAM Refresh Control [R/W] */ | 106 | #define NILE4_T0CTRL 0x01C0 /* SDRAM Refresh Control [R/W] */ |
@@ -114,7 +114,7 @@ | |||
114 | 114 | ||
115 | 115 | ||
116 | /* | 116 | /* |
117 | * PCI Configuration Space Registers | 117 | * PCI Configuration Space Registers |
118 | */ | 118 | */ |
119 | 119 | ||
120 | #define NILE4_PCI_BASE 0x0200 | 120 | #define NILE4_PCI_BASE 0x0200 |
@@ -153,10 +153,10 @@ | |||
153 | 153 | ||
154 | 154 | ||
155 | /* | 155 | /* |
156 | * Serial-Port Registers | 156 | * Serial-Port Registers |
157 | */ | 157 | */ |
158 | 158 | ||
159 | #define NILE4_UART_BASE 0x0300 | 159 | #define NILE4_UART_BASE 0x0300 |
160 | 160 | ||
161 | #define NILE4_UARTRBR 0x0300 /* UART Receiver Data Buffer [R] */ | 161 | #define NILE4_UARTRBR 0x0300 /* UART Receiver Data Buffer [R] */ |
162 | #define NILE4_UARTTHR 0x0300 /* UART Transmitter Data Holding [W] */ | 162 | #define NILE4_UARTTHR 0x0300 /* UART Transmitter Data Holding [W] */ |
@@ -175,7 +175,7 @@ | |||
175 | 175 | ||
176 | 176 | ||
177 | /* | 177 | /* |
178 | * Interrupt Lines | 178 | * Interrupt Lines |
179 | */ | 179 | */ |
180 | 180 | ||
181 | #define NILE4_INT_CPCE 0 /* CPU-Interface Parity-Error Interrupt */ | 181 | #define NILE4_INT_CPCE 0 /* CPU-Interface Parity-Error Interrupt */ |
@@ -185,7 +185,7 @@ | |||
185 | #define NILE4_INT_UART 4 /* UART Interrupt */ | 185 | #define NILE4_INT_UART 4 /* UART Interrupt */ |
186 | #define NILE4_INT_WDOG 5 /* Watchdog Timer Interrupt */ | 186 | #define NILE4_INT_WDOG 5 /* Watchdog Timer Interrupt */ |
187 | #define NILE4_INT_GPT 6 /* General-Purpose Timer Interrupt */ | 187 | #define NILE4_INT_GPT 6 /* General-Purpose Timer Interrupt */ |
188 | #define NILE4_INT_LBRTD 7 /* Local-Bus Ready Timer Interrupt */ | 188 | #define NILE4_INT_LBRTD 7 /* Local-Bus Ready Timer Interrupt */ |
189 | #define NILE4_INT_INTA 8 /* PCI Interrupt Signal INTA# */ | 189 | #define NILE4_INT_INTA 8 /* PCI Interrupt Signal INTA# */ |
190 | #define NILE4_INT_INTB 9 /* PCI Interrupt Signal INTB# */ | 190 | #define NILE4_INT_INTB 9 /* PCI Interrupt Signal INTB# */ |
191 | #define NILE4_INT_INTC 10 /* PCI Interrupt Signal INTC# */ | 191 | #define NILE4_INT_INTC 10 /* PCI Interrupt Signal INTC# */ |
@@ -197,7 +197,7 @@ | |||
197 | 197 | ||
198 | 198 | ||
199 | /* | 199 | /* |
200 | * Nile 4 Register Access | 200 | * Nile 4 Register Access |
201 | */ | 201 | */ |
202 | 202 | ||
203 | static inline void nile4_sync(void) | 203 | static inline void nile4_sync(void) |
@@ -247,7 +247,7 @@ static inline u8 nile4_in8(u32 offset) | |||
247 | 247 | ||
248 | 248 | ||
249 | /* | 249 | /* |
250 | * Physical Device Address Registers | 250 | * Physical Device Address Registers |
251 | */ | 251 | */ |
252 | 252 | ||
253 | extern void nile4_set_pdar(u32 pdar, u32 phys, u32 size, int width, | 253 | extern void nile4_set_pdar(u32 pdar, u32 phys, u32 size, int width, |
@@ -255,7 +255,7 @@ extern void nile4_set_pdar(u32 pdar, u32 phys, u32 size, int width, | |||
255 | 255 | ||
256 | 256 | ||
257 | /* | 257 | /* |
258 | * PCI Master Registers | 258 | * PCI Master Registers |
259 | */ | 259 | */ |
260 | 260 | ||
261 | #define NILE4_PCICMD_IACK 0 /* PCI Interrupt Acknowledge */ | 261 | #define NILE4_PCICMD_IACK 0 /* PCI Interrupt Acknowledge */ |
@@ -265,9 +265,9 @@ extern void nile4_set_pdar(u32 pdar, u32 phys, u32 size, int width, | |||
265 | 265 | ||
266 | 266 | ||
267 | /* | 267 | /* |
268 | * PCI Address Spaces | 268 | * PCI Address Spaces |
269 | * | 269 | * |
270 | * Note that these are multiplexed using PCIINIT[01]! | 270 | * Note that these are multiplexed using PCIINIT[01]! |
271 | */ | 271 | */ |
272 | 272 | ||
273 | #define NILE4_PCI_IO_BASE 0xa6000000 | 273 | #define NILE4_PCI_IO_BASE 0xa6000000 |
@@ -280,7 +280,7 @@ extern void nile4_set_pmr(u32 pmr, u32 type, u32 addr); | |||
280 | 280 | ||
281 | 281 | ||
282 | /* | 282 | /* |
283 | * Interrupt Programming | 283 | * Interrupt Programming |
284 | */ | 284 | */ |
285 | 285 | ||
286 | #define NUM_I8259_INTERRUPTS 16 | 286 | #define NUM_I8259_INTERRUPTS 16 |
diff --git a/arch/mips/include/asm/octeon/cvmx-address.h b/arch/mips/include/asm/octeon/cvmx-address.h index 3c74d826e2e6..e2d874e681f6 100644 --- a/arch/mips/include/asm/octeon/cvmx-address.h +++ b/arch/mips/include/asm/octeon/cvmx-address.h | |||
@@ -84,20 +84,20 @@ typedef enum { | |||
84 | * Octeon-I HW never interprets this X (<39:36> reserved | 84 | * Octeon-I HW never interprets this X (<39:36> reserved |
85 | * for future expansion), software should set to 0. | 85 | * for future expansion), software should set to 0. |
86 | * | 86 | * |
87 | * - 0x0 XXX0 0000 0000 to DRAM Cached | 87 | * - 0x0 XXX0 0000 0000 to DRAM Cached |
88 | * - 0x0 XXX0 0FFF FFFF | 88 | * - 0x0 XXX0 0FFF FFFF |
89 | * | 89 | * |
90 | * - 0x0 XXX0 1000 0000 to Boot Bus Uncached (Converted to 0x1 00X0 1000 0000 | 90 | * - 0x0 XXX0 1000 0000 to Boot Bus Uncached (Converted to 0x1 00X0 1000 0000 |
91 | * - 0x0 XXX0 1FFF FFFF + EJTAG to 0x1 00X0 1FFF FFFF) | 91 | * - 0x0 XXX0 1FFF FFFF + EJTAG to 0x1 00X0 1FFF FFFF) |
92 | * | 92 | * |
93 | * - 0x0 XXX0 2000 0000 to DRAM Cached | 93 | * - 0x0 XXX0 2000 0000 to DRAM Cached |
94 | * - 0x0 XXXF FFFF FFFF | 94 | * - 0x0 XXXF FFFF FFFF |
95 | * | 95 | * |
96 | * - 0x1 00X0 0000 0000 to Boot Bus Uncached | 96 | * - 0x1 00X0 0000 0000 to Boot Bus Uncached |
97 | * - 0x1 00XF FFFF FFFF | 97 | * - 0x1 00XF FFFF FFFF |
98 | * | 98 | * |
99 | * - 0x1 01X0 0000 0000 to Other NCB Uncached | 99 | * - 0x1 01X0 0000 0000 to Other NCB Uncached |
100 | * - 0x1 FFXF FFFF FFFF devices | 100 | * - 0x1 FFXF FFFF FFFF devices |
101 | * | 101 | * |
102 | * Decode of all Octeon addresses | 102 | * Decode of all Octeon addresses |
103 | */ | 103 | */ |
@@ -129,9 +129,9 @@ typedef union { | |||
129 | */ | 129 | */ |
130 | struct { | 130 | struct { |
131 | uint64_t R:2; /* CVMX_MIPS_SPACE_XKPHYS in this case */ | 131 | uint64_t R:2; /* CVMX_MIPS_SPACE_XKPHYS in this case */ |
132 | uint64_t cca:3; /* ignored by octeon */ | 132 | uint64_t cca:3; /* ignored by octeon */ |
133 | uint64_t mbz:10; | 133 | uint64_t mbz:10; |
134 | uint64_t pa:49; /* physical address */ | 134 | uint64_t pa:49; /* physical address */ |
135 | } sxkphys; | 135 | } sxkphys; |
136 | 136 | ||
137 | /* physical address */ | 137 | /* physical address */ |
@@ -253,22 +253,22 @@ typedef union { | |||
253 | #define CVMX_OCT_DID_ASX1 23ULL | 253 | #define CVMX_OCT_DID_ASX1 23ULL |
254 | #define CVMX_OCT_DID_IOB 30ULL | 254 | #define CVMX_OCT_DID_IOB 30ULL |
255 | 255 | ||
256 | #define CVMX_OCT_DID_PKT_SEND CVMX_FULL_DID(CVMX_OCT_DID_PKT, 2ULL) | 256 | #define CVMX_OCT_DID_PKT_SEND CVMX_FULL_DID(CVMX_OCT_DID_PKT, 2ULL) |
257 | #define CVMX_OCT_DID_TAG_SWTAG CVMX_FULL_DID(CVMX_OCT_DID_TAG, 0ULL) | 257 | #define CVMX_OCT_DID_TAG_SWTAG CVMX_FULL_DID(CVMX_OCT_DID_TAG, 0ULL) |
258 | #define CVMX_OCT_DID_TAG_TAG1 CVMX_FULL_DID(CVMX_OCT_DID_TAG, 1ULL) | 258 | #define CVMX_OCT_DID_TAG_TAG1 CVMX_FULL_DID(CVMX_OCT_DID_TAG, 1ULL) |
259 | #define CVMX_OCT_DID_TAG_TAG2 CVMX_FULL_DID(CVMX_OCT_DID_TAG, 2ULL) | 259 | #define CVMX_OCT_DID_TAG_TAG2 CVMX_FULL_DID(CVMX_OCT_DID_TAG, 2ULL) |
260 | #define CVMX_OCT_DID_TAG_TAG3 CVMX_FULL_DID(CVMX_OCT_DID_TAG, 3ULL) | 260 | #define CVMX_OCT_DID_TAG_TAG3 CVMX_FULL_DID(CVMX_OCT_DID_TAG, 3ULL) |
261 | #define CVMX_OCT_DID_TAG_NULL_RD CVMX_FULL_DID(CVMX_OCT_DID_TAG, 4ULL) | 261 | #define CVMX_OCT_DID_TAG_NULL_RD CVMX_FULL_DID(CVMX_OCT_DID_TAG, 4ULL) |
262 | #define CVMX_OCT_DID_TAG_CSR CVMX_FULL_DID(CVMX_OCT_DID_TAG, 7ULL) | 262 | #define CVMX_OCT_DID_TAG_CSR CVMX_FULL_DID(CVMX_OCT_DID_TAG, 7ULL) |
263 | #define CVMX_OCT_DID_FAU_FAI CVMX_FULL_DID(CVMX_OCT_DID_IOB, 0ULL) | 263 | #define CVMX_OCT_DID_FAU_FAI CVMX_FULL_DID(CVMX_OCT_DID_IOB, 0ULL) |
264 | #define CVMX_OCT_DID_TIM_CSR CVMX_FULL_DID(CVMX_OCT_DID_TIM, 0ULL) | 264 | #define CVMX_OCT_DID_TIM_CSR CVMX_FULL_DID(CVMX_OCT_DID_TIM, 0ULL) |
265 | #define CVMX_OCT_DID_KEY_RW CVMX_FULL_DID(CVMX_OCT_DID_KEY, 0ULL) | 265 | #define CVMX_OCT_DID_KEY_RW CVMX_FULL_DID(CVMX_OCT_DID_KEY, 0ULL) |
266 | #define CVMX_OCT_DID_PCI_6 CVMX_FULL_DID(CVMX_OCT_DID_PCI, 6ULL) | 266 | #define CVMX_OCT_DID_PCI_6 CVMX_FULL_DID(CVMX_OCT_DID_PCI, 6ULL) |
267 | #define CVMX_OCT_DID_MIS_BOO CVMX_FULL_DID(CVMX_OCT_DID_MIS, 0ULL) | 267 | #define CVMX_OCT_DID_MIS_BOO CVMX_FULL_DID(CVMX_OCT_DID_MIS, 0ULL) |
268 | #define CVMX_OCT_DID_PCI_RML CVMX_FULL_DID(CVMX_OCT_DID_PCI, 0ULL) | 268 | #define CVMX_OCT_DID_PCI_RML CVMX_FULL_DID(CVMX_OCT_DID_PCI, 0ULL) |
269 | #define CVMX_OCT_DID_IPD_CSR CVMX_FULL_DID(CVMX_OCT_DID_IPD, 7ULL) | 269 | #define CVMX_OCT_DID_IPD_CSR CVMX_FULL_DID(CVMX_OCT_DID_IPD, 7ULL) |
270 | #define CVMX_OCT_DID_DFA_CSR CVMX_FULL_DID(CVMX_OCT_DID_DFA, 7ULL) | 270 | #define CVMX_OCT_DID_DFA_CSR CVMX_FULL_DID(CVMX_OCT_DID_DFA, 7ULL) |
271 | #define CVMX_OCT_DID_MIS_CSR CVMX_FULL_DID(CVMX_OCT_DID_MIS, 7ULL) | 271 | #define CVMX_OCT_DID_MIS_CSR CVMX_FULL_DID(CVMX_OCT_DID_MIS, 7ULL) |
272 | #define CVMX_OCT_DID_ZIP_CSR CVMX_FULL_DID(CVMX_OCT_DID_ZIP, 0ULL) | 272 | #define CVMX_OCT_DID_ZIP_CSR CVMX_FULL_DID(CVMX_OCT_DID_ZIP, 0ULL) |
273 | 273 | ||
274 | #endif /* __CVMX_ADDRESS_H__ */ | 274 | #endif /* __CVMX_ADDRESS_H__ */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-bootinfo.h b/arch/mips/include/asm/octeon/cvmx-bootinfo.h index 1db1dc2724cb..284fa8d773ba 100644 --- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h +++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h | |||
@@ -91,11 +91,11 @@ struct cvmx_bootinfo { | |||
91 | #if (CVMX_BOOTINFO_MIN_VER >= 1) | 91 | #if (CVMX_BOOTINFO_MIN_VER >= 1) |
92 | /* | 92 | /* |
93 | * Several boards support compact flash on the Octeon boot | 93 | * Several boards support compact flash on the Octeon boot |
94 | * bus. The CF memory spaces may be mapped to different | 94 | * bus. The CF memory spaces may be mapped to different |
95 | * addresses on different boards. These are the physical | 95 | * addresses on different boards. These are the physical |
96 | * addresses, so care must be taken to use the correct | 96 | * addresses, so care must be taken to use the correct |
97 | * XKPHYS/KSEG0 addressing depending on the application's | 97 | * XKPHYS/KSEG0 addressing depending on the application's |
98 | * ABI. These values will be 0 if CF is not present. | 98 | * ABI. These values will be 0 if CF is not present. |
99 | */ | 99 | */ |
100 | uint64_t compact_flash_common_base_addr; | 100 | uint64_t compact_flash_common_base_addr; |
101 | uint64_t compact_flash_attribute_base_addr; | 101 | uint64_t compact_flash_attribute_base_addr; |
@@ -131,7 +131,7 @@ struct cvmx_bootinfo { | |||
131 | #define CVMX_BOOTINFO_CFG_FLAG_NO_MAGIC (1ull << 3) | 131 | #define CVMX_BOOTINFO_CFG_FLAG_NO_MAGIC (1ull << 3) |
132 | /* This flag is set if the TLB mappings are not contained in the | 132 | /* This flag is set if the TLB mappings are not contained in the |
133 | * 0x10000000 - 0x20000000 boot bus region. */ | 133 | * 0x10000000 - 0x20000000 boot bus region. */ |
134 | #define CVMX_BOOTINFO_CFG_FLAG_OVERSIZE_TLB_MAPPING (1ull << 4) | 134 | #define CVMX_BOOTINFO_CFG_FLAG_OVERSIZE_TLB_MAPPING (1ull << 4) |
135 | #define CVMX_BOOTINFO_CFG_FLAG_BREAK (1ull << 5) | 135 | #define CVMX_BOOTINFO_CFG_FLAG_BREAK (1ull << 5) |
136 | 136 | ||
137 | #endif /* (CVMX_BOOTINFO_MAJ_VER == 1) */ | 137 | #endif /* (CVMX_BOOTINFO_MAJ_VER == 1) */ |
@@ -164,9 +164,9 @@ enum cvmx_board_types_enum { | |||
164 | CVMX_BOARD_TYPE_EBT5600 = 22, | 164 | CVMX_BOARD_TYPE_EBT5600 = 22, |
165 | CVMX_BOARD_TYPE_EBH5201 = 23, | 165 | CVMX_BOARD_TYPE_EBH5201 = 23, |
166 | CVMX_BOARD_TYPE_EBT5200 = 24, | 166 | CVMX_BOARD_TYPE_EBT5200 = 24, |
167 | CVMX_BOARD_TYPE_CB5600 = 25, | 167 | CVMX_BOARD_TYPE_CB5600 = 25, |
168 | CVMX_BOARD_TYPE_CB5601 = 26, | 168 | CVMX_BOARD_TYPE_CB5601 = 26, |
169 | CVMX_BOARD_TYPE_CB5200 = 27, | 169 | CVMX_BOARD_TYPE_CB5200 = 27, |
170 | /* Special 'generic' board type, supports many boards */ | 170 | /* Special 'generic' board type, supports many boards */ |
171 | CVMX_BOARD_TYPE_GENERIC = 28, | 171 | CVMX_BOARD_TYPE_GENERIC = 28, |
172 | CVMX_BOARD_TYPE_EBH5610 = 29, | 172 | CVMX_BOARD_TYPE_EBH5610 = 29, |
@@ -223,7 +223,7 @@ enum cvmx_board_types_enum { | |||
223 | CVMX_BOARD_TYPE_CUST_DEFINED_MAX = 20000, | 223 | CVMX_BOARD_TYPE_CUST_DEFINED_MAX = 20000, |
224 | 224 | ||
225 | /* | 225 | /* |
226 | * Set aside a range for customer private use. The SDK won't | 226 | * Set aside a range for customer private use. The SDK won't |
227 | * use any numbers in this range. | 227 | * use any numbers in this range. |
228 | */ | 228 | */ |
229 | CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001, | 229 | CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001, |
diff --git a/arch/mips/include/asm/octeon/cvmx-bootmem.h b/arch/mips/include/asm/octeon/cvmx-bootmem.h index 42db2be663f1..352f1dc2508b 100644 --- a/arch/mips/include/asm/octeon/cvmx-bootmem.h +++ b/arch/mips/include/asm/octeon/cvmx-bootmem.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #define CVMX_BOOTMEM_NUM_NAMED_BLOCKS 64 | 39 | #define CVMX_BOOTMEM_NUM_NAMED_BLOCKS 64 |
40 | 40 | ||
41 | /* minimum alignment of bootmem alloced blocks */ | 41 | /* minimum alignment of bootmem alloced blocks */ |
42 | #define CVMX_BOOTMEM_ALIGNMENT_SIZE (16ull) | 42 | #define CVMX_BOOTMEM_ALIGNMENT_SIZE (16ull) |
43 | 43 | ||
44 | /* Flags for cvmx_bootmem_phy_mem* functions */ | 44 | /* Flags for cvmx_bootmem_phy_mem* functions */ |
45 | /* Allocate from end of block instead of beginning */ | 45 | /* Allocate from end of block instead of beginning */ |
@@ -151,8 +151,8 @@ extern void *cvmx_bootmem_alloc(uint64_t size, uint64_t alignment); | |||
151 | * memory cannot be allocated at the specified address. | 151 | * memory cannot be allocated at the specified address. |
152 | * | 152 | * |
153 | * @size: Size in bytes of block to allocate | 153 | * @size: Size in bytes of block to allocate |
154 | * @address: Physical address to allocate memory at. If this memory is not | 154 | * @address: Physical address to allocate memory at. If this memory is not |
155 | * available, the allocation fails. | 155 | * available, the allocation fails. |
156 | * @alignment: Alignment required - must be power of 2 | 156 | * @alignment: Alignment required - must be power of 2 |
157 | * Returns pointer to block of memory, NULL on error | 157 | * Returns pointer to block of memory, NULL on error |
158 | */ | 158 | */ |
@@ -181,7 +181,7 @@ extern void *cvmx_bootmem_alloc_range(uint64_t size, uint64_t alignment, | |||
181 | * @name: name of block to free | 181 | * @name: name of block to free |
182 | * | 182 | * |
183 | * Returns 0 on failure, | 183 | * Returns 0 on failure, |
184 | * !0 on success | 184 | * !0 on success |
185 | */ | 185 | */ |
186 | 186 | ||
187 | 187 | ||
@@ -210,9 +210,9 @@ extern void *cvmx_bootmem_alloc_named(uint64_t size, uint64_t alignment, | |||
210 | * | 210 | * |
211 | * @size: Size in bytes of block to allocate | 211 | * @size: Size in bytes of block to allocate |
212 | * @address: Physical address to allocate memory at. If this | 212 | * @address: Physical address to allocate memory at. If this |
213 | * memory is not available, the allocation fails. | 213 | * memory is not available, the allocation fails. |
214 | * @name: name of block - must be less than CVMX_BOOTMEM_NAME_LEN | 214 | * @name: name of block - must be less than CVMX_BOOTMEM_NAME_LEN |
215 | * bytes | 215 | * bytes |
216 | * | 216 | * |
217 | * Returns a pointer to block of memory, NULL on error | 217 | * Returns a pointer to block of memory, NULL on error |
218 | */ | 218 | */ |
@@ -249,7 +249,7 @@ extern int cvmx_bootmem_free_named(char *name); | |||
249 | * @name: name of block to free | 249 | * @name: name of block to free |
250 | * | 250 | * |
251 | * Returns pointer to named block descriptor on success | 251 | * Returns pointer to named block descriptor on success |
252 | * 0 on failure | 252 | * 0 on failure |
253 | */ | 253 | */ |
254 | struct cvmx_bootmem_named_block_desc *cvmx_bootmem_find_named_block(char *name); | 254 | struct cvmx_bootmem_named_block_desc *cvmx_bootmem_find_named_block(char *name); |
255 | 255 | ||
@@ -258,20 +258,20 @@ struct cvmx_bootmem_named_block_desc *cvmx_bootmem_find_named_block(char *name); | |||
258 | * (optional) requested address and alignment. | 258 | * (optional) requested address and alignment. |
259 | * | 259 | * |
260 | * @req_size: size of region to allocate. All requests are rounded up | 260 | * @req_size: size of region to allocate. All requests are rounded up |
261 | * to be a multiple CVMX_BOOTMEM_ALIGNMENT_SIZE bytes size | 261 | * to be a multiple CVMX_BOOTMEM_ALIGNMENT_SIZE bytes size |
262 | * | 262 | * |
263 | * @address_min: Minimum address that block can occupy. | 263 | * @address_min: Minimum address that block can occupy. |
264 | * | 264 | * |
265 | * @address_max: Specifies the maximum address_min (inclusive) that | 265 | * @address_max: Specifies the maximum address_min (inclusive) that |
266 | * the allocation can use. | 266 | * the allocation can use. |
267 | * | 267 | * |
268 | * @alignment: Requested alignment of the block. If this alignment | 268 | * @alignment: Requested alignment of the block. If this alignment |
269 | * cannot be met, the allocation fails. This must be a | 269 | * cannot be met, the allocation fails. This must be a |
270 | * power of 2. (Note: Alignment of | 270 | * power of 2. (Note: Alignment of |
271 | * CVMX_BOOTMEM_ALIGNMENT_SIZE bytes is required, and | 271 | * CVMX_BOOTMEM_ALIGNMENT_SIZE bytes is required, and |
272 | * internally enforced. Requested alignments of less than | 272 | * internally enforced. Requested alignments of less than |
273 | * CVMX_BOOTMEM_ALIGNMENT_SIZE are set to | 273 | * CVMX_BOOTMEM_ALIGNMENT_SIZE are set to |
274 | * CVMX_BOOTMEM_ALIGNMENT_SIZE.) | 274 | * CVMX_BOOTMEM_ALIGNMENT_SIZE.) |
275 | * | 275 | * |
276 | * @flags: Flags to control options for the allocation. | 276 | * @flags: Flags to control options for the allocation. |
277 | * | 277 | * |
@@ -285,21 +285,21 @@ int64_t cvmx_bootmem_phy_alloc(uint64_t req_size, uint64_t address_min, | |||
285 | * Allocates a named block of physical memory from the free list, at | 285 | * Allocates a named block of physical memory from the free list, at |
286 | * (optional) requested address and alignment. | 286 | * (optional) requested address and alignment. |
287 | * | 287 | * |
288 | * @param size size of region to allocate. All requests are rounded | 288 | * @param size size of region to allocate. All requests are rounded |
289 | * up to be a multiple CVMX_BOOTMEM_ALIGNMENT_SIZE | 289 | * up to be a multiple CVMX_BOOTMEM_ALIGNMENT_SIZE |
290 | * bytes size | 290 | * bytes size |
291 | * @param min_addr Minimum address that block can occupy. | 291 | * @param min_addr Minimum address that block can occupy. |
292 | * @param max_addr Specifies the maximum address_min (inclusive) that | 292 | * @param max_addr Specifies the maximum address_min (inclusive) that |
293 | * the allocation can use. | 293 | * the allocation can use. |
294 | * @param alignment Requested alignment of the block. If this | 294 | * @param alignment Requested alignment of the block. If this |
295 | * alignment cannot be met, the allocation fails. | 295 | * alignment cannot be met, the allocation fails. |
296 | * This must be a power of 2. (Note: Alignment of | 296 | * This must be a power of 2. (Note: Alignment of |
297 | * CVMX_BOOTMEM_ALIGNMENT_SIZE bytes is required, and | 297 | * CVMX_BOOTMEM_ALIGNMENT_SIZE bytes is required, and |
298 | * internally enforced. Requested alignments of less | 298 | * internally enforced. Requested alignments of less |
299 | * than CVMX_BOOTMEM_ALIGNMENT_SIZE are set to | 299 | * than CVMX_BOOTMEM_ALIGNMENT_SIZE are set to |
300 | * CVMX_BOOTMEM_ALIGNMENT_SIZE.) | 300 | * CVMX_BOOTMEM_ALIGNMENT_SIZE.) |
301 | * @param name name to assign to named block | 301 | * @param name name to assign to named block |
302 | * @param flags Flags to control options for the allocation. | 302 | * @param flags Flags to control options for the allocation. |
303 | * | 303 | * |
304 | * @return physical address of block allocated, or -1 on failure | 304 | * @return physical address of block allocated, or -1 on failure |
305 | */ | 305 | */ |
@@ -312,14 +312,14 @@ int64_t cvmx_bootmem_phy_named_block_alloc(uint64_t size, uint64_t min_addr, | |||
312 | * Finds a named memory block by name. | 312 | * Finds a named memory block by name. |
313 | * Also used for finding an unused entry in the named block table. | 313 | * Also used for finding an unused entry in the named block table. |
314 | * | 314 | * |
315 | * @name: Name of memory block to find. If NULL pointer given, then | 315 | * @name: Name of memory block to find. If NULL pointer given, then |
316 | * finds unused descriptor, if available. | 316 | * finds unused descriptor, if available. |
317 | * | 317 | * |
318 | * @flags: Flags to control options for the allocation. | 318 | * @flags: Flags to control options for the allocation. |
319 | * | 319 | * |
320 | * Returns Pointer to memory block descriptor, NULL if not found. | 320 | * Returns Pointer to memory block descriptor, NULL if not found. |
321 | * If NULL returned when name parameter is NULL, then no memory | 321 | * If NULL returned when name parameter is NULL, then no memory |
322 | * block descriptors are available. | 322 | * block descriptors are available. |
323 | */ | 323 | */ |
324 | struct cvmx_bootmem_named_block_desc * | 324 | struct cvmx_bootmem_named_block_desc * |
325 | cvmx_bootmem_phy_named_block_find(char *name, uint32_t flags); | 325 | cvmx_bootmem_phy_named_block_find(char *name, uint32_t flags); |
@@ -331,31 +331,31 @@ cvmx_bootmem_phy_named_block_find(char *name, uint32_t flags); | |||
331 | * @flags: flags for passing options | 331 | * @flags: flags for passing options |
332 | * | 332 | * |
333 | * Returns 0 on failure | 333 | * Returns 0 on failure |
334 | * 1 on success | 334 | * 1 on success |
335 | */ | 335 | */ |
336 | int cvmx_bootmem_phy_named_block_free(char *name, uint32_t flags); | 336 | int cvmx_bootmem_phy_named_block_free(char *name, uint32_t flags); |
337 | 337 | ||
338 | /** | 338 | /** |
339 | * Frees a block to the bootmem allocator list. This must | 339 | * Frees a block to the bootmem allocator list. This must |
340 | * be used with care, as the size provided must match the size | 340 | * be used with care, as the size provided must match the size |
341 | * of the block that was allocated, or the list will become | 341 | * of the block that was allocated, or the list will become |
342 | * corrupted. | 342 | * corrupted. |
343 | * | 343 | * |
344 | * IMPORTANT: This is only intended to be used as part of named block | 344 | * IMPORTANT: This is only intended to be used as part of named block |
345 | * frees and initial population of the free memory list. | 345 | * frees and initial population of the free memory list. |
346 | * * | 346 | * * |
347 | * | 347 | * |
348 | * @phy_addr: physical address of block | 348 | * @phy_addr: physical address of block |
349 | * @size: size of block in bytes. | 349 | * @size: size of block in bytes. |
350 | * @flags: flags for passing options | 350 | * @flags: flags for passing options |
351 | * | 351 | * |
352 | * Returns 1 on success, | 352 | * Returns 1 on success, |
353 | * 0 on failure | 353 | * 0 on failure |
354 | */ | 354 | */ |
355 | int __cvmx_bootmem_phy_free(uint64_t phy_addr, uint64_t size, uint32_t flags); | 355 | int __cvmx_bootmem_phy_free(uint64_t phy_addr, uint64_t size, uint32_t flags); |
356 | 356 | ||
357 | /** | 357 | /** |
358 | * Locks the bootmem allocator. This is useful in certain situations | 358 | * Locks the bootmem allocator. This is useful in certain situations |
359 | * where multiple allocations must be made without being interrupted. | 359 | * where multiple allocations must be made without being interrupted. |
360 | * This should be used with the CVMX_BOOTMEM_FLAG_NO_LOCKING flag. | 360 | * This should be used with the CVMX_BOOTMEM_FLAG_NO_LOCKING flag. |
361 | * | 361 | * |
diff --git a/arch/mips/include/asm/octeon/cvmx-cmd-queue.h b/arch/mips/include/asm/octeon/cvmx-cmd-queue.h index fed91125317f..024a71b2bff9 100644 --- a/arch/mips/include/asm/octeon/cvmx-cmd-queue.h +++ b/arch/mips/include/asm/octeon/cvmx-cmd-queue.h | |||
@@ -244,33 +244,33 @@ static inline void __cvmx_cmd_queue_lock(cvmx_cmd_queue_id_t queue_id, | |||
244 | ".set noreorder\n" | 244 | ".set noreorder\n" |
245 | "1:\n" | 245 | "1:\n" |
246 | /* Atomic add one to ticket_ptr */ | 246 | /* Atomic add one to ticket_ptr */ |
247 | "ll %[my_ticket], %[ticket_ptr]\n" | 247 | "ll %[my_ticket], %[ticket_ptr]\n" |
248 | /* and store the original value */ | 248 | /* and store the original value */ |
249 | "li %[ticket], 1\n" | 249 | "li %[ticket], 1\n" |
250 | /* in my_ticket */ | 250 | /* in my_ticket */ |
251 | "baddu %[ticket], %[my_ticket]\n" | 251 | "baddu %[ticket], %[my_ticket]\n" |
252 | "sc %[ticket], %[ticket_ptr]\n" | 252 | "sc %[ticket], %[ticket_ptr]\n" |
253 | "beqz %[ticket], 1b\n" | 253 | "beqz %[ticket], 1b\n" |
254 | " nop\n" | 254 | " nop\n" |
255 | /* Load the current now_serving ticket */ | 255 | /* Load the current now_serving ticket */ |
256 | "lbu %[ticket], %[now_serving]\n" | 256 | "lbu %[ticket], %[now_serving]\n" |
257 | "2:\n" | 257 | "2:\n" |
258 | /* Jump out if now_serving == my_ticket */ | 258 | /* Jump out if now_serving == my_ticket */ |
259 | "beq %[ticket], %[my_ticket], 4f\n" | 259 | "beq %[ticket], %[my_ticket], 4f\n" |
260 | /* Find out how many tickets are in front of me */ | 260 | /* Find out how many tickets are in front of me */ |
261 | " subu %[ticket], %[my_ticket], %[ticket]\n" | 261 | " subu %[ticket], %[my_ticket], %[ticket]\n" |
262 | /* Use tickets in front of me minus one to delay */ | 262 | /* Use tickets in front of me minus one to delay */ |
263 | "subu %[ticket], 1\n" | 263 | "subu %[ticket], 1\n" |
264 | /* Delay will be ((tickets in front)-1)*32 loops */ | 264 | /* Delay will be ((tickets in front)-1)*32 loops */ |
265 | "cins %[ticket], %[ticket], 5, 7\n" | 265 | "cins %[ticket], %[ticket], 5, 7\n" |
266 | "3:\n" | 266 | "3:\n" |
267 | /* Loop here until our ticket might be up */ | 267 | /* Loop here until our ticket might be up */ |
268 | "bnez %[ticket], 3b\n" | 268 | "bnez %[ticket], 3b\n" |
269 | " subu %[ticket], 1\n" | 269 | " subu %[ticket], 1\n" |
270 | /* Jump back up to check out ticket again */ | 270 | /* Jump back up to check out ticket again */ |
271 | "b 2b\n" | 271 | "b 2b\n" |
272 | /* Load the current now_serving ticket */ | 272 | /* Load the current now_serving ticket */ |
273 | " lbu %[ticket], %[now_serving]\n" | 273 | " lbu %[ticket], %[now_serving]\n" |
274 | "4:\n" | 274 | "4:\n" |
275 | ".set pop\n" : | 275 | ".set pop\n" : |
276 | [ticket_ptr] "=m"(__cvmx_cmd_queue_state_ptr->ticket[__cvmx_cmd_queue_get_index(queue_id)]), | 276 | [ticket_ptr] "=m"(__cvmx_cmd_queue_state_ptr->ticket[__cvmx_cmd_queue_get_index(queue_id)]), |
@@ -313,9 +313,9 @@ static inline __cvmx_cmd_queue_state_t | |||
313 | * | 313 | * |
314 | * @queue_id: Hardware command queue to write to | 314 | * @queue_id: Hardware command queue to write to |
315 | * @use_locking: | 315 | * @use_locking: |
316 | * Use internal locking to ensure exclusive access for queue | 316 | * Use internal locking to ensure exclusive access for queue |
317 | * updates. If you don't use this locking you must ensure | 317 | * updates. If you don't use this locking you must ensure |
318 | * exclusivity some other way. Locking is strongly recommended. | 318 | * exclusivity some other way. Locking is strongly recommended. |
319 | * @cmd_count: Number of command words to write | 319 | * @cmd_count: Number of command words to write |
320 | * @cmds: Array of commands to write | 320 | * @cmds: Array of commands to write |
321 | * | 321 | * |
@@ -411,9 +411,9 @@ static inline cvmx_cmd_queue_result_t cvmx_cmd_queue_write(cvmx_cmd_queue_id_t | |||
411 | * | 411 | * |
412 | * @queue_id: Hardware command queue to write to | 412 | * @queue_id: Hardware command queue to write to |
413 | * @use_locking: | 413 | * @use_locking: |
414 | * Use internal locking to ensure exclusive access for queue | 414 | * Use internal locking to ensure exclusive access for queue |
415 | * updates. If you don't use this locking you must ensure | 415 | * updates. If you don't use this locking you must ensure |
416 | * exclusivity some other way. Locking is strongly recommended. | 416 | * exclusivity some other way. Locking is strongly recommended. |
417 | * @cmd1: Command | 417 | * @cmd1: Command |
418 | * @cmd2: Command | 418 | * @cmd2: Command |
419 | * | 419 | * |
@@ -510,9 +510,9 @@ static inline cvmx_cmd_queue_result_t cvmx_cmd_queue_write2(cvmx_cmd_queue_id_t | |||
510 | * | 510 | * |
511 | * @queue_id: Hardware command queue to write to | 511 | * @queue_id: Hardware command queue to write to |
512 | * @use_locking: | 512 | * @use_locking: |
513 | * Use internal locking to ensure exclusive access for queue | 513 | * Use internal locking to ensure exclusive access for queue |
514 | * updates. If you don't use this locking you must ensure | 514 | * updates. If you don't use this locking you must ensure |
515 | * exclusivity some other way. Locking is strongly recommended. | 515 | * exclusivity some other way. Locking is strongly recommended. |
516 | * @cmd1: Command | 516 | * @cmd1: Command |
517 | * @cmd2: Command | 517 | * @cmd2: Command |
518 | * @cmd3: Command | 518 | * @cmd3: Command |
diff --git a/arch/mips/include/asm/octeon/cvmx-config.h b/arch/mips/include/asm/octeon/cvmx-config.h index 26835d1b43b8..f7dd17d0dc22 100644 --- a/arch/mips/include/asm/octeon/cvmx-config.h +++ b/arch/mips/include/asm/octeon/cvmx-config.h | |||
@@ -31,13 +31,13 @@ | |||
31 | 31 | ||
32 | /* Pools in use */ | 32 | /* Pools in use */ |
33 | /* Packet buffers */ | 33 | /* Packet buffers */ |
34 | #define CVMX_FPA_PACKET_POOL (0) | 34 | #define CVMX_FPA_PACKET_POOL (0) |
35 | #define CVMX_FPA_PACKET_POOL_SIZE CVMX_FPA_POOL_0_SIZE | 35 | #define CVMX_FPA_PACKET_POOL_SIZE CVMX_FPA_POOL_0_SIZE |
36 | /* Work queue entrys */ | 36 | /* Work queue entrys */ |
37 | #define CVMX_FPA_WQE_POOL (1) | 37 | #define CVMX_FPA_WQE_POOL (1) |
38 | #define CVMX_FPA_WQE_POOL_SIZE CVMX_FPA_POOL_1_SIZE | 38 | #define CVMX_FPA_WQE_POOL_SIZE CVMX_FPA_POOL_1_SIZE |
39 | /* PKO queue command buffers */ | 39 | /* PKO queue command buffers */ |
40 | #define CVMX_FPA_OUTPUT_BUFFER_POOL (2) | 40 | #define CVMX_FPA_OUTPUT_BUFFER_POOL (2) |
41 | #define CVMX_FPA_OUTPUT_BUFFER_POOL_SIZE CVMX_FPA_POOL_2_SIZE | 41 | #define CVMX_FPA_OUTPUT_BUFFER_POOL_SIZE CVMX_FPA_POOL_2_SIZE |
42 | 42 | ||
43 | /************************* FAU allocation ********************************/ | 43 | /************************* FAU allocation ********************************/ |
@@ -45,7 +45,7 @@ | |||
45 | * in order of descending size so that all alignment constraints are | 45 | * in order of descending size so that all alignment constraints are |
46 | * automatically met. The enums are linked so that the following enum | 46 | * automatically met. The enums are linked so that the following enum |
47 | * continues allocating where the previous one left off, so the | 47 | * continues allocating where the previous one left off, so the |
48 | * numbering within each enum always starts with zero. The macros | 48 | * numbering within each enum always starts with zero. The macros |
49 | * take care of the address increment size, so the values entered | 49 | * take care of the address increment size, so the values entered |
50 | * always increase by 1. FAU registers are accessed with byte | 50 | * always increase by 1. FAU registers are accessed with byte |
51 | * addresses. | 51 | * addresses. |
@@ -90,9 +90,9 @@ typedef enum { | |||
90 | * be taken into account. | 90 | * be taken into account. |
91 | */ | 91 | */ |
92 | /* Generic scratch iobdma area */ | 92 | /* Generic scratch iobdma area */ |
93 | #define CVMX_SCR_SCRATCH (0) | 93 | #define CVMX_SCR_SCRATCH (0) |
94 | /* First location available after cvmx-config.h allocated region. */ | 94 | /* First location available after cvmx-config.h allocated region. */ |
95 | #define CVMX_SCR_REG_AVAIL_BASE (8) | 95 | #define CVMX_SCR_REG_AVAIL_BASE (8) |
96 | 96 | ||
97 | /* | 97 | /* |
98 | * CVMX_HELPER_FIRST_MBUFF_SKIP is the number of bytes to reserve | 98 | * CVMX_HELPER_FIRST_MBUFF_SKIP is the number of bytes to reserve |
@@ -145,14 +145,14 @@ typedef enum { | |||
145 | * 1: include | 145 | * 1: include |
146 | */ | 146 | */ |
147 | #define CVMX_HELPER_INPUT_TAG_IPV6_SRC_IP 0 | 147 | #define CVMX_HELPER_INPUT_TAG_IPV6_SRC_IP 0 |
148 | #define CVMX_HELPER_INPUT_TAG_IPV6_DST_IP 0 | 148 | #define CVMX_HELPER_INPUT_TAG_IPV6_DST_IP 0 |
149 | #define CVMX_HELPER_INPUT_TAG_IPV6_SRC_PORT 0 | 149 | #define CVMX_HELPER_INPUT_TAG_IPV6_SRC_PORT 0 |
150 | #define CVMX_HELPER_INPUT_TAG_IPV6_DST_PORT 0 | 150 | #define CVMX_HELPER_INPUT_TAG_IPV6_DST_PORT 0 |
151 | #define CVMX_HELPER_INPUT_TAG_IPV6_NEXT_HEADER 0 | 151 | #define CVMX_HELPER_INPUT_TAG_IPV6_NEXT_HEADER 0 |
152 | #define CVMX_HELPER_INPUT_TAG_IPV4_SRC_IP 0 | 152 | #define CVMX_HELPER_INPUT_TAG_IPV4_SRC_IP 0 |
153 | #define CVMX_HELPER_INPUT_TAG_IPV4_DST_IP 0 | 153 | #define CVMX_HELPER_INPUT_TAG_IPV4_DST_IP 0 |
154 | #define CVMX_HELPER_INPUT_TAG_IPV4_SRC_PORT 0 | 154 | #define CVMX_HELPER_INPUT_TAG_IPV4_SRC_PORT 0 |
155 | #define CVMX_HELPER_INPUT_TAG_IPV4_DST_PORT 0 | 155 | #define CVMX_HELPER_INPUT_TAG_IPV4_DST_PORT 0 |
156 | #define CVMX_HELPER_INPUT_TAG_IPV4_PROTOCOL 0 | 156 | #define CVMX_HELPER_INPUT_TAG_IPV4_PROTOCOL 0 |
157 | #define CVMX_HELPER_INPUT_TAG_INPUT_PORT 1 | 157 | #define CVMX_HELPER_INPUT_TAG_INPUT_PORT 1 |
158 | 158 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx-fau.h b/arch/mips/include/asm/octeon/cvmx-fau.h index a6939fc8ba18..ef98f7fc102f 100644 --- a/arch/mips/include/asm/octeon/cvmx-fau.h +++ b/arch/mips/include/asm/octeon/cvmx-fau.h | |||
@@ -37,13 +37,13 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #define CVMX_FAU_LOAD_IO_ADDRESS cvmx_build_io_address(0x1e, 0) | 39 | #define CVMX_FAU_LOAD_IO_ADDRESS cvmx_build_io_address(0x1e, 0) |
40 | #define CVMX_FAU_BITS_SCRADDR 63, 56 | 40 | #define CVMX_FAU_BITS_SCRADDR 63, 56 |
41 | #define CVMX_FAU_BITS_LEN 55, 48 | 41 | #define CVMX_FAU_BITS_LEN 55, 48 |
42 | #define CVMX_FAU_BITS_INEVAL 35, 14 | 42 | #define CVMX_FAU_BITS_INEVAL 35, 14 |
43 | #define CVMX_FAU_BITS_TAGWAIT 13, 13 | 43 | #define CVMX_FAU_BITS_TAGWAIT 13, 13 |
44 | #define CVMX_FAU_BITS_NOADD 13, 13 | 44 | #define CVMX_FAU_BITS_NOADD 13, 13 |
45 | #define CVMX_FAU_BITS_SIZE 12, 11 | 45 | #define CVMX_FAU_BITS_SIZE 12, 11 |
46 | #define CVMX_FAU_BITS_REGISTER 10, 0 | 46 | #define CVMX_FAU_BITS_REGISTER 10, 0 |
47 | 47 | ||
48 | typedef enum { | 48 | typedef enum { |
49 | CVMX_FAU_OP_SIZE_8 = 0, | 49 | CVMX_FAU_OP_SIZE_8 = 0, |
@@ -109,11 +109,11 @@ typedef union { | |||
109 | * Builds a store I/O address for writing to the FAU | 109 | * Builds a store I/O address for writing to the FAU |
110 | * | 110 | * |
111 | * @noadd: 0 = Store value is atomically added to the current value | 111 | * @noadd: 0 = Store value is atomically added to the current value |
112 | * 1 = Store value is atomically written over the current value | 112 | * 1 = Store value is atomically written over the current value |
113 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 113 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
114 | * - Step by 2 for 16 bit access. | 114 | * - Step by 2 for 16 bit access. |
115 | * - Step by 4 for 32 bit access. | 115 | * - Step by 4 for 32 bit access. |
116 | * - Step by 8 for 64 bit access. | 116 | * - Step by 8 for 64 bit access. |
117 | * Returns Address to store for atomic update | 117 | * Returns Address to store for atomic update |
118 | */ | 118 | */ |
119 | static inline uint64_t __cvmx_fau_store_address(uint64_t noadd, uint64_t reg) | 119 | static inline uint64_t __cvmx_fau_store_address(uint64_t noadd, uint64_t reg) |
@@ -127,16 +127,16 @@ static inline uint64_t __cvmx_fau_store_address(uint64_t noadd, uint64_t reg) | |||
127 | * Builds a I/O address for accessing the FAU | 127 | * Builds a I/O address for accessing the FAU |
128 | * | 128 | * |
129 | * @tagwait: Should the atomic add wait for the current tag switch | 129 | * @tagwait: Should the atomic add wait for the current tag switch |
130 | * operation to complete. | 130 | * operation to complete. |
131 | * - 0 = Don't wait | 131 | * - 0 = Don't wait |
132 | * - 1 = Wait for tag switch to complete | 132 | * - 1 = Wait for tag switch to complete |
133 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 133 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
134 | * - Step by 2 for 16 bit access. | 134 | * - Step by 2 for 16 bit access. |
135 | * - Step by 4 for 32 bit access. | 135 | * - Step by 4 for 32 bit access. |
136 | * - Step by 8 for 64 bit access. | 136 | * - Step by 8 for 64 bit access. |
137 | * @value: Signed value to add. | 137 | * @value: Signed value to add. |
138 | * Note: When performing 32 and 64 bit access, only the low | 138 | * Note: When performing 32 and 64 bit access, only the low |
139 | * 22 bits are available. | 139 | * 22 bits are available. |
140 | * Returns Address to read from for atomic update | 140 | * Returns Address to read from for atomic update |
141 | */ | 141 | */ |
142 | static inline uint64_t __cvmx_fau_atomic_address(uint64_t tagwait, uint64_t reg, | 142 | static inline uint64_t __cvmx_fau_atomic_address(uint64_t tagwait, uint64_t reg, |
@@ -152,9 +152,9 @@ static inline uint64_t __cvmx_fau_atomic_address(uint64_t tagwait, uint64_t reg, | |||
152 | * Perform an atomic 64 bit add | 152 | * Perform an atomic 64 bit add |
153 | * | 153 | * |
154 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 154 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
155 | * - Step by 8 for 64 bit access. | 155 | * - Step by 8 for 64 bit access. |
156 | * @value: Signed value to add. | 156 | * @value: Signed value to add. |
157 | * Note: Only the low 22 bits are available. | 157 | * Note: Only the low 22 bits are available. |
158 | * Returns Value of the register before the update | 158 | * Returns Value of the register before the update |
159 | */ | 159 | */ |
160 | static inline int64_t cvmx_fau_fetch_and_add64(cvmx_fau_reg_64_t reg, | 160 | static inline int64_t cvmx_fau_fetch_and_add64(cvmx_fau_reg_64_t reg, |
@@ -167,9 +167,9 @@ static inline int64_t cvmx_fau_fetch_and_add64(cvmx_fau_reg_64_t reg, | |||
167 | * Perform an atomic 32 bit add | 167 | * Perform an atomic 32 bit add |
168 | * | 168 | * |
169 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 169 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
170 | * - Step by 4 for 32 bit access. | 170 | * - Step by 4 for 32 bit access. |
171 | * @value: Signed value to add. | 171 | * @value: Signed value to add. |
172 | * Note: Only the low 22 bits are available. | 172 | * Note: Only the low 22 bits are available. |
173 | * Returns Value of the register before the update | 173 | * Returns Value of the register before the update |
174 | */ | 174 | */ |
175 | static inline int32_t cvmx_fau_fetch_and_add32(cvmx_fau_reg_32_t reg, | 175 | static inline int32_t cvmx_fau_fetch_and_add32(cvmx_fau_reg_32_t reg, |
@@ -182,7 +182,7 @@ static inline int32_t cvmx_fau_fetch_and_add32(cvmx_fau_reg_32_t reg, | |||
182 | * Perform an atomic 16 bit add | 182 | * Perform an atomic 16 bit add |
183 | * | 183 | * |
184 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 184 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
185 | * - Step by 2 for 16 bit access. | 185 | * - Step by 2 for 16 bit access. |
186 | * @value: Signed value to add. | 186 | * @value: Signed value to add. |
187 | * Returns Value of the register before the update | 187 | * Returns Value of the register before the update |
188 | */ | 188 | */ |
@@ -209,12 +209,12 @@ static inline int8_t cvmx_fau_fetch_and_add8(cvmx_fau_reg_8_t reg, int8_t value) | |||
209 | * completes | 209 | * completes |
210 | * | 210 | * |
211 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 211 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
212 | * - Step by 8 for 64 bit access. | 212 | * - Step by 8 for 64 bit access. |
213 | * @value: Signed value to add. | 213 | * @value: Signed value to add. |
214 | * Note: Only the low 22 bits are available. | 214 | * Note: Only the low 22 bits are available. |
215 | * Returns If a timeout occurs, the error bit will be set. Otherwise | 215 | * Returns If a timeout occurs, the error bit will be set. Otherwise |
216 | * the value of the register before the update will be | 216 | * the value of the register before the update will be |
217 | * returned | 217 | * returned |
218 | */ | 218 | */ |
219 | static inline cvmx_fau_tagwait64_t | 219 | static inline cvmx_fau_tagwait64_t |
220 | cvmx_fau_tagwait_fetch_and_add64(cvmx_fau_reg_64_t reg, int64_t value) | 220 | cvmx_fau_tagwait_fetch_and_add64(cvmx_fau_reg_64_t reg, int64_t value) |
@@ -233,12 +233,12 @@ cvmx_fau_tagwait_fetch_and_add64(cvmx_fau_reg_64_t reg, int64_t value) | |||
233 | * completes | 233 | * completes |
234 | * | 234 | * |
235 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 235 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
236 | * - Step by 4 for 32 bit access. | 236 | * - Step by 4 for 32 bit access. |
237 | * @value: Signed value to add. | 237 | * @value: Signed value to add. |
238 | * Note: Only the low 22 bits are available. | 238 | * Note: Only the low 22 bits are available. |
239 | * Returns If a timeout occurs, the error bit will be set. Otherwise | 239 | * Returns If a timeout occurs, the error bit will be set. Otherwise |
240 | * the value of the register before the update will be | 240 | * the value of the register before the update will be |
241 | * returned | 241 | * returned |
242 | */ | 242 | */ |
243 | static inline cvmx_fau_tagwait32_t | 243 | static inline cvmx_fau_tagwait32_t |
244 | cvmx_fau_tagwait_fetch_and_add32(cvmx_fau_reg_32_t reg, int32_t value) | 244 | cvmx_fau_tagwait_fetch_and_add32(cvmx_fau_reg_32_t reg, int32_t value) |
@@ -257,11 +257,11 @@ cvmx_fau_tagwait_fetch_and_add32(cvmx_fau_reg_32_t reg, int32_t value) | |||
257 | * completes | 257 | * completes |
258 | * | 258 | * |
259 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 259 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
260 | * - Step by 2 for 16 bit access. | 260 | * - Step by 2 for 16 bit access. |
261 | * @value: Signed value to add. | 261 | * @value: Signed value to add. |
262 | * Returns If a timeout occurs, the error bit will be set. Otherwise | 262 | * Returns If a timeout occurs, the error bit will be set. Otherwise |
263 | * the value of the register before the update will be | 263 | * the value of the register before the update will be |
264 | * returned | 264 | * returned |
265 | */ | 265 | */ |
266 | static inline cvmx_fau_tagwait16_t | 266 | static inline cvmx_fau_tagwait16_t |
267 | cvmx_fau_tagwait_fetch_and_add16(cvmx_fau_reg_16_t reg, int16_t value) | 267 | cvmx_fau_tagwait_fetch_and_add16(cvmx_fau_reg_16_t reg, int16_t value) |
@@ -282,8 +282,8 @@ cvmx_fau_tagwait_fetch_and_add16(cvmx_fau_reg_16_t reg, int16_t value) | |||
282 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 282 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
283 | * @value: Signed value to add. | 283 | * @value: Signed value to add. |
284 | * Returns If a timeout occurs, the error bit will be set. Otherwise | 284 | * Returns If a timeout occurs, the error bit will be set. Otherwise |
285 | * the value of the register before the update will be | 285 | * the value of the register before the update will be |
286 | * returned | 286 | * returned |
287 | */ | 287 | */ |
288 | static inline cvmx_fau_tagwait8_t | 288 | static inline cvmx_fau_tagwait8_t |
289 | cvmx_fau_tagwait_fetch_and_add8(cvmx_fau_reg_8_t reg, int8_t value) | 289 | cvmx_fau_tagwait_fetch_and_add8(cvmx_fau_reg_8_t reg, int8_t value) |
@@ -301,21 +301,21 @@ cvmx_fau_tagwait_fetch_and_add8(cvmx_fau_reg_8_t reg, int8_t value) | |||
301 | * | 301 | * |
302 | * @scraddr: Scratch pad byte address to write to. Must be 8 byte aligned | 302 | * @scraddr: Scratch pad byte address to write to. Must be 8 byte aligned |
303 | * @value: Signed value to add. | 303 | * @value: Signed value to add. |
304 | * Note: When performing 32 and 64 bit access, only the low | 304 | * Note: When performing 32 and 64 bit access, only the low |
305 | * 22 bits are available. | 305 | * 22 bits are available. |
306 | * @tagwait: Should the atomic add wait for the current tag switch | 306 | * @tagwait: Should the atomic add wait for the current tag switch |
307 | * operation to complete. | 307 | * operation to complete. |
308 | * - 0 = Don't wait | 308 | * - 0 = Don't wait |
309 | * - 1 = Wait for tag switch to complete | 309 | * - 1 = Wait for tag switch to complete |
310 | * @size: The size of the operation: | 310 | * @size: The size of the operation: |
311 | * - CVMX_FAU_OP_SIZE_8 (0) = 8 bits | 311 | * - CVMX_FAU_OP_SIZE_8 (0) = 8 bits |
312 | * - CVMX_FAU_OP_SIZE_16 (1) = 16 bits | 312 | * - CVMX_FAU_OP_SIZE_16 (1) = 16 bits |
313 | * - CVMX_FAU_OP_SIZE_32 (2) = 32 bits | 313 | * - CVMX_FAU_OP_SIZE_32 (2) = 32 bits |
314 | * - CVMX_FAU_OP_SIZE_64 (3) = 64 bits | 314 | * - CVMX_FAU_OP_SIZE_64 (3) = 64 bits |
315 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 315 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
316 | * - Step by 2 for 16 bit access. | 316 | * - Step by 2 for 16 bit access. |
317 | * - Step by 4 for 32 bit access. | 317 | * - Step by 4 for 32 bit access. |
318 | * - Step by 8 for 64 bit access. | 318 | * - Step by 8 for 64 bit access. |
319 | * Returns Data to write using cvmx_send_single | 319 | * Returns Data to write using cvmx_send_single |
320 | */ | 320 | */ |
321 | static inline uint64_t __cvmx_fau_iobdma_data(uint64_t scraddr, int64_t value, | 321 | static inline uint64_t __cvmx_fau_iobdma_data(uint64_t scraddr, int64_t value, |
@@ -337,11 +337,11 @@ static inline uint64_t __cvmx_fau_iobdma_data(uint64_t scraddr, int64_t value, | |||
337 | * placed in the scratch memory at byte address scraddr. | 337 | * placed in the scratch memory at byte address scraddr. |
338 | * | 338 | * |
339 | * @scraddr: Scratch memory byte address to put response in. | 339 | * @scraddr: Scratch memory byte address to put response in. |
340 | * Must be 8 byte aligned. | 340 | * Must be 8 byte aligned. |
341 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 341 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
342 | * - Step by 8 for 64 bit access. | 342 | * - Step by 8 for 64 bit access. |
343 | * @value: Signed value to add. | 343 | * @value: Signed value to add. |
344 | * Note: Only the low 22 bits are available. | 344 | * Note: Only the low 22 bits are available. |
345 | * Returns Placed in the scratch pad register | 345 | * Returns Placed in the scratch pad register |
346 | */ | 346 | */ |
347 | static inline void cvmx_fau_async_fetch_and_add64(uint64_t scraddr, | 347 | static inline void cvmx_fau_async_fetch_and_add64(uint64_t scraddr, |
@@ -357,11 +357,11 @@ static inline void cvmx_fau_async_fetch_and_add64(uint64_t scraddr, | |||
357 | * placed in the scratch memory at byte address scraddr. | 357 | * placed in the scratch memory at byte address scraddr. |
358 | * | 358 | * |
359 | * @scraddr: Scratch memory byte address to put response in. | 359 | * @scraddr: Scratch memory byte address to put response in. |
360 | * Must be 8 byte aligned. | 360 | * Must be 8 byte aligned. |
361 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 361 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
362 | * - Step by 4 for 32 bit access. | 362 | * - Step by 4 for 32 bit access. |
363 | * @value: Signed value to add. | 363 | * @value: Signed value to add. |
364 | * Note: Only the low 22 bits are available. | 364 | * Note: Only the low 22 bits are available. |
365 | * Returns Placed in the scratch pad register | 365 | * Returns Placed in the scratch pad register |
366 | */ | 366 | */ |
367 | static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr, | 367 | static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr, |
@@ -377,9 +377,9 @@ static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr, | |||
377 | * placed in the scratch memory at byte address scraddr. | 377 | * placed in the scratch memory at byte address scraddr. |
378 | * | 378 | * |
379 | * @scraddr: Scratch memory byte address to put response in. | 379 | * @scraddr: Scratch memory byte address to put response in. |
380 | * Must be 8 byte aligned. | 380 | * Must be 8 byte aligned. |
381 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 381 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
382 | * - Step by 2 for 16 bit access. | 382 | * - Step by 2 for 16 bit access. |
383 | * @value: Signed value to add. | 383 | * @value: Signed value to add. |
384 | * Returns Placed in the scratch pad register | 384 | * Returns Placed in the scratch pad register |
385 | */ | 385 | */ |
@@ -396,7 +396,7 @@ static inline void cvmx_fau_async_fetch_and_add16(uint64_t scraddr, | |||
396 | * placed in the scratch memory at byte address scraddr. | 396 | * placed in the scratch memory at byte address scraddr. |
397 | * | 397 | * |
398 | * @scraddr: Scratch memory byte address to put response in. | 398 | * @scraddr: Scratch memory byte address to put response in. |
399 | * Must be 8 byte aligned. | 399 | * Must be 8 byte aligned. |
400 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 400 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
401 | * @value: Signed value to add. | 401 | * @value: Signed value to add. |
402 | * Returns Placed in the scratch pad register | 402 | * Returns Placed in the scratch pad register |
@@ -414,14 +414,14 @@ static inline void cvmx_fau_async_fetch_and_add8(uint64_t scraddr, | |||
414 | * switch completes. | 414 | * switch completes. |
415 | * | 415 | * |
416 | * @scraddr: Scratch memory byte address to put response in. Must be | 416 | * @scraddr: Scratch memory byte address to put response in. Must be |
417 | * 8 byte aligned. If a timeout occurs, the error bit (63) | 417 | * 8 byte aligned. If a timeout occurs, the error bit (63) |
418 | * will be set. Otherwise the value of the register before | 418 | * will be set. Otherwise the value of the register before |
419 | * the update will be returned | 419 | * the update will be returned |
420 | * | 420 | * |
421 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 421 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
422 | * - Step by 8 for 64 bit access. | 422 | * - Step by 8 for 64 bit access. |
423 | * @value: Signed value to add. | 423 | * @value: Signed value to add. |
424 | * Note: Only the low 22 bits are available. | 424 | * Note: Only the low 22 bits are available. |
425 | * Returns Placed in the scratch pad register | 425 | * Returns Placed in the scratch pad register |
426 | */ | 426 | */ |
427 | static inline void cvmx_fau_async_tagwait_fetch_and_add64(uint64_t scraddr, | 427 | static inline void cvmx_fau_async_tagwait_fetch_and_add64(uint64_t scraddr, |
@@ -437,14 +437,14 @@ static inline void cvmx_fau_async_tagwait_fetch_and_add64(uint64_t scraddr, | |||
437 | * switch completes. | 437 | * switch completes. |
438 | * | 438 | * |
439 | * @scraddr: Scratch memory byte address to put response in. Must be | 439 | * @scraddr: Scratch memory byte address to put response in. Must be |
440 | * 8 byte aligned. If a timeout occurs, the error bit (63) | 440 | * 8 byte aligned. If a timeout occurs, the error bit (63) |
441 | * will be set. Otherwise the value of the register before | 441 | * will be set. Otherwise the value of the register before |
442 | * the update will be returned | 442 | * the update will be returned |
443 | * | 443 | * |
444 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 444 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
445 | * - Step by 4 for 32 bit access. | 445 | * - Step by 4 for 32 bit access. |
446 | * @value: Signed value to add. | 446 | * @value: Signed value to add. |
447 | * Note: Only the low 22 bits are available. | 447 | * Note: Only the low 22 bits are available. |
448 | * Returns Placed in the scratch pad register | 448 | * Returns Placed in the scratch pad register |
449 | */ | 449 | */ |
450 | static inline void cvmx_fau_async_tagwait_fetch_and_add32(uint64_t scraddr, | 450 | static inline void cvmx_fau_async_tagwait_fetch_and_add32(uint64_t scraddr, |
@@ -460,12 +460,12 @@ static inline void cvmx_fau_async_tagwait_fetch_and_add32(uint64_t scraddr, | |||
460 | * switch completes. | 460 | * switch completes. |
461 | * | 461 | * |
462 | * @scraddr: Scratch memory byte address to put response in. Must be | 462 | * @scraddr: Scratch memory byte address to put response in. Must be |
463 | * 8 byte aligned. If a timeout occurs, the error bit (63) | 463 | * 8 byte aligned. If a timeout occurs, the error bit (63) |
464 | * will be set. Otherwise the value of the register before | 464 | * will be set. Otherwise the value of the register before |
465 | * the update will be returned | 465 | * the update will be returned |
466 | * | 466 | * |
467 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 467 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
468 | * - Step by 2 for 16 bit access. | 468 | * - Step by 2 for 16 bit access. |
469 | * @value: Signed value to add. | 469 | * @value: Signed value to add. |
470 | * | 470 | * |
471 | * Returns Placed in the scratch pad register | 471 | * Returns Placed in the scratch pad register |
@@ -483,9 +483,9 @@ static inline void cvmx_fau_async_tagwait_fetch_and_add16(uint64_t scraddr, | |||
483 | * switch completes. | 483 | * switch completes. |
484 | * | 484 | * |
485 | * @scraddr: Scratch memory byte address to put response in. Must be | 485 | * @scraddr: Scratch memory byte address to put response in. Must be |
486 | * 8 byte aligned. If a timeout occurs, the error bit (63) | 486 | * 8 byte aligned. If a timeout occurs, the error bit (63) |
487 | * will be set. Otherwise the value of the register before | 487 | * will be set. Otherwise the value of the register before |
488 | * the update will be returned | 488 | * the update will be returned |
489 | * | 489 | * |
490 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 490 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
491 | * @value: Signed value to add. | 491 | * @value: Signed value to add. |
@@ -504,7 +504,7 @@ static inline void cvmx_fau_async_tagwait_fetch_and_add8(uint64_t scraddr, | |||
504 | * Perform an atomic 64 bit add | 504 | * Perform an atomic 64 bit add |
505 | * | 505 | * |
506 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 506 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
507 | * - Step by 8 for 64 bit access. | 507 | * - Step by 8 for 64 bit access. |
508 | * @value: Signed value to add. | 508 | * @value: Signed value to add. |
509 | */ | 509 | */ |
510 | static inline void cvmx_fau_atomic_add64(cvmx_fau_reg_64_t reg, int64_t value) | 510 | static inline void cvmx_fau_atomic_add64(cvmx_fau_reg_64_t reg, int64_t value) |
@@ -516,7 +516,7 @@ static inline void cvmx_fau_atomic_add64(cvmx_fau_reg_64_t reg, int64_t value) | |||
516 | * Perform an atomic 32 bit add | 516 | * Perform an atomic 32 bit add |
517 | * | 517 | * |
518 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 518 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
519 | * - Step by 4 for 32 bit access. | 519 | * - Step by 4 for 32 bit access. |
520 | * @value: Signed value to add. | 520 | * @value: Signed value to add. |
521 | */ | 521 | */ |
522 | static inline void cvmx_fau_atomic_add32(cvmx_fau_reg_32_t reg, int32_t value) | 522 | static inline void cvmx_fau_atomic_add32(cvmx_fau_reg_32_t reg, int32_t value) |
@@ -528,7 +528,7 @@ static inline void cvmx_fau_atomic_add32(cvmx_fau_reg_32_t reg, int32_t value) | |||
528 | * Perform an atomic 16 bit add | 528 | * Perform an atomic 16 bit add |
529 | * | 529 | * |
530 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 530 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
531 | * - Step by 2 for 16 bit access. | 531 | * - Step by 2 for 16 bit access. |
532 | * @value: Signed value to add. | 532 | * @value: Signed value to add. |
533 | */ | 533 | */ |
534 | static inline void cvmx_fau_atomic_add16(cvmx_fau_reg_16_t reg, int16_t value) | 534 | static inline void cvmx_fau_atomic_add16(cvmx_fau_reg_16_t reg, int16_t value) |
@@ -551,7 +551,7 @@ static inline void cvmx_fau_atomic_add8(cvmx_fau_reg_8_t reg, int8_t value) | |||
551 | * Perform an atomic 64 bit write | 551 | * Perform an atomic 64 bit write |
552 | * | 552 | * |
553 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 553 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
554 | * - Step by 8 for 64 bit access. | 554 | * - Step by 8 for 64 bit access. |
555 | * @value: Signed value to write. | 555 | * @value: Signed value to write. |
556 | */ | 556 | */ |
557 | static inline void cvmx_fau_atomic_write64(cvmx_fau_reg_64_t reg, int64_t value) | 557 | static inline void cvmx_fau_atomic_write64(cvmx_fau_reg_64_t reg, int64_t value) |
@@ -563,7 +563,7 @@ static inline void cvmx_fau_atomic_write64(cvmx_fau_reg_64_t reg, int64_t value) | |||
563 | * Perform an atomic 32 bit write | 563 | * Perform an atomic 32 bit write |
564 | * | 564 | * |
565 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 565 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
566 | * - Step by 4 for 32 bit access. | 566 | * - Step by 4 for 32 bit access. |
567 | * @value: Signed value to write. | 567 | * @value: Signed value to write. |
568 | */ | 568 | */ |
569 | static inline void cvmx_fau_atomic_write32(cvmx_fau_reg_32_t reg, int32_t value) | 569 | static inline void cvmx_fau_atomic_write32(cvmx_fau_reg_32_t reg, int32_t value) |
@@ -575,7 +575,7 @@ static inline void cvmx_fau_atomic_write32(cvmx_fau_reg_32_t reg, int32_t value) | |||
575 | * Perform an atomic 16 bit write | 575 | * Perform an atomic 16 bit write |
576 | * | 576 | * |
577 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 577 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
578 | * - Step by 2 for 16 bit access. | 578 | * - Step by 2 for 16 bit access. |
579 | * @value: Signed value to write. | 579 | * @value: Signed value to write. |
580 | */ | 580 | */ |
581 | static inline void cvmx_fau_atomic_write16(cvmx_fau_reg_16_t reg, int16_t value) | 581 | static inline void cvmx_fau_atomic_write16(cvmx_fau_reg_16_t reg, int16_t value) |
diff --git a/arch/mips/include/asm/octeon/cvmx-fpa.h b/arch/mips/include/asm/octeon/cvmx-fpa.h index 541a1ae02b6f..aa26a2ce5a0e 100644 --- a/arch/mips/include/asm/octeon/cvmx-fpa.h +++ b/arch/mips/include/asm/octeon/cvmx-fpa.h | |||
@@ -39,9 +39,9 @@ | |||
39 | #include <asm/octeon/cvmx-address.h> | 39 | #include <asm/octeon/cvmx-address.h> |
40 | #include <asm/octeon/cvmx-fpa-defs.h> | 40 | #include <asm/octeon/cvmx-fpa-defs.h> |
41 | 41 | ||
42 | #define CVMX_FPA_NUM_POOLS 8 | 42 | #define CVMX_FPA_NUM_POOLS 8 |
43 | #define CVMX_FPA_MIN_BLOCK_SIZE 128 | 43 | #define CVMX_FPA_MIN_BLOCK_SIZE 128 |
44 | #define CVMX_FPA_ALIGNMENT 128 | 44 | #define CVMX_FPA_ALIGNMENT 128 |
45 | 45 | ||
46 | /** | 46 | /** |
47 | * Structure describing the data format used for stores to the FPA. | 47 | * Structure describing the data format used for stores to the FPA. |
@@ -186,8 +186,8 @@ static inline void *cvmx_fpa_alloc(uint64_t pool) | |||
186 | /** | 186 | /** |
187 | * Asynchronously get a new block from the FPA | 187 | * Asynchronously get a new block from the FPA |
188 | * | 188 | * |
189 | * @scr_addr: Local scratch address to put response in. This is a byte address, | 189 | * @scr_addr: Local scratch address to put response in. This is a byte address, |
190 | * but must be 8 byte aligned. | 190 | * but must be 8 byte aligned. |
191 | * @pool: Pool to get the block from | 191 | * @pool: Pool to get the block from |
192 | */ | 192 | */ |
193 | static inline void cvmx_fpa_async_alloc(uint64_t scr_addr, uint64_t pool) | 193 | static inline void cvmx_fpa_async_alloc(uint64_t scr_addr, uint64_t pool) |
@@ -212,7 +212,7 @@ static inline void cvmx_fpa_async_alloc(uint64_t scr_addr, uint64_t pool) | |||
212 | * @ptr: Block to free | 212 | * @ptr: Block to free |
213 | * @pool: Pool to put it in | 213 | * @pool: Pool to put it in |
214 | * @num_cache_lines: | 214 | * @num_cache_lines: |
215 | * Cache lines to invalidate | 215 | * Cache lines to invalidate |
216 | */ | 216 | */ |
217 | static inline void cvmx_fpa_free_nosync(void *ptr, uint64_t pool, | 217 | static inline void cvmx_fpa_free_nosync(void *ptr, uint64_t pool, |
218 | uint64_t num_cache_lines) | 218 | uint64_t num_cache_lines) |
@@ -234,7 +234,7 @@ static inline void cvmx_fpa_free_nosync(void *ptr, uint64_t pool, | |||
234 | * @ptr: Block to free | 234 | * @ptr: Block to free |
235 | * @pool: Pool to put it in | 235 | * @pool: Pool to put it in |
236 | * @num_cache_lines: | 236 | * @num_cache_lines: |
237 | * Cache lines to invalidate | 237 | * Cache lines to invalidate |
238 | */ | 238 | */ |
239 | static inline void cvmx_fpa_free(void *ptr, uint64_t pool, | 239 | static inline void cvmx_fpa_free(void *ptr, uint64_t pool, |
240 | uint64_t num_cache_lines) | 240 | uint64_t num_cache_lines) |
@@ -245,7 +245,7 @@ static inline void cvmx_fpa_free(void *ptr, uint64_t pool, | |||
245 | CVMX_ADDR_DIDSPACE(CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool)); | 245 | CVMX_ADDR_DIDSPACE(CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool)); |
246 | /* | 246 | /* |
247 | * Make sure that any previous writes to memory go out before | 247 | * Make sure that any previous writes to memory go out before |
248 | * we free this buffer. This also serves as a barrier to | 248 | * we free this buffer. This also serves as a barrier to |
249 | * prevent GCC from reordering operations to after the | 249 | * prevent GCC from reordering operations to after the |
250 | * free. | 250 | * free. |
251 | */ | 251 | */ |
@@ -259,17 +259,17 @@ static inline void cvmx_fpa_free(void *ptr, uint64_t pool, | |||
259 | * This can only be called once per pool. Make sure proper | 259 | * This can only be called once per pool. Make sure proper |
260 | * locking enforces this. | 260 | * locking enforces this. |
261 | * | 261 | * |
262 | * @pool: Pool to initialize | 262 | * @pool: Pool to initialize |
263 | * 0 <= pool < 8 | 263 | * 0 <= pool < 8 |
264 | * @name: Constant character string to name this pool. | 264 | * @name: Constant character string to name this pool. |
265 | * String is not copied. | 265 | * String is not copied. |
266 | * @buffer: Pointer to the block of memory to use. This must be | 266 | * @buffer: Pointer to the block of memory to use. This must be |
267 | * accessible by all processors and external hardware. | 267 | * accessible by all processors and external hardware. |
268 | * @block_size: Size for each block controlled by the FPA | 268 | * @block_size: Size for each block controlled by the FPA |
269 | * @num_blocks: Number of blocks | 269 | * @num_blocks: Number of blocks |
270 | * | 270 | * |
271 | * Returns 0 on Success, | 271 | * Returns 0 on Success, |
272 | * -1 on failure | 272 | * -1 on failure |
273 | */ | 273 | */ |
274 | extern int cvmx_fpa_setup_pool(uint64_t pool, const char *name, void *buffer, | 274 | extern int cvmx_fpa_setup_pool(uint64_t pool, const char *name, void *buffer, |
275 | uint64_t block_size, uint64_t num_blocks); | 275 | uint64_t block_size, uint64_t num_blocks); |
@@ -282,8 +282,8 @@ extern int cvmx_fpa_setup_pool(uint64_t pool, const char *name, void *buffer, | |||
282 | * | 282 | * |
283 | * @pool: Pool to shutdown | 283 | * @pool: Pool to shutdown |
284 | * Returns Zero on success | 284 | * Returns Zero on success |
285 | * - Positive is count of missing buffers | 285 | * - Positive is count of missing buffers |
286 | * - Negative is too many buffers or corrupted pointers | 286 | * - Negative is too many buffers or corrupted pointers |
287 | */ | 287 | */ |
288 | extern uint64_t cvmx_fpa_shutdown_pool(uint64_t pool); | 288 | extern uint64_t cvmx_fpa_shutdown_pool(uint64_t pool); |
289 | 289 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx-helper-board.h b/arch/mips/include/asm/octeon/cvmx-helper-board.h index 442f508eaac9..41785dd0ddd0 100644 --- a/arch/mips/include/asm/octeon/cvmx-helper-board.h +++ b/arch/mips/include/asm/octeon/cvmx-helper-board.h | |||
@@ -48,7 +48,7 @@ typedef enum { | |||
48 | * Fake IPD port, the RGMII/MII interface may use different PHY, use | 48 | * Fake IPD port, the RGMII/MII interface may use different PHY, use |
49 | * this macro to return appropriate MIX address to read the PHY. | 49 | * this macro to return appropriate MIX address to read the PHY. |
50 | */ | 50 | */ |
51 | #define CVMX_HELPER_BOARD_MGMT_IPD_PORT -10 | 51 | #define CVMX_HELPER_BOARD_MGMT_IPD_PORT -10 |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * cvmx_override_board_link_get(int ipd_port) is a function | 54 | * cvmx_override_board_link_get(int ipd_port) is a function |
@@ -86,10 +86,10 @@ extern int cvmx_helper_board_get_mii_address(int ipd_port); | |||
86 | * | 86 | * |
87 | * @phy_addr: The address of the PHY to program | 87 | * @phy_addr: The address of the PHY to program |
88 | * @link_flags: | 88 | * @link_flags: |
89 | * Flags to control autonegotiation. Bit 0 is autonegotiation | 89 | * Flags to control autonegotiation. Bit 0 is autonegotiation |
90 | * enable/disable to maintain backware compatibility. | 90 | * enable/disable to maintain backware compatibility. |
91 | * @link_info: Link speed to program. If the speed is zero and autonegotiation | 91 | * @link_info: Link speed to program. If the speed is zero and autonegotiation |
92 | * is enabled, all possible negotiation speeds are advertised. | 92 | * is enabled, all possible negotiation speeds are advertised. |
93 | * | 93 | * |
94 | * Returns Zero on success, negative on failure | 94 | * Returns Zero on success, negative on failure |
95 | */ | 95 | */ |
@@ -111,10 +111,10 @@ int cvmx_helper_board_link_set_phy(int phy_addr, | |||
111 | * enumeration from the bootloader. | 111 | * enumeration from the bootloader. |
112 | * | 112 | * |
113 | * @ipd_port: IPD input port associated with the port we want to get link | 113 | * @ipd_port: IPD input port associated with the port we want to get link |
114 | * status for. | 114 | * status for. |
115 | * | 115 | * |
116 | * Returns The ports link status. If the link isn't fully resolved, this must | 116 | * Returns The ports link status. If the link isn't fully resolved, this must |
117 | * return zero. | 117 | * return zero. |
118 | */ | 118 | */ |
119 | extern cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port); | 119 | extern cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port); |
120 | 120 | ||
@@ -134,10 +134,10 @@ extern cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port); | |||
134 | * | 134 | * |
135 | * @interface: Interface to probe | 135 | * @interface: Interface to probe |
136 | * @supported_ports: | 136 | * @supported_ports: |
137 | * Number of ports Octeon supports. | 137 | * Number of ports Octeon supports. |
138 | * | 138 | * |
139 | * Returns Number of ports the actual board supports. Many times this will | 139 | * Returns Number of ports the actual board supports. Many times this will |
140 | * simple be "support_ports". | 140 | * simple be "support_ports". |
141 | */ | 141 | */ |
142 | extern int __cvmx_helper_board_interface_probe(int interface, | 142 | extern int __cvmx_helper_board_interface_probe(int interface, |
143 | int supported_ports); | 143 | int supported_ports); |
diff --git a/arch/mips/include/asm/octeon/cvmx-helper-rgmii.h b/arch/mips/include/asm/octeon/cvmx-helper-rgmii.h index 78295ba0050f..4d7a3db3a9f6 100644 --- a/arch/mips/include/asm/octeon/cvmx-helper-rgmii.h +++ b/arch/mips/include/asm/octeon/cvmx-helper-rgmii.h | |||
@@ -98,9 +98,9 @@ extern int __cvmx_helper_rgmii_link_set(int ipd_port, | |||
98 | * | 98 | * |
99 | * @ipd_port: IPD/PKO port to loopback. | 99 | * @ipd_port: IPD/PKO port to loopback. |
100 | * @enable_internal: | 100 | * @enable_internal: |
101 | * Non zero if you want internal loopback | 101 | * Non zero if you want internal loopback |
102 | * @enable_external: | 102 | * @enable_external: |
103 | * Non zero if you want external loopback | 103 | * Non zero if you want external loopback |
104 | * | 104 | * |
105 | * Returns Zero on success, negative on failure. | 105 | * Returns Zero on success, negative on failure. |
106 | */ | 106 | */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-helper-sgmii.h b/arch/mips/include/asm/octeon/cvmx-helper-sgmii.h index 9a9b6c103ede..4debb1c5153d 100644 --- a/arch/mips/include/asm/octeon/cvmx-helper-sgmii.h +++ b/arch/mips/include/asm/octeon/cvmx-helper-sgmii.h | |||
@@ -92,9 +92,9 @@ extern int __cvmx_helper_sgmii_link_set(int ipd_port, | |||
92 | * | 92 | * |
93 | * @ipd_port: IPD/PKO port to loopback. | 93 | * @ipd_port: IPD/PKO port to loopback. |
94 | * @enable_internal: | 94 | * @enable_internal: |
95 | * Non zero if you want internal loopback | 95 | * Non zero if you want internal loopback |
96 | * @enable_external: | 96 | * @enable_external: |
97 | * Non zero if you want external loopback | 97 | * Non zero if you want external loopback |
98 | * | 98 | * |
99 | * Returns Zero on success, negative on failure. | 99 | * Returns Zero on success, negative on failure. |
100 | */ | 100 | */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-helper-util.h b/arch/mips/include/asm/octeon/cvmx-helper-util.h index 6a6e52fc22c1..e217aba1f523 100644 --- a/arch/mips/include/asm/octeon/cvmx-helper-util.h +++ b/arch/mips/include/asm/octeon/cvmx-helper-util.h | |||
@@ -57,11 +57,11 @@ extern int cvmx_helper_dump_packet(cvmx_wqe_t *work); | |||
57 | * | 57 | * |
58 | * @queue: Input queue to setup RED on (0-7) | 58 | * @queue: Input queue to setup RED on (0-7) |
59 | * @pass_thresh: | 59 | * @pass_thresh: |
60 | * Packets will begin slowly dropping when there are less than | 60 | * Packets will begin slowly dropping when there are less than |
61 | * this many packet buffers free in FPA 0. | 61 | * this many packet buffers free in FPA 0. |
62 | * @drop_thresh: | 62 | * @drop_thresh: |
63 | * All incomming packets will be dropped when there are less | 63 | * All incomming packets will be dropped when there are less |
64 | * than this many free packet buffers in FPA 0. | 64 | * than this many free packet buffers in FPA 0. |
65 | * Returns Zero on success. Negative on failure | 65 | * Returns Zero on success. Negative on failure |
66 | */ | 66 | */ |
67 | extern int cvmx_helper_setup_red_queue(int queue, int pass_thresh, | 67 | extern int cvmx_helper_setup_red_queue(int queue, int pass_thresh, |
@@ -71,11 +71,11 @@ extern int cvmx_helper_setup_red_queue(int queue, int pass_thresh, | |||
71 | * Setup Random Early Drop to automatically begin dropping packets. | 71 | * Setup Random Early Drop to automatically begin dropping packets. |
72 | * | 72 | * |
73 | * @pass_thresh: | 73 | * @pass_thresh: |
74 | * Packets will begin slowly dropping when there are less than | 74 | * Packets will begin slowly dropping when there are less than |
75 | * this many packet buffers free in FPA 0. | 75 | * this many packet buffers free in FPA 0. |
76 | * @drop_thresh: | 76 | * @drop_thresh: |
77 | * All incomming packets will be dropped when there are less | 77 | * All incomming packets will be dropped when there are less |
78 | * than this many free packet buffers in FPA 0. | 78 | * than this many free packet buffers in FPA 0. |
79 | * Returns Zero on success. Negative on failure | 79 | * Returns Zero on success. Negative on failure |
80 | */ | 80 | */ |
81 | extern int cvmx_helper_setup_red(int pass_thresh, int drop_thresh); | 81 | extern int cvmx_helper_setup_red(int pass_thresh, int drop_thresh); |
@@ -84,7 +84,7 @@ extern int cvmx_helper_setup_red(int pass_thresh, int drop_thresh); | |||
84 | * Get the version of the CVMX libraries. | 84 | * Get the version of the CVMX libraries. |
85 | * | 85 | * |
86 | * Returns Version string. Note this buffer is allocated statically | 86 | * Returns Version string. Note this buffer is allocated statically |
87 | * and will be shared by all callers. | 87 | * and will be shared by all callers. |
88 | */ | 88 | */ |
89 | extern const char *cvmx_helper_get_version(void); | 89 | extern const char *cvmx_helper_get_version(void); |
90 | 90 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx-helper-xaui.h b/arch/mips/include/asm/octeon/cvmx-helper-xaui.h index f6fbc4f45b56..5e89ed703eaa 100644 --- a/arch/mips/include/asm/octeon/cvmx-helper-xaui.h +++ b/arch/mips/include/asm/octeon/cvmx-helper-xaui.h | |||
@@ -92,9 +92,9 @@ extern int __cvmx_helper_xaui_link_set(int ipd_port, | |||
92 | * | 92 | * |
93 | * @ipd_port: IPD/PKO port to loopback. | 93 | * @ipd_port: IPD/PKO port to loopback. |
94 | * @enable_internal: | 94 | * @enable_internal: |
95 | * Non zero if you want internal loopback | 95 | * Non zero if you want internal loopback |
96 | * @enable_external: | 96 | * @enable_external: |
97 | * Non zero if you want external loopback | 97 | * Non zero if you want external loopback |
98 | * | 98 | * |
99 | * Returns Zero on success, negative on failure. | 99 | * Returns Zero on success, negative on failure. |
100 | */ | 100 | */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-helper.h b/arch/mips/include/asm/octeon/cvmx-helper.h index 691c8142cd4f..5a3090dc6f2f 100644 --- a/arch/mips/include/asm/octeon/cvmx-helper.h +++ b/arch/mips/include/asm/octeon/cvmx-helper.h | |||
@@ -93,12 +93,12 @@ extern void (*cvmx_override_ipd_port_setup) (int ipd_port); | |||
93 | /** | 93 | /** |
94 | * This function enables the IPD and also enables the packet interfaces. | 94 | * This function enables the IPD and also enables the packet interfaces. |
95 | * The packet interfaces (RGMII and SPI) must be enabled after the | 95 | * The packet interfaces (RGMII and SPI) must be enabled after the |
96 | * IPD. This should be called by the user program after any additional | 96 | * IPD. This should be called by the user program after any additional |
97 | * IPD configuration changes are made if CVMX_HELPER_ENABLE_IPD | 97 | * IPD configuration changes are made if CVMX_HELPER_ENABLE_IPD |
98 | * is not set in the executive-config.h file. | 98 | * is not set in the executive-config.h file. |
99 | * | 99 | * |
100 | * Returns 0 on success | 100 | * Returns 0 on success |
101 | * -1 on failure | 101 | * -1 on failure |
102 | */ | 102 | */ |
103 | extern int cvmx_helper_ipd_and_packet_input_enable(void); | 103 | extern int cvmx_helper_ipd_and_packet_input_enable(void); |
104 | 104 | ||
@@ -128,7 +128,7 @@ extern int cvmx_helper_initialize_packet_io_local(void); | |||
128 | * @interface: Which interface to return port count for. | 128 | * @interface: Which interface to return port count for. |
129 | * | 129 | * |
130 | * Returns Port count for interface | 130 | * Returns Port count for interface |
131 | * -1 for uninitialized interface | 131 | * -1 for uninitialized interface |
132 | */ | 132 | */ |
133 | extern int cvmx_helper_ports_on_interface(int interface); | 133 | extern int cvmx_helper_ports_on_interface(int interface); |
134 | 134 | ||
@@ -150,7 +150,7 @@ extern int cvmx_helper_get_number_of_interfaces(void); | |||
150 | * @interface: Interface to probe | 150 | * @interface: Interface to probe |
151 | * | 151 | * |
152 | * Returns Mode of the interface. Unknown or unsupported interfaces return | 152 | * Returns Mode of the interface. Unknown or unsupported interfaces return |
153 | * DISABLED. | 153 | * DISABLED. |
154 | */ | 154 | */ |
155 | extern cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int | 155 | extern cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int |
156 | interface); | 156 | interface); |
@@ -214,9 +214,9 @@ extern int cvmx_helper_interface_enumerate(int interface); | |||
214 | * | 214 | * |
215 | * @ipd_port: IPD/PKO port to loopback. | 215 | * @ipd_port: IPD/PKO port to loopback. |
216 | * @enable_internal: | 216 | * @enable_internal: |
217 | * Non zero if you want internal loopback | 217 | * Non zero if you want internal loopback |
218 | * @enable_external: | 218 | * @enable_external: |
219 | * Non zero if you want external loopback | 219 | * Non zero if you want external loopback |
220 | * | 220 | * |
221 | * Returns Zero on success, negative on failure. | 221 | * Returns Zero on success, negative on failure. |
222 | */ | 222 | */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-ipd.h b/arch/mips/include/asm/octeon/cvmx-ipd.h index 115a552c5c7f..e13490ebbb27 100644 --- a/arch/mips/include/asm/octeon/cvmx-ipd.h +++ b/arch/mips/include/asm/octeon/cvmx-ipd.h | |||
@@ -38,8 +38,8 @@ | |||
38 | #include <asm/octeon/cvmx-ipd-defs.h> | 38 | #include <asm/octeon/cvmx-ipd-defs.h> |
39 | 39 | ||
40 | enum cvmx_ipd_mode { | 40 | enum cvmx_ipd_mode { |
41 | CVMX_IPD_OPC_MODE_STT = 0LL, /* All blocks DRAM, not cached in L2 */ | 41 | CVMX_IPD_OPC_MODE_STT = 0LL, /* All blocks DRAM, not cached in L2 */ |
42 | CVMX_IPD_OPC_MODE_STF = 1LL, /* All bloccks into L2 */ | 42 | CVMX_IPD_OPC_MODE_STF = 1LL, /* All bloccks into L2 */ |
43 | CVMX_IPD_OPC_MODE_STF1_STT = 2LL, /* 1st block L2, rest DRAM */ | 43 | CVMX_IPD_OPC_MODE_STF1_STT = 2LL, /* 1st block L2, rest DRAM */ |
44 | CVMX_IPD_OPC_MODE_STF2_STT = 3LL /* 1st, 2nd blocks L2, rest DRAM */ | 44 | CVMX_IPD_OPC_MODE_STF2_STT = 3LL /* 1st, 2nd blocks L2, rest DRAM */ |
45 | }; | 45 | }; |
@@ -60,17 +60,17 @@ typedef cvmx_ipd_first_next_ptr_back_t cvmx_ipd_second_next_ptr_back_t; | |||
60 | * | 60 | * |
61 | * @mbuff_size: Packets buffer size in 8 byte words | 61 | * @mbuff_size: Packets buffer size in 8 byte words |
62 | * @first_mbuff_skip: | 62 | * @first_mbuff_skip: |
63 | * Number of 8 byte words to skip in the first buffer | 63 | * Number of 8 byte words to skip in the first buffer |
64 | * @not_first_mbuff_skip: | 64 | * @not_first_mbuff_skip: |
65 | * Number of 8 byte words to skip in each following buffer | 65 | * Number of 8 byte words to skip in each following buffer |
66 | * @first_back: Must be same as first_mbuff_skip / 128 | 66 | * @first_back: Must be same as first_mbuff_skip / 128 |
67 | * @second_back: | 67 | * @second_back: |
68 | * Must be same as not_first_mbuff_skip / 128 | 68 | * Must be same as not_first_mbuff_skip / 128 |
69 | * @wqe_fpa_pool: | 69 | * @wqe_fpa_pool: |
70 | * FPA pool to get work entries from | 70 | * FPA pool to get work entries from |
71 | * @cache_mode: | 71 | * @cache_mode: |
72 | * @back_pres_enable_flag: | 72 | * @back_pres_enable_flag: |
73 | * Enable or disable port back pressure | 73 | * Enable or disable port back pressure |
74 | */ | 74 | */ |
75 | static inline void cvmx_ipd_config(uint64_t mbuff_size, | 75 | static inline void cvmx_ipd_config(uint64_t mbuff_size, |
76 | uint64_t first_mbuff_skip, | 76 | uint64_t first_mbuff_skip, |
diff --git a/arch/mips/include/asm/octeon/cvmx-l2c.h b/arch/mips/include/asm/octeon/cvmx-l2c.h index 2c8ff9e33ec3..11c0a8fa8eb5 100644 --- a/arch/mips/include/asm/octeon/cvmx-l2c.h +++ b/arch/mips/include/asm/octeon/cvmx-l2c.h | |||
@@ -33,13 +33,13 @@ | |||
33 | #ifndef __CVMX_L2C_H__ | 33 | #ifndef __CVMX_L2C_H__ |
34 | #define __CVMX_L2C_H__ | 34 | #define __CVMX_L2C_H__ |
35 | 35 | ||
36 | #define CVMX_L2_ASSOC cvmx_l2c_get_num_assoc() /* Deprecated macro, use function */ | 36 | #define CVMX_L2_ASSOC cvmx_l2c_get_num_assoc() /* Deprecated macro, use function */ |
37 | #define CVMX_L2_SET_BITS cvmx_l2c_get_set_bits() /* Deprecated macro, use function */ | 37 | #define CVMX_L2_SET_BITS cvmx_l2c_get_set_bits() /* Deprecated macro, use function */ |
38 | #define CVMX_L2_SETS cvmx_l2c_get_num_sets() /* Deprecated macro, use function */ | 38 | #define CVMX_L2_SETS cvmx_l2c_get_num_sets() /* Deprecated macro, use function */ |
39 | 39 | ||
40 | 40 | ||
41 | #define CVMX_L2C_IDX_ADDR_SHIFT 7 /* based on 128 byte cache line size */ | 41 | #define CVMX_L2C_IDX_ADDR_SHIFT 7 /* based on 128 byte cache line size */ |
42 | #define CVMX_L2C_IDX_MASK (cvmx_l2c_get_num_sets() - 1) | 42 | #define CVMX_L2C_IDX_MASK (cvmx_l2c_get_num_sets() - 1) |
43 | 43 | ||
44 | /* Defines for index aliasing computations */ | 44 | /* Defines for index aliasing computations */ |
45 | #define CVMX_L2C_TAG_ADDR_ALIAS_SHIFT (CVMX_L2C_IDX_ADDR_SHIFT + cvmx_l2c_get_set_bits()) | 45 | #define CVMX_L2C_TAG_ADDR_ALIAS_SHIFT (CVMX_L2C_IDX_ADDR_SHIFT + cvmx_l2c_get_set_bits()) |
@@ -67,91 +67,91 @@ union cvmx_l2c_tag { | |||
67 | 67 | ||
68 | /* L2C Performance Counter events. */ | 68 | /* L2C Performance Counter events. */ |
69 | enum cvmx_l2c_event { | 69 | enum cvmx_l2c_event { |
70 | CVMX_L2C_EVENT_CYCLES = 0, | 70 | CVMX_L2C_EVENT_CYCLES = 0, |
71 | CVMX_L2C_EVENT_INSTRUCTION_MISS = 1, | 71 | CVMX_L2C_EVENT_INSTRUCTION_MISS = 1, |
72 | CVMX_L2C_EVENT_INSTRUCTION_HIT = 2, | 72 | CVMX_L2C_EVENT_INSTRUCTION_HIT = 2, |
73 | CVMX_L2C_EVENT_DATA_MISS = 3, | 73 | CVMX_L2C_EVENT_DATA_MISS = 3, |
74 | CVMX_L2C_EVENT_DATA_HIT = 4, | 74 | CVMX_L2C_EVENT_DATA_HIT = 4, |
75 | CVMX_L2C_EVENT_MISS = 5, | 75 | CVMX_L2C_EVENT_MISS = 5, |
76 | CVMX_L2C_EVENT_HIT = 6, | 76 | CVMX_L2C_EVENT_HIT = 6, |
77 | CVMX_L2C_EVENT_VICTIM_HIT = 7, | 77 | CVMX_L2C_EVENT_VICTIM_HIT = 7, |
78 | CVMX_L2C_EVENT_INDEX_CONFLICT = 8, | 78 | CVMX_L2C_EVENT_INDEX_CONFLICT = 8, |
79 | CVMX_L2C_EVENT_TAG_PROBE = 9, | 79 | CVMX_L2C_EVENT_TAG_PROBE = 9, |
80 | CVMX_L2C_EVENT_TAG_UPDATE = 10, | 80 | CVMX_L2C_EVENT_TAG_UPDATE = 10, |
81 | CVMX_L2C_EVENT_TAG_COMPLETE = 11, | 81 | CVMX_L2C_EVENT_TAG_COMPLETE = 11, |
82 | CVMX_L2C_EVENT_TAG_DIRTY = 12, | 82 | CVMX_L2C_EVENT_TAG_DIRTY = 12, |
83 | CVMX_L2C_EVENT_DATA_STORE_NOP = 13, | 83 | CVMX_L2C_EVENT_DATA_STORE_NOP = 13, |
84 | CVMX_L2C_EVENT_DATA_STORE_READ = 14, | 84 | CVMX_L2C_EVENT_DATA_STORE_READ = 14, |
85 | CVMX_L2C_EVENT_DATA_STORE_WRITE = 15, | 85 | CVMX_L2C_EVENT_DATA_STORE_WRITE = 15, |
86 | CVMX_L2C_EVENT_FILL_DATA_VALID = 16, | 86 | CVMX_L2C_EVENT_FILL_DATA_VALID = 16, |
87 | CVMX_L2C_EVENT_WRITE_REQUEST = 17, | 87 | CVMX_L2C_EVENT_WRITE_REQUEST = 17, |
88 | CVMX_L2C_EVENT_READ_REQUEST = 18, | 88 | CVMX_L2C_EVENT_READ_REQUEST = 18, |
89 | CVMX_L2C_EVENT_WRITE_DATA_VALID = 19, | 89 | CVMX_L2C_EVENT_WRITE_DATA_VALID = 19, |
90 | CVMX_L2C_EVENT_XMC_NOP = 20, | 90 | CVMX_L2C_EVENT_XMC_NOP = 20, |
91 | CVMX_L2C_EVENT_XMC_LDT = 21, | 91 | CVMX_L2C_EVENT_XMC_LDT = 21, |
92 | CVMX_L2C_EVENT_XMC_LDI = 22, | 92 | CVMX_L2C_EVENT_XMC_LDI = 22, |
93 | CVMX_L2C_EVENT_XMC_LDD = 23, | 93 | CVMX_L2C_EVENT_XMC_LDD = 23, |
94 | CVMX_L2C_EVENT_XMC_STF = 24, | 94 | CVMX_L2C_EVENT_XMC_STF = 24, |
95 | CVMX_L2C_EVENT_XMC_STT = 25, | 95 | CVMX_L2C_EVENT_XMC_STT = 25, |
96 | CVMX_L2C_EVENT_XMC_STP = 26, | 96 | CVMX_L2C_EVENT_XMC_STP = 26, |
97 | CVMX_L2C_EVENT_XMC_STC = 27, | 97 | CVMX_L2C_EVENT_XMC_STC = 27, |
98 | CVMX_L2C_EVENT_XMC_DWB = 28, | 98 | CVMX_L2C_EVENT_XMC_DWB = 28, |
99 | CVMX_L2C_EVENT_XMC_PL2 = 29, | 99 | CVMX_L2C_EVENT_XMC_PL2 = 29, |
100 | CVMX_L2C_EVENT_XMC_PSL1 = 30, | 100 | CVMX_L2C_EVENT_XMC_PSL1 = 30, |
101 | CVMX_L2C_EVENT_XMC_IOBLD = 31, | 101 | CVMX_L2C_EVENT_XMC_IOBLD = 31, |
102 | CVMX_L2C_EVENT_XMC_IOBST = 32, | 102 | CVMX_L2C_EVENT_XMC_IOBST = 32, |
103 | CVMX_L2C_EVENT_XMC_IOBDMA = 33, | 103 | CVMX_L2C_EVENT_XMC_IOBDMA = 33, |
104 | CVMX_L2C_EVENT_XMC_IOBRSP = 34, | 104 | CVMX_L2C_EVENT_XMC_IOBRSP = 34, |
105 | CVMX_L2C_EVENT_XMC_BUS_VALID = 35, | 105 | CVMX_L2C_EVENT_XMC_BUS_VALID = 35, |
106 | CVMX_L2C_EVENT_XMC_MEM_DATA = 36, | 106 | CVMX_L2C_EVENT_XMC_MEM_DATA = 36, |
107 | CVMX_L2C_EVENT_XMC_REFL_DATA = 37, | 107 | CVMX_L2C_EVENT_XMC_REFL_DATA = 37, |
108 | CVMX_L2C_EVENT_XMC_IOBRSP_DATA = 38, | 108 | CVMX_L2C_EVENT_XMC_IOBRSP_DATA = 38, |
109 | CVMX_L2C_EVENT_RSC_NOP = 39, | 109 | CVMX_L2C_EVENT_RSC_NOP = 39, |
110 | CVMX_L2C_EVENT_RSC_STDN = 40, | 110 | CVMX_L2C_EVENT_RSC_STDN = 40, |
111 | CVMX_L2C_EVENT_RSC_FILL = 41, | 111 | CVMX_L2C_EVENT_RSC_FILL = 41, |
112 | CVMX_L2C_EVENT_RSC_REFL = 42, | 112 | CVMX_L2C_EVENT_RSC_REFL = 42, |
113 | CVMX_L2C_EVENT_RSC_STIN = 43, | 113 | CVMX_L2C_EVENT_RSC_STIN = 43, |
114 | CVMX_L2C_EVENT_RSC_SCIN = 44, | 114 | CVMX_L2C_EVENT_RSC_SCIN = 44, |
115 | CVMX_L2C_EVENT_RSC_SCFL = 45, | 115 | CVMX_L2C_EVENT_RSC_SCFL = 45, |
116 | CVMX_L2C_EVENT_RSC_SCDN = 46, | 116 | CVMX_L2C_EVENT_RSC_SCDN = 46, |
117 | CVMX_L2C_EVENT_RSC_DATA_VALID = 47, | 117 | CVMX_L2C_EVENT_RSC_DATA_VALID = 47, |
118 | CVMX_L2C_EVENT_RSC_VALID_FILL = 48, | 118 | CVMX_L2C_EVENT_RSC_VALID_FILL = 48, |
119 | CVMX_L2C_EVENT_RSC_VALID_STRSP = 49, | 119 | CVMX_L2C_EVENT_RSC_VALID_STRSP = 49, |
120 | CVMX_L2C_EVENT_RSC_VALID_REFL = 50, | 120 | CVMX_L2C_EVENT_RSC_VALID_REFL = 50, |
121 | CVMX_L2C_EVENT_LRF_REQ = 51, | 121 | CVMX_L2C_EVENT_LRF_REQ = 51, |
122 | CVMX_L2C_EVENT_DT_RD_ALLOC = 52, | 122 | CVMX_L2C_EVENT_DT_RD_ALLOC = 52, |
123 | CVMX_L2C_EVENT_DT_WR_INVAL = 53, | 123 | CVMX_L2C_EVENT_DT_WR_INVAL = 53, |
124 | CVMX_L2C_EVENT_MAX | 124 | CVMX_L2C_EVENT_MAX |
125 | }; | 125 | }; |
126 | 126 | ||
127 | /* L2C Performance Counter events for Octeon2. */ | 127 | /* L2C Performance Counter events for Octeon2. */ |
128 | enum cvmx_l2c_tad_event { | 128 | enum cvmx_l2c_tad_event { |
129 | CVMX_L2C_TAD_EVENT_NONE = 0, | 129 | CVMX_L2C_TAD_EVENT_NONE = 0, |
130 | CVMX_L2C_TAD_EVENT_TAG_HIT = 1, | 130 | CVMX_L2C_TAD_EVENT_TAG_HIT = 1, |
131 | CVMX_L2C_TAD_EVENT_TAG_MISS = 2, | 131 | CVMX_L2C_TAD_EVENT_TAG_MISS = 2, |
132 | CVMX_L2C_TAD_EVENT_TAG_NOALLOC = 3, | 132 | CVMX_L2C_TAD_EVENT_TAG_NOALLOC = 3, |
133 | CVMX_L2C_TAD_EVENT_TAG_VICTIM = 4, | 133 | CVMX_L2C_TAD_EVENT_TAG_VICTIM = 4, |
134 | CVMX_L2C_TAD_EVENT_SC_FAIL = 5, | 134 | CVMX_L2C_TAD_EVENT_SC_FAIL = 5, |
135 | CVMX_L2C_TAD_EVENT_SC_PASS = 6, | 135 | CVMX_L2C_TAD_EVENT_SC_PASS = 6, |
136 | CVMX_L2C_TAD_EVENT_LFB_VALID = 7, | 136 | CVMX_L2C_TAD_EVENT_LFB_VALID = 7, |
137 | CVMX_L2C_TAD_EVENT_LFB_WAIT_LFB = 8, | 137 | CVMX_L2C_TAD_EVENT_LFB_WAIT_LFB = 8, |
138 | CVMX_L2C_TAD_EVENT_LFB_WAIT_VAB = 9, | 138 | CVMX_L2C_TAD_EVENT_LFB_WAIT_VAB = 9, |
139 | CVMX_L2C_TAD_EVENT_QUAD0_INDEX = 128, | 139 | CVMX_L2C_TAD_EVENT_QUAD0_INDEX = 128, |
140 | CVMX_L2C_TAD_EVENT_QUAD0_READ = 129, | 140 | CVMX_L2C_TAD_EVENT_QUAD0_READ = 129, |
141 | CVMX_L2C_TAD_EVENT_QUAD0_BANK = 130, | 141 | CVMX_L2C_TAD_EVENT_QUAD0_BANK = 130, |
142 | CVMX_L2C_TAD_EVENT_QUAD0_WDAT = 131, | 142 | CVMX_L2C_TAD_EVENT_QUAD0_WDAT = 131, |
143 | CVMX_L2C_TAD_EVENT_QUAD1_INDEX = 144, | 143 | CVMX_L2C_TAD_EVENT_QUAD1_INDEX = 144, |
144 | CVMX_L2C_TAD_EVENT_QUAD1_READ = 145, | 144 | CVMX_L2C_TAD_EVENT_QUAD1_READ = 145, |
145 | CVMX_L2C_TAD_EVENT_QUAD1_BANK = 146, | 145 | CVMX_L2C_TAD_EVENT_QUAD1_BANK = 146, |
146 | CVMX_L2C_TAD_EVENT_QUAD1_WDAT = 147, | 146 | CVMX_L2C_TAD_EVENT_QUAD1_WDAT = 147, |
147 | CVMX_L2C_TAD_EVENT_QUAD2_INDEX = 160, | 147 | CVMX_L2C_TAD_EVENT_QUAD2_INDEX = 160, |
148 | CVMX_L2C_TAD_EVENT_QUAD2_READ = 161, | 148 | CVMX_L2C_TAD_EVENT_QUAD2_READ = 161, |
149 | CVMX_L2C_TAD_EVENT_QUAD2_BANK = 162, | 149 | CVMX_L2C_TAD_EVENT_QUAD2_BANK = 162, |
150 | CVMX_L2C_TAD_EVENT_QUAD2_WDAT = 163, | 150 | CVMX_L2C_TAD_EVENT_QUAD2_WDAT = 163, |
151 | CVMX_L2C_TAD_EVENT_QUAD3_INDEX = 176, | 151 | CVMX_L2C_TAD_EVENT_QUAD3_INDEX = 176, |
152 | CVMX_L2C_TAD_EVENT_QUAD3_READ = 177, | 152 | CVMX_L2C_TAD_EVENT_QUAD3_READ = 177, |
153 | CVMX_L2C_TAD_EVENT_QUAD3_BANK = 178, | 153 | CVMX_L2C_TAD_EVENT_QUAD3_BANK = 178, |
154 | CVMX_L2C_TAD_EVENT_QUAD3_WDAT = 179, | 154 | CVMX_L2C_TAD_EVENT_QUAD3_WDAT = 179, |
155 | CVMX_L2C_TAD_EVENT_MAX | 155 | CVMX_L2C_TAD_EVENT_MAX |
156 | }; | 156 | }; |
157 | 157 | ||
@@ -159,10 +159,10 @@ enum cvmx_l2c_tad_event { | |||
159 | * Configure one of the four L2 Cache performance counters to capture event | 159 | * Configure one of the four L2 Cache performance counters to capture event |
160 | * occurrences. | 160 | * occurrences. |
161 | * | 161 | * |
162 | * @counter: The counter to configure. Range 0..3. | 162 | * @counter: The counter to configure. Range 0..3. |
163 | * @event: The type of L2 Cache event occurrence to count. | 163 | * @event: The type of L2 Cache event occurrence to count. |
164 | * @clear_on_read: When asserted, any read of the performance counter | 164 | * @clear_on_read: When asserted, any read of the performance counter |
165 | * clears the counter. | 165 | * clears the counter. |
166 | * | 166 | * |
167 | * @note The routine does not clear the counter. | 167 | * @note The routine does not clear the counter. |
168 | */ | 168 | */ |
@@ -184,8 +184,8 @@ uint64_t cvmx_l2c_read_perf(uint32_t counter); | |||
184 | * @core: The core processor of interest. | 184 | * @core: The core processor of interest. |
185 | * | 185 | * |
186 | * Returns The mask specifying the partitioning. 0 bits in mask indicates | 186 | * Returns The mask specifying the partitioning. 0 bits in mask indicates |
187 | * the cache 'ways' that a core can evict from. | 187 | * the cache 'ways' that a core can evict from. |
188 | * -1 on error | 188 | * -1 on error |
189 | */ | 189 | */ |
190 | int cvmx_l2c_get_core_way_partition(uint32_t core); | 190 | int cvmx_l2c_get_core_way_partition(uint32_t core); |
191 | 191 | ||
@@ -194,16 +194,16 @@ int cvmx_l2c_get_core_way_partition(uint32_t core); | |||
194 | * | 194 | * |
195 | * @core: The core that the partitioning applies to. | 195 | * @core: The core that the partitioning applies to. |
196 | * @mask: The partitioning of the ways expressed as a binary | 196 | * @mask: The partitioning of the ways expressed as a binary |
197 | * mask. A 0 bit allows the core to evict cache lines from | 197 | * mask. A 0 bit allows the core to evict cache lines from |
198 | * a way, while a 1 bit blocks the core from evicting any | 198 | * a way, while a 1 bit blocks the core from evicting any |
199 | * lines from that way. There must be at least one allowed | 199 | * lines from that way. There must be at least one allowed |
200 | * way (0 bit) in the mask. | 200 | * way (0 bit) in the mask. |
201 | * | 201 | * |
202 | 202 | ||
203 | * @note If any ways are blocked for all cores and the HW blocks, then | 203 | * @note If any ways are blocked for all cores and the HW blocks, then |
204 | * those ways will never have any cache lines evicted from them. | 204 | * those ways will never have any cache lines evicted from them. |
205 | * All cores and the hardware blocks are free to read from all | 205 | * All cores and the hardware blocks are free to read from all |
206 | * ways regardless of the partitioning. | 206 | * ways regardless of the partitioning. |
207 | */ | 207 | */ |
208 | int cvmx_l2c_set_core_way_partition(uint32_t core, uint32_t mask); | 208 | int cvmx_l2c_set_core_way_partition(uint32_t core, uint32_t mask); |
209 | 209 | ||
@@ -211,8 +211,8 @@ int cvmx_l2c_set_core_way_partition(uint32_t core, uint32_t mask); | |||
211 | * Return the L2 Cache way partitioning for the hw blocks. | 211 | * Return the L2 Cache way partitioning for the hw blocks. |
212 | * | 212 | * |
213 | * Returns The mask specifying the reserved way. 0 bits in mask indicates | 213 | * Returns The mask specifying the reserved way. 0 bits in mask indicates |
214 | * the cache 'ways' that a core can evict from. | 214 | * the cache 'ways' that a core can evict from. |
215 | * -1 on error | 215 | * -1 on error |
216 | */ | 216 | */ |
217 | int cvmx_l2c_get_hw_way_partition(void); | 217 | int cvmx_l2c_get_hw_way_partition(void); |
218 | 218 | ||
@@ -220,16 +220,16 @@ int cvmx_l2c_get_hw_way_partition(void); | |||
220 | * Partitions the L2 cache for the hardware blocks. | 220 | * Partitions the L2 cache for the hardware blocks. |
221 | * | 221 | * |
222 | * @mask: The partitioning of the ways expressed as a binary | 222 | * @mask: The partitioning of the ways expressed as a binary |
223 | * mask. A 0 bit allows the core to evict cache lines from | 223 | * mask. A 0 bit allows the core to evict cache lines from |
224 | * a way, while a 1 bit blocks the core from evicting any | 224 | * a way, while a 1 bit blocks the core from evicting any |
225 | * lines from that way. There must be at least one allowed | 225 | * lines from that way. There must be at least one allowed |
226 | * way (0 bit) in the mask. | 226 | * way (0 bit) in the mask. |
227 | * | 227 | * |
228 | 228 | ||
229 | * @note If any ways are blocked for all cores and the HW blocks, then | 229 | * @note If any ways are blocked for all cores and the HW blocks, then |
230 | * those ways will never have any cache lines evicted from them. | 230 | * those ways will never have any cache lines evicted from them. |
231 | * All cores and the hardware blocks are free to read from all | 231 | * All cores and the hardware blocks are free to read from all |
232 | * ways regardless of the partitioning. | 232 | * ways regardless of the partitioning. |
233 | */ | 233 | */ |
234 | int cvmx_l2c_set_hw_way_partition(uint32_t mask); | 234 | int cvmx_l2c_set_hw_way_partition(uint32_t mask); |
235 | 235 | ||
@@ -240,7 +240,7 @@ int cvmx_l2c_set_hw_way_partition(uint32_t mask); | |||
240 | * @addr: physical address of line to lock | 240 | * @addr: physical address of line to lock |
241 | * | 241 | * |
242 | * Returns 0 on success, | 242 | * Returns 0 on success, |
243 | * 1 if line not locked. | 243 | * 1 if line not locked. |
244 | */ | 244 | */ |
245 | int cvmx_l2c_lock_line(uint64_t addr); | 245 | int cvmx_l2c_lock_line(uint64_t addr); |
246 | 246 | ||
@@ -258,7 +258,7 @@ int cvmx_l2c_lock_line(uint64_t addr); | |||
258 | * @len: Length (in bytes) of region to lock | 258 | * @len: Length (in bytes) of region to lock |
259 | * | 259 | * |
260 | * Returns Number of requested lines that where not locked. | 260 | * Returns Number of requested lines that where not locked. |
261 | * 0 on success (all locked) | 261 | * 0 on success (all locked) |
262 | */ | 262 | */ |
263 | int cvmx_l2c_lock_mem_region(uint64_t start, uint64_t len); | 263 | int cvmx_l2c_lock_mem_region(uint64_t start, uint64_t len); |
264 | 264 | ||
@@ -272,7 +272,7 @@ int cvmx_l2c_lock_mem_region(uint64_t start, uint64_t len); | |||
272 | * @address: Physical address to unlock | 272 | * @address: Physical address to unlock |
273 | * | 273 | * |
274 | * Returns 0: line not unlocked | 274 | * Returns 0: line not unlocked |
275 | * 1: line unlocked | 275 | * 1: line unlocked |
276 | */ | 276 | */ |
277 | int cvmx_l2c_unlock_line(uint64_t address); | 277 | int cvmx_l2c_unlock_line(uint64_t address); |
278 | 278 | ||
@@ -290,7 +290,7 @@ int cvmx_l2c_unlock_mem_region(uint64_t start, uint64_t len); | |||
290 | * Read the L2 controller tag for a given location in L2 | 290 | * Read the L2 controller tag for a given location in L2 |
291 | * | 291 | * |
292 | * @association: | 292 | * @association: |
293 | * Which association to read line from | 293 | * Which association to read line from |
294 | * @index: Which way to read from. | 294 | * @index: Which way to read from. |
295 | * | 295 | * |
296 | * Returns l2c tag structure for line requested. | 296 | * Returns l2c tag structure for line requested. |
diff --git a/arch/mips/include/asm/octeon/cvmx-mdio.h b/arch/mips/include/asm/octeon/cvmx-mdio.h index 6f0cd182cec8..9f6a4f32a83c 100644 --- a/arch/mips/include/asm/octeon/cvmx-mdio.h +++ b/arch/mips/include/asm/octeon/cvmx-mdio.h | |||
@@ -246,21 +246,21 @@ typedef union { | |||
246 | } cvmx_mdio_phy_reg_mmd_address_data_t; | 246 | } cvmx_mdio_phy_reg_mmd_address_data_t; |
247 | 247 | ||
248 | /* Operating request encodings. */ | 248 | /* Operating request encodings. */ |
249 | #define MDIO_CLAUSE_22_WRITE 0 | 249 | #define MDIO_CLAUSE_22_WRITE 0 |
250 | #define MDIO_CLAUSE_22_READ 1 | 250 | #define MDIO_CLAUSE_22_READ 1 |
251 | 251 | ||
252 | #define MDIO_CLAUSE_45_ADDRESS 0 | 252 | #define MDIO_CLAUSE_45_ADDRESS 0 |
253 | #define MDIO_CLAUSE_45_WRITE 1 | 253 | #define MDIO_CLAUSE_45_WRITE 1 |
254 | #define MDIO_CLAUSE_45_READ_INC 2 | 254 | #define MDIO_CLAUSE_45_READ_INC 2 |
255 | #define MDIO_CLAUSE_45_READ 3 | 255 | #define MDIO_CLAUSE_45_READ 3 |
256 | 256 | ||
257 | /* MMD identifiers, mostly for accessing devices within XENPAK modules. */ | 257 | /* MMD identifiers, mostly for accessing devices within XENPAK modules. */ |
258 | #define CVMX_MMD_DEVICE_PMA_PMD 1 | 258 | #define CVMX_MMD_DEVICE_PMA_PMD 1 |
259 | #define CVMX_MMD_DEVICE_WIS 2 | 259 | #define CVMX_MMD_DEVICE_WIS 2 |
260 | #define CVMX_MMD_DEVICE_PCS 3 | 260 | #define CVMX_MMD_DEVICE_PCS 3 |
261 | #define CVMX_MMD_DEVICE_PHY_XS 4 | 261 | #define CVMX_MMD_DEVICE_PHY_XS 4 |
262 | #define CVMX_MMD_DEVICE_DTS_XS 5 | 262 | #define CVMX_MMD_DEVICE_DTS_XS 5 |
263 | #define CVMX_MMD_DEVICE_TC 6 | 263 | #define CVMX_MMD_DEVICE_TC 6 |
264 | #define CVMX_MMD_DEVICE_CL22_EXT 29 | 264 | #define CVMX_MMD_DEVICE_CL22_EXT 29 |
265 | #define CVMX_MMD_DEVICE_VENDOR_1 30 | 265 | #define CVMX_MMD_DEVICE_VENDOR_1 30 |
266 | #define CVMX_MMD_DEVICE_VENDOR_2 31 | 266 | #define CVMX_MMD_DEVICE_VENDOR_2 31 |
@@ -291,7 +291,7 @@ static inline void __cvmx_mdio_set_clause22_mode(int bus_id) | |||
291 | * registers controlling auto negotiation. | 291 | * registers controlling auto negotiation. |
292 | * | 292 | * |
293 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) | 293 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) |
294 | * support multiple busses. | 294 | * support multiple busses. |
295 | * @phy_id: The MII phy id | 295 | * @phy_id: The MII phy id |
296 | * @location: Register location to read | 296 | * @location: Register location to read |
297 | * | 297 | * |
@@ -328,13 +328,13 @@ static inline int cvmx_mdio_read(int bus_id, int phy_id, int location) | |||
328 | * registers controlling auto negotiation. | 328 | * registers controlling auto negotiation. |
329 | * | 329 | * |
330 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) | 330 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) |
331 | * support multiple busses. | 331 | * support multiple busses. |
332 | * @phy_id: The MII phy id | 332 | * @phy_id: The MII phy id |
333 | * @location: Register location to write | 333 | * @location: Register location to write |
334 | * @val: Value to write | 334 | * @val: Value to write |
335 | * | 335 | * |
336 | * Returns -1 on error | 336 | * Returns -1 on error |
337 | * 0 on success | 337 | * 0 on success |
338 | */ | 338 | */ |
339 | static inline int cvmx_mdio_write(int bus_id, int phy_id, int location, int val) | 339 | static inline int cvmx_mdio_write(int bus_id, int phy_id, int location, int val) |
340 | { | 340 | { |
@@ -370,7 +370,7 @@ static inline int cvmx_mdio_write(int bus_id, int phy_id, int location, int val) | |||
370 | * read PHY registers controlling auto negotiation. | 370 | * read PHY registers controlling auto negotiation. |
371 | * | 371 | * |
372 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) | 372 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) |
373 | * support multiple busses. | 373 | * support multiple busses. |
374 | * @phy_id: The MII phy id | 374 | * @phy_id: The MII phy id |
375 | * @device: MDIO Managable Device (MMD) id | 375 | * @device: MDIO Managable Device (MMD) id |
376 | * @location: Register location to read | 376 | * @location: Register location to read |
@@ -407,7 +407,7 @@ static inline int cvmx_mdio_45_read(int bus_id, int phy_id, int device, | |||
407 | } while (smi_wr.s.pending && --timeout); | 407 | } while (smi_wr.s.pending && --timeout); |
408 | if (timeout <= 0) { | 408 | if (timeout <= 0) { |
409 | cvmx_dprintf("cvmx_mdio_45_read: bus_id %d phy_id %2d " | 409 | cvmx_dprintf("cvmx_mdio_45_read: bus_id %d phy_id %2d " |
410 | "device %2d register %2d TIME OUT(address)\n", | 410 | "device %2d register %2d TIME OUT(address)\n", |
411 | bus_id, phy_id, device, location); | 411 | bus_id, phy_id, device, location); |
412 | return -1; | 412 | return -1; |
413 | } | 413 | } |
@@ -425,7 +425,7 @@ static inline int cvmx_mdio_45_read(int bus_id, int phy_id, int device, | |||
425 | 425 | ||
426 | if (timeout <= 0) { | 426 | if (timeout <= 0) { |
427 | cvmx_dprintf("cvmx_mdio_45_read: bus_id %d phy_id %2d " | 427 | cvmx_dprintf("cvmx_mdio_45_read: bus_id %d phy_id %2d " |
428 | "device %2d register %2d TIME OUT(data)\n", | 428 | "device %2d register %2d TIME OUT(data)\n", |
429 | bus_id, phy_id, device, location); | 429 | bus_id, phy_id, device, location); |
430 | return -1; | 430 | return -1; |
431 | } | 431 | } |
@@ -434,7 +434,7 @@ static inline int cvmx_mdio_45_read(int bus_id, int phy_id, int device, | |||
434 | return smi_rd.s.dat; | 434 | return smi_rd.s.dat; |
435 | else { | 435 | else { |
436 | cvmx_dprintf("cvmx_mdio_45_read: bus_id %d phy_id %2d " | 436 | cvmx_dprintf("cvmx_mdio_45_read: bus_id %d phy_id %2d " |
437 | "device %2d register %2d INVALID READ\n", | 437 | "device %2d register %2d INVALID READ\n", |
438 | bus_id, phy_id, device, location); | 438 | bus_id, phy_id, device, location); |
439 | return -1; | 439 | return -1; |
440 | } | 440 | } |
@@ -445,14 +445,14 @@ static inline int cvmx_mdio_45_read(int bus_id, int phy_id, int device, | |||
445 | * write PHY registers controlling auto negotiation. | 445 | * write PHY registers controlling auto negotiation. |
446 | * | 446 | * |
447 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) | 447 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) |
448 | * support multiple busses. | 448 | * support multiple busses. |
449 | * @phy_id: The MII phy id | 449 | * @phy_id: The MII phy id |
450 | * @device: MDIO Managable Device (MMD) id | 450 | * @device: MDIO Managable Device (MMD) id |
451 | * @location: Register location to write | 451 | * @location: Register location to write |
452 | * @val: Value to write | 452 | * @val: Value to write |
453 | * | 453 | * |
454 | * Returns -1 on error | 454 | * Returns -1 on error |
455 | * 0 on success | 455 | * 0 on success |
456 | */ | 456 | */ |
457 | static inline int cvmx_mdio_45_write(int bus_id, int phy_id, int device, | 457 | static inline int cvmx_mdio_45_write(int bus_id, int phy_id, int device, |
458 | int location, int val) | 458 | int location, int val) |
diff --git a/arch/mips/include/asm/octeon/cvmx-pip-defs.h b/arch/mips/include/asm/octeon/cvmx-pip-defs.h index 05a917d6ebe5..e975c7d2e485 100644 --- a/arch/mips/include/asm/octeon/cvmx-pip-defs.h +++ b/arch/mips/include/asm/octeon/cvmx-pip-defs.h | |||
@@ -44,7 +44,7 @@ enum cvmx_pip_port_parse_mode { | |||
44 | */ | 44 | */ |
45 | CVMX_PIP_PORT_CFG_MODE_SKIPL2 = 1ull, | 45 | CVMX_PIP_PORT_CFG_MODE_SKIPL2 = 1ull, |
46 | /* | 46 | /* |
47 | * Input packets are assumed to be IP. Results from non IP | 47 | * Input packets are assumed to be IP. Results from non IP |
48 | * packets is undefined. Pointers reference the beginning of | 48 | * packets is undefined. Pointers reference the beginning of |
49 | * the IP header. | 49 | * the IP header. |
50 | */ | 50 | */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-pip.h b/arch/mips/include/asm/octeon/cvmx-pip.h index 9e739a640855..a76fe5a57a9f 100644 --- a/arch/mips/include/asm/octeon/cvmx-pip.h +++ b/arch/mips/include/asm/octeon/cvmx-pip.h | |||
@@ -37,8 +37,8 @@ | |||
37 | #include <asm/octeon/cvmx-fpa.h> | 37 | #include <asm/octeon/cvmx-fpa.h> |
38 | #include <asm/octeon/cvmx-pip-defs.h> | 38 | #include <asm/octeon/cvmx-pip-defs.h> |
39 | 39 | ||
40 | #define CVMX_PIP_NUM_INPUT_PORTS 40 | 40 | #define CVMX_PIP_NUM_INPUT_PORTS 40 |
41 | #define CVMX_PIP_NUM_WATCHERS 4 | 41 | #define CVMX_PIP_NUM_WATCHERS 4 |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * Encodes the different error and exception codes | 44 | * Encodes the different error and exception codes |
@@ -92,10 +92,10 @@ typedef enum { | |||
92 | 92 | ||
93 | /** | 93 | /** |
94 | * NOTES | 94 | * NOTES |
95 | * late collision (data received before collision) | 95 | * late collision (data received before collision) |
96 | * late collisions cannot be detected by the receiver | 96 | * late collisions cannot be detected by the receiver |
97 | * they would appear as JAM bits which would appear as bad FCS | 97 | * they would appear as JAM bits which would appear as bad FCS |
98 | * or carrier extend error which is CVMX_PIP_EXTEND_ERR | 98 | * or carrier extend error which is CVMX_PIP_EXTEND_ERR |
99 | */ | 99 | */ |
100 | typedef enum { | 100 | typedef enum { |
101 | /* No error */ | 101 | /* No error */ |
@@ -122,11 +122,11 @@ typedef enum { | |||
122 | * error) | 122 | * error) |
123 | */ | 123 | */ |
124 | CVMX_PIP_UNDER_FCS_ERR = 6ull, | 124 | CVMX_PIP_UNDER_FCS_ERR = 6ull, |
125 | /* RGM 7 = FCS error */ | 125 | /* RGM 7 = FCS error */ |
126 | CVMX_PIP_GMX_FCS_ERR = 7ull, | 126 | CVMX_PIP_GMX_FCS_ERR = 7ull, |
127 | /* RGM+SPI 8 = min frame error (pkt len < min frame len) */ | 127 | /* RGM+SPI 8 = min frame error (pkt len < min frame len) */ |
128 | CVMX_PIP_UNDER_ERR = 8ull, | 128 | CVMX_PIP_UNDER_ERR = 8ull, |
129 | /* RGM 9 = Frame carrier extend error */ | 129 | /* RGM 9 = Frame carrier extend error */ |
130 | CVMX_PIP_EXTEND_ERR = 9ull, | 130 | CVMX_PIP_EXTEND_ERR = 9ull, |
131 | /* | 131 | /* |
132 | * RGM 10 = length mismatch (len did not match len in L2 | 132 | * RGM 10 = length mismatch (len did not match len in L2 |
@@ -161,10 +161,10 @@ typedef enum { | |||
161 | CVMX_PIP_PIP_L2_MAL_HDR = 18L | 161 | CVMX_PIP_PIP_L2_MAL_HDR = 18L |
162 | /* | 162 | /* |
163 | * NOTES: xx = late collision (data received before collision) | 163 | * NOTES: xx = late collision (data received before collision) |
164 | * late collisions cannot be detected by the receiver | 164 | * late collisions cannot be detected by the receiver |
165 | * they would appear as JAM bits which would appear as | 165 | * they would appear as JAM bits which would appear as |
166 | * bad FCS or carrier extend error which is | 166 | * bad FCS or carrier extend error which is |
167 | * CVMX_PIP_EXTEND_ERR | 167 | * CVMX_PIP_EXTEND_ERR |
168 | */ | 168 | */ |
169 | } cvmx_pip_rcv_err_t; | 169 | } cvmx_pip_rcv_err_t; |
170 | 170 | ||
@@ -192,13 +192,13 @@ typedef struct { | |||
192 | /* Number of packets processed by PIP */ | 192 | /* Number of packets processed by PIP */ |
193 | uint32_t packets; | 193 | uint32_t packets; |
194 | /* | 194 | /* |
195 | * Number of indentified L2 multicast packets. Does not | 195 | * Number of indentified L2 multicast packets. Does not |
196 | * include broadcast packets. Only includes packets whose | 196 | * include broadcast packets. Only includes packets whose |
197 | * parse mode is SKIP_TO_L2 | 197 | * parse mode is SKIP_TO_L2 |
198 | */ | 198 | */ |
199 | uint32_t multicast_packets; | 199 | uint32_t multicast_packets; |
200 | /* | 200 | /* |
201 | * Number of indentified L2 broadcast packets. Does not | 201 | * Number of indentified L2 broadcast packets. Does not |
202 | * include multicast packets. Only includes packets whose | 202 | * include multicast packets. Only includes packets whose |
203 | * parse mode is SKIP_TO_L2 | 203 | * parse mode is SKIP_TO_L2 |
204 | */ | 204 | */ |
@@ -287,7 +287,7 @@ typedef union { | |||
287 | * @port_num: Port number to configure | 287 | * @port_num: Port number to configure |
288 | * @port_cfg: Port hardware configuration | 288 | * @port_cfg: Port hardware configuration |
289 | * @port_tag_cfg: | 289 | * @port_tag_cfg: |
290 | * Port POW tagging configuration | 290 | * Port POW tagging configuration |
291 | */ | 291 | */ |
292 | static inline void cvmx_pip_config_port(uint64_t port_num, | 292 | static inline void cvmx_pip_config_port(uint64_t port_num, |
293 | union cvmx_pip_prt_cfgx port_cfg, | 293 | union cvmx_pip_prt_cfgx port_cfg, |
@@ -298,20 +298,20 @@ static inline void cvmx_pip_config_port(uint64_t port_num, | |||
298 | } | 298 | } |
299 | #if 0 | 299 | #if 0 |
300 | /** | 300 | /** |
301 | * @deprecated This function is a thin wrapper around the Pass1 version | 301 | * @deprecated This function is a thin wrapper around the Pass1 version |
302 | * of the CVMX_PIP_QOS_WATCHX CSR; Pass2 has added a field for | 302 | * of the CVMX_PIP_QOS_WATCHX CSR; Pass2 has added a field for |
303 | * setting the group that is incompatible with this function, | 303 | * setting the group that is incompatible with this function, |
304 | * the preferred upgrade path is to use the CSR directly. | 304 | * the preferred upgrade path is to use the CSR directly. |
305 | * | 305 | * |
306 | * Configure the global QoS packet watchers. Each watcher is | 306 | * Configure the global QoS packet watchers. Each watcher is |
307 | * capable of matching a field in a packet to determine the | 307 | * capable of matching a field in a packet to determine the |
308 | * QoS queue for scheduling. | 308 | * QoS queue for scheduling. |
309 | * | 309 | * |
310 | * @watcher: Watcher number to configure (0 - 3). | 310 | * @watcher: Watcher number to configure (0 - 3). |
311 | * @match_type: Watcher match type | 311 | * @match_type: Watcher match type |
312 | * @match_value: | 312 | * @match_value: |
313 | * Value the watcher will match against | 313 | * Value the watcher will match against |
314 | * @qos: QoS queue for packets matching this watcher | 314 | * @qos: QoS queue for packets matching this watcher |
315 | */ | 315 | */ |
316 | static inline void cvmx_pip_config_watcher(uint64_t watcher, | 316 | static inline void cvmx_pip_config_watcher(uint64_t watcher, |
317 | cvmx_pip_qos_watch_types match_type, | 317 | cvmx_pip_qos_watch_types match_type, |
@@ -331,7 +331,7 @@ static inline void cvmx_pip_config_watcher(uint64_t watcher, | |||
331 | * Configure the VLAN priority to QoS queue mapping. | 331 | * Configure the VLAN priority to QoS queue mapping. |
332 | * | 332 | * |
333 | * @vlan_priority: | 333 | * @vlan_priority: |
334 | * VLAN priority (0-7) | 334 | * VLAN priority (0-7) |
335 | * @qos: QoS queue for packets matching this watcher | 335 | * @qos: QoS queue for packets matching this watcher |
336 | */ | 336 | */ |
337 | static inline void cvmx_pip_config_vlan_qos(uint64_t vlan_priority, | 337 | static inline void cvmx_pip_config_vlan_qos(uint64_t vlan_priority, |
@@ -451,10 +451,10 @@ static inline void cvmx_pip_get_port_status(uint64_t port_num, uint64_t clear, | |||
451 | * | 451 | * |
452 | * @interface: Interface to configure (0 or 1) | 452 | * @interface: Interface to configure (0 or 1) |
453 | * @invert_result: | 453 | * @invert_result: |
454 | * Invert the result of the CRC | 454 | * Invert the result of the CRC |
455 | * @reflect: Reflect | 455 | * @reflect: Reflect |
456 | * @initialization_vector: | 456 | * @initialization_vector: |
457 | * CRC initialization vector | 457 | * CRC initialization vector |
458 | */ | 458 | */ |
459 | static inline void cvmx_pip_config_crc(uint64_t interface, | 459 | static inline void cvmx_pip_config_crc(uint64_t interface, |
460 | uint64_t invert_result, uint64_t reflect, | 460 | uint64_t invert_result, uint64_t reflect, |
@@ -500,13 +500,13 @@ static inline void cvmx_pip_tag_mask_clear(uint64_t mask_index) | |||
500 | * | 500 | * |
501 | * @mask_index: Which tag mask to modify (0..3) | 501 | * @mask_index: Which tag mask to modify (0..3) |
502 | * @offset: Offset into the bitmask to set bits at. Use the GCC macro | 502 | * @offset: Offset into the bitmask to set bits at. Use the GCC macro |
503 | * offsetof() to determine the offsets into packet headers. | 503 | * offsetof() to determine the offsets into packet headers. |
504 | * For example, offsetof(ethhdr, protocol) returns the offset | 504 | * For example, offsetof(ethhdr, protocol) returns the offset |
505 | * of the ethernet protocol field. The bitmask selects which | 505 | * of the ethernet protocol field. The bitmask selects which |
506 | * bytes to include the the tag, with bit offset X selecting | 506 | * bytes to include the the tag, with bit offset X selecting |
507 | * byte at offset X from the beginning of the packet data. | 507 | * byte at offset X from the beginning of the packet data. |
508 | * @len: Number of bytes to include. Usually this is the sizeof() | 508 | * @len: Number of bytes to include. Usually this is the sizeof() |
509 | * the field. | 509 | * the field. |
510 | */ | 510 | */ |
511 | static inline void cvmx_pip_tag_mask_set(uint64_t mask_index, uint64_t offset, | 511 | static inline void cvmx_pip_tag_mask_set(uint64_t mask_index, uint64_t offset, |
512 | uint64_t len) | 512 | uint64_t len) |
diff --git a/arch/mips/include/asm/octeon/cvmx-pko.h b/arch/mips/include/asm/octeon/cvmx-pko.h index c6daeedf1f81..f7d2a6718849 100644 --- a/arch/mips/include/asm/octeon/cvmx-pko.h +++ b/arch/mips/include/asm/octeon/cvmx-pko.h | |||
@@ -69,16 +69,16 @@ | |||
69 | #define CVMX_PKO_COMMAND_BUFFER_SIZE_ADJUST (1) | 69 | #define CVMX_PKO_COMMAND_BUFFER_SIZE_ADJUST (1) |
70 | 70 | ||
71 | #define CVMX_PKO_MAX_OUTPUT_QUEUES_STATIC 256 | 71 | #define CVMX_PKO_MAX_OUTPUT_QUEUES_STATIC 256 |
72 | #define CVMX_PKO_MAX_OUTPUT_QUEUES ((OCTEON_IS_MODEL(OCTEON_CN31XX) || \ | 72 | #define CVMX_PKO_MAX_OUTPUT_QUEUES ((OCTEON_IS_MODEL(OCTEON_CN31XX) || \ |
73 | OCTEON_IS_MODEL(OCTEON_CN3010) || OCTEON_IS_MODEL(OCTEON_CN3005) || \ | 73 | OCTEON_IS_MODEL(OCTEON_CN3010) || OCTEON_IS_MODEL(OCTEON_CN3005) || \ |
74 | OCTEON_IS_MODEL(OCTEON_CN50XX)) ? 32 : \ | 74 | OCTEON_IS_MODEL(OCTEON_CN50XX)) ? 32 : \ |
75 | (OCTEON_IS_MODEL(OCTEON_CN58XX) || \ | 75 | (OCTEON_IS_MODEL(OCTEON_CN58XX) || \ |
76 | OCTEON_IS_MODEL(OCTEON_CN56XX)) ? 256 : 128) | 76 | OCTEON_IS_MODEL(OCTEON_CN56XX)) ? 256 : 128) |
77 | #define CVMX_PKO_NUM_OUTPUT_PORTS 40 | 77 | #define CVMX_PKO_NUM_OUTPUT_PORTS 40 |
78 | /* use this for queues that are not used */ | 78 | /* use this for queues that are not used */ |
79 | #define CVMX_PKO_MEM_QUEUE_PTRS_ILLEGAL_PID 63 | 79 | #define CVMX_PKO_MEM_QUEUE_PTRS_ILLEGAL_PID 63 |
80 | #define CVMX_PKO_QUEUE_STATIC_PRIORITY 9 | 80 | #define CVMX_PKO_QUEUE_STATIC_PRIORITY 9 |
81 | #define CVMX_PKO_ILLEGAL_QUEUE 0xFFFF | 81 | #define CVMX_PKO_ILLEGAL_QUEUE 0xFFFF |
82 | #define CVMX_PKO_MAX_QUEUE_DEPTH 0 | 82 | #define CVMX_PKO_MAX_QUEUE_DEPTH 0 |
83 | 83 | ||
84 | typedef enum { | 84 | typedef enum { |
@@ -269,13 +269,13 @@ extern void cvmx_pko_shutdown(void); | |||
269 | /** | 269 | /** |
270 | * Configure a output port and the associated queues for use. | 270 | * Configure a output port and the associated queues for use. |
271 | * | 271 | * |
272 | * @port: Port to configure. | 272 | * @port: Port to configure. |
273 | * @base_queue: First queue number to associate with this port. | 273 | * @base_queue: First queue number to associate with this port. |
274 | * @num_queues: Number of queues t oassociate with this port | 274 | * @num_queues: Number of queues t oassociate with this port |
275 | * @priority: Array of priority levels for each queue. Values are | 275 | * @priority: Array of priority levels for each queue. Values are |
276 | * allowed to be 1-8. A value of 8 get 8 times the traffic | 276 | * allowed to be 1-8. A value of 8 get 8 times the traffic |
277 | * of a value of 1. There must be num_queues elements in the | 277 | * of a value of 1. There must be num_queues elements in the |
278 | * array. | 278 | * array. |
279 | */ | 279 | */ |
280 | extern cvmx_pko_status_t cvmx_pko_config_port(uint64_t port, | 280 | extern cvmx_pko_status_t cvmx_pko_config_port(uint64_t port, |
281 | uint64_t base_queue, | 281 | uint64_t base_queue, |
@@ -285,7 +285,7 @@ extern cvmx_pko_status_t cvmx_pko_config_port(uint64_t port, | |||
285 | /** | 285 | /** |
286 | * Ring the packet output doorbell. This tells the packet | 286 | * Ring the packet output doorbell. This tells the packet |
287 | * output hardware that "len" command words have been added | 287 | * output hardware that "len" command words have been added |
288 | * to its pending list. This command includes the required | 288 | * to its pending list. This command includes the required |
289 | * CVMX_SYNCWS before the doorbell ring. | 289 | * CVMX_SYNCWS before the doorbell ring. |
290 | * | 290 | * |
291 | * @port: Port the packet is for | 291 | * @port: Port the packet is for |
@@ -322,18 +322,18 @@ static inline void cvmx_pko_doorbell(uint64_t port, uint64_t queue, | |||
322 | * The use_locking parameter allows the caller to use three | 322 | * The use_locking parameter allows the caller to use three |
323 | * possible locking modes. | 323 | * possible locking modes. |
324 | * - CVMX_PKO_LOCK_NONE | 324 | * - CVMX_PKO_LOCK_NONE |
325 | * - PKO doesn't do any locking. It is the responsibility | 325 | * - PKO doesn't do any locking. It is the responsibility |
326 | * of the application to make sure that no other core | 326 | * of the application to make sure that no other core |
327 | * is accessing the same queue at the same time. | 327 | * is accessing the same queue at the same time. |
328 | * - CVMX_PKO_LOCK_ATOMIC_TAG | 328 | * - CVMX_PKO_LOCK_ATOMIC_TAG |
329 | * - PKO performs an atomic tagswitch to insure exclusive | 329 | * - PKO performs an atomic tagswitch to insure exclusive |
330 | * access to the output queue. This will maintain | 330 | * access to the output queue. This will maintain |
331 | * packet ordering on output. | 331 | * packet ordering on output. |
332 | * - CVMX_PKO_LOCK_CMD_QUEUE | 332 | * - CVMX_PKO_LOCK_CMD_QUEUE |
333 | * - PKO uses the common command queue locks to insure | 333 | * - PKO uses the common command queue locks to insure |
334 | * exclusive access to the output queue. This is a | 334 | * exclusive access to the output queue. This is a |
335 | * memory based ll/sc. This is the most portable | 335 | * memory based ll/sc. This is the most portable |
336 | * locking mechanism. | 336 | * locking mechanism. |
337 | * | 337 | * |
338 | * NOTE: If atomic locking is used, the POW entry CANNOT be | 338 | * NOTE: If atomic locking is used, the POW entry CANNOT be |
339 | * descheduled, as it does not contain a valid WQE pointer. | 339 | * descheduled, as it does not contain a valid WQE pointer. |
@@ -341,7 +341,7 @@ static inline void cvmx_pko_doorbell(uint64_t port, uint64_t queue, | |||
341 | * @port: Port to send it on | 341 | * @port: Port to send it on |
342 | * @queue: Queue to use | 342 | * @queue: Queue to use |
343 | * @use_locking: CVMX_PKO_LOCK_NONE, CVMX_PKO_LOCK_ATOMIC_TAG, or | 343 | * @use_locking: CVMX_PKO_LOCK_NONE, CVMX_PKO_LOCK_ATOMIC_TAG, or |
344 | * CVMX_PKO_LOCK_CMD_QUEUE | 344 | * CVMX_PKO_LOCK_CMD_QUEUE |
345 | */ | 345 | */ |
346 | 346 | ||
347 | static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue, | 347 | static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue, |
@@ -351,11 +351,11 @@ static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue, | |||
351 | /* | 351 | /* |
352 | * Must do a full switch here to handle all cases. We | 352 | * Must do a full switch here to handle all cases. We |
353 | * use a fake WQE pointer, as the POW does not access | 353 | * use a fake WQE pointer, as the POW does not access |
354 | * this memory. The WQE pointer and group are only | 354 | * this memory. The WQE pointer and group are only |
355 | * used if this work is descheduled, which is not | 355 | * used if this work is descheduled, which is not |
356 | * supported by the | 356 | * supported by the |
357 | * cvmx_pko_send_packet_prepare/cvmx_pko_send_packet_finish | 357 | * cvmx_pko_send_packet_prepare/cvmx_pko_send_packet_finish |
358 | * combination. Note that this is a special case in | 358 | * combination. Note that this is a special case in |
359 | * which these fake values can be used - this is not a | 359 | * which these fake values can be used - this is not a |
360 | * general technique. | 360 | * general technique. |
361 | */ | 361 | */ |
@@ -377,10 +377,10 @@ static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue, | |||
377 | * @port: Port to send it on | 377 | * @port: Port to send it on |
378 | * @queue: Queue to use | 378 | * @queue: Queue to use |
379 | * @pko_command: | 379 | * @pko_command: |
380 | * PKO HW command word | 380 | * PKO HW command word |
381 | * @packet: Packet to send | 381 | * @packet: Packet to send |
382 | * @use_locking: CVMX_PKO_LOCK_NONE, CVMX_PKO_LOCK_ATOMIC_TAG, or | 382 | * @use_locking: CVMX_PKO_LOCK_NONE, CVMX_PKO_LOCK_ATOMIC_TAG, or |
383 | * CVMX_PKO_LOCK_CMD_QUEUE | 383 | * CVMX_PKO_LOCK_CMD_QUEUE |
384 | * | 384 | * |
385 | * Returns returns CVMX_PKO_SUCCESS on success, or error code on | 385 | * Returns returns CVMX_PKO_SUCCESS on success, or error code on |
386 | * failure of output | 386 | * failure of output |
@@ -418,12 +418,12 @@ static inline cvmx_pko_status_t cvmx_pko_send_packet_finish( | |||
418 | * @port: Port to send it on | 418 | * @port: Port to send it on |
419 | * @queue: Queue to use | 419 | * @queue: Queue to use |
420 | * @pko_command: | 420 | * @pko_command: |
421 | * PKO HW command word | 421 | * PKO HW command word |
422 | * @packet: Packet to send | 422 | * @packet: Packet to send |
423 | * @addr: Plysical address of a work queue entry or physical address | 423 | * @addr: Plysical address of a work queue entry or physical address |
424 | * to zero on complete. | 424 | * to zero on complete. |
425 | * @use_locking: CVMX_PKO_LOCK_NONE, CVMX_PKO_LOCK_ATOMIC_TAG, or | 425 | * @use_locking: CVMX_PKO_LOCK_NONE, CVMX_PKO_LOCK_ATOMIC_TAG, or |
426 | * CVMX_PKO_LOCK_CMD_QUEUE | 426 | * CVMX_PKO_LOCK_CMD_QUEUE |
427 | * | 427 | * |
428 | * Returns returns CVMX_PKO_SUCCESS on success, or error code on | 428 | * Returns returns CVMX_PKO_SUCCESS on success, or error code on |
429 | * failure of output | 429 | * failure of output |
@@ -588,7 +588,7 @@ static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t clear, | |||
588 | * @port: Port to rate limit | 588 | * @port: Port to rate limit |
589 | * @packets_s: Maximum packet/sec | 589 | * @packets_s: Maximum packet/sec |
590 | * @burst: Maximum number of packets to burst in a row before rate | 590 | * @burst: Maximum number of packets to burst in a row before rate |
591 | * limiting cuts in. | 591 | * limiting cuts in. |
592 | * | 592 | * |
593 | * Returns Zero on success, negative on failure | 593 | * Returns Zero on success, negative on failure |
594 | */ | 594 | */ |
@@ -601,7 +601,7 @@ extern int cvmx_pko_rate_limit_packets(int port, int packets_s, int burst); | |||
601 | * @port: Port to rate limit | 601 | * @port: Port to rate limit |
602 | * @bits_s: PKO rate limit in bits/sec | 602 | * @bits_s: PKO rate limit in bits/sec |
603 | * @burst: Maximum number of bits to burst before rate | 603 | * @burst: Maximum number of bits to burst before rate |
604 | * limiting cuts in. | 604 | * limiting cuts in. |
605 | * | 605 | * |
606 | * Returns Zero on success, negative on failure | 606 | * Returns Zero on success, negative on failure |
607 | */ | 607 | */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-pow.h b/arch/mips/include/asm/octeon/cvmx-pow.h index 92742b241a51..4b4d0ecfd9eb 100644 --- a/arch/mips/include/asm/octeon/cvmx-pow.h +++ b/arch/mips/include/asm/octeon/cvmx-pow.h | |||
@@ -70,7 +70,7 @@ enum cvmx_pow_tag_type { | |||
70 | * The work queue entry from the order - NEVER tag switch from | 70 | * The work queue entry from the order - NEVER tag switch from |
71 | * NULL to NULL | 71 | * NULL to NULL |
72 | */ | 72 | */ |
73 | CVMX_POW_TAG_TYPE_NULL = 2L, | 73 | CVMX_POW_TAG_TYPE_NULL = 2L, |
74 | /* A tag switch to NULL, and there is no space reserved in POW | 74 | /* A tag switch to NULL, and there is no space reserved in POW |
75 | * - NEVER tag switch to NULL_NULL | 75 | * - NEVER tag switch to NULL_NULL |
76 | * - NEVER tag switch from NULL_NULL | 76 | * - NEVER tag switch from NULL_NULL |
@@ -90,7 +90,7 @@ typedef enum { | |||
90 | } cvmx_pow_wait_t; | 90 | } cvmx_pow_wait_t; |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * POW tag operations. These are used in the data stored to the POW. | 93 | * POW tag operations. These are used in the data stored to the POW. |
94 | */ | 94 | */ |
95 | typedef enum { | 95 | typedef enum { |
96 | /* | 96 | /* |
@@ -341,14 +341,14 @@ typedef union { | |||
341 | * lists. The two memory-input queue lists associated | 341 | * lists. The two memory-input queue lists associated |
342 | * with each QOS level are: | 342 | * with each QOS level are: |
343 | * | 343 | * |
344 | * - qosgrp = 0, qosgrp = 8: QOS0 | 344 | * - qosgrp = 0, qosgrp = 8: QOS0 |
345 | * - qosgrp = 1, qosgrp = 9: QOS1 | 345 | * - qosgrp = 1, qosgrp = 9: QOS1 |
346 | * - qosgrp = 2, qosgrp = 10: QOS2 | 346 | * - qosgrp = 2, qosgrp = 10: QOS2 |
347 | * - qosgrp = 3, qosgrp = 11: QOS3 | 347 | * - qosgrp = 3, qosgrp = 11: QOS3 |
348 | * - qosgrp = 4, qosgrp = 12: QOS4 | 348 | * - qosgrp = 4, qosgrp = 12: QOS4 |
349 | * - qosgrp = 5, qosgrp = 13: QOS5 | 349 | * - qosgrp = 5, qosgrp = 13: QOS5 |
350 | * - qosgrp = 6, qosgrp = 14: QOS6 | 350 | * - qosgrp = 6, qosgrp = 14: QOS6 |
351 | * - qosgrp = 7, qosgrp = 15: QOS7 | 351 | * - qosgrp = 7, qosgrp = 15: QOS7 |
352 | */ | 352 | */ |
353 | uint64_t qosgrp:4; | 353 | uint64_t qosgrp:4; |
354 | /* | 354 | /* |
@@ -942,11 +942,11 @@ typedef union { | |||
942 | * operations. | 942 | * operations. |
943 | * | 943 | * |
944 | * NOTE: The following is the behavior of the pending switch bit at the PP | 944 | * NOTE: The following is the behavior of the pending switch bit at the PP |
945 | * for POW stores (i.e. when did<7:3> == 0xc) | 945 | * for POW stores (i.e. when did<7:3> == 0xc) |
946 | * - did<2:0> == 0 => pending switch bit is set | 946 | * - did<2:0> == 0 => pending switch bit is set |
947 | * - did<2:0> == 1 => no affect on the pending switch bit | 947 | * - did<2:0> == 1 => no affect on the pending switch bit |
948 | * - did<2:0> == 3 => pending switch bit is cleared | 948 | * - did<2:0> == 3 => pending switch bit is cleared |
949 | * - did<2:0> == 7 => no affect on the pending switch bit | 949 | * - did<2:0> == 7 => no affect on the pending switch bit |
950 | * - did<2:0> == others => must not be used | 950 | * - did<2:0> == others => must not be used |
951 | * - No other loads/stores have an affect on the pending switch bit | 951 | * - No other loads/stores have an affect on the pending switch bit |
952 | * - The switch bus from POW can clear the pending switch bit | 952 | * - The switch bus from POW can clear the pending switch bit |
@@ -1053,7 +1053,7 @@ static inline cvmx_wqe_t *cvmx_pow_get_current_wqp(void) | |||
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | #ifndef CVMX_MF_CHORD | 1055 | #ifndef CVMX_MF_CHORD |
1056 | #define CVMX_MF_CHORD(dest) CVMX_RDHWR(dest, 30) | 1056 | #define CVMX_MF_CHORD(dest) CVMX_RDHWR(dest, 30) |
1057 | #endif | 1057 | #endif |
1058 | 1058 | ||
1059 | /** | 1059 | /** |
@@ -1097,7 +1097,7 @@ static inline void cvmx_pow_tag_sw_wait(void) | |||
1097 | * so the caller must ensure that there is not a pending tag switch. | 1097 | * so the caller must ensure that there is not a pending tag switch. |
1098 | * | 1098 | * |
1099 | * @wait: When set, call stalls until work becomes avaiable, or times out. | 1099 | * @wait: When set, call stalls until work becomes avaiable, or times out. |
1100 | * If not set, returns immediately. | 1100 | * If not set, returns immediately. |
1101 | * | 1101 | * |
1102 | * Returns Returns the WQE pointer from POW. Returns NULL if no work | 1102 | * Returns Returns the WQE pointer from POW. Returns NULL if no work |
1103 | * was available. | 1103 | * was available. |
@@ -1131,7 +1131,7 @@ static inline cvmx_wqe_t *cvmx_pow_work_request_sync_nocheck(cvmx_pow_wait_t | |||
1131 | * requesting the new work. | 1131 | * requesting the new work. |
1132 | * | 1132 | * |
1133 | * @wait: When set, call stalls until work becomes avaiable, or times out. | 1133 | * @wait: When set, call stalls until work becomes avaiable, or times out. |
1134 | * If not set, returns immediately. | 1134 | * If not set, returns immediately. |
1135 | * | 1135 | * |
1136 | * Returns Returns the WQE pointer from POW. Returns NULL if no work | 1136 | * Returns Returns the WQE pointer from POW. Returns NULL if no work |
1137 | * was available. | 1137 | * was available. |
@@ -1148,7 +1148,7 @@ static inline cvmx_wqe_t *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait) | |||
1148 | } | 1148 | } |
1149 | 1149 | ||
1150 | /** | 1150 | /** |
1151 | * Synchronous null_rd request. Requests a switch out of NULL_NULL POW state. | 1151 | * Synchronous null_rd request. Requests a switch out of NULL_NULL POW state. |
1152 | * This function waits for any previous tag switch to complete before | 1152 | * This function waits for any previous tag switch to complete before |
1153 | * requesting the null_rd. | 1153 | * requesting the null_rd. |
1154 | * | 1154 | * |
@@ -1183,11 +1183,11 @@ static inline enum cvmx_pow_tag_type cvmx_pow_work_request_null_rd(void) | |||
1183 | * there is not a pending tag switch. | 1183 | * there is not a pending tag switch. |
1184 | * | 1184 | * |
1185 | * @scr_addr: Scratch memory address that response will be returned | 1185 | * @scr_addr: Scratch memory address that response will be returned |
1186 | * to, which is either a valid WQE, or a response with the | 1186 | * to, which is either a valid WQE, or a response with the |
1187 | * invalid bit set. Byte address, must be 8 byte aligned. | 1187 | * invalid bit set. Byte address, must be 8 byte aligned. |
1188 | * | 1188 | * |
1189 | * @wait: 1 to cause response to wait for work to become available (or | 1189 | * @wait: 1 to cause response to wait for work to become available (or |
1190 | * timeout), 0 to cause response to return immediately | 1190 | * timeout), 0 to cause response to return immediately |
1191 | */ | 1191 | */ |
1192 | static inline void cvmx_pow_work_request_async_nocheck(int scr_addr, | 1192 | static inline void cvmx_pow_work_request_async_nocheck(int scr_addr, |
1193 | cvmx_pow_wait_t wait) | 1193 | cvmx_pow_wait_t wait) |
@@ -1212,11 +1212,11 @@ static inline void cvmx_pow_work_request_async_nocheck(int scr_addr, | |||
1212 | * tag switch to complete before requesting the new work. | 1212 | * tag switch to complete before requesting the new work. |
1213 | * | 1213 | * |
1214 | * @scr_addr: Scratch memory address that response will be returned | 1214 | * @scr_addr: Scratch memory address that response will be returned |
1215 | * to, which is either a valid WQE, or a response with the | 1215 | * to, which is either a valid WQE, or a response with the |
1216 | * invalid bit set. Byte address, must be 8 byte aligned. | 1216 | * invalid bit set. Byte address, must be 8 byte aligned. |
1217 | * | 1217 | * |
1218 | * @wait: 1 to cause response to wait for work to become available (or | 1218 | * @wait: 1 to cause response to wait for work to become available (or |
1219 | * timeout), 0 to cause response to return immediately | 1219 | * timeout), 0 to cause response to return immediately |
1220 | */ | 1220 | */ |
1221 | static inline void cvmx_pow_work_request_async(int scr_addr, | 1221 | static inline void cvmx_pow_work_request_async(int scr_addr, |
1222 | cvmx_pow_wait_t wait) | 1222 | cvmx_pow_wait_t wait) |
@@ -1234,7 +1234,7 @@ static inline void cvmx_pow_work_request_async(int scr_addr, | |||
1234 | * to wait for the response. | 1234 | * to wait for the response. |
1235 | * | 1235 | * |
1236 | * @scr_addr: Scratch memory address to get result from Byte address, | 1236 | * @scr_addr: Scratch memory address to get result from Byte address, |
1237 | * must be 8 byte aligned. | 1237 | * must be 8 byte aligned. |
1238 | * | 1238 | * |
1239 | * Returns Returns the WQE from the scratch register, or NULL if no | 1239 | * Returns Returns the WQE from the scratch register, or NULL if no |
1240 | * work was available. | 1240 | * work was available. |
@@ -1260,7 +1260,7 @@ static inline cvmx_wqe_t *cvmx_pow_work_response_async(int scr_addr) | |||
1260 | * @wqe_ptr: pointer to a work queue entry returned by the POW | 1260 | * @wqe_ptr: pointer to a work queue entry returned by the POW |
1261 | * | 1261 | * |
1262 | * Returns 0 if pointer is valid | 1262 | * Returns 0 if pointer is valid |
1263 | * 1 if invalid (no work was returned) | 1263 | * 1 if invalid (no work was returned) |
1264 | */ | 1264 | */ |
1265 | static inline uint64_t cvmx_pow_work_invalid(cvmx_wqe_t *wqe_ptr) | 1265 | static inline uint64_t cvmx_pow_work_invalid(cvmx_wqe_t *wqe_ptr) |
1266 | { | 1266 | { |
@@ -1314,7 +1314,7 @@ static inline void cvmx_pow_tag_sw_nocheck(uint32_t tag, | |||
1314 | /* | 1314 | /* |
1315 | * Note that WQE in DRAM is not updated here, as the POW does | 1315 | * Note that WQE in DRAM is not updated here, as the POW does |
1316 | * not read from DRAM once the WQE is in flight. See hardware | 1316 | * not read from DRAM once the WQE is in flight. See hardware |
1317 | * manual for complete details. It is the application's | 1317 | * manual for complete details. It is the application's |
1318 | * responsibility to keep track of the current tag value if | 1318 | * responsibility to keep track of the current tag value if |
1319 | * that is important. | 1319 | * that is important. |
1320 | */ | 1320 | */ |
@@ -1361,7 +1361,7 @@ static inline void cvmx_pow_tag_sw(uint32_t tag, | |||
1361 | /* | 1361 | /* |
1362 | * Note that WQE in DRAM is not updated here, as the POW does | 1362 | * Note that WQE in DRAM is not updated here, as the POW does |
1363 | * not read from DRAM once the WQE is in flight. See hardware | 1363 | * not read from DRAM once the WQE is in flight. See hardware |
1364 | * manual for complete details. It is the application's | 1364 | * manual for complete details. It is the application's |
1365 | * responsibility to keep track of the current tag value if | 1365 | * responsibility to keep track of the current tag value if |
1366 | * that is important. | 1366 | * that is important. |
1367 | */ | 1367 | */ |
@@ -1390,7 +1390,7 @@ static inline void cvmx_pow_tag_sw(uint32_t tag, | |||
1390 | * previous tag switch has completed. | 1390 | * previous tag switch has completed. |
1391 | * | 1391 | * |
1392 | * @wqp: pointer to work queue entry to submit. This entry is | 1392 | * @wqp: pointer to work queue entry to submit. This entry is |
1393 | * updated to match the other parameters | 1393 | * updated to match the other parameters |
1394 | * @tag: tag value to be assigned to work queue entry | 1394 | * @tag: tag value to be assigned to work queue entry |
1395 | * @tag_type: type of tag | 1395 | * @tag_type: type of tag |
1396 | * @group: group value for the work queue entry. | 1396 | * @group: group value for the work queue entry. |
@@ -1429,7 +1429,7 @@ static inline void cvmx_pow_tag_sw_full_nocheck(cvmx_wqe_t *wqp, uint32_t tag, | |||
1429 | /* | 1429 | /* |
1430 | * Note that WQE in DRAM is not updated here, as the POW does | 1430 | * Note that WQE in DRAM is not updated here, as the POW does |
1431 | * not read from DRAM once the WQE is in flight. See hardware | 1431 | * not read from DRAM once the WQE is in flight. See hardware |
1432 | * manual for complete details. It is the application's | 1432 | * manual for complete details. It is the application's |
1433 | * responsibility to keep track of the current tag value if | 1433 | * responsibility to keep track of the current tag value if |
1434 | * that is important. | 1434 | * that is important. |
1435 | */ | 1435 | */ |
@@ -1468,10 +1468,10 @@ static inline void cvmx_pow_tag_sw_full_nocheck(cvmx_wqe_t *wqp, uint32_t tag, | |||
1468 | * before requesting the tag switch. | 1468 | * before requesting the tag switch. |
1469 | * | 1469 | * |
1470 | * @wqp: pointer to work queue entry to submit. This entry is updated | 1470 | * @wqp: pointer to work queue entry to submit. This entry is updated |
1471 | * to match the other parameters | 1471 | * to match the other parameters |
1472 | * @tag: tag value to be assigned to work queue entry | 1472 | * @tag: tag value to be assigned to work queue entry |
1473 | * @tag_type: type of tag | 1473 | * @tag_type: type of tag |
1474 | * @group: group value for the work queue entry. | 1474 | * @group: group value for the work queue entry. |
1475 | */ | 1475 | */ |
1476 | static inline void cvmx_pow_tag_sw_full(cvmx_wqe_t *wqp, uint32_t tag, | 1476 | static inline void cvmx_pow_tag_sw_full(cvmx_wqe_t *wqp, uint32_t tag, |
1477 | enum cvmx_pow_tag_type tag_type, | 1477 | enum cvmx_pow_tag_type tag_type, |
@@ -1560,7 +1560,7 @@ static inline void cvmx_pow_tag_sw_null(void) | |||
1560 | * unrelated to the tag that the core currently holds. | 1560 | * unrelated to the tag that the core currently holds. |
1561 | * | 1561 | * |
1562 | * @wqp: pointer to work queue entry to submit. This entry is | 1562 | * @wqp: pointer to work queue entry to submit. This entry is |
1563 | * updated to match the other parameters | 1563 | * updated to match the other parameters |
1564 | * @tag: tag value to be assigned to work queue entry | 1564 | * @tag: tag value to be assigned to work queue entry |
1565 | * @tag_type: type of tag | 1565 | * @tag_type: type of tag |
1566 | * @qos: Input queue to add to. | 1566 | * @qos: Input queue to add to. |
@@ -1592,7 +1592,7 @@ static inline void cvmx_pow_work_submit(cvmx_wqe_t *wqp, uint32_t tag, | |||
1592 | ptr.sio.offset = cvmx_ptr_to_phys(wqp); | 1592 | ptr.sio.offset = cvmx_ptr_to_phys(wqp); |
1593 | 1593 | ||
1594 | /* | 1594 | /* |
1595 | * SYNC write to memory before the work submit. This is | 1595 | * SYNC write to memory before the work submit. This is |
1596 | * necessary as POW may read values from DRAM at this time. | 1596 | * necessary as POW may read values from DRAM at this time. |
1597 | */ | 1597 | */ |
1598 | CVMX_SYNCWS; | 1598 | CVMX_SYNCWS; |
@@ -1604,11 +1604,11 @@ static inline void cvmx_pow_work_submit(cvmx_wqe_t *wqp, uint32_t tag, | |||
1604 | * indicates which groups each core will accept work from. There are | 1604 | * indicates which groups each core will accept work from. There are |
1605 | * 16 groups. | 1605 | * 16 groups. |
1606 | * | 1606 | * |
1607 | * @core_num: core to apply mask to | 1607 | * @core_num: core to apply mask to |
1608 | * @mask: Group mask. There are 16 groups, so only bits 0-15 are valid, | 1608 | * @mask: Group mask. There are 16 groups, so only bits 0-15 are valid, |
1609 | * representing groups 0-15. | 1609 | * representing groups 0-15. |
1610 | * Each 1 bit in the mask enables the core to accept work from | 1610 | * Each 1 bit in the mask enables the core to accept work from |
1611 | * the corresponding group. | 1611 | * the corresponding group. |
1612 | */ | 1612 | */ |
1613 | static inline void cvmx_pow_set_group_mask(uint64_t core_num, uint64_t mask) | 1613 | static inline void cvmx_pow_set_group_mask(uint64_t core_num, uint64_t mask) |
1614 | { | 1614 | { |
@@ -1623,14 +1623,14 @@ static inline void cvmx_pow_set_group_mask(uint64_t core_num, uint64_t mask) | |||
1623 | * This function sets POW static priorities for a core. Each input queue has | 1623 | * This function sets POW static priorities for a core. Each input queue has |
1624 | * an associated priority value. | 1624 | * an associated priority value. |
1625 | * | 1625 | * |
1626 | * @core_num: core to apply priorities to | 1626 | * @core_num: core to apply priorities to |
1627 | * @priority: Vector of 8 priorities, one per POW Input Queue (0-7). | 1627 | * @priority: Vector of 8 priorities, one per POW Input Queue (0-7). |
1628 | * Highest priority is 0 and lowest is 7. A priority value | 1628 | * Highest priority is 0 and lowest is 7. A priority value |
1629 | * of 0xF instructs POW to skip the Input Queue when | 1629 | * of 0xF instructs POW to skip the Input Queue when |
1630 | * scheduling to this specific core. | 1630 | * scheduling to this specific core. |
1631 | * NOTE: priorities should not have gaps in values, meaning | 1631 | * NOTE: priorities should not have gaps in values, meaning |
1632 | * {0,1,1,1,1,1,1,1} is a valid configuration while | 1632 | * {0,1,1,1,1,1,1,1} is a valid configuration while |
1633 | * {0,2,2,2,2,2,2,2} is not. | 1633 | * {0,2,2,2,2,2,2,2} is not. |
1634 | */ | 1634 | */ |
1635 | static inline void cvmx_pow_set_priority(uint64_t core_num, | 1635 | static inline void cvmx_pow_set_priority(uint64_t core_num, |
1636 | const uint8_t priority[]) | 1636 | const uint8_t priority[]) |
@@ -1708,8 +1708,8 @@ static inline void cvmx_pow_set_priority(uint64_t core_num, | |||
1708 | * @tag_type: New tag type | 1708 | * @tag_type: New tag type |
1709 | * @group: New group value | 1709 | * @group: New group value |
1710 | * @no_sched: Control whether this work queue entry will be rescheduled. | 1710 | * @no_sched: Control whether this work queue entry will be rescheduled. |
1711 | * - 1 : don't schedule this work | 1711 | * - 1 : don't schedule this work |
1712 | * - 0 : allow this work to be scheduled. | 1712 | * - 0 : allow this work to be scheduled. |
1713 | */ | 1713 | */ |
1714 | static inline void cvmx_pow_tag_sw_desched_nocheck( | 1714 | static inline void cvmx_pow_tag_sw_desched_nocheck( |
1715 | uint32_t tag, | 1715 | uint32_t tag, |
@@ -1794,8 +1794,8 @@ static inline void cvmx_pow_tag_sw_desched_nocheck( | |||
1794 | * @tag_type: New tag type | 1794 | * @tag_type: New tag type |
1795 | * @group: New group value | 1795 | * @group: New group value |
1796 | * @no_sched: Control whether this work queue entry will be rescheduled. | 1796 | * @no_sched: Control whether this work queue entry will be rescheduled. |
1797 | * - 1 : don't schedule this work | 1797 | * - 1 : don't schedule this work |
1798 | * - 0 : allow this work to be scheduled. | 1798 | * - 0 : allow this work to be scheduled. |
1799 | */ | 1799 | */ |
1800 | static inline void cvmx_pow_tag_sw_desched(uint32_t tag, | 1800 | static inline void cvmx_pow_tag_sw_desched(uint32_t tag, |
1801 | enum cvmx_pow_tag_type tag_type, | 1801 | enum cvmx_pow_tag_type tag_type, |
@@ -1819,8 +1819,8 @@ static inline void cvmx_pow_tag_sw_desched(uint32_t tag, | |||
1819 | * Descchedules the current work queue entry. | 1819 | * Descchedules the current work queue entry. |
1820 | * | 1820 | * |
1821 | * @no_sched: no schedule flag value to be set on the work queue | 1821 | * @no_sched: no schedule flag value to be set on the work queue |
1822 | * entry. If this is set the entry will not be | 1822 | * entry. If this is set the entry will not be |
1823 | * rescheduled. | 1823 | * rescheduled. |
1824 | */ | 1824 | */ |
1825 | static inline void cvmx_pow_desched(uint64_t no_sched) | 1825 | static inline void cvmx_pow_desched(uint64_t no_sched) |
1826 | { | 1826 | { |
@@ -1863,7 +1863,7 @@ static inline void cvmx_pow_desched(uint64_t no_sched) | |||
1863 | *****************************************************/ | 1863 | *****************************************************/ |
1864 | 1864 | ||
1865 | /* | 1865 | /* |
1866 | * Number of bits of the tag used by software. The SW bits are always | 1866 | * Number of bits of the tag used by software. The SW bits are always |
1867 | * a contiguous block of the high starting at bit 31. The hardware | 1867 | * a contiguous block of the high starting at bit 31. The hardware |
1868 | * bits are always the low bits. By default, the top 8 bits of the | 1868 | * bits are always the low bits. By default, the top 8 bits of the |
1869 | * tag are reserved for software, and the low 24 are set by the IPD | 1869 | * tag are reserved for software, and the low 24 are set by the IPD |
@@ -1890,7 +1890,7 @@ static inline void cvmx_pow_desched(uint64_t no_sched) | |||
1890 | * are defined here. | 1890 | * are defined here. |
1891 | */ | 1891 | */ |
1892 | /* Mask for the value portion of the tag */ | 1892 | /* Mask for the value portion of the tag */ |
1893 | #define CVMX_TAG_SUBGROUP_MASK 0xFFFF | 1893 | #define CVMX_TAG_SUBGROUP_MASK 0xFFFF |
1894 | #define CVMX_TAG_SUBGROUP_SHIFT 16 | 1894 | #define CVMX_TAG_SUBGROUP_SHIFT 16 |
1895 | #define CVMX_TAG_SUBGROUP_PKO 0x1 | 1895 | #define CVMX_TAG_SUBGROUP_PKO 0x1 |
1896 | 1896 | ||
@@ -1905,12 +1905,12 @@ static inline void cvmx_pow_desched(uint64_t no_sched) | |||
1905 | * This function creates a 32 bit tag value from the two values provided. | 1905 | * This function creates a 32 bit tag value from the two values provided. |
1906 | * | 1906 | * |
1907 | * @sw_bits: The upper bits (number depends on configuration) are set | 1907 | * @sw_bits: The upper bits (number depends on configuration) are set |
1908 | * to this value. The remainder of bits are set by the | 1908 | * to this value. The remainder of bits are set by the |
1909 | * hw_bits parameter. | 1909 | * hw_bits parameter. |
1910 | * | 1910 | * |
1911 | * @hw_bits: The lower bits (number depends on configuration) are set | 1911 | * @hw_bits: The lower bits (number depends on configuration) are set |
1912 | * to this value. The remainder of bits are set by the | 1912 | * to this value. The remainder of bits are set by the |
1913 | * sw_bits parameter. | 1913 | * sw_bits parameter. |
1914 | * | 1914 | * |
1915 | * Returns 32 bit value of the combined hw and sw bits. | 1915 | * Returns 32 bit value of the combined hw and sw bits. |
1916 | */ | 1916 | */ |
@@ -1957,7 +1957,7 @@ static inline uint32_t cvmx_pow_tag_get_hw_bits(uint64_t tag) | |||
1957 | * | 1957 | * |
1958 | * @buffer: Buffer to store capture into | 1958 | * @buffer: Buffer to store capture into |
1959 | * @buffer_size: | 1959 | * @buffer_size: |
1960 | * The size of the supplied buffer | 1960 | * The size of the supplied buffer |
1961 | * | 1961 | * |
1962 | * Returns Zero on success, negative on failure | 1962 | * Returns Zero on success, negative on failure |
1963 | */ | 1963 | */ |
@@ -1968,7 +1968,7 @@ extern int cvmx_pow_capture(void *buffer, int buffer_size); | |||
1968 | * | 1968 | * |
1969 | * @buffer: POW capture from cvmx_pow_capture() | 1969 | * @buffer: POW capture from cvmx_pow_capture() |
1970 | * @buffer_size: | 1970 | * @buffer_size: |
1971 | * Size of the buffer | 1971 | * Size of the buffer |
1972 | */ | 1972 | */ |
1973 | extern void cvmx_pow_display(void *buffer, int buffer_size); | 1973 | extern void cvmx_pow_display(void *buffer, int buffer_size); |
1974 | 1974 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx-scratch.h b/arch/mips/include/asm/octeon/cvmx-scratch.h index 96b70cfd6245..8d21cc5e4e40 100644 --- a/arch/mips/include/asm/octeon/cvmx-scratch.h +++ b/arch/mips/include/asm/octeon/cvmx-scratch.h | |||
@@ -39,7 +39,7 @@ | |||
39 | * Note: This define must be a long, not a long long in order to | 39 | * Note: This define must be a long, not a long long in order to |
40 | * compile without warnings for both 32bit and 64bit. | 40 | * compile without warnings for both 32bit and 64bit. |
41 | */ | 41 | */ |
42 | #define CVMX_SCRATCH_BASE (-32768l) /* 0xffffffffffff8000 */ | 42 | #define CVMX_SCRATCH_BASE (-32768l) /* 0xffffffffffff8000 */ |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * Reads an 8 bit value from the processor local scratchpad memory. | 45 | * Reads an 8 bit value from the processor local scratchpad memory. |
diff --git a/arch/mips/include/asm/octeon/cvmx-spi.h b/arch/mips/include/asm/octeon/cvmx-spi.h index 3bf53b537bcf..d5038cc4b475 100644 --- a/arch/mips/include/asm/octeon/cvmx-spi.h +++ b/arch/mips/include/asm/octeon/cvmx-spi.h | |||
@@ -84,11 +84,11 @@ static inline int cvmx_spi_is_spi_interface(int interface) | |||
84 | * Initialize and start the SPI interface. | 84 | * Initialize and start the SPI interface. |
85 | * | 85 | * |
86 | * @interface: The identifier of the packet interface to configure and | 86 | * @interface: The identifier of the packet interface to configure and |
87 | * use as a SPI interface. | 87 | * use as a SPI interface. |
88 | * @mode: The operating mode for the SPI interface. The interface | 88 | * @mode: The operating mode for the SPI interface. The interface |
89 | * can operate as a full duplex (both Tx and Rx data paths | 89 | * can operate as a full duplex (both Tx and Rx data paths |
90 | * active) or as a halfplex (either the Tx data path is | 90 | * active) or as a halfplex (either the Tx data path is |
91 | * active or the Rx data path is active, but not both). | 91 | * active or the Rx data path is active, but not both). |
92 | * @timeout: Timeout to wait for clock synchronization in seconds | 92 | * @timeout: Timeout to wait for clock synchronization in seconds |
93 | * @num_ports: Number of SPI ports to configure | 93 | * @num_ports: Number of SPI ports to configure |
94 | * | 94 | * |
@@ -102,11 +102,11 @@ extern int cvmx_spi_start_interface(int interface, cvmx_spi_mode_t mode, | |||
102 | * with its corespondant system. | 102 | * with its corespondant system. |
103 | * | 103 | * |
104 | * @interface: The identifier of the packet interface to configure and | 104 | * @interface: The identifier of the packet interface to configure and |
105 | * use as a SPI interface. | 105 | * use as a SPI interface. |
106 | * @mode: The operating mode for the SPI interface. The interface | 106 | * @mode: The operating mode for the SPI interface. The interface |
107 | * can operate as a full duplex (both Tx and Rx data paths | 107 | * can operate as a full duplex (both Tx and Rx data paths |
108 | * active) or as a halfplex (either the Tx data path is | 108 | * active) or as a halfplex (either the Tx data path is |
109 | * active or the Rx data path is active, but not both). | 109 | * active or the Rx data path is active, but not both). |
110 | * @timeout: Timeout to wait for clock synchronization in seconds | 110 | * @timeout: Timeout to wait for clock synchronization in seconds |
111 | * Returns Zero on success, negative of failure. | 111 | * Returns Zero on success, negative of failure. |
112 | */ | 112 | */ |
@@ -154,7 +154,7 @@ static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed( | |||
154 | /** | 154 | /** |
155 | * Get current SPI4 initialization callbacks | 155 | * Get current SPI4 initialization callbacks |
156 | * | 156 | * |
157 | * @callbacks: Pointer to the callbacks structure.to fill | 157 | * @callbacks: Pointer to the callbacks structure.to fill |
158 | * | 158 | * |
159 | * Returns Pointer to cvmx_spi_callbacks_t structure. | 159 | * Returns Pointer to cvmx_spi_callbacks_t structure. |
160 | */ | 160 | */ |
@@ -171,11 +171,11 @@ extern void cvmx_spi_set_callbacks(cvmx_spi_callbacks_t *new_callbacks); | |||
171 | * Callback to perform SPI4 reset | 171 | * Callback to perform SPI4 reset |
172 | * | 172 | * |
173 | * @interface: The identifier of the packet interface to configure and | 173 | * @interface: The identifier of the packet interface to configure and |
174 | * use as a SPI interface. | 174 | * use as a SPI interface. |
175 | * @mode: The operating mode for the SPI interface. The interface | 175 | * @mode: The operating mode for the SPI interface. The interface |
176 | * can operate as a full duplex (both Tx and Rx data paths | 176 | * can operate as a full duplex (both Tx and Rx data paths |
177 | * active) or as a halfplex (either the Tx data path is | 177 | * active) or as a halfplex (either the Tx data path is |
178 | * active or the Rx data path is active, but not both). | 178 | * active or the Rx data path is active, but not both). |
179 | * | 179 | * |
180 | * Returns Zero on success, non-zero error code on failure (will cause | 180 | * Returns Zero on success, non-zero error code on failure (will cause |
181 | * SPI initialization to abort) | 181 | * SPI initialization to abort) |
@@ -187,11 +187,11 @@ extern int cvmx_spi_reset_cb(int interface, cvmx_spi_mode_t mode); | |||
187 | * detection | 187 | * detection |
188 | * | 188 | * |
189 | * @interface: The identifier of the packet interface to configure and | 189 | * @interface: The identifier of the packet interface to configure and |
190 | * use as a SPI interface. | 190 | * use as a SPI interface. |
191 | * @mode: The operating mode for the SPI interface. The interface | 191 | * @mode: The operating mode for the SPI interface. The interface |
192 | * can operate as a full duplex (both Tx and Rx data paths | 192 | * can operate as a full duplex (both Tx and Rx data paths |
193 | * active) or as a halfplex (either the Tx data path is | 193 | * active) or as a halfplex (either the Tx data path is |
194 | * active or the Rx data path is active, but not both). | 194 | * active or the Rx data path is active, but not both). |
195 | * @num_ports: Number of ports to configure on SPI | 195 | * @num_ports: Number of ports to configure on SPI |
196 | * | 196 | * |
197 | * Returns Zero on success, non-zero error code on failure (will cause | 197 | * Returns Zero on success, non-zero error code on failure (will cause |
@@ -204,11 +204,11 @@ extern int cvmx_spi_calendar_setup_cb(int interface, cvmx_spi_mode_t mode, | |||
204 | * Callback to perform clock detection | 204 | * Callback to perform clock detection |
205 | * | 205 | * |
206 | * @interface: The identifier of the packet interface to configure and | 206 | * @interface: The identifier of the packet interface to configure and |
207 | * use as a SPI interface. | 207 | * use as a SPI interface. |
208 | * @mode: The operating mode for the SPI interface. The interface | 208 | * @mode: The operating mode for the SPI interface. The interface |
209 | * can operate as a full duplex (both Tx and Rx data paths | 209 | * can operate as a full duplex (both Tx and Rx data paths |
210 | * active) or as a halfplex (either the Tx data path is | 210 | * active) or as a halfplex (either the Tx data path is |
211 | * active or the Rx data path is active, but not both). | 211 | * active or the Rx data path is active, but not both). |
212 | * @timeout: Timeout to wait for clock synchronization in seconds | 212 | * @timeout: Timeout to wait for clock synchronization in seconds |
213 | * | 213 | * |
214 | * Returns Zero on success, non-zero error code on failure (will cause | 214 | * Returns Zero on success, non-zero error code on failure (will cause |
@@ -221,11 +221,11 @@ extern int cvmx_spi_clock_detect_cb(int interface, cvmx_spi_mode_t mode, | |||
221 | * Callback to perform link training | 221 | * Callback to perform link training |
222 | * | 222 | * |
223 | * @interface: The identifier of the packet interface to configure and | 223 | * @interface: The identifier of the packet interface to configure and |
224 | * use as a SPI interface. | 224 | * use as a SPI interface. |
225 | * @mode: The operating mode for the SPI interface. The interface | 225 | * @mode: The operating mode for the SPI interface. The interface |
226 | * can operate as a full duplex (both Tx and Rx data paths | 226 | * can operate as a full duplex (both Tx and Rx data paths |
227 | * active) or as a halfplex (either the Tx data path is | 227 | * active) or as a halfplex (either the Tx data path is |
228 | * active or the Rx data path is active, but not both). | 228 | * active or the Rx data path is active, but not both). |
229 | * @timeout: Timeout to wait for link to be trained (in seconds) | 229 | * @timeout: Timeout to wait for link to be trained (in seconds) |
230 | * | 230 | * |
231 | * Returns Zero on success, non-zero error code on failure (will cause | 231 | * Returns Zero on success, non-zero error code on failure (will cause |
@@ -238,11 +238,11 @@ extern int cvmx_spi_training_cb(int interface, cvmx_spi_mode_t mode, | |||
238 | * Callback to perform calendar data synchronization | 238 | * Callback to perform calendar data synchronization |
239 | * | 239 | * |
240 | * @interface: The identifier of the packet interface to configure and | 240 | * @interface: The identifier of the packet interface to configure and |
241 | * use as a SPI interface. | 241 | * use as a SPI interface. |
242 | * @mode: The operating mode for the SPI interface. The interface | 242 | * @mode: The operating mode for the SPI interface. The interface |
243 | * can operate as a full duplex (both Tx and Rx data paths | 243 | * can operate as a full duplex (both Tx and Rx data paths |
244 | * active) or as a halfplex (either the Tx data path is | 244 | * active) or as a halfplex (either the Tx data path is |
245 | * active or the Rx data path is active, but not both). | 245 | * active or the Rx data path is active, but not both). |
246 | * @timeout: Timeout to wait for calendar data in seconds | 246 | * @timeout: Timeout to wait for calendar data in seconds |
247 | * | 247 | * |
248 | * Returns Zero on success, non-zero error code on failure (will cause | 248 | * Returns Zero on success, non-zero error code on failure (will cause |
@@ -255,11 +255,11 @@ extern int cvmx_spi_calendar_sync_cb(int interface, cvmx_spi_mode_t mode, | |||
255 | * Callback to handle interface up | 255 | * Callback to handle interface up |
256 | * | 256 | * |
257 | * @interface: The identifier of the packet interface to configure and | 257 | * @interface: The identifier of the packet interface to configure and |
258 | * use as a SPI interface. | 258 | * use as a SPI interface. |
259 | * @mode: The operating mode for the SPI interface. The interface | 259 | * @mode: The operating mode for the SPI interface. The interface |
260 | * can operate as a full duplex (both Tx and Rx data paths | 260 | * can operate as a full duplex (both Tx and Rx data paths |
261 | * active) or as a halfplex (either the Tx data path is | 261 | * active) or as a halfplex (either the Tx data path is |
262 | * active or the Rx data path is active, but not both). | 262 | * active or the Rx data path is active, but not both). |
263 | * | 263 | * |
264 | * Returns Zero on success, non-zero error code on failure (will cause | 264 | * Returns Zero on success, non-zero error code on failure (will cause |
265 | * SPI initialization to abort) | 265 | * SPI initialization to abort) |
diff --git a/arch/mips/include/asm/octeon/cvmx-spinlock.h b/arch/mips/include/asm/octeon/cvmx-spinlock.h index a672abb1bc4f..4f09cff8b8c0 100644 --- a/arch/mips/include/asm/octeon/cvmx-spinlock.h +++ b/arch/mips/include/asm/octeon/cvmx-spinlock.h | |||
@@ -26,7 +26,7 @@ | |||
26 | ***********************license end**************************************/ | 26 | ***********************license end**************************************/ |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * Implementation of spinlocks for Octeon CVMX. Although similar in | 29 | * Implementation of spinlocks for Octeon CVMX. Although similar in |
30 | * function to Linux kernel spinlocks, they are not compatible. | 30 | * function to Linux kernel spinlocks, they are not compatible. |
31 | * Octeon CVMX spinlocks are only used to synchronize with the boot | 31 | * Octeon CVMX spinlocks are only used to synchronize with the boot |
32 | * monitor and other non-Linux programs running in the system. | 32 | * monitor and other non-Linux programs running in the system. |
@@ -50,8 +50,8 @@ typedef struct { | |||
50 | } cvmx_spinlock_t; | 50 | } cvmx_spinlock_t; |
51 | 51 | ||
52 | /* note - macros not expanded in inline ASM, so values hardcoded */ | 52 | /* note - macros not expanded in inline ASM, so values hardcoded */ |
53 | #define CVMX_SPINLOCK_UNLOCKED_VAL 0 | 53 | #define CVMX_SPINLOCK_UNLOCKED_VAL 0 |
54 | #define CVMX_SPINLOCK_LOCKED_VAL 1 | 54 | #define CVMX_SPINLOCK_LOCKED_VAL 1 |
55 | 55 | ||
56 | #define CVMX_SPINLOCK_UNLOCKED_INITIALIZER {CVMX_SPINLOCK_UNLOCKED_VAL} | 56 | #define CVMX_SPINLOCK_UNLOCKED_INITIALIZER {CVMX_SPINLOCK_UNLOCKED_VAL} |
57 | 57 | ||
@@ -96,7 +96,7 @@ static inline void cvmx_spinlock_unlock(cvmx_spinlock_t *lock) | |||
96 | * @lock: pointer to lock structure | 96 | * @lock: pointer to lock structure |
97 | * | 97 | * |
98 | * Returns 0: lock successfully taken | 98 | * Returns 0: lock successfully taken |
99 | * 1: lock not taken, held by someone else | 99 | * 1: lock not taken, held by someone else |
100 | * These return values match the Linux semantics. | 100 | * These return values match the Linux semantics. |
101 | */ | 101 | */ |
102 | 102 | ||
@@ -104,16 +104,16 @@ static inline unsigned int cvmx_spinlock_trylock(cvmx_spinlock_t *lock) | |||
104 | { | 104 | { |
105 | unsigned int tmp; | 105 | unsigned int tmp; |
106 | 106 | ||
107 | __asm__ __volatile__(".set noreorder \n" | 107 | __asm__ __volatile__(".set noreorder \n" |
108 | "1: ll %[tmp], %[val] \n" | 108 | "1: ll %[tmp], %[val] \n" |
109 | /* if lock held, fail immediately */ | 109 | /* if lock held, fail immediately */ |
110 | " bnez %[tmp], 2f \n" | 110 | " bnez %[tmp], 2f \n" |
111 | " li %[tmp], 1 \n" | 111 | " li %[tmp], 1 \n" |
112 | " sc %[tmp], %[val] \n" | 112 | " sc %[tmp], %[val] \n" |
113 | " beqz %[tmp], 1b \n" | 113 | " beqz %[tmp], 1b \n" |
114 | " li %[tmp], 0 \n" | 114 | " li %[tmp], 0 \n" |
115 | "2: \n" | 115 | "2: \n" |
116 | ".set reorder \n" : | 116 | ".set reorder \n" : |
117 | [val] "+m"(lock->value), [tmp] "=&r"(tmp) | 117 | [val] "+m"(lock->value), [tmp] "=&r"(tmp) |
118 | : : "memory"); | 118 | : : "memory"); |
119 | 119 | ||
@@ -129,14 +129,14 @@ static inline void cvmx_spinlock_lock(cvmx_spinlock_t *lock) | |||
129 | { | 129 | { |
130 | unsigned int tmp; | 130 | unsigned int tmp; |
131 | 131 | ||
132 | __asm__ __volatile__(".set noreorder \n" | 132 | __asm__ __volatile__(".set noreorder \n" |
133 | "1: ll %[tmp], %[val] \n" | 133 | "1: ll %[tmp], %[val] \n" |
134 | " bnez %[tmp], 1b \n" | 134 | " bnez %[tmp], 1b \n" |
135 | " li %[tmp], 1 \n" | 135 | " li %[tmp], 1 \n" |
136 | " sc %[tmp], %[val] \n" | 136 | " sc %[tmp], %[val] \n" |
137 | " beqz %[tmp], 1b \n" | 137 | " beqz %[tmp], 1b \n" |
138 | " nop \n" | 138 | " nop \n" |
139 | ".set reorder \n" : | 139 | ".set reorder \n" : |
140 | [val] "+m"(lock->value), [tmp] "=&r"(tmp) | 140 | [val] "+m"(lock->value), [tmp] "=&r"(tmp) |
141 | : : "memory"); | 141 | : : "memory"); |
142 | 142 | ||
@@ -163,17 +163,17 @@ static inline void cvmx_spinlock_bit_lock(uint32_t *word) | |||
163 | unsigned int tmp; | 163 | unsigned int tmp; |
164 | unsigned int sav; | 164 | unsigned int sav; |
165 | 165 | ||
166 | __asm__ __volatile__(".set noreorder \n" | 166 | __asm__ __volatile__(".set noreorder \n" |
167 | ".set noat \n" | 167 | ".set noat \n" |
168 | "1: ll %[tmp], %[val] \n" | 168 | "1: ll %[tmp], %[val] \n" |
169 | " bbit1 %[tmp], 31, 1b \n" | 169 | " bbit1 %[tmp], 31, 1b \n" |
170 | " li $at, 1 \n" | 170 | " li $at, 1 \n" |
171 | " ins %[tmp], $at, 31, 1 \n" | 171 | " ins %[tmp], $at, 31, 1 \n" |
172 | " sc %[tmp], %[val] \n" | 172 | " sc %[tmp], %[val] \n" |
173 | " beqz %[tmp], 1b \n" | 173 | " beqz %[tmp], 1b \n" |
174 | " nop \n" | 174 | " nop \n" |
175 | ".set at \n" | 175 | ".set at \n" |
176 | ".set reorder \n" : | 176 | ".set reorder \n" : |
177 | [val] "+m"(*word), [tmp] "=&r"(tmp), [sav] "=&r"(sav) | 177 | [val] "+m"(*word), [tmp] "=&r"(tmp), [sav] "=&r"(sav) |
178 | : : "memory"); | 178 | : : "memory"); |
179 | 179 | ||
@@ -187,7 +187,7 @@ static inline void cvmx_spinlock_bit_lock(uint32_t *word) | |||
187 | * | 187 | * |
188 | * @word: word to lock bit 31 of | 188 | * @word: word to lock bit 31 of |
189 | * Returns 0: lock successfully taken | 189 | * Returns 0: lock successfully taken |
190 | * 1: lock not taken, held by someone else | 190 | * 1: lock not taken, held by someone else |
191 | * These return values match the Linux semantics. | 191 | * These return values match the Linux semantics. |
192 | */ | 192 | */ |
193 | static inline unsigned int cvmx_spinlock_bit_trylock(uint32_t *word) | 193 | static inline unsigned int cvmx_spinlock_bit_trylock(uint32_t *word) |
@@ -198,15 +198,15 @@ static inline unsigned int cvmx_spinlock_bit_trylock(uint32_t *word) | |||
198 | ".set noat\n" | 198 | ".set noat\n" |
199 | "1: ll %[tmp], %[val] \n" | 199 | "1: ll %[tmp], %[val] \n" |
200 | /* if lock held, fail immediately */ | 200 | /* if lock held, fail immediately */ |
201 | " bbit1 %[tmp], 31, 2f \n" | 201 | " bbit1 %[tmp], 31, 2f \n" |
202 | " li $at, 1 \n" | 202 | " li $at, 1 \n" |
203 | " ins %[tmp], $at, 31, 1 \n" | 203 | " ins %[tmp], $at, 31, 1 \n" |
204 | " sc %[tmp], %[val] \n" | 204 | " sc %[tmp], %[val] \n" |
205 | " beqz %[tmp], 1b \n" | 205 | " beqz %[tmp], 1b \n" |
206 | " li %[tmp], 0 \n" | 206 | " li %[tmp], 0 \n" |
207 | "2: \n" | 207 | "2: \n" |
208 | ".set at \n" | 208 | ".set at \n" |
209 | ".set reorder \n" : | 209 | ".set reorder \n" : |
210 | [val] "+m"(*word), [tmp] "=&r"(tmp) | 210 | [val] "+m"(*word), [tmp] "=&r"(tmp) |
211 | : : "memory"); | 211 | : : "memory"); |
212 | 212 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx-sysinfo.h b/arch/mips/include/asm/octeon/cvmx-sysinfo.h index 61dd5741afe4..2131197422e5 100644 --- a/arch/mips/include/asm/octeon/cvmx-sysinfo.h +++ b/arch/mips/include/asm/octeon/cvmx-sysinfo.h | |||
@@ -85,7 +85,7 @@ struct cvmx_sysinfo { | |||
85 | char board_serial_number[OCTEON_SERIAL_LEN]; | 85 | char board_serial_number[OCTEON_SERIAL_LEN]; |
86 | /* | 86 | /* |
87 | * Several boards support compact flash on the Octeon boot | 87 | * Several boards support compact flash on the Octeon boot |
88 | * bus. The CF memory spaces may be mapped to different | 88 | * bus. The CF memory spaces may be mapped to different |
89 | * addresses on different boards. These values will be 0 if | 89 | * addresses on different boards. These values will be 0 if |
90 | * CF is not present. Note that these addresses are physical | 90 | * CF is not present. Note that these addresses are physical |
91 | * addresses, and it is up to the application to use the | 91 | * addresses, and it is up to the application to use the |
@@ -123,25 +123,25 @@ extern struct cvmx_sysinfo *cvmx_sysinfo_get(void); | |||
123 | 123 | ||
124 | /** | 124 | /** |
125 | * This function is used in non-simple executive environments (such as | 125 | * This function is used in non-simple executive environments (such as |
126 | * Linux kernel, u-boot, etc.) to configure the minimal fields that | 126 | * Linux kernel, u-boot, etc.) to configure the minimal fields that |
127 | * are required to use simple executive files directly. | 127 | * are required to use simple executive files directly. |
128 | * | 128 | * |
129 | * Locking (if required) must be handled outside of this | 129 | * Locking (if required) must be handled outside of this |
130 | * function | 130 | * function |
131 | * | 131 | * |
132 | * @phy_mem_desc_ptr: Pointer to global physical memory descriptor | 132 | * @phy_mem_desc_ptr: Pointer to global physical memory descriptor |
133 | * (bootmem descriptor) @board_type: Octeon board | 133 | * (bootmem descriptor) @board_type: Octeon board |
134 | * type enumeration | 134 | * type enumeration |
135 | * | 135 | * |
136 | * @board_rev_major: | 136 | * @board_rev_major: |
137 | * Board major revision | 137 | * Board major revision |
138 | * @board_rev_minor: | 138 | * @board_rev_minor: |
139 | * Board minor revision | 139 | * Board minor revision |
140 | * @cpu_clock_hz: | 140 | * @cpu_clock_hz: |
141 | * CPU clock freqency in hertz | 141 | * CPU clock freqency in hertz |
142 | * | 142 | * |
143 | * Returns 0: Failure | 143 | * Returns 0: Failure |
144 | * 1: success | 144 | * 1: success |
145 | */ | 145 | */ |
146 | extern int cvmx_sysinfo_minimal_initialize(void *phy_mem_desc_ptr, | 146 | extern int cvmx_sysinfo_minimal_initialize(void *phy_mem_desc_ptr, |
147 | uint16_t board_type, | 147 | uint16_t board_type, |
diff --git a/arch/mips/include/asm/octeon/cvmx-wqe.h b/arch/mips/include/asm/octeon/cvmx-wqe.h index df762389e271..aa0d3d0de75c 100644 --- a/arch/mips/include/asm/octeon/cvmx-wqe.h +++ b/arch/mips/include/asm/octeon/cvmx-wqe.h | |||
@@ -101,23 +101,23 @@ typedef union { | |||
101 | * - 1 = Malformed L4 | 101 | * - 1 = Malformed L4 |
102 | * - 2 = L4 Checksum Error: the L4 checksum value is | 102 | * - 2 = L4 Checksum Error: the L4 checksum value is |
103 | * - 3 = UDP Length Error: The UDP length field would | 103 | * - 3 = UDP Length Error: The UDP length field would |
104 | * make the UDP data longer than what remains in | 104 | * make the UDP data longer than what remains in |
105 | * the IP packet (as defined by the IP header | 105 | * the IP packet (as defined by the IP header |
106 | * length field). | 106 | * length field). |
107 | * - 4 = Bad L4 Port: either the source or destination | 107 | * - 4 = Bad L4 Port: either the source or destination |
108 | * TCP/UDP port is 0. | 108 | * TCP/UDP port is 0. |
109 | * - 8 = TCP FIN Only: the packet is TCP and only the | 109 | * - 8 = TCP FIN Only: the packet is TCP and only the |
110 | * FIN flag set. | 110 | * FIN flag set. |
111 | * - 9 = TCP No Flags: the packet is TCP and no flags | 111 | * - 9 = TCP No Flags: the packet is TCP and no flags |
112 | * are set. | 112 | * are set. |
113 | * - 10 = TCP FIN RST: the packet is TCP and both FIN | 113 | * - 10 = TCP FIN RST: the packet is TCP and both FIN |
114 | * and RST are set. | 114 | * and RST are set. |
115 | * - 11 = TCP SYN URG: the packet is TCP and both SYN | 115 | * - 11 = TCP SYN URG: the packet is TCP and both SYN |
116 | * and URG are set. | 116 | * and URG are set. |
117 | * - 12 = TCP SYN RST: the packet is TCP and both SYN | 117 | * - 12 = TCP SYN RST: the packet is TCP and both SYN |
118 | * and RST are set. | 118 | * and RST are set. |
119 | * - 13 = TCP SYN FIN: the packet is TCP and both SYN | 119 | * - 13 = TCP SYN FIN: the packet is TCP and both SYN |
120 | * and FIN are set. | 120 | * and FIN are set. |
121 | */ | 121 | */ |
122 | uint64_t L4_error:1; | 122 | uint64_t L4_error:1; |
123 | /* set if the packet is a fragment */ | 123 | /* set if the packet is a fragment */ |
@@ -127,16 +127,16 @@ typedef union { | |||
127 | * failure indicated in err_code below, decode: | 127 | * failure indicated in err_code below, decode: |
128 | * | 128 | * |
129 | * - 1 = Not IP: the IP version field is neither 4 nor | 129 | * - 1 = Not IP: the IP version field is neither 4 nor |
130 | * 6. | 130 | * 6. |
131 | * - 2 = IPv4 Header Checksum Error: the IPv4 header | 131 | * - 2 = IPv4 Header Checksum Error: the IPv4 header |
132 | * has a checksum violation. | 132 | * has a checksum violation. |
133 | * - 3 = IP Malformed Header: the packet is not long | 133 | * - 3 = IP Malformed Header: the packet is not long |
134 | * enough to contain the IP header. | 134 | * enough to contain the IP header. |
135 | * - 4 = IP Malformed: the packet is not long enough | 135 | * - 4 = IP Malformed: the packet is not long enough |
136 | * to contain the bytes indicated by the IP | 136 | * to contain the bytes indicated by the IP |
137 | * header. Pad is allowed. | 137 | * header. Pad is allowed. |
138 | * - 5 = IP TTL Hop: the IPv4 TTL field or the IPv6 | 138 | * - 5 = IP TTL Hop: the IPv4 TTL field or the IPv6 |
139 | * Hop Count field are zero. | 139 | * Hop Count field are zero. |
140 | * - 6 = IP Options | 140 | * - 6 = IP Options |
141 | */ | 141 | */ |
142 | uint64_t IP_exc:1; | 142 | uint64_t IP_exc:1; |
@@ -243,46 +243,46 @@ typedef union { | |||
243 | * decode: | 243 | * decode: |
244 | * | 244 | * |
245 | * - 1 = partial error: a packet was partially | 245 | * - 1 = partial error: a packet was partially |
246 | * received, but internal buffering / bandwidth | 246 | * received, but internal buffering / bandwidth |
247 | * was not adequate to receive the entire | 247 | * was not adequate to receive the entire |
248 | * packet. | 248 | * packet. |
249 | * - 2 = jabber error: the RGMII packet was too large | 249 | * - 2 = jabber error: the RGMII packet was too large |
250 | * and is truncated. | 250 | * and is truncated. |
251 | * - 3 = overrun error: the RGMII packet is longer | 251 | * - 3 = overrun error: the RGMII packet is longer |
252 | * than allowed and had an FCS error. | 252 | * than allowed and had an FCS error. |
253 | * - 4 = oversize error: the RGMII packet is longer | 253 | * - 4 = oversize error: the RGMII packet is longer |
254 | * than allowed. | 254 | * than allowed. |
255 | * - 5 = alignment error: the RGMII packet is not an | 255 | * - 5 = alignment error: the RGMII packet is not an |
256 | * integer number of bytes | 256 | * integer number of bytes |
257 | * and had an FCS error (100M and 10M only). | 257 | * and had an FCS error (100M and 10M only). |
258 | * - 6 = fragment error: the RGMII packet is shorter | 258 | * - 6 = fragment error: the RGMII packet is shorter |
259 | * than allowed and had an FCS error. | 259 | * than allowed and had an FCS error. |
260 | * - 7 = GMX FCS error: the RGMII packet had an FCS | 260 | * - 7 = GMX FCS error: the RGMII packet had an FCS |
261 | * error. | 261 | * error. |
262 | * - 8 = undersize error: the RGMII packet is shorter | 262 | * - 8 = undersize error: the RGMII packet is shorter |
263 | * than allowed. | 263 | * than allowed. |
264 | * - 9 = extend error: the RGMII packet had an extend | 264 | * - 9 = extend error: the RGMII packet had an extend |
265 | * error. | 265 | * error. |
266 | * - 10 = length mismatch error: the RGMII packet had | 266 | * - 10 = length mismatch error: the RGMII packet had |
267 | * a length that did not match the length field | 267 | * a length that did not match the length field |
268 | * in the L2 HDR. | 268 | * in the L2 HDR. |
269 | * - 11 = RGMII RX error/SPI4 DIP4 Error: the RGMII | 269 | * - 11 = RGMII RX error/SPI4 DIP4 Error: the RGMII |
270 | * packet had one or more data reception errors | 270 | * packet had one or more data reception errors |
271 | * (RXERR) or the SPI4 packet had one or more | 271 | * (RXERR) or the SPI4 packet had one or more |
272 | * DIP4 errors. | 272 | * DIP4 errors. |
273 | * - 12 = RGMII skip error/SPI4 Abort Error: the RGMII | 273 | * - 12 = RGMII skip error/SPI4 Abort Error: the RGMII |
274 | * packet was not large enough to cover the | 274 | * packet was not large enough to cover the |
275 | * skipped bytes or the SPI4 packet was | 275 | * skipped bytes or the SPI4 packet was |
276 | * terminated with an About EOPS. | 276 | * terminated with an About EOPS. |
277 | * - 13 = RGMII nibble error/SPI4 Port NXA Error: the | 277 | * - 13 = RGMII nibble error/SPI4 Port NXA Error: the |
278 | * RGMII packet had a studder error (data not | 278 | * RGMII packet had a studder error (data not |
279 | * repeated - 10/100M only) or the SPI4 packet | 279 | * repeated - 10/100M only) or the SPI4 packet |
280 | * was sent to an NXA. | 280 | * was sent to an NXA. |
281 | * - 16 = FCS error: a SPI4.2 packet had an FCS error. | 281 | * - 16 = FCS error: a SPI4.2 packet had an FCS error. |
282 | * - 17 = Skip error: a packet was not large enough to | 282 | * - 17 = Skip error: a packet was not large enough to |
283 | * cover the skipped bytes. | 283 | * cover the skipped bytes. |
284 | * - 18 = L2 header malformed: the packet is not long | 284 | * - 18 = L2 header malformed: the packet is not long |
285 | * enough to contain the L2. | 285 | * enough to contain the L2. |
286 | */ | 286 | */ |
287 | 287 | ||
288 | uint64_t rcv_error:1; | 288 | uint64_t rcv_error:1; |
@@ -309,7 +309,7 @@ typedef struct { | |||
309 | 309 | ||
310 | /***************************************************************** | 310 | /***************************************************************** |
311 | * WORD 0 | 311 | * WORD 0 |
312 | * HW WRITE: the following 64 bits are filled by HW when a packet arrives | 312 | * HW WRITE: the following 64 bits are filled by HW when a packet arrives |
313 | */ | 313 | */ |
314 | 314 | ||
315 | /** | 315 | /** |
@@ -323,14 +323,14 @@ typedef struct { | |||
323 | /** | 323 | /** |
324 | * Next pointer used by hardware for list maintenance. | 324 | * Next pointer used by hardware for list maintenance. |
325 | * May be written/read by HW before the work queue | 325 | * May be written/read by HW before the work queue |
326 | * entry is scheduled to a PP | 326 | * entry is scheduled to a PP |
327 | * (Only 36 bits used in Octeon 1) | 327 | * (Only 36 bits used in Octeon 1) |
328 | */ | 328 | */ |
329 | uint64_t next_ptr:40; | 329 | uint64_t next_ptr:40; |
330 | 330 | ||
331 | /***************************************************************** | 331 | /***************************************************************** |
332 | * WORD 1 | 332 | * WORD 1 |
333 | * HW WRITE: the following 64 bits are filled by HW when a packet arrives | 333 | * HW WRITE: the following 64 bits are filled by HW when a packet arrives |
334 | */ | 334 | */ |
335 | 335 | ||
336 | /** | 336 | /** |
@@ -362,8 +362,8 @@ typedef struct { | |||
362 | 362 | ||
363 | /** | 363 | /** |
364 | * WORD 2 HW WRITE: the following 64-bits are filled in by | 364 | * WORD 2 HW WRITE: the following 64-bits are filled in by |
365 | * hardware when a packet arrives This indicates a variety of | 365 | * hardware when a packet arrives This indicates a variety of |
366 | * status and error conditions. | 366 | * status and error conditions. |
367 | */ | 367 | */ |
368 | cvmx_pip_wqe_word2 word2; | 368 | cvmx_pip_wqe_word2 word2; |
369 | 369 | ||
@@ -373,15 +373,15 @@ typedef struct { | |||
373 | union cvmx_buf_ptr packet_ptr; | 373 | union cvmx_buf_ptr packet_ptr; |
374 | 374 | ||
375 | /** | 375 | /** |
376 | * HW WRITE: octeon will fill in a programmable amount from the | 376 | * HW WRITE: octeon will fill in a programmable amount from the |
377 | * packet, up to (at most, but perhaps less) the amount | 377 | * packet, up to (at most, but perhaps less) the amount |
378 | * needed to fill the work queue entry to 128 bytes | 378 | * needed to fill the work queue entry to 128 bytes |
379 | * | 379 | * |
380 | * If the packet is recognized to be IP, the hardware starts | 380 | * If the packet is recognized to be IP, the hardware starts |
381 | * (except that the IPv4 header is padded for appropriate | 381 | * (except that the IPv4 header is padded for appropriate |
382 | * alignment) writing here where the IP header starts. If the | 382 | * alignment) writing here where the IP header starts. If the |
383 | * packet is not recognized to be IP, the hardware starts | 383 | * packet is not recognized to be IP, the hardware starts |
384 | * writing the beginning of the packet here. | 384 | * writing the beginning of the packet here. |
385 | */ | 385 | */ |
386 | uint8_t packet_data[96]; | 386 | uint8_t packet_data[96]; |
387 | 387 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h index db58beab6cb2..f991e7701d3d 100644 --- a/arch/mips/include/asm/octeon/cvmx.h +++ b/arch/mips/include/asm/octeon/cvmx.h | |||
@@ -76,14 +76,14 @@ enum cvmx_mips_space { | |||
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #if CVMX_ENABLE_DEBUG_PRINTS | 78 | #if CVMX_ENABLE_DEBUG_PRINTS |
79 | #define cvmx_dprintf printk | 79 | #define cvmx_dprintf printk |
80 | #else | 80 | #else |
81 | #define cvmx_dprintf(...) {} | 81 | #define cvmx_dprintf(...) {} |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | #define CVMX_MAX_CORES (16) | 84 | #define CVMX_MAX_CORES (16) |
85 | #define CVMX_CACHE_LINE_SIZE (128) /* In bytes */ | 85 | #define CVMX_CACHE_LINE_SIZE (128) /* In bytes */ |
86 | #define CVMX_CACHE_LINE_MASK (CVMX_CACHE_LINE_SIZE - 1) /* In bytes */ | 86 | #define CVMX_CACHE_LINE_MASK (CVMX_CACHE_LINE_SIZE - 1) /* In bytes */ |
87 | #define CVMX_CACHE_LINE_ALIGNED __attribute__ ((aligned(CVMX_CACHE_LINE_SIZE))) | 87 | #define CVMX_CACHE_LINE_ALIGNED __attribute__ ((aligned(CVMX_CACHE_LINE_SIZE))) |
88 | #define CAST64(v) ((long long)(long)(v)) | 88 | #define CAST64(v) ((long long)(long)(v)) |
89 | #define CASTPTR(type, v) ((type *)(long)(v)) | 89 | #define CASTPTR(type, v) ((type *)(long)(v)) |
@@ -133,8 +133,8 @@ static inline uint64_t cvmx_build_io_address(uint64_t major_did, | |||
133 | * | 133 | * |
134 | * Example: cvmx_build_bits(39,24,value) | 134 | * Example: cvmx_build_bits(39,24,value) |
135 | * <pre> | 135 | * <pre> |
136 | * 6 5 4 3 3 2 1 | 136 | * 6 5 4 3 3 2 1 |
137 | * 3 5 7 9 1 3 5 7 0 | 137 | * 3 5 7 9 1 3 5 7 0 |
138 | * +-------+-------+-------+-------+-------+-------+-------+------+ | 138 | * +-------+-------+-------+-------+-------+-------+-------+------+ |
139 | * 000000000000000000000000___________value000000000000000000000000 | 139 | * 000000000000000000000000___________value000000000000000000000000 |
140 | * </pre> | 140 | * </pre> |
@@ -183,7 +183,7 @@ static inline uint64_t cvmx_ptr_to_phys(void *ptr) | |||
183 | * memory pointer (void *). | 183 | * memory pointer (void *). |
184 | * | 184 | * |
185 | * @physical_address: | 185 | * @physical_address: |
186 | * Hardware physical address to memory | 186 | * Hardware physical address to memory |
187 | * Returns Pointer to memory | 187 | * Returns Pointer to memory |
188 | */ | 188 | */ |
189 | static inline void *cvmx_phys_to_ptr(uint64_t physical_address) | 189 | static inline void *cvmx_phys_to_ptr(uint64_t physical_address) |
@@ -207,10 +207,10 @@ static inline void *cvmx_phys_to_ptr(uint64_t physical_address) | |||
207 | 207 | ||
208 | /* We have a full 64bit ABI. Writing to a 64bit address can be done with | 208 | /* We have a full 64bit ABI. Writing to a 64bit address can be done with |
209 | a simple volatile pointer */ | 209 | a simple volatile pointer */ |
210 | #define CVMX_BUILD_WRITE64(TYPE, ST) \ | 210 | #define CVMX_BUILD_WRITE64(TYPE, ST) \ |
211 | static inline void cvmx_write64_##TYPE(uint64_t addr, TYPE##_t val) \ | 211 | static inline void cvmx_write64_##TYPE(uint64_t addr, TYPE##_t val) \ |
212 | { \ | 212 | { \ |
213 | *CASTPTR(volatile TYPE##_t, addr) = val; \ | 213 | *CASTPTR(volatile TYPE##_t, addr) = val; \ |
214 | } | 214 | } |
215 | 215 | ||
216 | 216 | ||
@@ -221,19 +221,19 @@ static inline void cvmx_write64_##TYPE(uint64_t addr, TYPE##_t val) \ | |||
221 | 221 | ||
222 | /* We have a full 64bit ABI. Writing to a 64bit address can be done with | 222 | /* We have a full 64bit ABI. Writing to a 64bit address can be done with |
223 | a simple volatile pointer */ | 223 | a simple volatile pointer */ |
224 | #define CVMX_BUILD_READ64(TYPE, LT) \ | 224 | #define CVMX_BUILD_READ64(TYPE, LT) \ |
225 | static inline TYPE##_t cvmx_read64_##TYPE(uint64_t addr) \ | 225 | static inline TYPE##_t cvmx_read64_##TYPE(uint64_t addr) \ |
226 | { \ | 226 | { \ |
227 | return *CASTPTR(volatile TYPE##_t, addr); \ | 227 | return *CASTPTR(volatile TYPE##_t, addr); \ |
228 | } | 228 | } |
229 | 229 | ||
230 | 230 | ||
231 | /* The following defines 8 functions for writing to a 64bit address. Each | 231 | /* The following defines 8 functions for writing to a 64bit address. Each |
232 | takes two arguments, the address and the value to write. | 232 | takes two arguments, the address and the value to write. |
233 | cvmx_write64_int64 cvmx_write64_uint64 | 233 | cvmx_write64_int64 cvmx_write64_uint64 |
234 | cvmx_write64_int32 cvmx_write64_uint32 | 234 | cvmx_write64_int32 cvmx_write64_uint32 |
235 | cvmx_write64_int16 cvmx_write64_uint16 | 235 | cvmx_write64_int16 cvmx_write64_uint16 |
236 | cvmx_write64_int8 cvmx_write64_uint8 */ | 236 | cvmx_write64_int8 cvmx_write64_uint8 */ |
237 | CVMX_BUILD_WRITE64(int64, "sd"); | 237 | CVMX_BUILD_WRITE64(int64, "sd"); |
238 | CVMX_BUILD_WRITE64(int32, "sw"); | 238 | CVMX_BUILD_WRITE64(int32, "sw"); |
239 | CVMX_BUILD_WRITE64(int16, "sh"); | 239 | CVMX_BUILD_WRITE64(int16, "sh"); |
@@ -246,10 +246,10 @@ CVMX_BUILD_WRITE64(uint8, "sb"); | |||
246 | 246 | ||
247 | /* The following defines 8 functions for reading from a 64bit address. Each | 247 | /* The following defines 8 functions for reading from a 64bit address. Each |
248 | takes the address as the only argument | 248 | takes the address as the only argument |
249 | cvmx_read64_int64 cvmx_read64_uint64 | 249 | cvmx_read64_int64 cvmx_read64_uint64 |
250 | cvmx_read64_int32 cvmx_read64_uint32 | 250 | cvmx_read64_int32 cvmx_read64_uint32 |
251 | cvmx_read64_int16 cvmx_read64_uint16 | 251 | cvmx_read64_int16 cvmx_read64_uint16 |
252 | cvmx_read64_int8 cvmx_read64_uint8 */ | 252 | cvmx_read64_int8 cvmx_read64_uint8 */ |
253 | CVMX_BUILD_READ64(int64, "ld"); | 253 | CVMX_BUILD_READ64(int64, "ld"); |
254 | CVMX_BUILD_READ64(int32, "lw"); | 254 | CVMX_BUILD_READ64(int32, "lw"); |
255 | CVMX_BUILD_READ64(int16, "lh"); | 255 | CVMX_BUILD_READ64(int16, "lh"); |
@@ -389,7 +389,7 @@ static inline void cvmx_wait(uint64_t cycles) | |||
389 | 389 | ||
390 | /** | 390 | /** |
391 | * Reads a chip global cycle counter. This counts CPU cycles since | 391 | * Reads a chip global cycle counter. This counts CPU cycles since |
392 | * chip reset. The counter is 64 bit. | 392 | * chip reset. The counter is 64 bit. |
393 | * This register does not exist on CN38XX pass 1 silicion | 393 | * This register does not exist on CN38XX pass 1 silicion |
394 | * | 394 | * |
395 | * Returns Global chip cycle count since chip reset. | 395 | * Returns Global chip cycle count since chip reset. |
@@ -453,7 +453,7 @@ static inline uint32_t cvmx_octeon_num_cores(void) | |||
453 | 453 | ||
454 | /** | 454 | /** |
455 | * Read a byte of fuse data | 455 | * Read a byte of fuse data |
456 | * @byte_addr: address to read | 456 | * @byte_addr: address to read |
457 | * | 457 | * |
458 | * Returns fuse value: 0 or 1 | 458 | * Returns fuse value: 0 or 1 |
459 | */ | 459 | */ |
diff --git a/arch/mips/include/asm/octeon/octeon-feature.h b/arch/mips/include/asm/octeon/octeon-feature.h index 8008da2f8779..90e05a8d4b15 100644 --- a/arch/mips/include/asm/octeon/octeon-feature.h +++ b/arch/mips/include/asm/octeon/octeon-feature.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <asm/octeon/cvmx-rnm-defs.h> | 35 | #include <asm/octeon/cvmx-rnm-defs.h> |
36 | 36 | ||
37 | enum octeon_feature { | 37 | enum octeon_feature { |
38 | /* CN68XX uses port kinds for packet interface */ | 38 | /* CN68XX uses port kinds for packet interface */ |
39 | OCTEON_FEATURE_PKND, | 39 | OCTEON_FEATURE_PKND, |
40 | /* CN68XX has different fields in word0 - word2 */ | 40 | /* CN68XX has different fields in word0 - word2 */ |
41 | OCTEON_FEATURE_CN68XX_WQE, | 41 | OCTEON_FEATURE_CN68XX_WQE, |
@@ -51,7 +51,7 @@ enum octeon_feature { | |||
51 | OCTEON_FEATURE_DORM_CRYPTO, | 51 | OCTEON_FEATURE_DORM_CRYPTO, |
52 | /* Does this Octeon support PCI express? */ | 52 | /* Does this Octeon support PCI express? */ |
53 | OCTEON_FEATURE_PCIE, | 53 | OCTEON_FEATURE_PCIE, |
54 | /* Does this Octeon support SRIOs */ | 54 | /* Does this Octeon support SRIOs */ |
55 | OCTEON_FEATURE_SRIO, | 55 | OCTEON_FEATURE_SRIO, |
56 | /* Does this Octeon support Interlaken */ | 56 | /* Does this Octeon support Interlaken */ |
57 | OCTEON_FEATURE_ILK, | 57 | OCTEON_FEATURE_ILK, |
@@ -75,7 +75,7 @@ enum octeon_feature { | |||
75 | /* Octeon MDIO block supports clause 45 transactions for 10 | 75 | /* Octeon MDIO block supports clause 45 transactions for 10 |
76 | * Gig support */ | 76 | * Gig support */ |
77 | OCTEON_FEATURE_MDIO_CLAUSE_45, | 77 | OCTEON_FEATURE_MDIO_CLAUSE_45, |
78 | /* | 78 | /* |
79 | * CN52XX and CN56XX used a block named NPEI for PCIe | 79 | * CN52XX and CN56XX used a block named NPEI for PCIe |
80 | * access. Newer chips replaced this with SLI+DPI. | 80 | * access. Newer chips replaced this with SLI+DPI. |
81 | */ | 81 | */ |
@@ -94,10 +94,10 @@ static inline int cvmx_fuse_read(int fuse); | |||
94 | * be kept out of fast path code. | 94 | * be kept out of fast path code. |
95 | * | 95 | * |
96 | * @feature: Feature to check for. This should always be a constant so the | 96 | * @feature: Feature to check for. This should always be a constant so the |
97 | * compiler can remove the switch statement through optimization. | 97 | * compiler can remove the switch statement through optimization. |
98 | * | 98 | * |
99 | * Returns Non zero if the feature exists. Zero if the feature does not | 99 | * Returns Non zero if the feature exists. Zero if the feature does not |
100 | * exist. | 100 | * exist. |
101 | */ | 101 | */ |
102 | static inline int octeon_has_feature(enum octeon_feature feature) | 102 | static inline int octeon_has_feature(enum octeon_feature feature) |
103 | { | 103 | { |
diff --git a/arch/mips/include/asm/octeon/octeon-model.h b/arch/mips/include/asm/octeon/octeon-model.h index 349bb2ba840c..e2c122c6a657 100644 --- a/arch/mips/include/asm/octeon/octeon-model.h +++ b/arch/mips/include/asm/octeon/octeon-model.h | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | /* | 30 | /* |
31 | * The defines below should be used with the OCTEON_IS_MODEL() macro | 31 | * The defines below should be used with the OCTEON_IS_MODEL() macro |
32 | * to determine what model of chip the software is running on. Models | 32 | * to determine what model of chip the software is running on. Models |
33 | * ending in 'XX' match multiple models (families), while specific | 33 | * ending in 'XX' match multiple models (families), while specific |
34 | * models match only that model. If a pass (revision) is specified, | 34 | * models match only that model. If a pass (revision) is specified, |
35 | * then only that revision will be matched. Care should be taken when | 35 | * then only that revision will be matched. Care should be taken when |
@@ -40,183 +40,183 @@ | |||
40 | * subject to change at anytime without notice. | 40 | * subject to change at anytime without notice. |
41 | * | 41 | * |
42 | * NOTE: only the OCTEON_IS_MODEL() macro/function and the OCTEON_CN* | 42 | * NOTE: only the OCTEON_IS_MODEL() macro/function and the OCTEON_CN* |
43 | * macros should be used outside of this file. All other macros are | 43 | * macros should be used outside of this file. All other macros are |
44 | * for internal use only, and may change without notice. | 44 | * for internal use only, and may change without notice. |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #define OCTEON_FAMILY_MASK 0x00ffff00 | 47 | #define OCTEON_FAMILY_MASK 0x00ffff00 |
48 | 48 | ||
49 | /* Flag bits in top byte */ | 49 | /* Flag bits in top byte */ |
50 | /* Ignores revision in model checks */ | 50 | /* Ignores revision in model checks */ |
51 | #define OM_IGNORE_REVISION 0x01000000 | 51 | #define OM_IGNORE_REVISION 0x01000000 |
52 | /* Check submodels */ | 52 | /* Check submodels */ |
53 | #define OM_CHECK_SUBMODEL 0x02000000 | 53 | #define OM_CHECK_SUBMODEL 0x02000000 |
54 | /* Match all models previous than the one specified */ | 54 | /* Match all models previous than the one specified */ |
55 | #define OM_MATCH_PREVIOUS_MODELS 0x04000000 | 55 | #define OM_MATCH_PREVIOUS_MODELS 0x04000000 |
56 | /* Ignores the minor revison on newer parts */ | 56 | /* Ignores the minor revison on newer parts */ |
57 | #define OM_IGNORE_MINOR_REVISION 0x08000000 | 57 | #define OM_IGNORE_MINOR_REVISION 0x08000000 |
58 | #define OM_FLAG_MASK 0xff000000 | 58 | #define OM_FLAG_MASK 0xff000000 |
59 | 59 | ||
60 | /* Match all cn5XXX Octeon models. */ | 60 | /* Match all cn5XXX Octeon models. */ |
61 | #define OM_MATCH_5XXX_FAMILY_MODELS 0x20000000 | 61 | #define OM_MATCH_5XXX_FAMILY_MODELS 0x20000000 |
62 | /* Match all cn6XXX Octeon models. */ | 62 | /* Match all cn6XXX Octeon models. */ |
63 | #define OM_MATCH_6XXX_FAMILY_MODELS 0x40000000 | 63 | #define OM_MATCH_6XXX_FAMILY_MODELS 0x40000000 |
64 | /* Match all cnf7XXX Octeon models. */ | 64 | /* Match all cnf7XXX Octeon models. */ |
65 | #define OM_MATCH_F7XXX_FAMILY_MODELS 0x80000000 | 65 | #define OM_MATCH_F7XXX_FAMILY_MODELS 0x80000000 |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * CNF7XXX models with new revision encoding | 68 | * CNF7XXX models with new revision encoding |
69 | */ | 69 | */ |
70 | #define OCTEON_CNF71XX_PASS1_0 0x000d9400 | 70 | #define OCTEON_CNF71XX_PASS1_0 0x000d9400 |
71 | 71 | ||
72 | #define OCTEON_CNF71XX (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_REVISION) | 72 | #define OCTEON_CNF71XX (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_REVISION) |
73 | #define OCTEON_CNF71XX_PASS1_X (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 73 | #define OCTEON_CNF71XX_PASS1_X (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * CN6XXX models with new revision encoding | 76 | * CN6XXX models with new revision encoding |
77 | */ | 77 | */ |
78 | #define OCTEON_CN68XX_PASS1_0 0x000d9100 | 78 | #define OCTEON_CN68XX_PASS1_0 0x000d9100 |
79 | #define OCTEON_CN68XX_PASS1_1 0x000d9101 | 79 | #define OCTEON_CN68XX_PASS1_1 0x000d9101 |
80 | #define OCTEON_CN68XX_PASS1_2 0x000d9102 | 80 | #define OCTEON_CN68XX_PASS1_2 0x000d9102 |
81 | #define OCTEON_CN68XX_PASS2_0 0x000d9108 | 81 | #define OCTEON_CN68XX_PASS2_0 0x000d9108 |
82 | 82 | ||
83 | #define OCTEON_CN68XX (OCTEON_CN68XX_PASS2_0 | OM_IGNORE_REVISION) | 83 | #define OCTEON_CN68XX (OCTEON_CN68XX_PASS2_0 | OM_IGNORE_REVISION) |
84 | #define OCTEON_CN68XX_PASS1_X (OCTEON_CN68XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 84 | #define OCTEON_CN68XX_PASS1_X (OCTEON_CN68XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
85 | #define OCTEON_CN68XX_PASS2_X (OCTEON_CN68XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 85 | #define OCTEON_CN68XX_PASS2_X (OCTEON_CN68XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
86 | 86 | ||
87 | #define OCTEON_CN68XX_PASS1 OCTEON_CN68XX_PASS1_X | 87 | #define OCTEON_CN68XX_PASS1 OCTEON_CN68XX_PASS1_X |
88 | #define OCTEON_CN68XX_PASS2 OCTEON_CN68XX_PASS2_X | 88 | #define OCTEON_CN68XX_PASS2 OCTEON_CN68XX_PASS2_X |
89 | 89 | ||
90 | #define OCTEON_CN66XX_PASS1_0 0x000d9200 | 90 | #define OCTEON_CN66XX_PASS1_0 0x000d9200 |
91 | #define OCTEON_CN66XX_PASS1_2 0x000d9202 | 91 | #define OCTEON_CN66XX_PASS1_2 0x000d9202 |
92 | 92 | ||
93 | #define OCTEON_CN66XX (OCTEON_CN66XX_PASS1_0 | OM_IGNORE_REVISION) | 93 | #define OCTEON_CN66XX (OCTEON_CN66XX_PASS1_0 | OM_IGNORE_REVISION) |
94 | #define OCTEON_CN66XX_PASS1_X (OCTEON_CN66XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 94 | #define OCTEON_CN66XX_PASS1_X (OCTEON_CN66XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
95 | 95 | ||
96 | #define OCTEON_CN63XX_PASS1_0 0x000d9000 | 96 | #define OCTEON_CN63XX_PASS1_0 0x000d9000 |
97 | #define OCTEON_CN63XX_PASS1_1 0x000d9001 | 97 | #define OCTEON_CN63XX_PASS1_1 0x000d9001 |
98 | #define OCTEON_CN63XX_PASS1_2 0x000d9002 | 98 | #define OCTEON_CN63XX_PASS1_2 0x000d9002 |
99 | #define OCTEON_CN63XX_PASS2_0 0x000d9008 | 99 | #define OCTEON_CN63XX_PASS2_0 0x000d9008 |
100 | #define OCTEON_CN63XX_PASS2_1 0x000d9009 | 100 | #define OCTEON_CN63XX_PASS2_1 0x000d9009 |
101 | #define OCTEON_CN63XX_PASS2_2 0x000d900a | 101 | #define OCTEON_CN63XX_PASS2_2 0x000d900a |
102 | 102 | ||
103 | #define OCTEON_CN63XX (OCTEON_CN63XX_PASS2_0 | OM_IGNORE_REVISION) | 103 | #define OCTEON_CN63XX (OCTEON_CN63XX_PASS2_0 | OM_IGNORE_REVISION) |
104 | #define OCTEON_CN63XX_PASS1_X (OCTEON_CN63XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 104 | #define OCTEON_CN63XX_PASS1_X (OCTEON_CN63XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
105 | #define OCTEON_CN63XX_PASS2_X (OCTEON_CN63XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 105 | #define OCTEON_CN63XX_PASS2_X (OCTEON_CN63XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
106 | 106 | ||
107 | #define OCTEON_CN61XX_PASS1_0 0x000d9300 | 107 | #define OCTEON_CN61XX_PASS1_0 0x000d9300 |
108 | 108 | ||
109 | #define OCTEON_CN61XX (OCTEON_CN61XX_PASS1_0 | OM_IGNORE_REVISION) | 109 | #define OCTEON_CN61XX (OCTEON_CN61XX_PASS1_0 | OM_IGNORE_REVISION) |
110 | #define OCTEON_CN61XX_PASS1_X (OCTEON_CN61XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 110 | #define OCTEON_CN61XX_PASS1_X (OCTEON_CN61XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * CN5XXX models with new revision encoding | 113 | * CN5XXX models with new revision encoding |
114 | */ | 114 | */ |
115 | #define OCTEON_CN58XX_PASS1_0 0x000d0300 | 115 | #define OCTEON_CN58XX_PASS1_0 0x000d0300 |
116 | #define OCTEON_CN58XX_PASS1_1 0x000d0301 | 116 | #define OCTEON_CN58XX_PASS1_1 0x000d0301 |
117 | #define OCTEON_CN58XX_PASS1_2 0x000d0303 | 117 | #define OCTEON_CN58XX_PASS1_2 0x000d0303 |
118 | #define OCTEON_CN58XX_PASS2_0 0x000d0308 | 118 | #define OCTEON_CN58XX_PASS2_0 0x000d0308 |
119 | #define OCTEON_CN58XX_PASS2_1 0x000d0309 | 119 | #define OCTEON_CN58XX_PASS2_1 0x000d0309 |
120 | #define OCTEON_CN58XX_PASS2_2 0x000d030a | 120 | #define OCTEON_CN58XX_PASS2_2 0x000d030a |
121 | #define OCTEON_CN58XX_PASS2_3 0x000d030b | 121 | #define OCTEON_CN58XX_PASS2_3 0x000d030b |
122 | 122 | ||
123 | #define OCTEON_CN58XX (OCTEON_CN58XX_PASS1_0 | OM_IGNORE_REVISION) | 123 | #define OCTEON_CN58XX (OCTEON_CN58XX_PASS1_0 | OM_IGNORE_REVISION) |
124 | #define OCTEON_CN58XX_PASS1_X (OCTEON_CN58XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 124 | #define OCTEON_CN58XX_PASS1_X (OCTEON_CN58XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
125 | #define OCTEON_CN58XX_PASS2_X (OCTEON_CN58XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 125 | #define OCTEON_CN58XX_PASS2_X (OCTEON_CN58XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
126 | #define OCTEON_CN58XX_PASS1 OCTEON_CN58XX_PASS1_X | 126 | #define OCTEON_CN58XX_PASS1 OCTEON_CN58XX_PASS1_X |
127 | #define OCTEON_CN58XX_PASS2 OCTEON_CN58XX_PASS2_X | 127 | #define OCTEON_CN58XX_PASS2 OCTEON_CN58XX_PASS2_X |
128 | 128 | ||
129 | #define OCTEON_CN56XX_PASS1_0 0x000d0400 | 129 | #define OCTEON_CN56XX_PASS1_0 0x000d0400 |
130 | #define OCTEON_CN56XX_PASS1_1 0x000d0401 | 130 | #define OCTEON_CN56XX_PASS1_1 0x000d0401 |
131 | #define OCTEON_CN56XX_PASS2_0 0x000d0408 | 131 | #define OCTEON_CN56XX_PASS2_0 0x000d0408 |
132 | #define OCTEON_CN56XX_PASS2_1 0x000d0409 | 132 | #define OCTEON_CN56XX_PASS2_1 0x000d0409 |
133 | 133 | ||
134 | #define OCTEON_CN56XX (OCTEON_CN56XX_PASS2_0 | OM_IGNORE_REVISION) | 134 | #define OCTEON_CN56XX (OCTEON_CN56XX_PASS2_0 | OM_IGNORE_REVISION) |
135 | #define OCTEON_CN56XX_PASS1_X (OCTEON_CN56XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 135 | #define OCTEON_CN56XX_PASS1_X (OCTEON_CN56XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
136 | #define OCTEON_CN56XX_PASS2_X (OCTEON_CN56XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 136 | #define OCTEON_CN56XX_PASS2_X (OCTEON_CN56XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
137 | #define OCTEON_CN56XX_PASS1 OCTEON_CN56XX_PASS1_X | 137 | #define OCTEON_CN56XX_PASS1 OCTEON_CN56XX_PASS1_X |
138 | #define OCTEON_CN56XX_PASS2 OCTEON_CN56XX_PASS2_X | 138 | #define OCTEON_CN56XX_PASS2 OCTEON_CN56XX_PASS2_X |
139 | 139 | ||
140 | #define OCTEON_CN57XX OCTEON_CN56XX | 140 | #define OCTEON_CN57XX OCTEON_CN56XX |
141 | #define OCTEON_CN57XX_PASS1 OCTEON_CN56XX_PASS1 | 141 | #define OCTEON_CN57XX_PASS1 OCTEON_CN56XX_PASS1 |
142 | #define OCTEON_CN57XX_PASS2 OCTEON_CN56XX_PASS2 | 142 | #define OCTEON_CN57XX_PASS2 OCTEON_CN56XX_PASS2 |
143 | 143 | ||
144 | #define OCTEON_CN55XX OCTEON_CN56XX | 144 | #define OCTEON_CN55XX OCTEON_CN56XX |
145 | #define OCTEON_CN55XX_PASS1 OCTEON_CN56XX_PASS1 | 145 | #define OCTEON_CN55XX_PASS1 OCTEON_CN56XX_PASS1 |
146 | #define OCTEON_CN55XX_PASS2 OCTEON_CN56XX_PASS2 | 146 | #define OCTEON_CN55XX_PASS2 OCTEON_CN56XX_PASS2 |
147 | 147 | ||
148 | #define OCTEON_CN54XX OCTEON_CN56XX | 148 | #define OCTEON_CN54XX OCTEON_CN56XX |
149 | #define OCTEON_CN54XX_PASS1 OCTEON_CN56XX_PASS1 | 149 | #define OCTEON_CN54XX_PASS1 OCTEON_CN56XX_PASS1 |
150 | #define OCTEON_CN54XX_PASS2 OCTEON_CN56XX_PASS2 | 150 | #define OCTEON_CN54XX_PASS2 OCTEON_CN56XX_PASS2 |
151 | 151 | ||
152 | #define OCTEON_CN50XX_PASS1_0 0x000d0600 | 152 | #define OCTEON_CN50XX_PASS1_0 0x000d0600 |
153 | 153 | ||
154 | #define OCTEON_CN50XX (OCTEON_CN50XX_PASS1_0 | OM_IGNORE_REVISION) | 154 | #define OCTEON_CN50XX (OCTEON_CN50XX_PASS1_0 | OM_IGNORE_REVISION) |
155 | #define OCTEON_CN50XX_PASS1_X (OCTEON_CN50XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 155 | #define OCTEON_CN50XX_PASS1_X (OCTEON_CN50XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
156 | #define OCTEON_CN50XX_PASS1 OCTEON_CN50XX_PASS1_X | 156 | #define OCTEON_CN50XX_PASS1 OCTEON_CN50XX_PASS1_X |
157 | 157 | ||
158 | /* | 158 | /* |
159 | * NOTE: Octeon CN5000F model is not identifiable using the | 159 | * NOTE: Octeon CN5000F model is not identifiable using the |
160 | * OCTEON_IS_MODEL() functions, but are treated as CN50XX. | 160 | * OCTEON_IS_MODEL() functions, but are treated as CN50XX. |
161 | */ | 161 | */ |
162 | 162 | ||
163 | #define OCTEON_CN52XX_PASS1_0 0x000d0700 | 163 | #define OCTEON_CN52XX_PASS1_0 0x000d0700 |
164 | #define OCTEON_CN52XX_PASS2_0 0x000d0708 | 164 | #define OCTEON_CN52XX_PASS2_0 0x000d0708 |
165 | 165 | ||
166 | #define OCTEON_CN52XX (OCTEON_CN52XX_PASS2_0 | OM_IGNORE_REVISION) | 166 | #define OCTEON_CN52XX (OCTEON_CN52XX_PASS2_0 | OM_IGNORE_REVISION) |
167 | #define OCTEON_CN52XX_PASS1_X (OCTEON_CN52XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 167 | #define OCTEON_CN52XX_PASS1_X (OCTEON_CN52XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
168 | #define OCTEON_CN52XX_PASS2_X (OCTEON_CN52XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 168 | #define OCTEON_CN52XX_PASS2_X (OCTEON_CN52XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
169 | #define OCTEON_CN52XX_PASS1 OCTEON_CN52XX_PASS1_X | 169 | #define OCTEON_CN52XX_PASS1 OCTEON_CN52XX_PASS1_X |
170 | #define OCTEON_CN52XX_PASS2 OCTEON_CN52XX_PASS2_X | 170 | #define OCTEON_CN52XX_PASS2 OCTEON_CN52XX_PASS2_X |
171 | 171 | ||
172 | /* | 172 | /* |
173 | * CN3XXX models with old revision enconding | 173 | * CN3XXX models with old revision enconding |
174 | */ | 174 | */ |
175 | #define OCTEON_CN38XX_PASS1 0x000d0000 | 175 | #define OCTEON_CN38XX_PASS1 0x000d0000 |
176 | #define OCTEON_CN38XX_PASS2 0x000d0001 | 176 | #define OCTEON_CN38XX_PASS2 0x000d0001 |
177 | #define OCTEON_CN38XX_PASS3 0x000d0003 | 177 | #define OCTEON_CN38XX_PASS3 0x000d0003 |
178 | #define OCTEON_CN38XX (OCTEON_CN38XX_PASS3 | OM_IGNORE_REVISION) | 178 | #define OCTEON_CN38XX (OCTEON_CN38XX_PASS3 | OM_IGNORE_REVISION) |
179 | 179 | ||
180 | #define OCTEON_CN36XX OCTEON_CN38XX | 180 | #define OCTEON_CN36XX OCTEON_CN38XX |
181 | #define OCTEON_CN36XX_PASS2 OCTEON_CN38XX_PASS2 | 181 | #define OCTEON_CN36XX_PASS2 OCTEON_CN38XX_PASS2 |
182 | #define OCTEON_CN36XX_PASS3 OCTEON_CN38XX_PASS3 | 182 | #define OCTEON_CN36XX_PASS3 OCTEON_CN38XX_PASS3 |
183 | 183 | ||
184 | /* The OCTEON_CN31XX matches CN31XX models and the CN3020 */ | 184 | /* The OCTEON_CN31XX matches CN31XX models and the CN3020 */ |
185 | #define OCTEON_CN31XX_PASS1 0x000d0100 | 185 | #define OCTEON_CN31XX_PASS1 0x000d0100 |
186 | #define OCTEON_CN31XX_PASS1_1 0x000d0102 | 186 | #define OCTEON_CN31XX_PASS1_1 0x000d0102 |
187 | #define OCTEON_CN31XX (OCTEON_CN31XX_PASS1 | OM_IGNORE_REVISION) | 187 | #define OCTEON_CN31XX (OCTEON_CN31XX_PASS1 | OM_IGNORE_REVISION) |
188 | 188 | ||
189 | /* | 189 | /* |
190 | * This model is only used for internal checks, it is not a valid | 190 | * This model is only used for internal checks, it is not a valid |
191 | * model for the OCTEON_MODEL environment variable. This matches the | 191 | * model for the OCTEON_MODEL environment variable. This matches the |
192 | * CN3010 and CN3005 but NOT the CN3020. | 192 | * CN3010 and CN3005 but NOT the CN3020. |
193 | */ | 193 | */ |
194 | #define OCTEON_CN30XX_PASS1 0x000d0200 | 194 | #define OCTEON_CN30XX_PASS1 0x000d0200 |
195 | #define OCTEON_CN30XX_PASS1_1 0x000d0202 | 195 | #define OCTEON_CN30XX_PASS1_1 0x000d0202 |
196 | #define OCTEON_CN30XX (OCTEON_CN30XX_PASS1 | OM_IGNORE_REVISION) | 196 | #define OCTEON_CN30XX (OCTEON_CN30XX_PASS1 | OM_IGNORE_REVISION) |
197 | 197 | ||
198 | #define OCTEON_CN3005_PASS1 (0x000d0210 | OM_CHECK_SUBMODEL) | 198 | #define OCTEON_CN3005_PASS1 (0x000d0210 | OM_CHECK_SUBMODEL) |
199 | #define OCTEON_CN3005_PASS1_0 (0x000d0210 | OM_CHECK_SUBMODEL) | 199 | #define OCTEON_CN3005_PASS1_0 (0x000d0210 | OM_CHECK_SUBMODEL) |
200 | #define OCTEON_CN3005_PASS1_1 (0x000d0212 | OM_CHECK_SUBMODEL) | 200 | #define OCTEON_CN3005_PASS1_1 (0x000d0212 | OM_CHECK_SUBMODEL) |
201 | #define OCTEON_CN3005 (OCTEON_CN3005_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) | 201 | #define OCTEON_CN3005 (OCTEON_CN3005_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) |
202 | 202 | ||
203 | #define OCTEON_CN3010_PASS1 (0x000d0200 | OM_CHECK_SUBMODEL) | 203 | #define OCTEON_CN3010_PASS1 (0x000d0200 | OM_CHECK_SUBMODEL) |
204 | #define OCTEON_CN3010_PASS1_0 (0x000d0200 | OM_CHECK_SUBMODEL) | 204 | #define OCTEON_CN3010_PASS1_0 (0x000d0200 | OM_CHECK_SUBMODEL) |
205 | #define OCTEON_CN3010_PASS1_1 (0x000d0202 | OM_CHECK_SUBMODEL) | 205 | #define OCTEON_CN3010_PASS1_1 (0x000d0202 | OM_CHECK_SUBMODEL) |
206 | #define OCTEON_CN3010 (OCTEON_CN3010_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) | 206 | #define OCTEON_CN3010 (OCTEON_CN3010_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) |
207 | 207 | ||
208 | #define OCTEON_CN3020_PASS1 (0x000d0110 | OM_CHECK_SUBMODEL) | 208 | #define OCTEON_CN3020_PASS1 (0x000d0110 | OM_CHECK_SUBMODEL) |
209 | #define OCTEON_CN3020_PASS1_0 (0x000d0110 | OM_CHECK_SUBMODEL) | 209 | #define OCTEON_CN3020_PASS1_0 (0x000d0110 | OM_CHECK_SUBMODEL) |
210 | #define OCTEON_CN3020_PASS1_1 (0x000d0112 | OM_CHECK_SUBMODEL) | 210 | #define OCTEON_CN3020_PASS1_1 (0x000d0112 | OM_CHECK_SUBMODEL) |
211 | #define OCTEON_CN3020 (OCTEON_CN3020_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) | 211 | #define OCTEON_CN3020 (OCTEON_CN3020_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) |
212 | 212 | ||
213 | /* | 213 | /* |
214 | * This matches the complete family of CN3xxx CPUs, and not subsequent | 214 | * This matches the complete family of CN3xxx CPUs, and not subsequent |
215 | * models | 215 | * models |
216 | */ | 216 | */ |
217 | #define OCTEON_CN3XXX (OCTEON_CN58XX_PASS1_0 | OM_MATCH_PREVIOUS_MODELS | OM_IGNORE_REVISION) | 217 | #define OCTEON_CN3XXX (OCTEON_CN58XX_PASS1_0 | OM_MATCH_PREVIOUS_MODELS | OM_IGNORE_REVISION) |
218 | #define OCTEON_CN5XXX (OCTEON_CN58XX_PASS1_0 | OM_MATCH_5XXX_FAMILY_MODELS) | 218 | #define OCTEON_CN5XXX (OCTEON_CN58XX_PASS1_0 | OM_MATCH_5XXX_FAMILY_MODELS) |
219 | #define OCTEON_CN6XXX (OCTEON_CN63XX_PASS1_0 | OM_MATCH_6XXX_FAMILY_MODELS) | 219 | #define OCTEON_CN6XXX (OCTEON_CN63XX_PASS1_0 | OM_MATCH_6XXX_FAMILY_MODELS) |
220 | 220 | ||
221 | /* These are used to cover entire families of OCTEON processors */ | 221 | /* These are used to cover entire families of OCTEON processors */ |
222 | #define OCTEON_FAM_1 (OCTEON_CN3XXX) | 222 | #define OCTEON_FAM_1 (OCTEON_CN3XXX) |
@@ -243,18 +243,18 @@ | |||
243 | */ | 243 | */ |
244 | 244 | ||
245 | /* Masks used for the various types of model/family/revision matching */ | 245 | /* Masks used for the various types of model/family/revision matching */ |
246 | #define OCTEON_38XX_FAMILY_MASK 0x00ffff00 | 246 | #define OCTEON_38XX_FAMILY_MASK 0x00ffff00 |
247 | #define OCTEON_38XX_FAMILY_REV_MASK 0x00ffff0f | 247 | #define OCTEON_38XX_FAMILY_REV_MASK 0x00ffff0f |
248 | #define OCTEON_38XX_MODEL_MASK 0x00ffff10 | 248 | #define OCTEON_38XX_MODEL_MASK 0x00ffff10 |
249 | #define OCTEON_38XX_MODEL_REV_MASK (OCTEON_38XX_FAMILY_REV_MASK | OCTEON_38XX_MODEL_MASK) | 249 | #define OCTEON_38XX_MODEL_REV_MASK (OCTEON_38XX_FAMILY_REV_MASK | OCTEON_38XX_MODEL_MASK) |
250 | 250 | ||
251 | /* CN5XXX and later use different layout of bits in the revision ID field */ | 251 | /* CN5XXX and later use different layout of bits in the revision ID field */ |
252 | #define OCTEON_58XX_FAMILY_MASK OCTEON_38XX_FAMILY_MASK | 252 | #define OCTEON_58XX_FAMILY_MASK OCTEON_38XX_FAMILY_MASK |
253 | #define OCTEON_58XX_FAMILY_REV_MASK 0x00ffff3f | 253 | #define OCTEON_58XX_FAMILY_REV_MASK 0x00ffff3f |
254 | #define OCTEON_58XX_MODEL_MASK 0x00ffffc0 | 254 | #define OCTEON_58XX_MODEL_MASK 0x00ffffc0 |
255 | #define OCTEON_58XX_MODEL_REV_MASK (OCTEON_58XX_FAMILY_REV_MASK | OCTEON_58XX_MODEL_MASK) | 255 | #define OCTEON_58XX_MODEL_REV_MASK (OCTEON_58XX_FAMILY_REV_MASK | OCTEON_58XX_MODEL_MASK) |
256 | #define OCTEON_58XX_MODEL_MINOR_REV_MASK (OCTEON_58XX_MODEL_REV_MASK & 0x00fffff8) | 256 | #define OCTEON_58XX_MODEL_MINOR_REV_MASK (OCTEON_58XX_MODEL_REV_MASK & 0x00fffff8) |
257 | #define OCTEON_5XXX_MODEL_MASK 0x00ff0fc0 | 257 | #define OCTEON_5XXX_MODEL_MASK 0x00ff0fc0 |
258 | 258 | ||
259 | /* forward declarations */ | 259 | /* forward declarations */ |
260 | static inline uint32_t cvmx_get_proc_id(void) __attribute__ ((pure)); | 260 | static inline uint32_t cvmx_get_proc_id(void) __attribute__ ((pure)); |
@@ -264,7 +264,7 @@ static inline uint64_t cvmx_read_csr(uint64_t csr_addr); | |||
264 | 264 | ||
265 | /* NOTE: This for internal use only! */ | 265 | /* NOTE: This for internal use only! */ |
266 | #define __OCTEON_IS_MODEL_COMPILE__(arg_model, chip_model) \ | 266 | #define __OCTEON_IS_MODEL_COMPILE__(arg_model, chip_model) \ |
267 | ((((arg_model & OCTEON_38XX_FAMILY_MASK) < OCTEON_CN58XX_PASS1_0) && ( \ | 267 | ((((arg_model & OCTEON_38XX_FAMILY_MASK) < OCTEON_CN58XX_PASS1_0) && ( \ |
268 | ((((arg_model) & (OM_FLAG_MASK)) == (OM_IGNORE_REVISION | OM_CHECK_SUBMODEL)) \ | 268 | ((((arg_model) & (OM_FLAG_MASK)) == (OM_IGNORE_REVISION | OM_CHECK_SUBMODEL)) \ |
269 | && __OCTEON_MATCH_MASK__((chip_model), (arg_model), OCTEON_38XX_MODEL_MASK)) || \ | 269 | && __OCTEON_MATCH_MASK__((chip_model), (arg_model), OCTEON_38XX_MODEL_MASK)) || \ |
270 | ((((arg_model) & (OM_FLAG_MASK)) == 0) \ | 270 | ((((arg_model) & (OM_FLAG_MASK)) == 0) \ |
@@ -276,7 +276,7 @@ static inline uint64_t cvmx_read_csr(uint64_t csr_addr); | |||
276 | ((((arg_model) & (OM_MATCH_PREVIOUS_MODELS)) == OM_MATCH_PREVIOUS_MODELS) \ | 276 | ((((arg_model) & (OM_MATCH_PREVIOUS_MODELS)) == OM_MATCH_PREVIOUS_MODELS) \ |
277 | && (((chip_model) & OCTEON_38XX_MODEL_MASK) < ((arg_model) & OCTEON_38XX_MODEL_MASK))) \ | 277 | && (((chip_model) & OCTEON_38XX_MODEL_MASK) < ((arg_model) & OCTEON_38XX_MODEL_MASK))) \ |
278 | )) || \ | 278 | )) || \ |
279 | (((arg_model & OCTEON_38XX_FAMILY_MASK) >= OCTEON_CN58XX_PASS1_0) && ( \ | 279 | (((arg_model & OCTEON_38XX_FAMILY_MASK) >= OCTEON_CN58XX_PASS1_0) && ( \ |
280 | ((((arg_model) & (OM_FLAG_MASK)) == (OM_IGNORE_REVISION | OM_CHECK_SUBMODEL)) \ | 280 | ((((arg_model) & (OM_FLAG_MASK)) == (OM_IGNORE_REVISION | OM_CHECK_SUBMODEL)) \ |
281 | && __OCTEON_MATCH_MASK__((chip_model), (arg_model), OCTEON_58XX_MODEL_MASK)) || \ | 281 | && __OCTEON_MATCH_MASK__((chip_model), (arg_model), OCTEON_58XX_MODEL_MASK)) || \ |
282 | ((((arg_model) & (OM_FLAG_MASK)) == 0) \ | 282 | ((((arg_model) & (OM_FLAG_MASK)) == 0) \ |
@@ -320,7 +320,7 @@ static inline int __octeon_is_model_runtime__(uint32_t model) | |||
320 | * Use of the macro in preprocessor directives ( #if OCTEON_IS_MODEL(...) ) | 320 | * Use of the macro in preprocessor directives ( #if OCTEON_IS_MODEL(...) ) |
321 | * is NOT SUPPORTED, and should be replaced with CVMX_COMPILED_FOR() | 321 | * is NOT SUPPORTED, and should be replaced with CVMX_COMPILED_FOR() |
322 | * I.e.: | 322 | * I.e.: |
323 | * #if OCTEON_IS_MODEL(OCTEON_CN56XX) -> #if CVMX_COMPILED_FOR(OCTEON_CN56XX) | 323 | * #if OCTEON_IS_MODEL(OCTEON_CN56XX) -> #if CVMX_COMPILED_FOR(OCTEON_CN56XX) |
324 | */ | 324 | */ |
325 | #define OCTEON_IS_MODEL(x) __octeon_is_model_runtime__(x) | 325 | #define OCTEON_IS_MODEL(x) __octeon_is_model_runtime__(x) |
326 | #define OCTEON_IS_COMMON_BINARY() 1 | 326 | #define OCTEON_IS_COMMON_BINARY() 1 |
diff --git a/arch/mips/include/asm/octeon/octeon.h b/arch/mips/include/asm/octeon/octeon.h index 254e9954ed71..a2eed23c49a9 100644 --- a/arch/mips/include/asm/octeon/octeon.h +++ b/arch/mips/include/asm/octeon/octeon.h | |||
@@ -75,15 +75,15 @@ struct octeon_boot_descriptor { | |||
75 | uint32_t argc; | 75 | uint32_t argc; |
76 | uint32_t argv[OCTEON_ARGV_MAX_ARGS]; | 76 | uint32_t argv[OCTEON_ARGV_MAX_ARGS]; |
77 | 77 | ||
78 | #define BOOT_FLAG_INIT_CORE (1 << 0) | 78 | #define BOOT_FLAG_INIT_CORE (1 << 0) |
79 | #define OCTEON_BL_FLAG_DEBUG (1 << 1) | 79 | #define OCTEON_BL_FLAG_DEBUG (1 << 1) |
80 | #define OCTEON_BL_FLAG_NO_MAGIC (1 << 2) | 80 | #define OCTEON_BL_FLAG_NO_MAGIC (1 << 2) |
81 | /* If set, use uart1 for console */ | 81 | /* If set, use uart1 for console */ |
82 | #define OCTEON_BL_FLAG_CONSOLE_UART1 (1 << 3) | 82 | #define OCTEON_BL_FLAG_CONSOLE_UART1 (1 << 3) |
83 | /* If set, use PCI console */ | 83 | /* If set, use PCI console */ |
84 | #define OCTEON_BL_FLAG_CONSOLE_PCI (1 << 4) | 84 | #define OCTEON_BL_FLAG_CONSOLE_PCI (1 << 4) |
85 | /* Call exit on break on serial port */ | 85 | /* Call exit on break on serial port */ |
86 | #define OCTEON_BL_FLAG_BREAK (1 << 5) | 86 | #define OCTEON_BL_FLAG_BREAK (1 << 5) |
87 | 87 | ||
88 | uint32_t flags; | 88 | uint32_t flags; |
89 | uint32_t core_mask; | 89 | uint32_t core_mask; |
diff --git a/arch/mips/include/asm/octeon/pci-octeon.h b/arch/mips/include/asm/octeon/pci-octeon.h index c66734bd3382..64ba56a02843 100644 --- a/arch/mips/include/asm/octeon/pci-octeon.h +++ b/arch/mips/include/asm/octeon/pci-octeon.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #define CVMX_PCIE_BAR1_PHYS_SIZE (1ull << 28) | 22 | #define CVMX_PCIE_BAR1_PHYS_SIZE (1ull << 28) |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * The RC base of BAR1. gen1 has a 39-bit BAR2, gen2 has 41-bit BAR2, | 25 | * The RC base of BAR1. gen1 has a 39-bit BAR2, gen2 has 41-bit BAR2, |
26 | * place BAR1 so it is the same for both. | 26 | * place BAR1 so it is the same for both. |
27 | */ | 27 | */ |
28 | #define CVMX_PCIE_BAR1_RC_BASE (1ull << 41) | 28 | #define CVMX_PCIE_BAR1_RC_BASE (1ull << 41) |
diff --git a/arch/mips/include/asm/paccess.h b/arch/mips/include/asm/paccess.h index 9ce5a1e7e14c..2474fc5d1751 100644 --- a/arch/mips/include/asm/paccess.h +++ b/arch/mips/include/asm/paccess.h | |||
@@ -43,7 +43,7 @@ struct __large_pstruct { unsigned long buf[100]; }; | |||
43 | case 1: __get_dbe_asm("lb"); break; \ | 43 | case 1: __get_dbe_asm("lb"); break; \ |
44 | case 2: __get_dbe_asm("lh"); break; \ | 44 | case 2: __get_dbe_asm("lh"); break; \ |
45 | case 4: __get_dbe_asm("lw"); break; \ | 45 | case 4: __get_dbe_asm("lw"); break; \ |
46 | case 8: __get_dbe_asm("ld"); break; \ | 46 | case 8: __get_dbe_asm("ld"); break; \ |
47 | default: __get_dbe_unknown(); break; \ | 47 | default: __get_dbe_unknown(); break; \ |
48 | } \ | 48 | } \ |
49 | x = (__typeof__(*(ptr))) __gu_val; \ | 49 | x = (__typeof__(*(ptr))) __gu_val; \ |
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index dbaec94046da..99fc547af9d3 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #define PAGE_SHIFT 16 | 31 | #define PAGE_SHIFT 16 |
32 | #endif | 32 | #endif |
33 | #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) | 33 | #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) |
34 | #define PAGE_MASK (~(PAGE_SIZE - 1)) | 34 | #define PAGE_MASK (~(PAGE_SIZE - 1)) |
35 | 35 | ||
36 | #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT | 36 | #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT |
37 | #define HPAGE_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3) | 37 | #define HPAGE_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3) |
@@ -95,11 +95,11 @@ extern void copy_user_highpage(struct page *to, struct page *from, | |||
95 | #ifdef CONFIG_64BIT_PHYS_ADDR | 95 | #ifdef CONFIG_64BIT_PHYS_ADDR |
96 | #ifdef CONFIG_CPU_MIPS32 | 96 | #ifdef CONFIG_CPU_MIPS32 |
97 | typedef struct { unsigned long pte_low, pte_high; } pte_t; | 97 | typedef struct { unsigned long pte_low, pte_high; } pte_t; |
98 | #define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32)) | 98 | #define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32)) |
99 | #define __pte(x) ({ pte_t __pte = {(x), ((unsigned long long)(x)) >> 32}; __pte; }) | 99 | #define __pte(x) ({ pte_t __pte = {(x), ((unsigned long long)(x)) >> 32}; __pte; }) |
100 | #else | 100 | #else |
101 | typedef struct { unsigned long long pte; } pte_t; | 101 | typedef struct { unsigned long long pte; } pte_t; |
102 | #define pte_val(x) ((x).pte) | 102 | #define pte_val(x) ((x).pte) |
103 | #define __pte(x) ((pte_t) { (x) } ) | 103 | #define __pte(x) ((pte_t) { (x) } ) |
104 | #endif | 104 | #endif |
105 | #else | 105 | #else |
@@ -191,8 +191,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
191 | unsigned long __pfn = (pfn); \ | 191 | unsigned long __pfn = (pfn); \ |
192 | int __n = pfn_to_nid(__pfn); \ | 192 | int __n = pfn_to_nid(__pfn); \ |
193 | ((__n >= 0) ? (__pfn < NODE_DATA(__n)->node_start_pfn + \ | 193 | ((__n >= 0) ? (__pfn < NODE_DATA(__n)->node_start_pfn + \ |
194 | NODE_DATA(__n)->node_spanned_pages) \ | 194 | NODE_DATA(__n)->node_spanned_pages) \ |
195 | : 0); \ | 195 | : 0); \ |
196 | }) | 196 | }) |
197 | 197 | ||
198 | #endif | 198 | #endif |
@@ -206,7 +206,7 @@ extern int __virt_addr_valid(const volatile void *kaddr); | |||
206 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 206 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
207 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 207 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
208 | 208 | ||
209 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE + \ | 209 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE + \ |
210 | PHYS_OFFSET) | 210 | PHYS_OFFSET) |
211 | #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET - \ | 211 | #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET - \ |
212 | PHYS_OFFSET) | 212 | PHYS_OFFSET) |
diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h index d69ea743272b..e224876cc344 100644 --- a/arch/mips/include/asm/pci.h +++ b/arch/mips/include/asm/pci.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | /* | 13 | /* |
14 | * This file essentially defines the interface between board | 14 | * This file essentially defines the interface between board |
15 | * specific PCI code and MIPS common PCI code. Should potentially put | 15 | * specific PCI code and MIPS common PCI code. Should potentially put |
16 | * into include/asm/pci.h file. | 16 | * into include/asm/pci.h file. |
17 | */ | 17 | */ |
18 | 18 | ||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * Each pci channel is a top-level PCI bus seem by CPU. A machine with | 23 | * Each pci channel is a top-level PCI bus seem by CPU. A machine with |
24 | * multiple PCI channels may have multiple PCI host controllers or a | 24 | * multiple PCI channels may have multiple PCI host controllers or a |
25 | * single controller supporting multiple channels. | 25 | * single controller supporting multiple channels. |
26 | */ | 26 | */ |
@@ -99,7 +99,7 @@ extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
99 | struct pci_dev; | 99 | struct pci_dev; |
100 | 100 | ||
101 | /* | 101 | /* |
102 | * The PCI address space does equal the physical memory address space. The | 102 | * The PCI address space does equal the physical memory address space. The |
103 | * networking and block device layers use this boolean for bounce buffer | 103 | * networking and block device layers use this boolean for bounce buffer |
104 | * decisions. This is set if any hose does not have an IOMMU. | 104 | * decisions. This is set if any hose does not have an IOMMU. |
105 | */ | 105 | */ |
diff --git a/arch/mips/include/asm/pci/bridge.h b/arch/mips/include/asm/pci/bridge.h index be44fb0266da..af2c8a351ca7 100644 --- a/arch/mips/include/asm/pci/bridge.h +++ b/arch/mips/include/asm/pci/bridge.h | |||
@@ -85,7 +85,7 @@ typedef volatile struct bridge_s { | |||
85 | #define b_wid_llp b_widget.w_llp_cfg | 85 | #define b_wid_llp b_widget.w_llp_cfg |
86 | #define b_wid_tflush b_widget.w_tflush | 86 | #define b_wid_tflush b_widget.w_tflush |
87 | 87 | ||
88 | /* bridge-specific widget configuration 0x000058-0x00007F */ | 88 | /* bridge-specific widget configuration 0x000058-0x00007F */ |
89 | bridgereg_t _pad_000058; | 89 | bridgereg_t _pad_000058; |
90 | bridgereg_t b_wid_aux_err; /* 0x00005C */ | 90 | bridgereg_t b_wid_aux_err; /* 0x00005C */ |
91 | bridgereg_t _pad_000060; | 91 | bridgereg_t _pad_000060; |
@@ -167,8 +167,8 @@ typedef volatile struct bridge_s { | |||
167 | bridgereg_t __pad; /* 0x0002{80,,,88} */ | 167 | bridgereg_t __pad; /* 0x0002{80,,,88} */ |
168 | bridgereg_t reg; /* 0x0002{84,,,8C} */ | 168 | bridgereg_t reg; /* 0x0002{84,,,8C} */ |
169 | } b_rrb_map[2]; /* 0x000280 */ | 169 | } b_rrb_map[2]; /* 0x000280 */ |
170 | #define b_even_resp b_rrb_map[0].reg /* 0x000284 */ | 170 | #define b_even_resp b_rrb_map[0].reg /* 0x000284 */ |
171 | #define b_odd_resp b_rrb_map[1].reg /* 0x00028C */ | 171 | #define b_odd_resp b_rrb_map[1].reg /* 0x00028C */ |
172 | 172 | ||
173 | bridgereg_t _pad_000290; | 173 | bridgereg_t _pad_000290; |
174 | bridgereg_t b_resp_status; /* 0x000294 */ | 174 | bridgereg_t b_resp_status; /* 0x000294 */ |
@@ -233,7 +233,7 @@ typedef volatile struct bridge_s { | |||
233 | u8 _pad_030007[0x04fff8]; /* 0x030008-0x07FFFF */ | 233 | u8 _pad_030007[0x04fff8]; /* 0x030008-0x07FFFF */ |
234 | 234 | ||
235 | /* External Address Translation Entry RAM 0x080000-0x0FFFFF */ | 235 | /* External Address Translation Entry RAM 0x080000-0x0FFFFF */ |
236 | bridge_ate_t b_ext_ate_ram[0x10000]; | 236 | bridge_ate_t b_ext_ate_ram[0x10000]; |
237 | 237 | ||
238 | /* Reserved 0x100000-0x1FFFFF */ | 238 | /* Reserved 0x100000-0x1FFFFF */ |
239 | char _pad_100000[0x200000-0x100000]; | 239 | char _pad_100000[0x200000-0x100000]; |
@@ -400,7 +400,7 @@ typedef struct bridge_err_cmdword_s { | |||
400 | #define BRIDGE_REV_A 0x1 | 400 | #define BRIDGE_REV_A 0x1 |
401 | #define BRIDGE_REV_B 0x2 | 401 | #define BRIDGE_REV_B 0x2 |
402 | #define BRIDGE_REV_C 0x3 | 402 | #define BRIDGE_REV_C 0x3 |
403 | #define BRIDGE_REV_D 0x4 | 403 | #define BRIDGE_REV_D 0x4 |
404 | 404 | ||
405 | /* Bridge widget status register bits definition */ | 405 | /* Bridge widget status register bits definition */ |
406 | 406 | ||
@@ -691,21 +691,21 @@ typedef struct bridge_err_cmdword_s { | |||
691 | #define BRIDGE_CREDIT 3 | 691 | #define BRIDGE_CREDIT 3 |
692 | 692 | ||
693 | /* RRB assignment register */ | 693 | /* RRB assignment register */ |
694 | #define BRIDGE_RRB_EN 0x8 /* after shifting down */ | 694 | #define BRIDGE_RRB_EN 0x8 /* after shifting down */ |
695 | #define BRIDGE_RRB_DEV 0x7 /* after shifting down */ | 695 | #define BRIDGE_RRB_DEV 0x7 /* after shifting down */ |
696 | #define BRIDGE_RRB_VDEV 0x4 /* after shifting down */ | 696 | #define BRIDGE_RRB_VDEV 0x4 /* after shifting down */ |
697 | #define BRIDGE_RRB_PDEV 0x3 /* after shifting down */ | 697 | #define BRIDGE_RRB_PDEV 0x3 /* after shifting down */ |
698 | 698 | ||
699 | /* RRB status register */ | 699 | /* RRB status register */ |
700 | #define BRIDGE_RRB_VALID(r) (0x00010000<<(r)) | 700 | #define BRIDGE_RRB_VALID(r) (0x00010000<<(r)) |
701 | #define BRIDGE_RRB_INUSE(r) (0x00000001<<(r)) | 701 | #define BRIDGE_RRB_INUSE(r) (0x00000001<<(r)) |
702 | 702 | ||
703 | /* RRB clear register */ | 703 | /* RRB clear register */ |
704 | #define BRIDGE_RRB_CLEAR(r) (0x00000001<<(r)) | 704 | #define BRIDGE_RRB_CLEAR(r) (0x00000001<<(r)) |
705 | 705 | ||
706 | /* xbox system controller declarations */ | 706 | /* xbox system controller declarations */ |
707 | #define XBOX_BRIDGE_WID 8 | 707 | #define XBOX_BRIDGE_WID 8 |
708 | #define FLASH_PROM1_BASE 0xE00000 /* To read the xbox sysctlr status */ | 708 | #define FLASH_PROM1_BASE 0xE00000 /* To read the xbox sysctlr status */ |
709 | #define XBOX_RPS_EXISTS 1 << 6 /* RPS bit in status register */ | 709 | #define XBOX_RPS_EXISTS 1 << 6 /* RPS bit in status register */ |
710 | #define XBOX_RPS_FAIL 1 << 4 /* RPS status bit in register */ | 710 | #define XBOX_RPS_FAIL 1 << 4 /* RPS status bit in register */ |
711 | 711 | ||
@@ -838,7 +838,7 @@ struct bridge_controller { | |||
838 | bridge_t *base; | 838 | bridge_t *base; |
839 | nasid_t nasid; | 839 | nasid_t nasid; |
840 | unsigned int widget_id; | 840 | unsigned int widget_id; |
841 | unsigned int irq_cpu; | 841 | unsigned int irq_cpu; |
842 | u64 baddr; | 842 | u64 baddr; |
843 | unsigned int pci_int[8]; | 843 | unsigned int pci_int[8]; |
844 | }; | 844 | }; |
diff --git a/arch/mips/include/asm/pgtable-32.h b/arch/mips/include/asm/pgtable-32.h index 5d56bb230345..b4204c179b97 100644 --- a/arch/mips/include/asm/pgtable-32.h +++ b/arch/mips/include/asm/pgtable-32.h | |||
@@ -47,7 +47,7 @@ | |||
47 | #define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE) | 47 | #define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE) |
48 | #define FIRST_USER_ADDRESS 0 | 48 | #define FIRST_USER_ADDRESS 0 |
49 | 49 | ||
50 | #define VMALLOC_START MAP_BASE | 50 | #define VMALLOC_START MAP_BASE |
51 | 51 | ||
52 | #define PKMAP_BASE (0xfe000000UL) | 52 | #define PKMAP_BASE (0xfe000000UL) |
53 | 53 | ||
@@ -136,7 +136,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
136 | #define pte_offset_kernel(dir, address) \ | 136 | #define pte_offset_kernel(dir, address) \ |
137 | ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address)) | 137 | ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address)) |
138 | 138 | ||
139 | #define pte_offset_map(dir, address) \ | 139 | #define pte_offset_map(dir, address) \ |
140 | ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address)) | 140 | ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address)) |
141 | #define pte_unmap(pte) ((void)(pte)) | 141 | #define pte_unmap(pte) ((void)(pte)) |
142 | 142 | ||
@@ -155,7 +155,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
155 | 155 | ||
156 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1 ) & 0x07) | \ | 156 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1 ) & 0x07) | \ |
157 | (((_pte).pte >> 2 ) & 0x38) | \ | 157 | (((_pte).pte >> 2 ) & 0x38) | \ |
158 | (((_pte).pte >> 10) << 6 )) | 158 | (((_pte).pte >> 10) << 6 )) |
159 | 159 | ||
160 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x07) << 1 ) | \ | 160 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x07) << 1 ) | \ |
161 | (((off) & 0x38) << 2 ) | \ | 161 | (((off) & 0x38) << 2 ) | \ |
@@ -167,14 +167,14 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
167 | /* Swap entries must have VALID and GLOBAL bits cleared. */ | 167 | /* Swap entries must have VALID and GLOBAL bits cleared. */ |
168 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) | 168 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) |
169 | #define __swp_type(x) (((x).val >> 2) & 0x1f) | 169 | #define __swp_type(x) (((x).val >> 2) & 0x1f) |
170 | #define __swp_offset(x) ((x).val >> 7) | 170 | #define __swp_offset(x) ((x).val >> 7) |
171 | #define __swp_entry(type,offset) \ | 171 | #define __swp_entry(type,offset) \ |
172 | ((swp_entry_t) { ((type) << 2) | ((offset) << 7) }) | 172 | ((swp_entry_t) { ((type) << 2) | ((offset) << 7) }) |
173 | #else | 173 | #else |
174 | #define __swp_type(x) (((x).val >> 8) & 0x1f) | 174 | #define __swp_type(x) (((x).val >> 8) & 0x1f) |
175 | #define __swp_offset(x) ((x).val >> 13) | 175 | #define __swp_offset(x) ((x).val >> 13) |
176 | #define __swp_entry(type,offset) \ | 176 | #define __swp_entry(type,offset) \ |
177 | ((swp_entry_t) { ((type) << 8) | ((offset) << 13) }) | 177 | ((swp_entry_t) { ((type) << 8) | ((offset) << 13) }) |
178 | #endif /* defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) */ | 178 | #endif /* defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) */ |
179 | 179 | ||
180 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) | 180 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) |
@@ -184,7 +184,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
184 | #define PTE_FILE_MAX_BITS 30 | 184 | #define PTE_FILE_MAX_BITS 30 |
185 | 185 | ||
186 | #define pte_to_pgoff(_pte) ((_pte).pte_high >> 2) | 186 | #define pte_to_pgoff(_pte) ((_pte).pte_high >> 2) |
187 | #define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) << 2 }) | 187 | #define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) << 2 }) |
188 | 188 | ||
189 | #else | 189 | #else |
190 | /* | 190 | /* |
@@ -194,7 +194,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
194 | 194 | ||
195 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1) & 0x7) | \ | 195 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1) & 0x7) | \ |
196 | (((_pte).pte >> 2) & 0x8) | \ | 196 | (((_pte).pte >> 2) & 0x8) | \ |
197 | (((_pte).pte >> 8) << 4)) | 197 | (((_pte).pte >> 8) << 4)) |
198 | 198 | ||
199 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x7) << 1) | \ | 199 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x7) << 1) | \ |
200 | (((off) & 0x8) << 2) | \ | 200 | (((off) & 0x8) << 2) | \ |
@@ -208,7 +208,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
208 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_high }) | 208 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_high }) |
209 | #define __swp_entry_to_pte(x) ((pte_t) { 0, (x).val }) | 209 | #define __swp_entry_to_pte(x) ((pte_t) { 0, (x).val }) |
210 | #else | 210 | #else |
211 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | 211 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
212 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | 212 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
213 | #endif | 213 | #endif |
214 | 214 | ||
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index 013d5f781263..e1c49a96807d 100644 --- a/arch/mips/include/asm/pgtable-64.h +++ b/arch/mips/include/asm/pgtable-64.h | |||
@@ -115,7 +115,7 @@ | |||
115 | #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) | 115 | #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) |
116 | 116 | ||
117 | #if PGDIR_SIZE >= TASK_SIZE64 | 117 | #if PGDIR_SIZE >= TASK_SIZE64 |
118 | #define USER_PTRS_PER_PGD (1) | 118 | #define USER_PTRS_PER_PGD (1) |
119 | #else | 119 | #else |
120 | #define USER_PTRS_PER_PGD (TASK_SIZE64 / PGDIR_SIZE) | 120 | #define USER_PTRS_PER_PGD (TASK_SIZE64 / PGDIR_SIZE) |
121 | #endif | 121 | #endif |
@@ -288,7 +288,7 @@ static inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) | |||
288 | #define __swp_type(x) (((x).val >> 32) & 0xff) | 288 | #define __swp_type(x) (((x).val >> 32) & 0xff) |
289 | #define __swp_offset(x) ((x).val >> 40) | 289 | #define __swp_offset(x) ((x).val >> 40) |
290 | #define __swp_entry(type, offset) ((swp_entry_t) { pte_val(mk_swap_pte((type), (offset))) }) | 290 | #define __swp_entry(type, offset) ((swp_entry_t) { pte_val(mk_swap_pte((type), (offset))) }) |
291 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | 291 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
292 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | 292 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
293 | 293 | ||
294 | /* | 294 | /* |
diff --git a/arch/mips/include/asm/pgtable-bits.h b/arch/mips/include/asm/pgtable-bits.h index 5a7ccc2473f8..32aea4852fb0 100644 --- a/arch/mips/include/asm/pgtable-bits.h +++ b/arch/mips/include/asm/pgtable-bits.h | |||
@@ -21,7 +21,7 @@ | |||
21 | * Similar to the Alpha port, we need to keep track of the ref | 21 | * Similar to the Alpha port, we need to keep track of the ref |
22 | * and mod bits in software. We have a software "yeah you can read | 22 | * and mod bits in software. We have a software "yeah you can read |
23 | * from this page" bit, and a hardware one which actually lets the | 23 | * from this page" bit, and a hardware one which actually lets the |
24 | * process read from the page. On the same token we have a software | 24 | * process read from the page. On the same token we have a software |
25 | * writable bit and the real hardware one which actually lets the | 25 | * writable bit and the real hardware one which actually lets the |
26 | * process write to the page, this keeps a mod bit via the hardware | 26 | * process write to the page, this keeps a mod bit via the hardware |
27 | * dirty bit. | 27 | * dirty bit. |
@@ -41,9 +41,9 @@ | |||
41 | #define _PAGE_GLOBAL (1 << 0) | 41 | #define _PAGE_GLOBAL (1 << 0) |
42 | #define _PAGE_VALID_SHIFT 1 | 42 | #define _PAGE_VALID_SHIFT 1 |
43 | #define _PAGE_VALID (1 << _PAGE_VALID_SHIFT) | 43 | #define _PAGE_VALID (1 << _PAGE_VALID_SHIFT) |
44 | #define _PAGE_SILENT_READ (1 << 1) /* synonym */ | 44 | #define _PAGE_SILENT_READ (1 << 1) /* synonym */ |
45 | #define _PAGE_DIRTY_SHIFT 2 | 45 | #define _PAGE_DIRTY_SHIFT 2 |
46 | #define _PAGE_DIRTY (1 << _PAGE_DIRTY_SHIFT) /* The MIPS dirty bit */ | 46 | #define _PAGE_DIRTY (1 << _PAGE_DIRTY_SHIFT) /* The MIPS dirty bit */ |
47 | #define _PAGE_SILENT_WRITE (1 << 2) | 47 | #define _PAGE_SILENT_WRITE (1 << 2) |
48 | #define _CACHE_SHIFT 3 | 48 | #define _CACHE_SHIFT 3 |
49 | #define _CACHE_MASK (7 << 3) | 49 | #define _CACHE_MASK (7 << 3) |
@@ -134,7 +134,7 @@ | |||
134 | #define _PAGE_HUGE (1 << _PAGE_HUGE_SHIFT) | 134 | #define _PAGE_HUGE (1 << _PAGE_HUGE_SHIFT) |
135 | #else | 135 | #else |
136 | #define _PAGE_HUGE_SHIFT (_PAGE_MODIFIED_SHIFT) | 136 | #define _PAGE_HUGE_SHIFT (_PAGE_MODIFIED_SHIFT) |
137 | #define _PAGE_HUGE ({BUG(); 1; }) /* Dummy value */ | 137 | #define _PAGE_HUGE ({BUG(); 1; }) /* Dummy value */ |
138 | #endif | 138 | #endif |
139 | 139 | ||
140 | #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT | 140 | #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT |
@@ -143,7 +143,7 @@ | |||
143 | #define _PAGE_SPLITTING (1 << _PAGE_SPLITTING_SHIFT) | 143 | #define _PAGE_SPLITTING (1 << _PAGE_SPLITTING_SHIFT) |
144 | #else | 144 | #else |
145 | #define _PAGE_SPLITTING_SHIFT (_PAGE_HUGE_SHIFT) | 145 | #define _PAGE_SPLITTING_SHIFT (_PAGE_HUGE_SHIFT) |
146 | #define _PAGE_SPLITTING ({BUG(); 1; }) /* Dummy value */ | 146 | #define _PAGE_SPLITTING ({BUG(); 1; }) /* Dummy value */ |
147 | #endif | 147 | #endif |
148 | 148 | ||
149 | /* Page cannot be executed */ | 149 | /* Page cannot be executed */ |
@@ -159,10 +159,10 @@ | |||
159 | 159 | ||
160 | #define _PAGE_VALID_SHIFT (_PAGE_GLOBAL_SHIFT + 1) | 160 | #define _PAGE_VALID_SHIFT (_PAGE_GLOBAL_SHIFT + 1) |
161 | #define _PAGE_VALID (1 << _PAGE_VALID_SHIFT) | 161 | #define _PAGE_VALID (1 << _PAGE_VALID_SHIFT) |
162 | /* synonym */ | 162 | /* synonym */ |
163 | #define _PAGE_SILENT_READ (_PAGE_VALID) | 163 | #define _PAGE_SILENT_READ (_PAGE_VALID) |
164 | 164 | ||
165 | /* The MIPS dirty bit */ | 165 | /* The MIPS dirty bit */ |
166 | #define _PAGE_DIRTY_SHIFT (_PAGE_VALID_SHIFT + 1) | 166 | #define _PAGE_DIRTY_SHIFT (_PAGE_VALID_SHIFT + 1) |
167 | #define _PAGE_DIRTY (1 << _PAGE_DIRTY_SHIFT) | 167 | #define _PAGE_DIRTY (1 << _PAGE_DIRTY_SHIFT) |
168 | #define _PAGE_SILENT_WRITE (_PAGE_DIRTY) | 168 | #define _PAGE_SILENT_WRITE (_PAGE_DIRTY) |
@@ -175,7 +175,7 @@ | |||
175 | #endif /* defined(CONFIG_64BIT_PHYS_ADDR && defined(CONFIG_CPU_MIPS32) */ | 175 | #endif /* defined(CONFIG_64BIT_PHYS_ADDR && defined(CONFIG_CPU_MIPS32) */ |
176 | 176 | ||
177 | #ifndef _PFN_SHIFT | 177 | #ifndef _PFN_SHIFT |
178 | #define _PFN_SHIFT PAGE_SHIFT | 178 | #define _PFN_SHIFT PAGE_SHIFT |
179 | #endif | 179 | #endif |
180 | #define _PFN_MASK (~((1 << (_PFN_SHIFT)) - 1)) | 180 | #define _PFN_MASK (~((1 << (_PFN_SHIFT)) - 1)) |
181 | 181 | ||
@@ -230,28 +230,28 @@ static inline uint64_t pte_to_entrylo(unsigned long pte_val) | |||
230 | /* No penalty for being coherent on the SB1, so just | 230 | /* No penalty for being coherent on the SB1, so just |
231 | use it for "noncoherent" spaces, too. Shouldn't hurt. */ | 231 | use it for "noncoherent" spaces, too. Shouldn't hurt. */ |
232 | 232 | ||
233 | #define _CACHE_UNCACHED (2<<_CACHE_SHIFT) | 233 | #define _CACHE_UNCACHED (2<<_CACHE_SHIFT) |
234 | #define _CACHE_CACHABLE_COW (5<<_CACHE_SHIFT) | 234 | #define _CACHE_CACHABLE_COW (5<<_CACHE_SHIFT) |
235 | #define _CACHE_CACHABLE_NONCOHERENT (5<<_CACHE_SHIFT) | 235 | #define _CACHE_CACHABLE_NONCOHERENT (5<<_CACHE_SHIFT) |
236 | #define _CACHE_UNCACHED_ACCELERATED (7<<_CACHE_SHIFT) | 236 | #define _CACHE_UNCACHED_ACCELERATED (7<<_CACHE_SHIFT) |
237 | 237 | ||
238 | #else | 238 | #else |
239 | 239 | ||
240 | #define _CACHE_CACHABLE_NO_WA (0<<_CACHE_SHIFT) /* R4600 only */ | 240 | #define _CACHE_CACHABLE_NO_WA (0<<_CACHE_SHIFT) /* R4600 only */ |
241 | #define _CACHE_CACHABLE_WA (1<<_CACHE_SHIFT) /* R4600 only */ | 241 | #define _CACHE_CACHABLE_WA (1<<_CACHE_SHIFT) /* R4600 only */ |
242 | #define _CACHE_UNCACHED (2<<_CACHE_SHIFT) /* R4[0246]00 */ | 242 | #define _CACHE_UNCACHED (2<<_CACHE_SHIFT) /* R4[0246]00 */ |
243 | #define _CACHE_CACHABLE_NONCOHERENT (3<<_CACHE_SHIFT) /* R4[0246]00 */ | 243 | #define _CACHE_CACHABLE_NONCOHERENT (3<<_CACHE_SHIFT) /* R4[0246]00 */ |
244 | #define _CACHE_CACHABLE_CE (4<<_CACHE_SHIFT) /* R4[04]00MC only */ | 244 | #define _CACHE_CACHABLE_CE (4<<_CACHE_SHIFT) /* R4[04]00MC only */ |
245 | #define _CACHE_CACHABLE_COW (5<<_CACHE_SHIFT) /* R4[04]00MC only */ | 245 | #define _CACHE_CACHABLE_COW (5<<_CACHE_SHIFT) /* R4[04]00MC only */ |
246 | #define _CACHE_CACHABLE_COHERENT (5<<_CACHE_SHIFT) /* MIPS32R2 CMP */ | 246 | #define _CACHE_CACHABLE_COHERENT (5<<_CACHE_SHIFT) /* MIPS32R2 CMP */ |
247 | #define _CACHE_CACHABLE_CUW (6<<_CACHE_SHIFT) /* R4[04]00MC only */ | 247 | #define _CACHE_CACHABLE_CUW (6<<_CACHE_SHIFT) /* R4[04]00MC only */ |
248 | #define _CACHE_UNCACHED_ACCELERATED (7<<_CACHE_SHIFT) /* R10000 only */ | 248 | #define _CACHE_UNCACHED_ACCELERATED (7<<_CACHE_SHIFT) /* R10000 only */ |
249 | 249 | ||
250 | #endif | 250 | #endif |
251 | 251 | ||
252 | #define __READABLE (_PAGE_SILENT_READ | _PAGE_ACCESSED | (cpu_has_rixi ? 0 : _PAGE_READ)) | 252 | #define __READABLE (_PAGE_SILENT_READ | _PAGE_ACCESSED | (cpu_has_rixi ? 0 : _PAGE_READ)) |
253 | #define __WRITEABLE (_PAGE_WRITE | _PAGE_SILENT_WRITE | _PAGE_MODIFIED) | 253 | #define __WRITEABLE (_PAGE_WRITE | _PAGE_SILENT_WRITE | _PAGE_MODIFIED) |
254 | 254 | ||
255 | #define _PAGE_CHG_MASK (_PFN_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _CACHE_MASK) | 255 | #define _PAGE_CHG_MASK (_PFN_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _CACHE_MASK) |
256 | 256 | ||
257 | #endif /* _ASM_PGTABLE_BITS_H */ | 257 | #endif /* _ASM_PGTABLE_BITS_H */ |
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h index ec50d52cfb74..fdc62fb5630d 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h | |||
@@ -112,7 +112,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
112 | * it better already be global) | 112 | * it better already be global) |
113 | */ | 113 | */ |
114 | if (pte_none(*buddy)) { | 114 | if (pte_none(*buddy)) { |
115 | buddy->pte_low |= _PAGE_GLOBAL; | 115 | buddy->pte_low |= _PAGE_GLOBAL; |
116 | buddy->pte_high |= _PAGE_GLOBAL; | 116 | buddy->pte_high |= _PAGE_GLOBAL; |
117 | } | 117 | } |
118 | } | 118 | } |
@@ -319,7 +319,7 @@ static inline int pte_special(pte_t pte) { return 0; } | |||
319 | static inline pte_t pte_mkspecial(pte_t pte) { return pte; } | 319 | static inline pte_t pte_mkspecial(pte_t pte) { return pte; } |
320 | 320 | ||
321 | /* | 321 | /* |
322 | * Macro to make mark a page protection value as "uncacheable". Note | 322 | * Macro to make mark a page protection value as "uncacheable". Note |
323 | * that "protection" is really a misnomer here as the protection value | 323 | * that "protection" is really a misnomer here as the protection value |
324 | * contains the memory attribute bits, dirty bits, and various other | 324 | * contains the memory attribute bits, dirty bits, and various other |
325 | * bits as well. | 325 | * bits as well. |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_cic_int.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_cic_int.h index c84bcf9570b1..ac863e2deb62 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_cic_int.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_cic_int.h | |||
@@ -43,14 +43,14 @@ | |||
43 | * IRQs directly forwarded to the CPU | 43 | * IRQs directly forwarded to the CPU |
44 | */ | 44 | */ |
45 | #define MSP_MIPS_INTBASE 0 | 45 | #define MSP_MIPS_INTBASE 0 |
46 | #define MSP_INT_SW0 0 /* IRQ for swint0, C_SW0 */ | 46 | #define MSP_INT_SW0 0 /* IRQ for swint0, C_SW0 */ |
47 | #define MSP_INT_SW1 1 /* IRQ for swint1, C_SW1 */ | 47 | #define MSP_INT_SW1 1 /* IRQ for swint1, C_SW1 */ |
48 | #define MSP_INT_MAC0 2 /* IRQ for MAC 0, C_IRQ0 */ | 48 | #define MSP_INT_MAC0 2 /* IRQ for MAC 0, C_IRQ0 */ |
49 | #define MSP_INT_MAC1 3 /* IRQ for MAC 1, C_IRQ1 */ | 49 | #define MSP_INT_MAC1 3 /* IRQ for MAC 1, C_IRQ1 */ |
50 | #define MSP_INT_USB 4 /* IRQ for USB, C_IRQ2 */ | 50 | #define MSP_INT_USB 4 /* IRQ for USB, C_IRQ2 */ |
51 | #define MSP_INT_SAR 5 /* IRQ for ADSL2+ SAR, C_IRQ3 */ | 51 | #define MSP_INT_SAR 5 /* IRQ for ADSL2+ SAR, C_IRQ3 */ |
52 | #define MSP_INT_CIC 6 /* IRQ for CIC block, C_IRQ4 */ | 52 | #define MSP_INT_CIC 6 /* IRQ for CIC block, C_IRQ4 */ |
53 | #define MSP_INT_SEC 7 /* IRQ for Sec engine, C_IRQ5 */ | 53 | #define MSP_INT_SEC 7 /* IRQ for Sec engine, C_IRQ5 */ |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * IRQs cascaded on CPU interrupt 4 (CAUSE bit 12, C_IRQ4) | 56 | * IRQs cascaded on CPU interrupt 4 (CAUSE bit 12, C_IRQ4) |
@@ -59,93 +59,93 @@ | |||
59 | */ | 59 | */ |
60 | #define MSP_CIC_INTBASE (MSP_MIPS_INTBASE + 8) | 60 | #define MSP_CIC_INTBASE (MSP_MIPS_INTBASE + 8) |
61 | #define MSP_INT_EXT0 (MSP_CIC_INTBASE + 0) | 61 | #define MSP_INT_EXT0 (MSP_CIC_INTBASE + 0) |
62 | /* External interrupt 0 */ | 62 | /* External interrupt 0 */ |
63 | #define MSP_INT_EXT1 (MSP_CIC_INTBASE + 1) | 63 | #define MSP_INT_EXT1 (MSP_CIC_INTBASE + 1) |
64 | /* External interrupt 1 */ | 64 | /* External interrupt 1 */ |
65 | #define MSP_INT_EXT2 (MSP_CIC_INTBASE + 2) | 65 | #define MSP_INT_EXT2 (MSP_CIC_INTBASE + 2) |
66 | /* External interrupt 2 */ | 66 | /* External interrupt 2 */ |
67 | #define MSP_INT_EXT3 (MSP_CIC_INTBASE + 3) | 67 | #define MSP_INT_EXT3 (MSP_CIC_INTBASE + 3) |
68 | /* External interrupt 3 */ | 68 | /* External interrupt 3 */ |
69 | #define MSP_INT_CPUIF (MSP_CIC_INTBASE + 4) | 69 | #define MSP_INT_CPUIF (MSP_CIC_INTBASE + 4) |
70 | /* CPU interface interrupt */ | 70 | /* CPU interface interrupt */ |
71 | #define MSP_INT_EXT4 (MSP_CIC_INTBASE + 5) | 71 | #define MSP_INT_EXT4 (MSP_CIC_INTBASE + 5) |
72 | /* External interrupt 4 */ | 72 | /* External interrupt 4 */ |
73 | #define MSP_INT_CIC_USB (MSP_CIC_INTBASE + 6) | 73 | #define MSP_INT_CIC_USB (MSP_CIC_INTBASE + 6) |
74 | /* Cascaded IRQ for USB */ | 74 | /* Cascaded IRQ for USB */ |
75 | #define MSP_INT_MBOX (MSP_CIC_INTBASE + 7) | 75 | #define MSP_INT_MBOX (MSP_CIC_INTBASE + 7) |
76 | /* Sec engine mailbox IRQ */ | 76 | /* Sec engine mailbox IRQ */ |
77 | #define MSP_INT_EXT5 (MSP_CIC_INTBASE + 8) | 77 | #define MSP_INT_EXT5 (MSP_CIC_INTBASE + 8) |
78 | /* External interrupt 5 */ | 78 | /* External interrupt 5 */ |
79 | #define MSP_INT_TDM (MSP_CIC_INTBASE + 9) | 79 | #define MSP_INT_TDM (MSP_CIC_INTBASE + 9) |
80 | /* TDM interrupt */ | 80 | /* TDM interrupt */ |
81 | #define MSP_INT_CIC_MAC0 (MSP_CIC_INTBASE + 10) | 81 | #define MSP_INT_CIC_MAC0 (MSP_CIC_INTBASE + 10) |
82 | /* Cascaded IRQ for MAC 0 */ | 82 | /* Cascaded IRQ for MAC 0 */ |
83 | #define MSP_INT_CIC_MAC1 (MSP_CIC_INTBASE + 11) | 83 | #define MSP_INT_CIC_MAC1 (MSP_CIC_INTBASE + 11) |
84 | /* Cascaded IRQ for MAC 1 */ | 84 | /* Cascaded IRQ for MAC 1 */ |
85 | #define MSP_INT_CIC_SEC (MSP_CIC_INTBASE + 12) | 85 | #define MSP_INT_CIC_SEC (MSP_CIC_INTBASE + 12) |
86 | /* Cascaded IRQ for sec engine */ | 86 | /* Cascaded IRQ for sec engine */ |
87 | #define MSP_INT_PER (MSP_CIC_INTBASE + 13) | 87 | #define MSP_INT_PER (MSP_CIC_INTBASE + 13) |
88 | /* Peripheral interrupt */ | 88 | /* Peripheral interrupt */ |
89 | #define MSP_INT_TIMER0 (MSP_CIC_INTBASE + 14) | 89 | #define MSP_INT_TIMER0 (MSP_CIC_INTBASE + 14) |
90 | /* SLP timer 0 */ | 90 | /* SLP timer 0 */ |
91 | #define MSP_INT_TIMER1 (MSP_CIC_INTBASE + 15) | 91 | #define MSP_INT_TIMER1 (MSP_CIC_INTBASE + 15) |
92 | /* SLP timer 1 */ | 92 | /* SLP timer 1 */ |
93 | #define MSP_INT_TIMER2 (MSP_CIC_INTBASE + 16) | 93 | #define MSP_INT_TIMER2 (MSP_CIC_INTBASE + 16) |
94 | /* SLP timer 2 */ | 94 | /* SLP timer 2 */ |
95 | #define MSP_INT_VPE0_TIMER (MSP_CIC_INTBASE + 17) | 95 | #define MSP_INT_VPE0_TIMER (MSP_CIC_INTBASE + 17) |
96 | /* VPE0 MIPS timer */ | 96 | /* VPE0 MIPS timer */ |
97 | #define MSP_INT_BLKCP (MSP_CIC_INTBASE + 18) | 97 | #define MSP_INT_BLKCP (MSP_CIC_INTBASE + 18) |
98 | /* Block Copy */ | 98 | /* Block Copy */ |
99 | #define MSP_INT_UART0 (MSP_CIC_INTBASE + 19) | 99 | #define MSP_INT_UART0 (MSP_CIC_INTBASE + 19) |
100 | /* UART 0 */ | 100 | /* UART 0 */ |
101 | #define MSP_INT_PCI (MSP_CIC_INTBASE + 20) | 101 | #define MSP_INT_PCI (MSP_CIC_INTBASE + 20) |
102 | /* PCI subsystem */ | 102 | /* PCI subsystem */ |
103 | #define MSP_INT_EXT6 (MSP_CIC_INTBASE + 21) | 103 | #define MSP_INT_EXT6 (MSP_CIC_INTBASE + 21) |
104 | /* External interrupt 5 */ | 104 | /* External interrupt 5 */ |
105 | #define MSP_INT_PCI_MSI (MSP_CIC_INTBASE + 22) | 105 | #define MSP_INT_PCI_MSI (MSP_CIC_INTBASE + 22) |
106 | /* PCI Message Signal */ | 106 | /* PCI Message Signal */ |
107 | #define MSP_INT_CIC_SAR (MSP_CIC_INTBASE + 23) | 107 | #define MSP_INT_CIC_SAR (MSP_CIC_INTBASE + 23) |
108 | /* Cascaded ADSL2+ SAR IRQ */ | 108 | /* Cascaded ADSL2+ SAR IRQ */ |
109 | #define MSP_INT_DSL (MSP_CIC_INTBASE + 24) | 109 | #define MSP_INT_DSL (MSP_CIC_INTBASE + 24) |
110 | /* ADSL2+ IRQ */ | 110 | /* ADSL2+ IRQ */ |
111 | #define MSP_INT_CIC_ERR (MSP_CIC_INTBASE + 25) | 111 | #define MSP_INT_CIC_ERR (MSP_CIC_INTBASE + 25) |
112 | /* SLP error condition */ | 112 | /* SLP error condition */ |
113 | #define MSP_INT_VPE1_TIMER (MSP_CIC_INTBASE + 26) | 113 | #define MSP_INT_VPE1_TIMER (MSP_CIC_INTBASE + 26) |
114 | /* VPE1 MIPS timer */ | 114 | /* VPE1 MIPS timer */ |
115 | #define MSP_INT_VPE0_PC (MSP_CIC_INTBASE + 27) | 115 | #define MSP_INT_VPE0_PC (MSP_CIC_INTBASE + 27) |
116 | /* VPE0 Performance counter */ | 116 | /* VPE0 Performance counter */ |
117 | #define MSP_INT_VPE1_PC (MSP_CIC_INTBASE + 28) | 117 | #define MSP_INT_VPE1_PC (MSP_CIC_INTBASE + 28) |
118 | /* VPE1 Performance counter */ | 118 | /* VPE1 Performance counter */ |
119 | #define MSP_INT_EXT7 (MSP_CIC_INTBASE + 29) | 119 | #define MSP_INT_EXT7 (MSP_CIC_INTBASE + 29) |
120 | /* External interrupt 5 */ | 120 | /* External interrupt 5 */ |
121 | #define MSP_INT_VPE0_SW (MSP_CIC_INTBASE + 30) | 121 | #define MSP_INT_VPE0_SW (MSP_CIC_INTBASE + 30) |
122 | /* VPE0 Software interrupt */ | 122 | /* VPE0 Software interrupt */ |
123 | #define MSP_INT_VPE1_SW (MSP_CIC_INTBASE + 31) | 123 | #define MSP_INT_VPE1_SW (MSP_CIC_INTBASE + 31) |
124 | /* VPE0 Software interrupt */ | 124 | /* VPE0 Software interrupt */ |
125 | 125 | ||
126 | /* | 126 | /* |
127 | * IRQs cascaded on CIC PER interrupt (MSP_INT_PER) | 127 | * IRQs cascaded on CIC PER interrupt (MSP_INT_PER) |
128 | */ | 128 | */ |
129 | #define MSP_PER_INTBASE (MSP_CIC_INTBASE + 32) | 129 | #define MSP_PER_INTBASE (MSP_CIC_INTBASE + 32) |
130 | /* Reserved 0-1 */ | 130 | /* Reserved 0-1 */ |
131 | #define MSP_INT_UART1 (MSP_PER_INTBASE + 2) | 131 | #define MSP_INT_UART1 (MSP_PER_INTBASE + 2) |
132 | /* UART 1 */ | 132 | /* UART 1 */ |
133 | /* Reserved 3-5 */ | 133 | /* Reserved 3-5 */ |
134 | #define MSP_INT_2WIRE (MSP_PER_INTBASE + 6) | 134 | #define MSP_INT_2WIRE (MSP_PER_INTBASE + 6) |
135 | /* 2-wire */ | 135 | /* 2-wire */ |
136 | #define MSP_INT_TM0 (MSP_PER_INTBASE + 7) | 136 | #define MSP_INT_TM0 (MSP_PER_INTBASE + 7) |
137 | /* Peripheral timer block out 0 */ | 137 | /* Peripheral timer block out 0 */ |
138 | #define MSP_INT_TM1 (MSP_PER_INTBASE + 8) | 138 | #define MSP_INT_TM1 (MSP_PER_INTBASE + 8) |
139 | /* Peripheral timer block out 1 */ | 139 | /* Peripheral timer block out 1 */ |
140 | /* Reserved 9 */ | 140 | /* Reserved 9 */ |
141 | #define MSP_INT_SPRX (MSP_PER_INTBASE + 10) | 141 | #define MSP_INT_SPRX (MSP_PER_INTBASE + 10) |
142 | /* SPI RX complete */ | 142 | /* SPI RX complete */ |
143 | #define MSP_INT_SPTX (MSP_PER_INTBASE + 11) | 143 | #define MSP_INT_SPTX (MSP_PER_INTBASE + 11) |
144 | /* SPI TX complete */ | 144 | /* SPI TX complete */ |
145 | #define MSP_INT_GPIO (MSP_PER_INTBASE + 12) | 145 | #define MSP_INT_GPIO (MSP_PER_INTBASE + 12) |
146 | /* GPIO */ | 146 | /* GPIO */ |
147 | #define MSP_INT_PER_ERR (MSP_PER_INTBASE + 13) | 147 | #define MSP_INT_PER_ERR (MSP_PER_INTBASE + 13) |
148 | /* Peripheral error */ | 148 | /* Peripheral error */ |
149 | /* Reserved 14-31 */ | 149 | /* Reserved 14-31 */ |
150 | 150 | ||
151 | #endif /* !_MSP_CIC_INT_H */ | 151 | #endif /* !_MSP_CIC_INT_H */ |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_gpio_macros.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_gpio_macros.h index 156f320c69e7..daacebb047c2 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_gpio_macros.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_gpio_macros.h | |||
@@ -54,7 +54,7 @@ enum msp_gpio_mode { | |||
54 | MSP_GPIO_UART_OUTPUT = 0x9, /* Only GPIO 2 or 3 */ | 54 | MSP_GPIO_UART_OUTPUT = 0x9, /* Only GPIO 2 or 3 */ |
55 | MSP_GPIO_PERIF_TIMERA = 0x9, /* Only GPIO 0 or 1 */ | 55 | MSP_GPIO_PERIF_TIMERA = 0x9, /* Only GPIO 0 or 1 */ |
56 | MSP_GPIO_PERIF_TIMERB = 0xa, /* Only GPIO 0 or 1 */ | 56 | MSP_GPIO_PERIF_TIMERB = 0xa, /* Only GPIO 0 or 1 */ |
57 | MSP_GPIO_UNKNOWN = 0xb, /* No such GPIO or mode */ | 57 | MSP_GPIO_UNKNOWN = 0xb, /* No such GPIO or mode */ |
58 | }; | 58 | }; |
59 | 59 | ||
60 | /* -- Static Tables -- */ | 60 | /* -- Static Tables -- */ |
@@ -148,7 +148,7 @@ static unsigned int MSP_GPIO_MODE_ALLOWED[] = { | |||
148 | BASIC_MODE_REG_VALUE(mode, OFFSET_GPIO_NUMBER(gpio)) | 148 | BASIC_MODE_REG_VALUE(mode, OFFSET_GPIO_NUMBER(gpio)) |
149 | #define BASIC_MODE_SHIFT(gpio) \ | 149 | #define BASIC_MODE_SHIFT(gpio) \ |
150 | BASIC_MODE_REG_SHIFT(OFFSET_GPIO_NUMBER(gpio)) | 150 | BASIC_MODE_REG_SHIFT(OFFSET_GPIO_NUMBER(gpio)) |
151 | #define BASIC_MODE_FROM_REG(data, gpio) \ | 151 | #define BASIC_MODE_FROM_REG(data, gpio) \ |
152 | BASIC_MODE_REG_FROM_REG(data, OFFSET_GPIO_NUMBER(gpio)) | 152 | BASIC_MODE_REG_FROM_REG(data, OFFSET_GPIO_NUMBER(gpio)) |
153 | 153 | ||
154 | /* | 154 | /* |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_int.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_int.h index 1d9f05474820..29f8bf79d7a5 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_int.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_int.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Defines for the MSP interrupt handlers. | 2 | * Defines for the MSP interrupt handlers. |
3 | * | 3 | * |
4 | * Copyright (C) 2005, PMC-Sierra, Inc. All rights reserved. | 4 | * Copyright (C) 2005, PMC-Sierra, Inc. All rights reserved. |
5 | * Author: Andrew Hughes, Andrew_Hughes@pmc-sierra.com | 5 | * Author: Andrew Hughes, Andrew_Hughes@pmc-sierra.com |
6 | * | 6 | * |
7 | * ######################################################################## | 7 | * ######################################################################## |
@@ -28,7 +28,7 @@ | |||
28 | /* | 28 | /* |
29 | * The PMC-Sierra MSP product line has at least two different interrupt | 29 | * The PMC-Sierra MSP product line has at least two different interrupt |
30 | * controllers, the SLP register based scheme and the CIC interrupt | 30 | * controllers, the SLP register based scheme and the CIC interrupt |
31 | * controller block mechanism. This file distinguishes between them | 31 | * controller block mechanism. This file distinguishes between them |
32 | * so that devices see a uniform interface. | 32 | * so that devices see a uniform interface. |
33 | */ | 33 | */ |
34 | 34 | ||
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_pci.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_pci.h index 415606903617..24948cc42461 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_pci.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_pci.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #ifndef _MSP_PCI_H_ | 26 | #ifndef _MSP_PCI_H_ |
27 | #define _MSP_PCI_H_ | 27 | #define _MSP_PCI_H_ |
28 | 28 | ||
29 | #define MSP_HAS_PCI(ID) (((u32)(ID) <= 0x4236) && ((u32)(ID) >= 0x4220)) | 29 | #define MSP_HAS_PCI(ID) (((u32)(ID) <= 0x4236) && ((u32)(ID) >= 0x4220)) |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * It is convenient to program the OATRAN register so that | 32 | * It is convenient to program the OATRAN register so that |
@@ -96,24 +96,24 @@ enum | |||
96 | config_status_command, /* 1 */ | 96 | config_status_command, /* 1 */ |
97 | config_class_revision, /* 2 */ | 97 | config_class_revision, /* 2 */ |
98 | config_BIST_header_latency_cache, /* 3 */ | 98 | config_BIST_header_latency_cache, /* 3 */ |
99 | config_BAR0, /* 4 */ | 99 | config_BAR0, /* 4 */ |
100 | config_BAR1, /* 5 */ | 100 | config_BAR1, /* 5 */ |
101 | config_BAR2, /* 6 */ | 101 | config_BAR2, /* 6 */ |
102 | config_not_used7, /* 7 */ | 102 | config_not_used7, /* 7 */ |
103 | config_not_used8, /* 8 */ | 103 | config_not_used8, /* 8 */ |
104 | config_not_used9, /* 9 */ | 104 | config_not_used9, /* 9 */ |
105 | config_CIS, /* 10 */ | 105 | config_CIS, /* 10 */ |
106 | config_subsystem, /* 11 */ | 106 | config_subsystem, /* 11 */ |
107 | config_not_used12, /* 12 */ | 107 | config_not_used12, /* 12 */ |
108 | config_capabilities, /* 13 */ | 108 | config_capabilities, /* 13 */ |
109 | config_not_used14, /* 14 */ | 109 | config_not_used14, /* 14 */ |
110 | config_lat_grant_irq, /* 15 */ | 110 | config_lat_grant_irq, /* 15 */ |
111 | config_message_control,/* 16 */ | 111 | config_message_control,/* 16 */ |
112 | config_message_addr, /* 17 */ | 112 | config_message_addr, /* 17 */ |
113 | config_message_data, /* 18 */ | 113 | config_message_data, /* 18 */ |
114 | config_VPD_addr, /* 19 */ | 114 | config_VPD_addr, /* 19 */ |
115 | config_VPD_data, /* 20 */ | 115 | config_VPD_data, /* 20 */ |
116 | config_maxregs /* 21 - number of registers */ | 116 | config_maxregs /* 21 - number of registers */ |
117 | }; | 117 | }; |
118 | 118 | ||
119 | struct msp_pci_regs | 119 | struct msp_pci_regs |
@@ -132,15 +132,15 @@ struct msp_pci_regs | |||
132 | pcireg hop_unused_2C; /* +0x2C */ | 132 | pcireg hop_unused_2C; /* +0x2C */ |
133 | pcireg hop_unused_30; /* +0x30 */ | 133 | pcireg hop_unused_30; /* +0x30 */ |
134 | pcireg hop_unused_34; /* +0x34 */ | 134 | pcireg hop_unused_34; /* +0x34 */ |
135 | pcireg if_control; /* +0x38 */ | 135 | pcireg if_control; /* +0x38 */ |
136 | pcireg oatran; /* +0x3C */ | 136 | pcireg oatran; /* +0x3C */ |
137 | pcireg reset_ctl; /* +0x40 */ | 137 | pcireg reset_ctl; /* +0x40 */ |
138 | pcireg config_addr; /* +0x44 */ | 138 | pcireg config_addr; /* +0x44 */ |
139 | pcireg hop_unused_48; /* +0x48 */ | 139 | pcireg hop_unused_48; /* +0x48 */ |
140 | pcireg msg_signaled_int_status; /* +0x4C */ | 140 | pcireg msg_signaled_int_status; /* +0x4C */ |
141 | pcireg msg_signaled_int_mask; /* +0x50 */ | 141 | pcireg msg_signaled_int_mask; /* +0x50 */ |
142 | pcireg if_status; /* +0x54 */ | 142 | pcireg if_status; /* +0x54 */ |
143 | pcireg if_mask; /* +0x58 */ | 143 | pcireg if_mask; /* +0x58 */ |
144 | pcireg hop_unused_5C; /* +0x5C */ | 144 | pcireg hop_unused_5C; /* +0x5C */ |
145 | pcireg hop_unused_60; /* +0x60 */ | 145 | pcireg hop_unused_60; /* +0x60 */ |
146 | pcireg hop_unused_64; /* +0x64 */ | 146 | pcireg hop_unused_64; /* +0x64 */ |
@@ -190,9 +190,9 @@ struct msp_pci_regs | |||
190 | #define BPCI_IFSTATUS_PEI (1<<30) /* Parity error as initiator */ | 190 | #define BPCI_IFSTATUS_PEI (1<<30) /* Parity error as initiator */ |
191 | #define BPCI_IFSTATUS_PET (1<<31) /* Parity error as target */ | 191 | #define BPCI_IFSTATUS_PET (1<<31) /* Parity error as target */ |
192 | 192 | ||
193 | #define BPCI_RESETCTL_PR (1<<0) /* True if reset asserted */ | 193 | #define BPCI_RESETCTL_PR (1<<0) /* True if reset asserted */ |
194 | #define BPCI_RESETCTL_RT (1<<4) /* Release time */ | 194 | #define BPCI_RESETCTL_RT (1<<4) /* Release time */ |
195 | #define BPCI_RESETCTL_CT (1<<8) /* Config time */ | 195 | #define BPCI_RESETCTL_CT (1<<8) /* Config time */ |
196 | #define BPCI_RESETCTL_PE (1<<12) /* PCI enabled */ | 196 | #define BPCI_RESETCTL_PE (1<<12) /* PCI enabled */ |
197 | #define BPCI_RESETCTL_HM (1<<13) /* PCI host mode */ | 197 | #define BPCI_RESETCTL_HM (1<<13) /* PCI host mode */ |
198 | #define BPCI_RESETCTL_RI (1<<14) /* PCI reset in */ | 198 | #define BPCI_RESETCTL_RI (1<<14) /* PCI reset in */ |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h index 786d82daf8d6..4d3052ab89a2 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h | |||
@@ -40,7 +40,7 @@ | |||
40 | (((revision >= 0xb0) && (revision < 0xd0))) | 40 | (((revision >= 0xb0) && (revision < 0xd0))) |
41 | #define FPGA_IS_5000(revision) \ | 41 | #define FPGA_IS_5000(revision) \ |
42 | ((revision >= 0x80) && (revision <= 0x90)) | 42 | ((revision >= 0x80) && (revision <= 0x90)) |
43 | #define FPGA_IS_ZEUS(revision) ((revision < 0x7f)) | 43 | #define FPGA_IS_ZEUS(revision) ((revision < 0x7f)) |
44 | #define FPGA_IS_DUET(revision) \ | 44 | #define FPGA_IS_DUET(revision) \ |
45 | (((revision >= 0xa0) && (revision < 0xb0))) | 45 | (((revision >= 0xa0) && (revision < 0xb0))) |
46 | #define FPGA_IS_MSP4200(revision) ((revision >= 0xd0)) | 46 | #define FPGA_IS_MSP4200(revision) ((revision >= 0xd0)) |
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | #define MACHINE_TYPE_POLO "POLO" | 49 | #define MACHINE_TYPE_POLO "POLO" |
50 | #define MACHINE_TYPE_DUET "DUET" | 50 | #define MACHINE_TYPE_DUET "DUET" |
51 | #define MACHINE_TYPE_ZEUS "ZEUS" | 51 | #define MACHINE_TYPE_ZEUS "ZEUS" |
52 | #define MACHINE_TYPE_MSP2000REVB "MSP2000REVB" | 52 | #define MACHINE_TYPE_MSP2000REVB "MSP2000REVB" |
53 | #define MACHINE_TYPE_MSP5000 "MSP5000" | 53 | #define MACHINE_TYPE_MSP5000 "MSP5000" |
54 | #define MACHINE_TYPE_MSP4200 "MSP4200" | 54 | #define MACHINE_TYPE_MSP4200 "MSP4200" |
@@ -58,7 +58,7 @@ | |||
58 | 58 | ||
59 | #define MACHINE_TYPE_POLO_FPGA "POLO-FPGA" | 59 | #define MACHINE_TYPE_POLO_FPGA "POLO-FPGA" |
60 | #define MACHINE_TYPE_DUET_FPGA "DUET-FPGA" | 60 | #define MACHINE_TYPE_DUET_FPGA "DUET-FPGA" |
61 | #define MACHINE_TYPE_ZEUS_FPGA "ZEUS_FPGA" | 61 | #define MACHINE_TYPE_ZEUS_FPGA "ZEUS_FPGA" |
62 | #define MACHINE_TYPE_MSP2000REVB_FPGA "MSP2000REVB-FPGA" | 62 | #define MACHINE_TYPE_MSP2000REVB_FPGA "MSP2000REVB-FPGA" |
63 | #define MACHINE_TYPE_MSP5000_FPGA "MSP5000-FPGA" | 63 | #define MACHINE_TYPE_MSP5000_FPGA "MSP5000-FPGA" |
64 | #define MACHINE_TYPE_MSP4200_FPGA "MSP4200-FPGA" | 64 | #define MACHINE_TYPE_MSP4200_FPGA "MSP4200-FPGA" |
@@ -95,7 +95,7 @@ | |||
95 | #define ENET_MII 'M' | 95 | #define ENET_MII 'M' |
96 | #define ENET_RMII 'R' | 96 | #define ENET_RMII 'R' |
97 | 97 | ||
98 | #define ENETTXD_FALLING 'F' | 98 | #define ENETTXD_FALLING 'F' |
99 | #define ENETTXD_RISING 'R' | 99 | #define ENETTXD_RISING 'R' |
100 | 100 | ||
101 | #define PCI_HOST 'H' | 101 | #define PCI_HOST 'H' |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h index 7d41474e5488..2dbc7a8cec1a 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h | |||
@@ -233,4 +233,4 @@ static inline u32 blocking_read_reg32(volatile u32 *const addr) | |||
233 | : "=&r" (tmp), "=m" (*address) \ | 233 | : "=&r" (tmp), "=m" (*address) \ |
234 | : "0" (tmp), "m" (*address)) | 234 | : "0" (tmp), "m" (*address)) |
235 | 235 | ||
236 | #endif /* __ASM_REGOPS_H__ */ | 236 | #endif /* __ASM_REGOPS_H__ */ |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regs.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regs.h index 692c1b658b92..da3a8dea2282 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regs.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regs.h | |||
@@ -37,13 +37,13 @@ | |||
37 | 37 | ||
38 | /* | 38 | /* |
39 | ######################################################################## | 39 | ######################################################################## |
40 | # Address space and device base definitions # | 40 | # Address space and device base definitions # |
41 | ######################################################################## | 41 | ######################################################################## |
42 | */ | 42 | */ |
43 | 43 | ||
44 | /* | 44 | /* |
45 | *************************************************************************** | 45 | *************************************************************************** |
46 | * System Logic and Peripherals (ELB, UART0, etc) device address space * | 46 | * System Logic and Peripherals (ELB, UART0, etc) device address space * |
47 | *************************************************************************** | 47 | *************************************************************************** |
48 | */ | 48 | */ |
49 | #define MSP_SLP_BASE 0x1c000000 | 49 | #define MSP_SLP_BASE 0x1c000000 |
@@ -53,69 +53,69 @@ | |||
53 | #define MSP_RST_SIZE 0x0C /* System reset register space */ | 53 | #define MSP_RST_SIZE 0x0C /* System reset register space */ |
54 | 54 | ||
55 | #define MSP_WTIMER_BASE (MSP_SLP_BASE + 0x04C) | 55 | #define MSP_WTIMER_BASE (MSP_SLP_BASE + 0x04C) |
56 | /* watchdog timer base */ | 56 | /* watchdog timer base */ |
57 | #define MSP_ITIMER_BASE (MSP_SLP_BASE + 0x054) | 57 | #define MSP_ITIMER_BASE (MSP_SLP_BASE + 0x054) |
58 | /* internal timer base */ | 58 | /* internal timer base */ |
59 | #define MSP_UART0_BASE (MSP_SLP_BASE + 0x100) | 59 | #define MSP_UART0_BASE (MSP_SLP_BASE + 0x100) |
60 | /* UART0 controller base */ | 60 | /* UART0 controller base */ |
61 | #define MSP_BCPY_CTRL_BASE (MSP_SLP_BASE + 0x120) | 61 | #define MSP_BCPY_CTRL_BASE (MSP_SLP_BASE + 0x120) |
62 | /* Block Copy controller base */ | 62 | /* Block Copy controller base */ |
63 | #define MSP_BCPY_DESC_BASE (MSP_SLP_BASE + 0x160) | 63 | #define MSP_BCPY_DESC_BASE (MSP_SLP_BASE + 0x160) |
64 | /* Block Copy descriptor base */ | 64 | /* Block Copy descriptor base */ |
65 | 65 | ||
66 | /* | 66 | /* |
67 | *************************************************************************** | 67 | *************************************************************************** |
68 | * PCI address space * | 68 | * PCI address space * |
69 | *************************************************************************** | 69 | *************************************************************************** |
70 | */ | 70 | */ |
71 | #define MSP_PCI_BASE 0x19000000 | 71 | #define MSP_PCI_BASE 0x19000000 |
72 | 72 | ||
73 | /* | 73 | /* |
74 | *************************************************************************** | 74 | *************************************************************************** |
75 | * MSbus device address space * | 75 | * MSbus device address space * |
76 | *************************************************************************** | 76 | *************************************************************************** |
77 | */ | 77 | */ |
78 | #define MSP_MSB_BASE 0x18000000 | 78 | #define MSP_MSB_BASE 0x18000000 |
79 | /* MSbus address start */ | 79 | /* MSbus address start */ |
80 | #define MSP_PER_BASE (MSP_MSB_BASE + 0x400000) | 80 | #define MSP_PER_BASE (MSP_MSB_BASE + 0x400000) |
81 | /* Peripheral device registers */ | 81 | /* Peripheral device registers */ |
82 | #define MSP_MAC0_BASE (MSP_MSB_BASE + 0x600000) | 82 | #define MSP_MAC0_BASE (MSP_MSB_BASE + 0x600000) |
83 | /* MAC A device registers */ | 83 | /* MAC A device registers */ |
84 | #define MSP_MAC1_BASE (MSP_MSB_BASE + 0x700000) | 84 | #define MSP_MAC1_BASE (MSP_MSB_BASE + 0x700000) |
85 | /* MAC B device registers */ | 85 | /* MAC B device registers */ |
86 | #define MSP_MAC_SIZE 0xE0 /* MAC register space */ | 86 | #define MSP_MAC_SIZE 0xE0 /* MAC register space */ |
87 | 87 | ||
88 | #define MSP_SEC_BASE (MSP_MSB_BASE + 0x800000) | 88 | #define MSP_SEC_BASE (MSP_MSB_BASE + 0x800000) |
89 | /* Security Engine registers */ | 89 | /* Security Engine registers */ |
90 | #define MSP_MAC2_BASE (MSP_MSB_BASE + 0x900000) | 90 | #define MSP_MAC2_BASE (MSP_MSB_BASE + 0x900000) |
91 | /* MAC C device registers */ | 91 | /* MAC C device registers */ |
92 | #define MSP_ADSL2_BASE (MSP_MSB_BASE + 0xA80000) | 92 | #define MSP_ADSL2_BASE (MSP_MSB_BASE + 0xA80000) |
93 | /* ADSL2 device registers */ | 93 | /* ADSL2 device registers */ |
94 | #define MSP_USB0_BASE (MSP_MSB_BASE + 0xB00000) | 94 | #define MSP_USB0_BASE (MSP_MSB_BASE + 0xB00000) |
95 | /* USB0 device registers */ | 95 | /* USB0 device registers */ |
96 | #define MSP_USB1_BASE (MSP_MSB_BASE + 0x300000) | 96 | #define MSP_USB1_BASE (MSP_MSB_BASE + 0x300000) |
97 | /* USB1 device registers */ | 97 | /* USB1 device registers */ |
98 | #define MSP_CPUIF_BASE (MSP_MSB_BASE + 0xC00000) | 98 | #define MSP_CPUIF_BASE (MSP_MSB_BASE + 0xC00000) |
99 | /* CPU interface registers */ | 99 | /* CPU interface registers */ |
100 | 100 | ||
101 | /* Devices within the MSbus peripheral block */ | 101 | /* Devices within the MSbus peripheral block */ |
102 | #define MSP_UART1_BASE (MSP_PER_BASE + 0x030) | 102 | #define MSP_UART1_BASE (MSP_PER_BASE + 0x030) |
103 | /* UART1 controller base */ | 103 | /* UART1 controller base */ |
104 | #define MSP_SPI_BASE (MSP_PER_BASE + 0x058) | 104 | #define MSP_SPI_BASE (MSP_PER_BASE + 0x058) |
105 | /* SPI/MPI control registers */ | 105 | /* SPI/MPI control registers */ |
106 | #define MSP_TWI_BASE (MSP_PER_BASE + 0x090) | 106 | #define MSP_TWI_BASE (MSP_PER_BASE + 0x090) |
107 | /* Two-wire control registers */ | 107 | /* Two-wire control registers */ |
108 | #define MSP_PTIMER_BASE (MSP_PER_BASE + 0x0F0) | 108 | #define MSP_PTIMER_BASE (MSP_PER_BASE + 0x0F0) |
109 | /* Programmable timer control */ | 109 | /* Programmable timer control */ |
110 | 110 | ||
111 | /* | 111 | /* |
112 | *************************************************************************** | 112 | *************************************************************************** |
113 | * Physical Memory configuration address space * | 113 | * Physical Memory configuration address space * |
114 | *************************************************************************** | 114 | *************************************************************************** |
115 | */ | 115 | */ |
116 | #define MSP_MEM_CFG_BASE 0x17f00000 | 116 | #define MSP_MEM_CFG_BASE 0x17f00000 |
117 | 117 | ||
118 | #define MSP_MEM_INDIRECT_CTL_10 0x10 | 118 | #define MSP_MEM_INDIRECT_CTL_10 0x10 |
119 | 119 | ||
120 | /* | 120 | /* |
121 | * Notes: | 121 | * Notes: |
@@ -130,10 +130,10 @@ | |||
130 | * 3) These constants are for physical addresses which means that they | 130 | * 3) These constants are for physical addresses which means that they |
131 | * work correctly with "ioremap" and friends. This means that device | 131 | * work correctly with "ioremap" and friends. This means that device |
132 | * drivers will need to remap these addresses using ioremap and perhaps | 132 | * drivers will need to remap these addresses using ioremap and perhaps |
133 | * the readw/writew macros. Or they could use the regptr() macro | 133 | * the readw/writew macros. Or they could use the regptr() macro |
134 | * defined below, but the readw/writew calls are the correct thing. | 134 | * defined below, but the readw/writew calls are the correct thing. |
135 | * 4) The UARTs have an additional status register offset from the base | 135 | * 4) The UARTs have an additional status register offset from the base |
136 | * address. This register isn't used in the standard 8250 driver but | 136 | * address. This register isn't used in the standard 8250 driver but |
137 | * may be used in other software. Consult the hardware datasheet for | 137 | * may be used in other software. Consult the hardware datasheet for |
138 | * offset details. | 138 | * offset details. |
139 | * 5) For some unknown reason the security engine (MSP_SEC_BASE) registers | 139 | * 5) For some unknown reason the security engine (MSP_SEC_BASE) registers |
@@ -163,44 +163,44 @@ | |||
163 | 163 | ||
164 | /* | 164 | /* |
165 | *************************************************************************** | 165 | *************************************************************************** |
166 | * System Logic and Peripherals (RESET, ELB, etc) registers * | 166 | * System Logic and Peripherals (RESET, ELB, etc) registers * |
167 | *************************************************************************** | 167 | *************************************************************************** |
168 | */ | 168 | */ |
169 | 169 | ||
170 | /* System Control register definitions */ | 170 | /* System Control register definitions */ |
171 | #define DEV_ID_REG regptr(MSP_SLP_BASE + 0x00) | 171 | #define DEV_ID_REG regptr(MSP_SLP_BASE + 0x00) |
172 | /* Device-ID RO */ | 172 | /* Device-ID RO */ |
173 | #define FWR_ID_REG regptr(MSP_SLP_BASE + 0x04) | 173 | #define FWR_ID_REG regptr(MSP_SLP_BASE + 0x04) |
174 | /* Firmware-ID Register RW */ | 174 | /* Firmware-ID Register RW */ |
175 | #define SYS_ID_REG0 regptr(MSP_SLP_BASE + 0x08) | 175 | #define SYS_ID_REG0 regptr(MSP_SLP_BASE + 0x08) |
176 | /* System-ID Register-0 RW */ | 176 | /* System-ID Register-0 RW */ |
177 | #define SYS_ID_REG1 regptr(MSP_SLP_BASE + 0x0C) | 177 | #define SYS_ID_REG1 regptr(MSP_SLP_BASE + 0x0C) |
178 | /* System-ID Register-1 RW */ | 178 | /* System-ID Register-1 RW */ |
179 | 179 | ||
180 | /* System Reset register definitions */ | 180 | /* System Reset register definitions */ |
181 | #define RST_STS_REG regptr(MSP_SLP_BASE + 0x10) | 181 | #define RST_STS_REG regptr(MSP_SLP_BASE + 0x10) |
182 | /* System Reset Status RO */ | 182 | /* System Reset Status RO */ |
183 | #define RST_SET_REG regptr(MSP_SLP_BASE + 0x14) | 183 | #define RST_SET_REG regptr(MSP_SLP_BASE + 0x14) |
184 | /* System Set Reset WO */ | 184 | /* System Set Reset WO */ |
185 | #define RST_CLR_REG regptr(MSP_SLP_BASE + 0x18) | 185 | #define RST_CLR_REG regptr(MSP_SLP_BASE + 0x18) |
186 | /* System Clear Reset WO */ | 186 | /* System Clear Reset WO */ |
187 | 187 | ||
188 | /* System Clock Registers */ | 188 | /* System Clock Registers */ |
189 | #define PCI_SLP_REG regptr(MSP_SLP_BASE + 0x1C) | 189 | #define PCI_SLP_REG regptr(MSP_SLP_BASE + 0x1C) |
190 | /* PCI clock generator RW */ | 190 | /* PCI clock generator RW */ |
191 | #define URT_SLP_REG regptr(MSP_SLP_BASE + 0x20) | 191 | #define URT_SLP_REG regptr(MSP_SLP_BASE + 0x20) |
192 | /* UART clock generator RW */ | 192 | /* UART clock generator RW */ |
193 | /* reserved (MSP_SLP_BASE + 0x24) */ | 193 | /* reserved (MSP_SLP_BASE + 0x24) */ |
194 | /* reserved (MSP_SLP_BASE + 0x28) */ | 194 | /* reserved (MSP_SLP_BASE + 0x28) */ |
195 | #define PLL1_SLP_REG regptr(MSP_SLP_BASE + 0x2C) | 195 | #define PLL1_SLP_REG regptr(MSP_SLP_BASE + 0x2C) |
196 | /* PLL1 clock generator RW */ | 196 | /* PLL1 clock generator RW */ |
197 | #define PLL0_SLP_REG regptr(MSP_SLP_BASE + 0x30) | 197 | #define PLL0_SLP_REG regptr(MSP_SLP_BASE + 0x30) |
198 | /* PLL0 clock generator RW */ | 198 | /* PLL0 clock generator RW */ |
199 | #define MIPS_SLP_REG regptr(MSP_SLP_BASE + 0x34) | 199 | #define MIPS_SLP_REG regptr(MSP_SLP_BASE + 0x34) |
200 | /* MIPS clock generator RW */ | 200 | /* MIPS clock generator RW */ |
201 | #define VE_SLP_REG regptr(MSP_SLP_BASE + 0x38) | 201 | #define VE_SLP_REG regptr(MSP_SLP_BASE + 0x38) |
202 | /* Voice Eng clock generator RW */ | 202 | /* Voice Eng clock generator RW */ |
203 | /* reserved (MSP_SLP_BASE + 0x3C) */ | 203 | /* reserved (MSP_SLP_BASE + 0x3C) */ |
204 | #define MSB_SLP_REG regptr(MSP_SLP_BASE + 0x40) | 204 | #define MSB_SLP_REG regptr(MSP_SLP_BASE + 0x40) |
205 | /* MS-Bus clock generator RW */ | 205 | /* MS-Bus clock generator RW */ |
206 | #define SMAC_SLP_REG regptr(MSP_SLP_BASE + 0x44) | 206 | #define SMAC_SLP_REG regptr(MSP_SLP_BASE + 0x44) |
@@ -216,108 +216,108 @@ | |||
216 | #define SE_MBOX_REG regptr(MSP_SLP_BASE + 0x78) | 216 | #define SE_MBOX_REG regptr(MSP_SLP_BASE + 0x78) |
217 | /* Security Engine mailbox RW */ | 217 | /* Security Engine mailbox RW */ |
218 | #define VE_MBOX_REG regptr(MSP_SLP_BASE + 0x7C) | 218 | #define VE_MBOX_REG regptr(MSP_SLP_BASE + 0x7C) |
219 | /* Voice Engine mailbox RW */ | 219 | /* Voice Engine mailbox RW */ |
220 | 220 | ||
221 | /* ELB Controller Registers */ | 221 | /* ELB Controller Registers */ |
222 | #define CS0_CNFG_REG regptr(MSP_SLP_BASE + 0x80) | 222 | #define CS0_CNFG_REG regptr(MSP_SLP_BASE + 0x80) |
223 | /* ELB CS0 Configuration Reg */ | 223 | /* ELB CS0 Configuration Reg */ |
224 | #define CS0_ADDR_REG regptr(MSP_SLP_BASE + 0x84) | 224 | #define CS0_ADDR_REG regptr(MSP_SLP_BASE + 0x84) |
225 | /* ELB CS0 Base Address Reg */ | 225 | /* ELB CS0 Base Address Reg */ |
226 | #define CS0_MASK_REG regptr(MSP_SLP_BASE + 0x88) | 226 | #define CS0_MASK_REG regptr(MSP_SLP_BASE + 0x88) |
227 | /* ELB CS0 Mask Register */ | 227 | /* ELB CS0 Mask Register */ |
228 | #define CS0_ACCESS_REG regptr(MSP_SLP_BASE + 0x8C) | 228 | #define CS0_ACCESS_REG regptr(MSP_SLP_BASE + 0x8C) |
229 | /* ELB CS0 access register */ | 229 | /* ELB CS0 access register */ |
230 | 230 | ||
231 | #define CS1_CNFG_REG regptr(MSP_SLP_BASE + 0x90) | 231 | #define CS1_CNFG_REG regptr(MSP_SLP_BASE + 0x90) |
232 | /* ELB CS1 Configuration Reg */ | 232 | /* ELB CS1 Configuration Reg */ |
233 | #define CS1_ADDR_REG regptr(MSP_SLP_BASE + 0x94) | 233 | #define CS1_ADDR_REG regptr(MSP_SLP_BASE + 0x94) |
234 | /* ELB CS1 Base Address Reg */ | 234 | /* ELB CS1 Base Address Reg */ |
235 | #define CS1_MASK_REG regptr(MSP_SLP_BASE + 0x98) | 235 | #define CS1_MASK_REG regptr(MSP_SLP_BASE + 0x98) |
236 | /* ELB CS1 Mask Register */ | 236 | /* ELB CS1 Mask Register */ |
237 | #define CS1_ACCESS_REG regptr(MSP_SLP_BASE + 0x9C) | 237 | #define CS1_ACCESS_REG regptr(MSP_SLP_BASE + 0x9C) |
238 | /* ELB CS1 access register */ | 238 | /* ELB CS1 access register */ |
239 | 239 | ||
240 | #define CS2_CNFG_REG regptr(MSP_SLP_BASE + 0xA0) | 240 | #define CS2_CNFG_REG regptr(MSP_SLP_BASE + 0xA0) |
241 | /* ELB CS2 Configuration Reg */ | 241 | /* ELB CS2 Configuration Reg */ |
242 | #define CS2_ADDR_REG regptr(MSP_SLP_BASE + 0xA4) | 242 | #define CS2_ADDR_REG regptr(MSP_SLP_BASE + 0xA4) |
243 | /* ELB CS2 Base Address Reg */ | 243 | /* ELB CS2 Base Address Reg */ |
244 | #define CS2_MASK_REG regptr(MSP_SLP_BASE + 0xA8) | 244 | #define CS2_MASK_REG regptr(MSP_SLP_BASE + 0xA8) |
245 | /* ELB CS2 Mask Register */ | 245 | /* ELB CS2 Mask Register */ |
246 | #define CS2_ACCESS_REG regptr(MSP_SLP_BASE + 0xAC) | 246 | #define CS2_ACCESS_REG regptr(MSP_SLP_BASE + 0xAC) |
247 | /* ELB CS2 access register */ | 247 | /* ELB CS2 access register */ |
248 | 248 | ||
249 | #define CS3_CNFG_REG regptr(MSP_SLP_BASE + 0xB0) | 249 | #define CS3_CNFG_REG regptr(MSP_SLP_BASE + 0xB0) |
250 | /* ELB CS3 Configuration Reg */ | 250 | /* ELB CS3 Configuration Reg */ |
251 | #define CS3_ADDR_REG regptr(MSP_SLP_BASE + 0xB4) | 251 | #define CS3_ADDR_REG regptr(MSP_SLP_BASE + 0xB4) |
252 | /* ELB CS3 Base Address Reg */ | 252 | /* ELB CS3 Base Address Reg */ |
253 | #define CS3_MASK_REG regptr(MSP_SLP_BASE + 0xB8) | 253 | #define CS3_MASK_REG regptr(MSP_SLP_BASE + 0xB8) |
254 | /* ELB CS3 Mask Register */ | 254 | /* ELB CS3 Mask Register */ |
255 | #define CS3_ACCESS_REG regptr(MSP_SLP_BASE + 0xBC) | 255 | #define CS3_ACCESS_REG regptr(MSP_SLP_BASE + 0xBC) |
256 | /* ELB CS3 access register */ | 256 | /* ELB CS3 access register */ |
257 | 257 | ||
258 | #define CS4_CNFG_REG regptr(MSP_SLP_BASE + 0xC0) | 258 | #define CS4_CNFG_REG regptr(MSP_SLP_BASE + 0xC0) |
259 | /* ELB CS4 Configuration Reg */ | 259 | /* ELB CS4 Configuration Reg */ |
260 | #define CS4_ADDR_REG regptr(MSP_SLP_BASE + 0xC4) | 260 | #define CS4_ADDR_REG regptr(MSP_SLP_BASE + 0xC4) |
261 | /* ELB CS4 Base Address Reg */ | 261 | /* ELB CS4 Base Address Reg */ |
262 | #define CS4_MASK_REG regptr(MSP_SLP_BASE + 0xC8) | 262 | #define CS4_MASK_REG regptr(MSP_SLP_BASE + 0xC8) |
263 | /* ELB CS4 Mask Register */ | 263 | /* ELB CS4 Mask Register */ |
264 | #define CS4_ACCESS_REG regptr(MSP_SLP_BASE + 0xCC) | 264 | #define CS4_ACCESS_REG regptr(MSP_SLP_BASE + 0xCC) |
265 | /* ELB CS4 access register */ | 265 | /* ELB CS4 access register */ |
266 | 266 | ||
267 | #define CS5_CNFG_REG regptr(MSP_SLP_BASE + 0xD0) | 267 | #define CS5_CNFG_REG regptr(MSP_SLP_BASE + 0xD0) |
268 | /* ELB CS5 Configuration Reg */ | 268 | /* ELB CS5 Configuration Reg */ |
269 | #define CS5_ADDR_REG regptr(MSP_SLP_BASE + 0xD4) | 269 | #define CS5_ADDR_REG regptr(MSP_SLP_BASE + 0xD4) |
270 | /* ELB CS5 Base Address Reg */ | 270 | /* ELB CS5 Base Address Reg */ |
271 | #define CS5_MASK_REG regptr(MSP_SLP_BASE + 0xD8) | 271 | #define CS5_MASK_REG regptr(MSP_SLP_BASE + 0xD8) |
272 | /* ELB CS5 Mask Register */ | 272 | /* ELB CS5 Mask Register */ |
273 | #define CS5_ACCESS_REG regptr(MSP_SLP_BASE + 0xDC) | 273 | #define CS5_ACCESS_REG regptr(MSP_SLP_BASE + 0xDC) |
274 | /* ELB CS5 access register */ | 274 | /* ELB CS5 access register */ |
275 | 275 | ||
276 | /* reserved 0xE0 - 0xE8 */ | 276 | /* reserved 0xE0 - 0xE8 */ |
277 | #define ELB_1PC_EN_REG regptr(MSP_SLP_BASE + 0xEC) | 277 | #define ELB_1PC_EN_REG regptr(MSP_SLP_BASE + 0xEC) |
278 | /* ELB single PC card detect */ | 278 | /* ELB single PC card detect */ |
279 | 279 | ||
280 | /* reserved 0xF0 - 0xF8 */ | 280 | /* reserved 0xF0 - 0xF8 */ |
281 | #define ELB_CLK_CFG_REG regptr(MSP_SLP_BASE + 0xFC) | 281 | #define ELB_CLK_CFG_REG regptr(MSP_SLP_BASE + 0xFC) |
282 | /* SDRAM read/ELB timing Reg */ | 282 | /* SDRAM read/ELB timing Reg */ |
283 | 283 | ||
284 | /* Extended UART status registers */ | 284 | /* Extended UART status registers */ |
285 | #define UART0_STATUS_REG regptr(MSP_UART0_BASE + 0x0c0) | 285 | #define UART0_STATUS_REG regptr(MSP_UART0_BASE + 0x0c0) |
286 | /* UART Status Register 0 */ | 286 | /* UART Status Register 0 */ |
287 | #define UART1_STATUS_REG regptr(MSP_UART1_BASE + 0x170) | 287 | #define UART1_STATUS_REG regptr(MSP_UART1_BASE + 0x170) |
288 | /* UART Status Register 1 */ | 288 | /* UART Status Register 1 */ |
289 | 289 | ||
290 | /* Performance monitoring registers */ | 290 | /* Performance monitoring registers */ |
291 | #define PERF_MON_CTRL_REG regptr(MSP_SLP_BASE + 0x140) | 291 | #define PERF_MON_CTRL_REG regptr(MSP_SLP_BASE + 0x140) |
292 | /* Performance monitor control */ | 292 | /* Performance monitor control */ |
293 | #define PERF_MON_CLR_REG regptr(MSP_SLP_BASE + 0x144) | 293 | #define PERF_MON_CLR_REG regptr(MSP_SLP_BASE + 0x144) |
294 | /* Performance monitor clear */ | 294 | /* Performance monitor clear */ |
295 | #define PERF_MON_CNTH_REG regptr(MSP_SLP_BASE + 0x148) | 295 | #define PERF_MON_CNTH_REG regptr(MSP_SLP_BASE + 0x148) |
296 | /* Perf monitor counter high */ | 296 | /* Perf monitor counter high */ |
297 | #define PERF_MON_CNTL_REG regptr(MSP_SLP_BASE + 0x14C) | 297 | #define PERF_MON_CNTL_REG regptr(MSP_SLP_BASE + 0x14C) |
298 | /* Perf monitor counter low */ | 298 | /* Perf monitor counter low */ |
299 | 299 | ||
300 | /* System control registers */ | 300 | /* System control registers */ |
301 | #define SYS_CTRL_REG regptr(MSP_SLP_BASE + 0x150) | 301 | #define SYS_CTRL_REG regptr(MSP_SLP_BASE + 0x150) |
302 | /* System control register */ | 302 | /* System control register */ |
303 | #define SYS_ERR1_REG regptr(MSP_SLP_BASE + 0x154) | 303 | #define SYS_ERR1_REG regptr(MSP_SLP_BASE + 0x154) |
304 | /* System Error status 1 */ | 304 | /* System Error status 1 */ |
305 | #define SYS_ERR2_REG regptr(MSP_SLP_BASE + 0x158) | 305 | #define SYS_ERR2_REG regptr(MSP_SLP_BASE + 0x158) |
306 | /* System Error status 2 */ | 306 | /* System Error status 2 */ |
307 | #define SYS_INT_CFG_REG regptr(MSP_SLP_BASE + 0x15C) | 307 | #define SYS_INT_CFG_REG regptr(MSP_SLP_BASE + 0x15C) |
308 | /* System Interrupt config */ | 308 | /* System Interrupt config */ |
309 | 309 | ||
310 | /* Voice Engine Memory configuration */ | 310 | /* Voice Engine Memory configuration */ |
311 | #define VE_MEM_REG regptr(MSP_SLP_BASE + 0x17C) | 311 | #define VE_MEM_REG regptr(MSP_SLP_BASE + 0x17C) |
312 | /* Voice engine memory config */ | 312 | /* Voice engine memory config */ |
313 | 313 | ||
314 | /* CPU/SLP Error Status registers */ | 314 | /* CPU/SLP Error Status registers */ |
315 | #define CPU_ERR1_REG regptr(MSP_SLP_BASE + 0x180) | 315 | #define CPU_ERR1_REG regptr(MSP_SLP_BASE + 0x180) |
316 | /* CPU/SLP Error status 1 */ | 316 | /* CPU/SLP Error status 1 */ |
317 | #define CPU_ERR2_REG regptr(MSP_SLP_BASE + 0x184) | 317 | #define CPU_ERR2_REG regptr(MSP_SLP_BASE + 0x184) |
318 | /* CPU/SLP Error status 1 */ | 318 | /* CPU/SLP Error status 1 */ |
319 | 319 | ||
320 | /* Extended GPIO registers */ | 320 | /* Extended GPIO registers */ |
321 | #define EXTENDED_GPIO1_REG regptr(MSP_SLP_BASE + 0x188) | 321 | #define EXTENDED_GPIO1_REG regptr(MSP_SLP_BASE + 0x188) |
322 | #define EXTENDED_GPIO2_REG regptr(MSP_SLP_BASE + 0x18c) | 322 | #define EXTENDED_GPIO2_REG regptr(MSP_SLP_BASE + 0x18c) |
323 | #define EXTENDED_GPIO_REG EXTENDED_GPIO1_REG | 323 | #define EXTENDED_GPIO_REG EXTENDED_GPIO1_REG |
@@ -325,182 +325,182 @@ | |||
325 | 325 | ||
326 | /* System Error registers */ | 326 | /* System Error registers */ |
327 | #define SLP_ERR_STS_REG regptr(MSP_SLP_BASE + 0x190) | 327 | #define SLP_ERR_STS_REG regptr(MSP_SLP_BASE + 0x190) |
328 | /* Int status for SLP errors */ | 328 | /* Int status for SLP errors */ |
329 | #define SLP_ERR_MSK_REG regptr(MSP_SLP_BASE + 0x194) | 329 | #define SLP_ERR_MSK_REG regptr(MSP_SLP_BASE + 0x194) |
330 | /* Int mask for SLP errors */ | 330 | /* Int mask for SLP errors */ |
331 | #define SLP_ELB_ERST_REG regptr(MSP_SLP_BASE + 0x198) | 331 | #define SLP_ELB_ERST_REG regptr(MSP_SLP_BASE + 0x198) |
332 | /* External ELB reset */ | 332 | /* External ELB reset */ |
333 | #define SLP_BOOT_STS_REG regptr(MSP_SLP_BASE + 0x19C) | 333 | #define SLP_BOOT_STS_REG regptr(MSP_SLP_BASE + 0x19C) |
334 | /* Boot Status */ | 334 | /* Boot Status */ |
335 | 335 | ||
336 | /* Extended ELB addressing */ | 336 | /* Extended ELB addressing */ |
337 | #define CS0_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A0) | 337 | #define CS0_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A0) |
338 | /* CS0 Extended address */ | 338 | /* CS0 Extended address */ |
339 | #define CS1_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A4) | 339 | #define CS1_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A4) |
340 | /* CS1 Extended address */ | 340 | /* CS1 Extended address */ |
341 | #define CS2_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A8) | 341 | #define CS2_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A8) |
342 | /* CS2 Extended address */ | 342 | /* CS2 Extended address */ |
343 | #define CS3_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1AC) | 343 | #define CS3_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1AC) |
344 | /* CS3 Extended address */ | 344 | /* CS3 Extended address */ |
345 | /* reserved 0x1B0 */ | 345 | /* reserved 0x1B0 */ |
346 | #define CS5_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1B4) | 346 | #define CS5_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1B4) |
347 | /* CS5 Extended address */ | 347 | /* CS5 Extended address */ |
348 | 348 | ||
349 | /* PLL Adjustment registers */ | 349 | /* PLL Adjustment registers */ |
350 | #define PLL_LOCK_REG regptr(MSP_SLP_BASE + 0x200) | 350 | #define PLL_LOCK_REG regptr(MSP_SLP_BASE + 0x200) |
351 | /* PLL0 lock status */ | 351 | /* PLL0 lock status */ |
352 | #define PLL_ARST_REG regptr(MSP_SLP_BASE + 0x204) | 352 | #define PLL_ARST_REG regptr(MSP_SLP_BASE + 0x204) |
353 | /* PLL Analog reset status */ | 353 | /* PLL Analog reset status */ |
354 | #define PLL0_ADJ_REG regptr(MSP_SLP_BASE + 0x208) | 354 | #define PLL0_ADJ_REG regptr(MSP_SLP_BASE + 0x208) |
355 | /* PLL0 Adjustment value */ | 355 | /* PLL0 Adjustment value */ |
356 | #define PLL1_ADJ_REG regptr(MSP_SLP_BASE + 0x20C) | 356 | #define PLL1_ADJ_REG regptr(MSP_SLP_BASE + 0x20C) |
357 | /* PLL1 Adjustment value */ | 357 | /* PLL1 Adjustment value */ |
358 | 358 | ||
359 | /* | 359 | /* |
360 | *************************************************************************** | 360 | *************************************************************************** |
361 | * Peripheral Register definitions * | 361 | * Peripheral Register definitions * |
362 | *************************************************************************** | 362 | *************************************************************************** |
363 | */ | 363 | */ |
364 | 364 | ||
365 | /* Peripheral status */ | 365 | /* Peripheral status */ |
366 | #define PER_CTRL_REG regptr(MSP_PER_BASE + 0x50) | 366 | #define PER_CTRL_REG regptr(MSP_PER_BASE + 0x50) |
367 | /* Peripheral control register */ | 367 | /* Peripheral control register */ |
368 | #define PER_STS_REG regptr(MSP_PER_BASE + 0x54) | 368 | #define PER_STS_REG regptr(MSP_PER_BASE + 0x54) |
369 | /* Peripheral status register */ | 369 | /* Peripheral status register */ |
370 | 370 | ||
371 | /* SPI/MPI Registers */ | 371 | /* SPI/MPI Registers */ |
372 | #define SMPI_TX_SZ_REG regptr(MSP_PER_BASE + 0x58) | 372 | #define SMPI_TX_SZ_REG regptr(MSP_PER_BASE + 0x58) |
373 | /* SPI/MPI Tx Size register */ | 373 | /* SPI/MPI Tx Size register */ |
374 | #define SMPI_RX_SZ_REG regptr(MSP_PER_BASE + 0x5C) | 374 | #define SMPI_RX_SZ_REG regptr(MSP_PER_BASE + 0x5C) |
375 | /* SPI/MPI Rx Size register */ | 375 | /* SPI/MPI Rx Size register */ |
376 | #define SMPI_CTL_REG regptr(MSP_PER_BASE + 0x60) | 376 | #define SMPI_CTL_REG regptr(MSP_PER_BASE + 0x60) |
377 | /* SPI/MPI Control register */ | 377 | /* SPI/MPI Control register */ |
378 | #define SMPI_MS_REG regptr(MSP_PER_BASE + 0x64) | 378 | #define SMPI_MS_REG regptr(MSP_PER_BASE + 0x64) |
379 | /* SPI/MPI Chip Select reg */ | 379 | /* SPI/MPI Chip Select reg */ |
380 | #define SMPI_CORE_DATA_REG regptr(MSP_PER_BASE + 0xC0) | 380 | #define SMPI_CORE_DATA_REG regptr(MSP_PER_BASE + 0xC0) |
381 | /* SPI/MPI Core Data reg */ | 381 | /* SPI/MPI Core Data reg */ |
382 | #define SMPI_CORE_CTRL_REG regptr(MSP_PER_BASE + 0xC4) | 382 | #define SMPI_CORE_CTRL_REG regptr(MSP_PER_BASE + 0xC4) |
383 | /* SPI/MPI Core Control reg */ | 383 | /* SPI/MPI Core Control reg */ |
384 | #define SMPI_CORE_STAT_REG regptr(MSP_PER_BASE + 0xC8) | 384 | #define SMPI_CORE_STAT_REG regptr(MSP_PER_BASE + 0xC8) |
385 | /* SPI/MPI Core Status reg */ | 385 | /* SPI/MPI Core Status reg */ |
386 | #define SMPI_CORE_SSEL_REG regptr(MSP_PER_BASE + 0xCC) | 386 | #define SMPI_CORE_SSEL_REG regptr(MSP_PER_BASE + 0xCC) |
387 | /* SPI/MPI Core Ssel reg */ | 387 | /* SPI/MPI Core Ssel reg */ |
388 | #define SMPI_FIFO_REG regptr(MSP_PER_BASE + 0xD0) | 388 | #define SMPI_FIFO_REG regptr(MSP_PER_BASE + 0xD0) |
389 | /* SPI/MPI Data FIFO reg */ | 389 | /* SPI/MPI Data FIFO reg */ |
390 | 390 | ||
391 | /* Peripheral Block Error Registers */ | 391 | /* Peripheral Block Error Registers */ |
392 | #define PER_ERR_STS_REG regptr(MSP_PER_BASE + 0x70) | 392 | #define PER_ERR_STS_REG regptr(MSP_PER_BASE + 0x70) |
393 | /* Error Bit Status Register */ | 393 | /* Error Bit Status Register */ |
394 | #define PER_ERR_MSK_REG regptr(MSP_PER_BASE + 0x74) | 394 | #define PER_ERR_MSK_REG regptr(MSP_PER_BASE + 0x74) |
395 | /* Error Bit Mask Register */ | 395 | /* Error Bit Mask Register */ |
396 | #define PER_HDR1_REG regptr(MSP_PER_BASE + 0x78) | 396 | #define PER_HDR1_REG regptr(MSP_PER_BASE + 0x78) |
397 | /* Error Header 1 Register */ | 397 | /* Error Header 1 Register */ |
398 | #define PER_HDR2_REG regptr(MSP_PER_BASE + 0x7C) | 398 | #define PER_HDR2_REG regptr(MSP_PER_BASE + 0x7C) |
399 | /* Error Header 2 Register */ | 399 | /* Error Header 2 Register */ |
400 | 400 | ||
401 | /* Peripheral Block Interrupt Registers */ | 401 | /* Peripheral Block Interrupt Registers */ |
402 | #define PER_INT_STS_REG regptr(MSP_PER_BASE + 0x80) | 402 | #define PER_INT_STS_REG regptr(MSP_PER_BASE + 0x80) |
403 | /* Interrupt status register */ | 403 | /* Interrupt status register */ |
404 | #define PER_INT_MSK_REG regptr(MSP_PER_BASE + 0x84) | 404 | #define PER_INT_MSK_REG regptr(MSP_PER_BASE + 0x84) |
405 | /* Interrupt Mask Register */ | 405 | /* Interrupt Mask Register */ |
406 | #define GPIO_INT_STS_REG regptr(MSP_PER_BASE + 0x88) | 406 | #define GPIO_INT_STS_REG regptr(MSP_PER_BASE + 0x88) |
407 | /* GPIO interrupt status reg */ | 407 | /* GPIO interrupt status reg */ |
408 | #define GPIO_INT_MSK_REG regptr(MSP_PER_BASE + 0x8C) | 408 | #define GPIO_INT_MSK_REG regptr(MSP_PER_BASE + 0x8C) |
409 | /* GPIO interrupt MASK Reg */ | 409 | /* GPIO interrupt MASK Reg */ |
410 | 410 | ||
411 | /* POLO GPIO registers */ | 411 | /* POLO GPIO registers */ |
412 | #define POLO_GPIO_DAT1_REG regptr(MSP_PER_BASE + 0x0E0) | 412 | #define POLO_GPIO_DAT1_REG regptr(MSP_PER_BASE + 0x0E0) |
413 | /* Polo GPIO[8:0] data reg */ | 413 | /* Polo GPIO[8:0] data reg */ |
414 | #define POLO_GPIO_CFG1_REG regptr(MSP_PER_BASE + 0x0E4) | 414 | #define POLO_GPIO_CFG1_REG regptr(MSP_PER_BASE + 0x0E4) |
415 | /* Polo GPIO[7:0] config reg */ | 415 | /* Polo GPIO[7:0] config reg */ |
416 | #define POLO_GPIO_CFG2_REG regptr(MSP_PER_BASE + 0x0E8) | 416 | #define POLO_GPIO_CFG2_REG regptr(MSP_PER_BASE + 0x0E8) |
417 | /* Polo GPIO[15:8] config reg */ | 417 | /* Polo GPIO[15:8] config reg */ |
418 | #define POLO_GPIO_OD1_REG regptr(MSP_PER_BASE + 0x0EC) | 418 | #define POLO_GPIO_OD1_REG regptr(MSP_PER_BASE + 0x0EC) |
419 | /* Polo GPIO[31:0] output drive */ | 419 | /* Polo GPIO[31:0] output drive */ |
420 | #define POLO_GPIO_CFG3_REG regptr(MSP_PER_BASE + 0x170) | 420 | #define POLO_GPIO_CFG3_REG regptr(MSP_PER_BASE + 0x170) |
421 | /* Polo GPIO[23:16] config reg */ | 421 | /* Polo GPIO[23:16] config reg */ |
422 | #define POLO_GPIO_DAT2_REG regptr(MSP_PER_BASE + 0x174) | 422 | #define POLO_GPIO_DAT2_REG regptr(MSP_PER_BASE + 0x174) |
423 | /* Polo GPIO[15:9] data reg */ | 423 | /* Polo GPIO[15:9] data reg */ |
424 | #define POLO_GPIO_DAT3_REG regptr(MSP_PER_BASE + 0x178) | 424 | #define POLO_GPIO_DAT3_REG regptr(MSP_PER_BASE + 0x178) |
425 | /* Polo GPIO[23:16] data reg */ | 425 | /* Polo GPIO[23:16] data reg */ |
426 | #define POLO_GPIO_DAT4_REG regptr(MSP_PER_BASE + 0x17C) | 426 | #define POLO_GPIO_DAT4_REG regptr(MSP_PER_BASE + 0x17C) |
427 | /* Polo GPIO[31:24] data reg */ | 427 | /* Polo GPIO[31:24] data reg */ |
428 | #define POLO_GPIO_DAT5_REG regptr(MSP_PER_BASE + 0x180) | 428 | #define POLO_GPIO_DAT5_REG regptr(MSP_PER_BASE + 0x180) |
429 | /* Polo GPIO[39:32] data reg */ | 429 | /* Polo GPIO[39:32] data reg */ |
430 | #define POLO_GPIO_DAT6_REG regptr(MSP_PER_BASE + 0x184) | 430 | #define POLO_GPIO_DAT6_REG regptr(MSP_PER_BASE + 0x184) |
431 | /* Polo GPIO[47:40] data reg */ | 431 | /* Polo GPIO[47:40] data reg */ |
432 | #define POLO_GPIO_DAT7_REG regptr(MSP_PER_BASE + 0x188) | 432 | #define POLO_GPIO_DAT7_REG regptr(MSP_PER_BASE + 0x188) |
433 | /* Polo GPIO[54:48] data reg */ | 433 | /* Polo GPIO[54:48] data reg */ |
434 | #define POLO_GPIO_CFG4_REG regptr(MSP_PER_BASE + 0x18C) | 434 | #define POLO_GPIO_CFG4_REG regptr(MSP_PER_BASE + 0x18C) |
435 | /* Polo GPIO[31:24] config reg */ | 435 | /* Polo GPIO[31:24] config reg */ |
436 | #define POLO_GPIO_CFG5_REG regptr(MSP_PER_BASE + 0x190) | 436 | #define POLO_GPIO_CFG5_REG regptr(MSP_PER_BASE + 0x190) |
437 | /* Polo GPIO[39:32] config reg */ | 437 | /* Polo GPIO[39:32] config reg */ |
438 | #define POLO_GPIO_CFG6_REG regptr(MSP_PER_BASE + 0x194) | 438 | #define POLO_GPIO_CFG6_REG regptr(MSP_PER_BASE + 0x194) |
439 | /* Polo GPIO[47:40] config reg */ | 439 | /* Polo GPIO[47:40] config reg */ |
440 | #define POLO_GPIO_CFG7_REG regptr(MSP_PER_BASE + 0x198) | 440 | #define POLO_GPIO_CFG7_REG regptr(MSP_PER_BASE + 0x198) |
441 | /* Polo GPIO[54:48] config reg */ | 441 | /* Polo GPIO[54:48] config reg */ |
442 | #define POLO_GPIO_OD2_REG regptr(MSP_PER_BASE + 0x19C) | 442 | #define POLO_GPIO_OD2_REG regptr(MSP_PER_BASE + 0x19C) |
443 | /* Polo GPIO[54:32] output drive */ | 443 | /* Polo GPIO[54:32] output drive */ |
444 | 444 | ||
445 | /* Generic GPIO registers */ | 445 | /* Generic GPIO registers */ |
446 | #define GPIO_DATA1_REG regptr(MSP_PER_BASE + 0x170) | 446 | #define GPIO_DATA1_REG regptr(MSP_PER_BASE + 0x170) |
447 | /* GPIO[1:0] data register */ | 447 | /* GPIO[1:0] data register */ |
448 | #define GPIO_DATA2_REG regptr(MSP_PER_BASE + 0x174) | 448 | #define GPIO_DATA2_REG regptr(MSP_PER_BASE + 0x174) |
449 | /* GPIO[5:2] data register */ | 449 | /* GPIO[5:2] data register */ |
450 | #define GPIO_DATA3_REG regptr(MSP_PER_BASE + 0x178) | 450 | #define GPIO_DATA3_REG regptr(MSP_PER_BASE + 0x178) |
451 | /* GPIO[9:6] data register */ | 451 | /* GPIO[9:6] data register */ |
452 | #define GPIO_DATA4_REG regptr(MSP_PER_BASE + 0x17C) | 452 | #define GPIO_DATA4_REG regptr(MSP_PER_BASE + 0x17C) |
453 | /* GPIO[15:10] data register */ | 453 | /* GPIO[15:10] data register */ |
454 | #define GPIO_CFG1_REG regptr(MSP_PER_BASE + 0x180) | 454 | #define GPIO_CFG1_REG regptr(MSP_PER_BASE + 0x180) |
455 | /* GPIO[1:0] config register */ | 455 | /* GPIO[1:0] config register */ |
456 | #define GPIO_CFG2_REG regptr(MSP_PER_BASE + 0x184) | 456 | #define GPIO_CFG2_REG regptr(MSP_PER_BASE + 0x184) |
457 | /* GPIO[5:2] config register */ | 457 | /* GPIO[5:2] config register */ |
458 | #define GPIO_CFG3_REG regptr(MSP_PER_BASE + 0x188) | 458 | #define GPIO_CFG3_REG regptr(MSP_PER_BASE + 0x188) |
459 | /* GPIO[9:6] config register */ | 459 | /* GPIO[9:6] config register */ |
460 | #define GPIO_CFG4_REG regptr(MSP_PER_BASE + 0x18C) | 460 | #define GPIO_CFG4_REG regptr(MSP_PER_BASE + 0x18C) |
461 | /* GPIO[15:10] config register */ | 461 | /* GPIO[15:10] config register */ |
462 | #define GPIO_OD_REG regptr(MSP_PER_BASE + 0x190) | 462 | #define GPIO_OD_REG regptr(MSP_PER_BASE + 0x190) |
463 | /* GPIO[15:0] output drive */ | 463 | /* GPIO[15:0] output drive */ |
464 | 464 | ||
465 | /* | 465 | /* |
466 | *************************************************************************** | 466 | *************************************************************************** |
467 | * CPU Interface register definitions * | 467 | * CPU Interface register definitions * |
468 | *************************************************************************** | 468 | *************************************************************************** |
469 | */ | 469 | */ |
470 | #define PCI_FLUSH_REG regptr(MSP_CPUIF_BASE + 0x00) | 470 | #define PCI_FLUSH_REG regptr(MSP_CPUIF_BASE + 0x00) |
471 | /* PCI-SDRAM queue flush trigger */ | 471 | /* PCI-SDRAM queue flush trigger */ |
472 | #define OCP_ERR1_REG regptr(MSP_CPUIF_BASE + 0x04) | 472 | #define OCP_ERR1_REG regptr(MSP_CPUIF_BASE + 0x04) |
473 | /* OCP Error Attribute 1 */ | 473 | /* OCP Error Attribute 1 */ |
474 | #define OCP_ERR2_REG regptr(MSP_CPUIF_BASE + 0x08) | 474 | #define OCP_ERR2_REG regptr(MSP_CPUIF_BASE + 0x08) |
475 | /* OCP Error Attribute 2 */ | 475 | /* OCP Error Attribute 2 */ |
476 | #define OCP_STS_REG regptr(MSP_CPUIF_BASE + 0x0C) | 476 | #define OCP_STS_REG regptr(MSP_CPUIF_BASE + 0x0C) |
477 | /* OCP Error Status */ | 477 | /* OCP Error Status */ |
478 | #define CPUIF_PM_REG regptr(MSP_CPUIF_BASE + 0x10) | 478 | #define CPUIF_PM_REG regptr(MSP_CPUIF_BASE + 0x10) |
479 | /* CPU policy configuration */ | 479 | /* CPU policy configuration */ |
480 | #define CPUIF_CFG_REG regptr(MSP_CPUIF_BASE + 0x10) | 480 | #define CPUIF_CFG_REG regptr(MSP_CPUIF_BASE + 0x10) |
481 | /* Misc configuration options */ | 481 | /* Misc configuration options */ |
482 | 482 | ||
483 | /* Central Interrupt Controller Registers */ | 483 | /* Central Interrupt Controller Registers */ |
484 | #define MSP_CIC_BASE (MSP_CPUIF_BASE + 0x8000) | 484 | #define MSP_CIC_BASE (MSP_CPUIF_BASE + 0x8000) |
485 | /* Central Interrupt registers */ | 485 | /* Central Interrupt registers */ |
486 | #define CIC_EXT_CFG_REG regptr(MSP_CIC_BASE + 0x00) | 486 | #define CIC_EXT_CFG_REG regptr(MSP_CIC_BASE + 0x00) |
487 | /* External interrupt config */ | 487 | /* External interrupt config */ |
488 | #define CIC_STS_REG regptr(MSP_CIC_BASE + 0x04) | 488 | #define CIC_STS_REG regptr(MSP_CIC_BASE + 0x04) |
489 | /* CIC Interrupt Status */ | 489 | /* CIC Interrupt Status */ |
490 | #define CIC_VPE0_MSK_REG regptr(MSP_CIC_BASE + 0x08) | 490 | #define CIC_VPE0_MSK_REG regptr(MSP_CIC_BASE + 0x08) |
491 | /* VPE0 Interrupt Mask */ | 491 | /* VPE0 Interrupt Mask */ |
492 | #define CIC_VPE1_MSK_REG regptr(MSP_CIC_BASE + 0x0C) | 492 | #define CIC_VPE1_MSK_REG regptr(MSP_CIC_BASE + 0x0C) |
493 | /* VPE1 Interrupt Mask */ | 493 | /* VPE1 Interrupt Mask */ |
494 | #define CIC_TC0_MSK_REG regptr(MSP_CIC_BASE + 0x10) | 494 | #define CIC_TC0_MSK_REG regptr(MSP_CIC_BASE + 0x10) |
495 | /* Thread Context 0 Int Mask */ | 495 | /* Thread Context 0 Int Mask */ |
496 | #define CIC_TC1_MSK_REG regptr(MSP_CIC_BASE + 0x14) | 496 | #define CIC_TC1_MSK_REG regptr(MSP_CIC_BASE + 0x14) |
497 | /* Thread Context 1 Int Mask */ | 497 | /* Thread Context 1 Int Mask */ |
498 | #define CIC_TC2_MSK_REG regptr(MSP_CIC_BASE + 0x18) | 498 | #define CIC_TC2_MSK_REG regptr(MSP_CIC_BASE + 0x18) |
499 | /* Thread Context 2 Int Mask */ | 499 | /* Thread Context 2 Int Mask */ |
500 | #define CIC_TC3_MSK_REG regptr(MSP_CIC_BASE + 0x18) | 500 | #define CIC_TC3_MSK_REG regptr(MSP_CIC_BASE + 0x18) |
501 | /* Thread Context 3 Int Mask */ | 501 | /* Thread Context 3 Int Mask */ |
502 | #define CIC_TC4_MSK_REG regptr(MSP_CIC_BASE + 0x18) | 502 | #define CIC_TC4_MSK_REG regptr(MSP_CIC_BASE + 0x18) |
503 | /* Thread Context 4 Int Mask */ | 503 | /* Thread Context 4 Int Mask */ |
504 | #define CIC_PCIMSI_STS_REG regptr(MSP_CIC_BASE + 0x18) | 504 | #define CIC_PCIMSI_STS_REG regptr(MSP_CIC_BASE + 0x18) |
505 | #define CIC_PCIMSI_MSK_REG regptr(MSP_CIC_BASE + 0x18) | 505 | #define CIC_PCIMSI_MSK_REG regptr(MSP_CIC_BASE + 0x18) |
506 | #define CIC_PCIFLSH_REG regptr(MSP_CIC_BASE + 0x18) | 506 | #define CIC_PCIFLSH_REG regptr(MSP_CIC_BASE + 0x18) |
@@ -509,7 +509,7 @@ | |||
509 | 509 | ||
510 | /* | 510 | /* |
511 | *************************************************************************** | 511 | *************************************************************************** |
512 | * Memory controller registers * | 512 | * Memory controller registers * |
513 | *************************************************************************** | 513 | *************************************************************************** |
514 | */ | 514 | */ |
515 | #define MEM_CFG1_REG regptr(MSP_MEM_CFG_BASE + 0x00) | 515 | #define MEM_CFG1_REG regptr(MSP_MEM_CFG_BASE + 0x00) |
@@ -519,7 +519,7 @@ | |||
519 | 519 | ||
520 | /* | 520 | /* |
521 | *************************************************************************** | 521 | *************************************************************************** |
522 | * PCI controller registers * | 522 | * PCI controller registers * |
523 | *************************************************************************** | 523 | *************************************************************************** |
524 | */ | 524 | */ |
525 | #define PCI_BASE_REG regptr(MSP_PCI_BASE + 0x00) | 525 | #define PCI_BASE_REG regptr(MSP_PCI_BASE + 0x00) |
@@ -528,25 +528,25 @@ | |||
528 | 528 | ||
529 | /* | 529 | /* |
530 | ######################################################################## | 530 | ######################################################################## |
531 | # Register content & macro definitions # | 531 | # Register content & macro definitions # |
532 | ######################################################################## | 532 | ######################################################################## |
533 | */ | 533 | */ |
534 | 534 | ||
535 | /* | 535 | /* |
536 | *************************************************************************** | 536 | *************************************************************************** |
537 | * DEV_ID defines * | 537 | * DEV_ID defines * |
538 | *************************************************************************** | 538 | *************************************************************************** |
539 | */ | 539 | */ |
540 | #define DEV_ID_PCI_DIS (1 << 26) /* Set if PCI disabled */ | 540 | #define DEV_ID_PCI_DIS (1 << 26) /* Set if PCI disabled */ |
541 | #define DEV_ID_PCI_HOST (1 << 20) /* Set if PCI host */ | 541 | #define DEV_ID_PCI_HOST (1 << 20) /* Set if PCI host */ |
542 | #define DEV_ID_SINGLE_PC (1 << 19) /* Set if single PC Card */ | 542 | #define DEV_ID_SINGLE_PC (1 << 19) /* Set if single PC Card */ |
543 | #define DEV_ID_FAMILY (0xff << 8) /* family ID code */ | 543 | #define DEV_ID_FAMILY (0xff << 8) /* family ID code */ |
544 | #define POLO_ZEUS_SUB_FAMILY (0x7 << 16) /* sub family for Polo/Zeus */ | 544 | #define POLO_ZEUS_SUB_FAMILY (0x7 << 16) /* sub family for Polo/Zeus */ |
545 | 545 | ||
546 | #define MSPFPGA_ID (0x00 << 8) /* you are on your own here */ | 546 | #define MSPFPGA_ID (0x00 << 8) /* you are on your own here */ |
547 | #define MSP5000_ID (0x50 << 8) | 547 | #define MSP5000_ID (0x50 << 8) |
548 | #define MSP4F00_ID (0x4f << 8) /* FPGA version of MSP4200 */ | 548 | #define MSP4F00_ID (0x4f << 8) /* FPGA version of MSP4200 */ |
549 | #define MSP4E00_ID (0x4f << 8) /* FPGA version of MSP7120 */ | 549 | #define MSP4E00_ID (0x4f << 8) /* FPGA version of MSP7120 */ |
550 | #define MSP4200_ID (0x42 << 8) | 550 | #define MSP4200_ID (0x42 << 8) |
551 | #define MSP4000_ID (0x40 << 8) | 551 | #define MSP4000_ID (0x40 << 8) |
552 | #define MSP2XXX_ID (0x20 << 8) | 552 | #define MSP2XXX_ID (0x20 << 8) |
@@ -563,27 +563,27 @@ | |||
563 | 563 | ||
564 | /* | 564 | /* |
565 | *************************************************************************** | 565 | *************************************************************************** |
566 | * RESET defines * | 566 | * RESET defines * |
567 | *************************************************************************** | 567 | *************************************************************************** |
568 | */ | 568 | */ |
569 | #define MSP_GR_RST (0x01 << 0) /* Global reset bit */ | 569 | #define MSP_GR_RST (0x01 << 0) /* Global reset bit */ |
570 | #define MSP_MR_RST (0x01 << 1) /* MIPS reset bit */ | 570 | #define MSP_MR_RST (0x01 << 1) /* MIPS reset bit */ |
571 | #define MSP_PD_RST (0x01 << 2) /* PVC DMA reset bit */ | 571 | #define MSP_PD_RST (0x01 << 2) /* PVC DMA reset bit */ |
572 | #define MSP_PP_RST (0x01 << 3) /* PVC reset bit */ | 572 | #define MSP_PP_RST (0x01 << 3) /* PVC reset bit */ |
573 | /* reserved */ | 573 | /* reserved */ |
574 | #define MSP_EA_RST (0x01 << 6) /* Mac A reset bit */ | 574 | #define MSP_EA_RST (0x01 << 6) /* Mac A reset bit */ |
575 | #define MSP_EB_RST (0x01 << 7) /* Mac B reset bit */ | 575 | #define MSP_EB_RST (0x01 << 7) /* Mac B reset bit */ |
576 | #define MSP_SE_RST (0x01 << 8) /* Security Eng reset bit */ | 576 | #define MSP_SE_RST (0x01 << 8) /* Security Eng reset bit */ |
577 | #define MSP_PB_RST (0x01 << 9) /* Per block reset bit */ | 577 | #define MSP_PB_RST (0x01 << 9) /* Per block reset bit */ |
578 | #define MSP_EC_RST (0x01 << 10) /* Mac C reset bit */ | 578 | #define MSP_EC_RST (0x01 << 10) /* Mac C reset bit */ |
579 | #define MSP_TW_RST (0x01 << 11) /* TWI reset bit */ | 579 | #define MSP_TW_RST (0x01 << 11) /* TWI reset bit */ |
580 | #define MSP_SPI_RST (0x01 << 12) /* SPI/MPI reset bit */ | 580 | #define MSP_SPI_RST (0x01 << 12) /* SPI/MPI reset bit */ |
581 | #define MSP_U1_RST (0x01 << 13) /* UART1 reset bit */ | 581 | #define MSP_U1_RST (0x01 << 13) /* UART1 reset bit */ |
582 | #define MSP_U0_RST (0x01 << 14) /* UART0 reset bit */ | 582 | #define MSP_U0_RST (0x01 << 14) /* UART0 reset bit */ |
583 | 583 | ||
584 | /* | 584 | /* |
585 | *************************************************************************** | 585 | *************************************************************************** |
586 | * UART defines * | 586 | * UART defines * |
587 | *************************************************************************** | 587 | *************************************************************************** |
588 | */ | 588 | */ |
589 | #define MSP_BASE_BAUD 25000000 | 589 | #define MSP_BASE_BAUD 25000000 |
@@ -591,15 +591,15 @@ | |||
591 | 591 | ||
592 | /* | 592 | /* |
593 | *************************************************************************** | 593 | *************************************************************************** |
594 | * ELB defines * | 594 | * ELB defines * |
595 | *************************************************************************** | 595 | *************************************************************************** |
596 | */ | 596 | */ |
597 | #define PCCARD_32 0x02 /* Set if is PCCARD 32 (Cardbus) */ | 597 | #define PCCARD_32 0x02 /* Set if is PCCARD 32 (Cardbus) */ |
598 | #define SINGLE_PCCARD 0x01 /* Set to enable single PC card */ | 598 | #define SINGLE_PCCARD 0x01 /* Set to enable single PC card */ |
599 | 599 | ||
600 | /* | 600 | /* |
601 | *************************************************************************** | 601 | *************************************************************************** |
602 | * CIC defines * | 602 | * CIC defines * |
603 | *************************************************************************** | 603 | *************************************************************************** |
604 | */ | 604 | */ |
605 | 605 | ||
@@ -625,7 +625,7 @@ | |||
625 | 625 | ||
626 | /* | 626 | /* |
627 | *************************************************************************** | 627 | *************************************************************************** |
628 | * Memory Controller defines * | 628 | * Memory Controller defines * |
629 | *************************************************************************** | 629 | *************************************************************************** |
630 | */ | 630 | */ |
631 | 631 | ||
@@ -644,17 +644,17 @@ | |||
644 | 644 | ||
645 | /* | 645 | /* |
646 | *************************************************************************** | 646 | *************************************************************************** |
647 | * SPI/MPI Mode * | 647 | * SPI/MPI Mode * |
648 | *************************************************************************** | 648 | *************************************************************************** |
649 | */ | 649 | */ |
650 | #define SPI_MPI_RX_BUSY 0x00008000 /* SPI/MPI Receive Busy */ | 650 | #define SPI_MPI_RX_BUSY 0x00008000 /* SPI/MPI Receive Busy */ |
651 | #define SPI_MPI_FIFO_EMPTY 0x00004000 /* SPI/MPI Fifo Empty */ | 651 | #define SPI_MPI_FIFO_EMPTY 0x00004000 /* SPI/MPI Fifo Empty */ |
652 | #define SPI_MPI_TX_BUSY 0x00002000 /* SPI/MPI Transmit Busy */ | 652 | #define SPI_MPI_TX_BUSY 0x00002000 /* SPI/MPI Transmit Busy */ |
653 | #define SPI_MPI_FIFO_FULL 0x00001000 /* SPI/MPU FIFO full */ | 653 | #define SPI_MPI_FIFO_FULL 0x00001000 /* SPI/MPU FIFO full */ |
654 | 654 | ||
655 | /* | 655 | /* |
656 | *************************************************************************** | 656 | *************************************************************************** |
657 | * SPI/MPI Control Register * | 657 | * SPI/MPI Control Register * |
658 | *************************************************************************** | 658 | *************************************************************************** |
659 | */ | 659 | */ |
660 | #define SPI_MPI_RX_START 0x00000004 /* Start receive command */ | 660 | #define SPI_MPI_RX_START 0x00000004 /* Start receive command */ |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_slp_int.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_slp_int.h index 96d4c8ce8c83..51a66dcc429d 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_slp_int.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_slp_int.h | |||
@@ -27,9 +27,9 @@ | |||
27 | 27 | ||
28 | /* | 28 | /* |
29 | * The PMC-Sierra SLP interrupts are arranged in a 3 level cascaded | 29 | * The PMC-Sierra SLP interrupts are arranged in a 3 level cascaded |
30 | * hierarchical system. The first level are the direct MIPS interrupts | 30 | * hierarchical system. The first level are the direct MIPS interrupts |
31 | * and are assigned the interrupt range 0-7. The second level is the SLM | 31 | * and are assigned the interrupt range 0-7. The second level is the SLM |
32 | * interrupt controller and is assigned the range 8-39. The third level | 32 | * interrupt controller and is assigned the range 8-39. The third level |
33 | * comprises the Peripherial block, the PCI block, the PCI MSI block and | 33 | * comprises the Peripherial block, the PCI block, the PCI MSI block and |
34 | * the SLP. The PCI interrupts and the SLP errors are handled by the | 34 | * the SLP. The PCI interrupts and the SLP errors are handled by the |
35 | * relevant subsystems so the core interrupt code needs only concern | 35 | * relevant subsystems so the core interrupt code needs only concern |
@@ -41,11 +41,11 @@ | |||
41 | * IRQs directly connected to CPU | 41 | * IRQs directly connected to CPU |
42 | */ | 42 | */ |
43 | #define MSP_MIPS_INTBASE 0 | 43 | #define MSP_MIPS_INTBASE 0 |
44 | #define MSP_INT_SW0 0 /* IRQ for swint0, C_SW0 */ | 44 | #define MSP_INT_SW0 0 /* IRQ for swint0, C_SW0 */ |
45 | #define MSP_INT_SW1 1 /* IRQ for swint1, C_SW1 */ | 45 | #define MSP_INT_SW1 1 /* IRQ for swint1, C_SW1 */ |
46 | #define MSP_INT_MAC0 2 /* IRQ for MAC 0, C_IRQ0 */ | 46 | #define MSP_INT_MAC0 2 /* IRQ for MAC 0, C_IRQ0 */ |
47 | #define MSP_INT_MAC1 3 /* IRQ for MAC 1, C_IRQ1 */ | 47 | #define MSP_INT_MAC1 3 /* IRQ for MAC 1, C_IRQ1 */ |
48 | #define MSP_INT_C_IRQ2 4 /* Wired off, C_IRQ2 */ | 48 | #define MSP_INT_C_IRQ2 4 /* Wired off, C_IRQ2 */ |
49 | #define MSP_INT_VE 5 /* IRQ for Voice Engine, C_IRQ3 */ | 49 | #define MSP_INT_VE 5 /* IRQ for Voice Engine, C_IRQ3 */ |
50 | #define MSP_INT_SLP 6 /* IRQ for SLM block, C_IRQ4 */ | 50 | #define MSP_INT_SLP 6 /* IRQ for SLM block, C_IRQ4 */ |
51 | #define MSP_INT_TIMER 7 /* IRQ for the MIPS timer, C_IRQ5 */ | 51 | #define MSP_INT_TIMER 7 /* IRQ for the MIPS timer, C_IRQ5 */ |
@@ -57,85 +57,85 @@ | |||
57 | */ | 57 | */ |
58 | #define MSP_SLP_INTBASE (MSP_MIPS_INTBASE + 8) | 58 | #define MSP_SLP_INTBASE (MSP_MIPS_INTBASE + 8) |
59 | #define MSP_INT_EXT0 (MSP_SLP_INTBASE + 0) | 59 | #define MSP_INT_EXT0 (MSP_SLP_INTBASE + 0) |
60 | /* External interrupt 0 */ | 60 | /* External interrupt 0 */ |
61 | #define MSP_INT_EXT1 (MSP_SLP_INTBASE + 1) | 61 | #define MSP_INT_EXT1 (MSP_SLP_INTBASE + 1) |
62 | /* External interrupt 1 */ | 62 | /* External interrupt 1 */ |
63 | #define MSP_INT_EXT2 (MSP_SLP_INTBASE + 2) | 63 | #define MSP_INT_EXT2 (MSP_SLP_INTBASE + 2) |
64 | /* External interrupt 2 */ | 64 | /* External interrupt 2 */ |
65 | #define MSP_INT_EXT3 (MSP_SLP_INTBASE + 3) | 65 | #define MSP_INT_EXT3 (MSP_SLP_INTBASE + 3) |
66 | /* External interrupt 3 */ | 66 | /* External interrupt 3 */ |
67 | /* Reserved 4-7 */ | 67 | /* Reserved 4-7 */ |
68 | 68 | ||
69 | /* | 69 | /* |
70 | ************************************************************************* | 70 | ************************************************************************* |
71 | * DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER * | 71 | * DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER * |
72 | * Some MSP produces have this interrupt labelled as Voice and some are * | 72 | * Some MSP produces have this interrupt labelled as Voice and some are * |
73 | * SEC mbox ... * | 73 | * SEC mbox ... * |
74 | ************************************************************************* | 74 | ************************************************************************* |
75 | */ | 75 | */ |
76 | #define MSP_INT_SLP_VE (MSP_SLP_INTBASE + 8) | 76 | #define MSP_INT_SLP_VE (MSP_SLP_INTBASE + 8) |
77 | /* Cascaded IRQ for Voice Engine*/ | 77 | /* Cascaded IRQ for Voice Engine*/ |
78 | #define MSP_INT_SLP_TDM (MSP_SLP_INTBASE + 9) | 78 | #define MSP_INT_SLP_TDM (MSP_SLP_INTBASE + 9) |
79 | /* TDM interrupt */ | 79 | /* TDM interrupt */ |
80 | #define MSP_INT_SLP_MAC0 (MSP_SLP_INTBASE + 10) | 80 | #define MSP_INT_SLP_MAC0 (MSP_SLP_INTBASE + 10) |
81 | /* Cascaded IRQ for MAC 0 */ | 81 | /* Cascaded IRQ for MAC 0 */ |
82 | #define MSP_INT_SLP_MAC1 (MSP_SLP_INTBASE + 11) | 82 | #define MSP_INT_SLP_MAC1 (MSP_SLP_INTBASE + 11) |
83 | /* Cascaded IRQ for MAC 1 */ | 83 | /* Cascaded IRQ for MAC 1 */ |
84 | #define MSP_INT_SEC (MSP_SLP_INTBASE + 12) | 84 | #define MSP_INT_SEC (MSP_SLP_INTBASE + 12) |
85 | /* IRQ for security engine */ | 85 | /* IRQ for security engine */ |
86 | #define MSP_INT_PER (MSP_SLP_INTBASE + 13) | 86 | #define MSP_INT_PER (MSP_SLP_INTBASE + 13) |
87 | /* Peripheral interrupt */ | 87 | /* Peripheral interrupt */ |
88 | #define MSP_INT_TIMER0 (MSP_SLP_INTBASE + 14) | 88 | #define MSP_INT_TIMER0 (MSP_SLP_INTBASE + 14) |
89 | /* SLP timer 0 */ | 89 | /* SLP timer 0 */ |
90 | #define MSP_INT_TIMER1 (MSP_SLP_INTBASE + 15) | 90 | #define MSP_INT_TIMER1 (MSP_SLP_INTBASE + 15) |
91 | /* SLP timer 1 */ | 91 | /* SLP timer 1 */ |
92 | #define MSP_INT_TIMER2 (MSP_SLP_INTBASE + 16) | 92 | #define MSP_INT_TIMER2 (MSP_SLP_INTBASE + 16) |
93 | /* SLP timer 2 */ | 93 | /* SLP timer 2 */ |
94 | #define MSP_INT_SLP_TIMER (MSP_SLP_INTBASE + 17) | 94 | #define MSP_INT_SLP_TIMER (MSP_SLP_INTBASE + 17) |
95 | /* Cascaded MIPS timer */ | 95 | /* Cascaded MIPS timer */ |
96 | #define MSP_INT_BLKCP (MSP_SLP_INTBASE + 18) | 96 | #define MSP_INT_BLKCP (MSP_SLP_INTBASE + 18) |
97 | /* Block Copy */ | 97 | /* Block Copy */ |
98 | #define MSP_INT_UART0 (MSP_SLP_INTBASE + 19) | 98 | #define MSP_INT_UART0 (MSP_SLP_INTBASE + 19) |
99 | /* UART 0 */ | 99 | /* UART 0 */ |
100 | #define MSP_INT_PCI (MSP_SLP_INTBASE + 20) | 100 | #define MSP_INT_PCI (MSP_SLP_INTBASE + 20) |
101 | /* PCI subsystem */ | 101 | /* PCI subsystem */ |
102 | #define MSP_INT_PCI_DBELL (MSP_SLP_INTBASE + 21) | 102 | #define MSP_INT_PCI_DBELL (MSP_SLP_INTBASE + 21) |
103 | /* PCI doorbell */ | 103 | /* PCI doorbell */ |
104 | #define MSP_INT_PCI_MSI (MSP_SLP_INTBASE + 22) | 104 | #define MSP_INT_PCI_MSI (MSP_SLP_INTBASE + 22) |
105 | /* PCI Message Signal */ | 105 | /* PCI Message Signal */ |
106 | #define MSP_INT_PCI_BC0 (MSP_SLP_INTBASE + 23) | 106 | #define MSP_INT_PCI_BC0 (MSP_SLP_INTBASE + 23) |
107 | /* PCI Block Copy 0 */ | 107 | /* PCI Block Copy 0 */ |
108 | #define MSP_INT_PCI_BC1 (MSP_SLP_INTBASE + 24) | 108 | #define MSP_INT_PCI_BC1 (MSP_SLP_INTBASE + 24) |
109 | /* PCI Block Copy 1 */ | 109 | /* PCI Block Copy 1 */ |
110 | #define MSP_INT_SLP_ERR (MSP_SLP_INTBASE + 25) | 110 | #define MSP_INT_SLP_ERR (MSP_SLP_INTBASE + 25) |
111 | /* SLP error condition */ | 111 | /* SLP error condition */ |
112 | #define MSP_INT_MAC2 (MSP_SLP_INTBASE + 26) | 112 | #define MSP_INT_MAC2 (MSP_SLP_INTBASE + 26) |
113 | /* IRQ for MAC2 */ | 113 | /* IRQ for MAC2 */ |
114 | /* Reserved 26-31 */ | 114 | /* Reserved 26-31 */ |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * IRQs cascaded on SLP PER interrupt (MSP_INT_PER) | 117 | * IRQs cascaded on SLP PER interrupt (MSP_INT_PER) |
118 | */ | 118 | */ |
119 | #define MSP_PER_INTBASE (MSP_SLP_INTBASE + 32) | 119 | #define MSP_PER_INTBASE (MSP_SLP_INTBASE + 32) |
120 | /* Reserved 0-1 */ | 120 | /* Reserved 0-1 */ |
121 | #define MSP_INT_UART1 (MSP_PER_INTBASE + 2) | 121 | #define MSP_INT_UART1 (MSP_PER_INTBASE + 2) |
122 | /* UART 1 */ | 122 | /* UART 1 */ |
123 | /* Reserved 3-5 */ | 123 | /* Reserved 3-5 */ |
124 | #define MSP_INT_2WIRE (MSP_PER_INTBASE + 6) | 124 | #define MSP_INT_2WIRE (MSP_PER_INTBASE + 6) |
125 | /* 2-wire */ | 125 | /* 2-wire */ |
126 | #define MSP_INT_TM0 (MSP_PER_INTBASE + 7) | 126 | #define MSP_INT_TM0 (MSP_PER_INTBASE + 7) |
127 | /* Peripheral timer block out 0 */ | 127 | /* Peripheral timer block out 0 */ |
128 | #define MSP_INT_TM1 (MSP_PER_INTBASE + 8) | 128 | #define MSP_INT_TM1 (MSP_PER_INTBASE + 8) |
129 | /* Peripheral timer block out 1 */ | 129 | /* Peripheral timer block out 1 */ |
130 | /* Reserved 9 */ | 130 | /* Reserved 9 */ |
131 | #define MSP_INT_SPRX (MSP_PER_INTBASE + 10) | 131 | #define MSP_INT_SPRX (MSP_PER_INTBASE + 10) |
132 | /* SPI RX complete */ | 132 | /* SPI RX complete */ |
133 | #define MSP_INT_SPTX (MSP_PER_INTBASE + 11) | 133 | #define MSP_INT_SPTX (MSP_PER_INTBASE + 11) |
134 | /* SPI TX complete */ | 134 | /* SPI TX complete */ |
135 | #define MSP_INT_GPIO (MSP_PER_INTBASE + 12) | 135 | #define MSP_INT_GPIO (MSP_PER_INTBASE + 12) |
136 | /* GPIO */ | 136 | /* GPIO */ |
137 | #define MSP_INT_PER_ERR (MSP_PER_INTBASE + 13) | 137 | #define MSP_INT_PER_ERR (MSP_PER_INTBASE + 13) |
138 | /* Peripheral error */ | 138 | /* Peripheral error */ |
139 | /* Reserved 14-31 */ | 139 | /* Reserved 14-31 */ |
140 | 140 | ||
141 | #endif /* !_MSP_SLP_INT_H */ | 141 | #endif /* !_MSP_SLP_INT_H */ |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h index 4c9348df9df2..aa45e6a07126 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #define MSP_USB0_HS_END (MSP_USB0_BASE + 0x401FF) | 40 | #define MSP_USB0_HS_END (MSP_USB0_BASE + 0x401FF) |
41 | 41 | ||
42 | /* Register spaces for USB host 1 */ | 42 | /* Register spaces for USB host 1 */ |
43 | #define MSP_USB1_MAB_START (MSP_USB1_BASE + 0x0) | 43 | #define MSP_USB1_MAB_START (MSP_USB1_BASE + 0x0) |
44 | #define MSP_USB1_MAB_END (MSP_USB1_BASE + 0x17) | 44 | #define MSP_USB1_MAB_END (MSP_USB1_BASE + 0x17) |
45 | #define MSP_USB1_ID_START (MSP_USB1_BASE + 0x40000) | 45 | #define MSP_USB1_ID_START (MSP_USB1_BASE + 0x40000) |
46 | #define MSP_USB1_ID_END (MSP_USB1_BASE + 0x4008f) | 46 | #define MSP_USB1_ID_END (MSP_USB1_BASE + 0x4008f) |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/war.h b/arch/mips/include/asm/pmc-sierra/msp71xx/war.h index c74eb1657f5f..a60bf9dd14ae 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/war.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/war.h | |||
@@ -21,9 +21,9 @@ | |||
21 | #define R10000_LLSC_WAR 0 | 21 | #define R10000_LLSC_WAR 0 |
22 | #if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW) || \ | 22 | #if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW) || \ |
23 | defined(CONFIG_PMC_MSP7120_FPGA) | 23 | defined(CONFIG_PMC_MSP7120_FPGA) |
24 | #define MIPS34K_MISSED_ITLB_WAR 1 | 24 | #define MIPS34K_MISSED_ITLB_WAR 1 |
25 | #else | 25 | #else |
26 | #define MIPS34K_MISSED_ITLB_WAR 0 | 26 | #define MIPS34K_MISSED_ITLB_WAR 0 |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | #endif /* __ASM_MIPS_PMC_SIERRA_WAR_H */ | 29 | #endif /* __ASM_MIPS_PMC_SIERRA_WAR_H */ |
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h index bd98b503f04c..2a5fa7abb346 100644 --- a/arch/mips/include/asm/processor.h +++ b/arch/mips/include/asm/processor.h | |||
@@ -112,8 +112,8 @@ struct mips_fpu_struct { | |||
112 | typedef __u32 dspreg_t; | 112 | typedef __u32 dspreg_t; |
113 | 113 | ||
114 | struct mips_dsp_state { | 114 | struct mips_dsp_state { |
115 | dspreg_t dspr[NUM_DSP_REGS]; | 115 | dspreg_t dspr[NUM_DSP_REGS]; |
116 | unsigned int dspcontrol; | 116 | unsigned int dspcontrol; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | #define INIT_CPUMASK { \ | 119 | #define INIT_CPUMASK { \ |
@@ -137,46 +137,46 @@ union mips_watch_reg_state { | |||
137 | 137 | ||
138 | struct octeon_cop2_state { | 138 | struct octeon_cop2_state { |
139 | /* DMFC2 rt, 0x0201 */ | 139 | /* DMFC2 rt, 0x0201 */ |
140 | unsigned long cop2_crc_iv; | 140 | unsigned long cop2_crc_iv; |
141 | /* DMFC2 rt, 0x0202 (Set with DMTC2 rt, 0x1202) */ | 141 | /* DMFC2 rt, 0x0202 (Set with DMTC2 rt, 0x1202) */ |
142 | unsigned long cop2_crc_length; | 142 | unsigned long cop2_crc_length; |
143 | /* DMFC2 rt, 0x0200 (set with DMTC2 rt, 0x4200) */ | 143 | /* DMFC2 rt, 0x0200 (set with DMTC2 rt, 0x4200) */ |
144 | unsigned long cop2_crc_poly; | 144 | unsigned long cop2_crc_poly; |
145 | /* DMFC2 rt, 0x0402; DMFC2 rt, 0x040A */ | 145 | /* DMFC2 rt, 0x0402; DMFC2 rt, 0x040A */ |
146 | unsigned long cop2_llm_dat[2]; | 146 | unsigned long cop2_llm_dat[2]; |
147 | /* DMFC2 rt, 0x0084 */ | 147 | /* DMFC2 rt, 0x0084 */ |
148 | unsigned long cop2_3des_iv; | 148 | unsigned long cop2_3des_iv; |
149 | /* DMFC2 rt, 0x0080; DMFC2 rt, 0x0081; DMFC2 rt, 0x0082 */ | 149 | /* DMFC2 rt, 0x0080; DMFC2 rt, 0x0081; DMFC2 rt, 0x0082 */ |
150 | unsigned long cop2_3des_key[3]; | 150 | unsigned long cop2_3des_key[3]; |
151 | /* DMFC2 rt, 0x0088 (Set with DMTC2 rt, 0x0098) */ | 151 | /* DMFC2 rt, 0x0088 (Set with DMTC2 rt, 0x0098) */ |
152 | unsigned long cop2_3des_result; | 152 | unsigned long cop2_3des_result; |
153 | /* DMFC2 rt, 0x0111 (FIXME: Read Pass1 Errata) */ | 153 | /* DMFC2 rt, 0x0111 (FIXME: Read Pass1 Errata) */ |
154 | unsigned long cop2_aes_inp0; | 154 | unsigned long cop2_aes_inp0; |
155 | /* DMFC2 rt, 0x0102; DMFC2 rt, 0x0103 */ | 155 | /* DMFC2 rt, 0x0102; DMFC2 rt, 0x0103 */ |
156 | unsigned long cop2_aes_iv[2]; | 156 | unsigned long cop2_aes_iv[2]; |
157 | /* DMFC2 rt, 0x0104; DMFC2 rt, 0x0105; DMFC2 rt, 0x0106; DMFC2 | 157 | /* DMFC2 rt, 0x0104; DMFC2 rt, 0x0105; DMFC2 rt, 0x0106; DMFC2 |
158 | * rt, 0x0107 */ | 158 | * rt, 0x0107 */ |
159 | unsigned long cop2_aes_key[4]; | 159 | unsigned long cop2_aes_key[4]; |
160 | /* DMFC2 rt, 0x0110 */ | 160 | /* DMFC2 rt, 0x0110 */ |
161 | unsigned long cop2_aes_keylen; | 161 | unsigned long cop2_aes_keylen; |
162 | /* DMFC2 rt, 0x0100; DMFC2 rt, 0x0101 */ | 162 | /* DMFC2 rt, 0x0100; DMFC2 rt, 0x0101 */ |
163 | unsigned long cop2_aes_result[2]; | 163 | unsigned long cop2_aes_result[2]; |
164 | /* DMFC2 rt, 0x0240; DMFC2 rt, 0x0241; DMFC2 rt, 0x0242; DMFC2 | 164 | /* DMFC2 rt, 0x0240; DMFC2 rt, 0x0241; DMFC2 rt, 0x0242; DMFC2 |
165 | * rt, 0x0243; DMFC2 rt, 0x0244; DMFC2 rt, 0x0245; DMFC2 rt, | 165 | * rt, 0x0243; DMFC2 rt, 0x0244; DMFC2 rt, 0x0245; DMFC2 rt, |
166 | * 0x0246; DMFC2 rt, 0x0247; DMFC2 rt, 0x0248; DMFC2 rt, | 166 | * 0x0246; DMFC2 rt, 0x0247; DMFC2 rt, 0x0248; DMFC2 rt, |
167 | * 0x0249; DMFC2 rt, 0x024A; DMFC2 rt, 0x024B; DMFC2 rt, | 167 | * 0x0249; DMFC2 rt, 0x024A; DMFC2 rt, 0x024B; DMFC2 rt, |
168 | * 0x024C; DMFC2 rt, 0x024D; DMFC2 rt, 0x024E - Pass2 */ | 168 | * 0x024C; DMFC2 rt, 0x024D; DMFC2 rt, 0x024E - Pass2 */ |
169 | unsigned long cop2_hsh_datw[15]; | 169 | unsigned long cop2_hsh_datw[15]; |
170 | /* DMFC2 rt, 0x0250; DMFC2 rt, 0x0251; DMFC2 rt, 0x0252; DMFC2 | 170 | /* DMFC2 rt, 0x0250; DMFC2 rt, 0x0251; DMFC2 rt, 0x0252; DMFC2 |
171 | * rt, 0x0253; DMFC2 rt, 0x0254; DMFC2 rt, 0x0255; DMFC2 rt, | 171 | * rt, 0x0253; DMFC2 rt, 0x0254; DMFC2 rt, 0x0255; DMFC2 rt, |
172 | * 0x0256; DMFC2 rt, 0x0257 - Pass2 */ | 172 | * 0x0256; DMFC2 rt, 0x0257 - Pass2 */ |
173 | unsigned long cop2_hsh_ivw[8]; | 173 | unsigned long cop2_hsh_ivw[8]; |
174 | /* DMFC2 rt, 0x0258; DMFC2 rt, 0x0259 - Pass2 */ | 174 | /* DMFC2 rt, 0x0258; DMFC2 rt, 0x0259 - Pass2 */ |
175 | unsigned long cop2_gfm_mult[2]; | 175 | unsigned long cop2_gfm_mult[2]; |
176 | /* DMFC2 rt, 0x025E - Pass2 */ | 176 | /* DMFC2 rt, 0x025E - Pass2 */ |
177 | unsigned long cop2_gfm_poly; | 177 | unsigned long cop2_gfm_poly; |
178 | /* DMFC2 rt, 0x025A; DMFC2 rt, 0x025B - Pass2 */ | 178 | /* DMFC2 rt, 0x025A; DMFC2 rt, 0x025B - Pass2 */ |
179 | unsigned long cop2_gfm_result[2]; | 179 | unsigned long cop2_gfm_result[2]; |
180 | }; | 180 | }; |
181 | #define INIT_OCTEON_COP2 {0,} | 181 | #define INIT_OCTEON_COP2 {0,} |
182 | 182 | ||
@@ -249,9 +249,9 @@ struct thread_struct { | |||
249 | #endif /* CONFIG_CPU_CAVIUM_OCTEON */ | 249 | #endif /* CONFIG_CPU_CAVIUM_OCTEON */ |
250 | 250 | ||
251 | #define INIT_THREAD { \ | 251 | #define INIT_THREAD { \ |
252 | /* \ | 252 | /* \ |
253 | * Saved main processor registers \ | 253 | * Saved main processor registers \ |
254 | */ \ | 254 | */ \ |
255 | .reg16 = 0, \ | 255 | .reg16 = 0, \ |
256 | .reg17 = 0, \ | 256 | .reg17 = 0, \ |
257 | .reg18 = 0, \ | 257 | .reg18 = 0, \ |
@@ -332,7 +332,7 @@ unsigned long get_wchan(struct task_struct *p); | |||
332 | * aborts compilation on some CPUs. It's simply not possible to unwind | 332 | * aborts compilation on some CPUs. It's simply not possible to unwind |
333 | * some CPU's stackframes. | 333 | * some CPU's stackframes. |
334 | * | 334 | * |
335 | * __builtin_return_address works only for non-leaf functions. We avoid the | 335 | * __builtin_return_address works only for non-leaf functions. We avoid the |
336 | * overhead of a function call by forcing the compiler to save the return | 336 | * overhead of a function call by forcing the compiler to save the return |
337 | * address register on the stack. | 337 | * address register on the stack. |
338 | */ | 338 | */ |
diff --git a/arch/mips/include/asm/r4kcache.h b/arch/mips/include/asm/r4kcache.h index 54ea47da59a1..a0b2650516ac 100644 --- a/arch/mips/include/asm/r4kcache.h +++ b/arch/mips/include/asm/r4kcache.h | |||
@@ -22,10 +22,10 @@ | |||
22 | * for indexed cache operations. Two issues here: | 22 | * for indexed cache operations. Two issues here: |
23 | * | 23 | * |
24 | * - The MIPS32 and MIPS64 specs permit an implementation to directly derive | 24 | * - The MIPS32 and MIPS64 specs permit an implementation to directly derive |
25 | * the index bits from the virtual address. This breaks with tradition | 25 | * the index bits from the virtual address. This breaks with tradition |
26 | * set by the R4000. To keep unpleasant surprises from happening we pick | 26 | * set by the R4000. To keep unpleasant surprises from happening we pick |
27 | * an address in KSEG0 / CKSEG0. | 27 | * an address in KSEG0 / CKSEG0. |
28 | * - We need a properly sign extended address for 64-bit code. To get away | 28 | * - We need a properly sign extended address for 64-bit code. To get away |
29 | * without ifdefs we let the compiler do it by a type cast. | 29 | * without ifdefs we let the compiler do it by a type cast. |
30 | */ | 30 | */ |
31 | #define INDEX_BASE CKSEG0 | 31 | #define INDEX_BASE CKSEG0 |
@@ -347,7 +347,7 @@ static inline void blast_##pfx##cache##lsize(void) \ | |||
347 | unsigned long end = start + current_cpu_data.desc.waysize; \ | 347 | unsigned long end = start + current_cpu_data.desc.waysize; \ |
348 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ | 348 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ |
349 | unsigned long ws_end = current_cpu_data.desc.ways << \ | 349 | unsigned long ws_end = current_cpu_data.desc.ways << \ |
350 | current_cpu_data.desc.waybit; \ | 350 | current_cpu_data.desc.waybit; \ |
351 | unsigned long ws, addr; \ | 351 | unsigned long ws, addr; \ |
352 | \ | 352 | \ |
353 | __##pfx##flush_prologue \ | 353 | __##pfx##flush_prologue \ |
@@ -359,7 +359,7 @@ static inline void blast_##pfx##cache##lsize(void) \ | |||
359 | __##pfx##flush_epilogue \ | 359 | __##pfx##flush_epilogue \ |
360 | } \ | 360 | } \ |
361 | \ | 361 | \ |
362 | static inline void blast_##pfx##cache##lsize##_page(unsigned long page) \ | 362 | static inline void blast_##pfx##cache##lsize##_page(unsigned long page) \ |
363 | { \ | 363 | { \ |
364 | unsigned long start = page; \ | 364 | unsigned long start = page; \ |
365 | unsigned long end = page + PAGE_SIZE; \ | 365 | unsigned long end = page + PAGE_SIZE; \ |
@@ -381,7 +381,7 @@ static inline void blast_##pfx##cache##lsize##_page_indexed(unsigned long page) | |||
381 | unsigned long end = start + PAGE_SIZE; \ | 381 | unsigned long end = start + PAGE_SIZE; \ |
382 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ | 382 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ |
383 | unsigned long ws_end = current_cpu_data.desc.ways << \ | 383 | unsigned long ws_end = current_cpu_data.desc.ways << \ |
384 | current_cpu_data.desc.waybit; \ | 384 | current_cpu_data.desc.waybit; \ |
385 | unsigned long ws, addr; \ | 385 | unsigned long ws, addr; \ |
386 | \ | 386 | \ |
387 | __##pfx##flush_prologue \ | 387 | __##pfx##flush_prologue \ |
diff --git a/arch/mips/include/asm/regdef.h b/arch/mips/include/asm/regdef.h index 785a5189b374..3c687df1d515 100644 --- a/arch/mips/include/asm/regdef.h +++ b/arch/mips/include/asm/regdef.h | |||
@@ -19,44 +19,44 @@ | |||
19 | /* | 19 | /* |
20 | * Symbolic register names for 32 bit ABI | 20 | * Symbolic register names for 32 bit ABI |
21 | */ | 21 | */ |
22 | #define zero $0 /* wired zero */ | 22 | #define zero $0 /* wired zero */ |
23 | #define AT $1 /* assembler temp - uppercase because of ".set at" */ | 23 | #define AT $1 /* assembler temp - uppercase because of ".set at" */ |
24 | #define v0 $2 /* return value */ | 24 | #define v0 $2 /* return value */ |
25 | #define v1 $3 | 25 | #define v1 $3 |
26 | #define a0 $4 /* argument registers */ | 26 | #define a0 $4 /* argument registers */ |
27 | #define a1 $5 | 27 | #define a1 $5 |
28 | #define a2 $6 | 28 | #define a2 $6 |
29 | #define a3 $7 | 29 | #define a3 $7 |
30 | #define t0 $8 /* caller saved */ | 30 | #define t0 $8 /* caller saved */ |
31 | #define t1 $9 | 31 | #define t1 $9 |
32 | #define t2 $10 | 32 | #define t2 $10 |
33 | #define t3 $11 | 33 | #define t3 $11 |
34 | #define t4 $12 | 34 | #define t4 $12 |
35 | #define ta0 $12 | 35 | #define ta0 $12 |
36 | #define t5 $13 | 36 | #define t5 $13 |
37 | #define ta1 $13 | 37 | #define ta1 $13 |
38 | #define t6 $14 | 38 | #define t6 $14 |
39 | #define ta2 $14 | 39 | #define ta2 $14 |
40 | #define t7 $15 | 40 | #define t7 $15 |
41 | #define ta3 $15 | 41 | #define ta3 $15 |
42 | #define s0 $16 /* callee saved */ | 42 | #define s0 $16 /* callee saved */ |
43 | #define s1 $17 | 43 | #define s1 $17 |
44 | #define s2 $18 | 44 | #define s2 $18 |
45 | #define s3 $19 | 45 | #define s3 $19 |
46 | #define s4 $20 | 46 | #define s4 $20 |
47 | #define s5 $21 | 47 | #define s5 $21 |
48 | #define s6 $22 | 48 | #define s6 $22 |
49 | #define s7 $23 | 49 | #define s7 $23 |
50 | #define t8 $24 /* caller saved */ | 50 | #define t8 $24 /* caller saved */ |
51 | #define t9 $25 | 51 | #define t9 $25 |
52 | #define jp $25 /* PIC jump register */ | 52 | #define jp $25 /* PIC jump register */ |
53 | #define k0 $26 /* kernel scratch */ | 53 | #define k0 $26 /* kernel scratch */ |
54 | #define k1 $27 | 54 | #define k1 $27 |
55 | #define gp $28 /* global pointer */ | 55 | #define gp $28 /* global pointer */ |
56 | #define sp $29 /* stack pointer */ | 56 | #define sp $29 /* stack pointer */ |
57 | #define fp $30 /* frame pointer */ | 57 | #define fp $30 /* frame pointer */ |
58 | #define s8 $30 /* same like fp! */ | 58 | #define s8 $30 /* same like fp! */ |
59 | #define ra $31 /* return address */ | 59 | #define ra $31 /* return address */ |
60 | 60 | ||
61 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 61 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
62 | 62 | ||
diff --git a/arch/mips/include/asm/rtlx.h b/arch/mips/include/asm/rtlx.h index 4ca3063ed2ce..90985b61dbd9 100644 --- a/arch/mips/include/asm/rtlx.h +++ b/arch/mips/include/asm/rtlx.h | |||
@@ -38,7 +38,7 @@ enum rtlx_state { | |||
38 | #define RTLX_BUFFER_SIZE 2048 | 38 | #define RTLX_BUFFER_SIZE 2048 |
39 | 39 | ||
40 | /* each channel supports read and write. | 40 | /* each channel supports read and write. |
41 | linux (vpe0) reads lx_buffer and writes rt_buffer | 41 | linux (vpe0) reads lx_buffer and writes rt_buffer |
42 | SP (vpe1) reads rt_buffer and writes lx_buffer | 42 | SP (vpe1) reads rt_buffer and writes lx_buffer |
43 | */ | 43 | */ |
44 | struct rtlx_channel { | 44 | struct rtlx_channel { |
diff --git a/arch/mips/include/asm/seccomp.h b/arch/mips/include/asm/seccomp.h index ae6306ebdcad..f29c75cf83c6 100644 --- a/arch/mips/include/asm/seccomp.h +++ b/arch/mips/include/asm/seccomp.h | |||
@@ -10,7 +10,7 @@ | |||
10 | /* | 10 | /* |
11 | * Kludge alert: | 11 | * Kludge alert: |
12 | * | 12 | * |
13 | * The generic seccomp code currently allows only a single compat ABI. Until | 13 | * The generic seccomp code currently allows only a single compat ABI. Until |
14 | * this is fixed we priorize O32 as the compat ABI over N32. | 14 | * this is fixed we priorize O32 as the compat ABI over N32. |
15 | */ | 15 | */ |
16 | #ifdef CONFIG_MIPS32_O32 | 16 | #ifdef CONFIG_MIPS32_O32 |
diff --git a/arch/mips/include/asm/sgi/gio.h b/arch/mips/include/asm/sgi/gio.h index 889cf028c95d..24be2b425be8 100644 --- a/arch/mips/include/asm/sgi/gio.h +++ b/arch/mips/include/asm/sgi/gio.h | |||
@@ -18,18 +18,18 @@ | |||
18 | * three physical connectors, but only two slots, GFX and EXP0. | 18 | * three physical connectors, but only two slots, GFX and EXP0. |
19 | * | 19 | * |
20 | * There is 10MB of GIO address space for GIO64 slot devices | 20 | * There is 10MB of GIO address space for GIO64 slot devices |
21 | * slot# slot type address range size | 21 | * slot# slot type address range size |
22 | * ----- --------- ----------------------- ----- | 22 | * ----- --------- ----------------------- ----- |
23 | * 0 GFX 0x1f000000 - 0x1f3fffff 4MB | 23 | * 0 GFX 0x1f000000 - 0x1f3fffff 4MB |
24 | * 1 EXP0 0x1f400000 - 0x1f5fffff 2MB | 24 | * 1 EXP0 0x1f400000 - 0x1f5fffff 2MB |
25 | * 2 EXP1 0x1f600000 - 0x1f9fffff 4MB | 25 | * 2 EXP1 0x1f600000 - 0x1f9fffff 4MB |
26 | * | 26 | * |
27 | * There are un-slotted devices, HPC, I/O and misc devices, which are grouped | 27 | * There are un-slotted devices, HPC, I/O and misc devices, which are grouped |
28 | * into the HPC address space. | 28 | * into the HPC address space. |
29 | * - MISC 0x1fb00000 - 0x1fbfffff 1MB | 29 | * - MISC 0x1fb00000 - 0x1fbfffff 1MB |
30 | * | 30 | * |
31 | * Following space is reserved and unused | 31 | * Following space is reserved and unused |
32 | * - RESERVED 0x18000000 - 0x1effffff 112MB | 32 | * - RESERVED 0x18000000 - 0x1effffff 112MB |
33 | * | 33 | * |
34 | * GIO bus IDs | 34 | * GIO bus IDs |
35 | * | 35 | * |
@@ -39,10 +39,10 @@ | |||
39 | * the slot undefined. | 39 | * the slot undefined. |
40 | * | 40 | * |
41 | * 32-bit IDs are divided into | 41 | * 32-bit IDs are divided into |
42 | * bits 0:6 the product ID; ranges from 0x00 to 0x7F. | 42 | * bits 0:6 the product ID; ranges from 0x00 to 0x7F. |
43 | * bit 7 0=GIO Product ID is 8 bits wide | 43 | * bit 7 0=GIO Product ID is 8 bits wide |
44 | * 1=GIO Product ID is 32 bits wide. | 44 | * 1=GIO Product ID is 32 bits wide. |
45 | * bits 8:15 manufacturer version for the product. | 45 | * bits 8:15 manufacturer version for the product. |
46 | * bit 16 0=GIO32 and GIO32-bis, 1=GIO64. | 46 | * bit 16 0=GIO32 and GIO32-bis, 1=GIO64. |
47 | * bit 17 0=no ROM present | 47 | * bit 17 0=no ROM present |
48 | * 1=ROM present on this board AND next three words | 48 | * 1=ROM present on this board AND next three words |
diff --git a/arch/mips/include/asm/sgi/hpc3.h b/arch/mips/include/asm/sgi/hpc3.h index c4729f531919..59920b345942 100644 --- a/arch/mips/include/asm/sgi/hpc3.h +++ b/arch/mips/include/asm/sgi/hpc3.h | |||
@@ -65,39 +65,39 @@ struct hpc3_scsiregs { | |||
65 | u32 _unused0[0x1000/4 - 2]; /* padding */ | 65 | u32 _unused0[0x1000/4 - 2]; /* padding */ |
66 | volatile u32 bcd; /* byte count info */ | 66 | volatile u32 bcd; /* byte count info */ |
67 | #define HPC3_SBCD_BCNTMSK 0x00003fff /* bytes to transfer from/to memory */ | 67 | #define HPC3_SBCD_BCNTMSK 0x00003fff /* bytes to transfer from/to memory */ |
68 | #define HPC3_SBCD_XIE 0x00004000 /* Send IRQ when done with cur buf */ | 68 | #define HPC3_SBCD_XIE 0x00004000 /* Send IRQ when done with cur buf */ |
69 | #define HPC3_SBCD_EOX 0x00008000 /* Indicates this is last buf in chain */ | 69 | #define HPC3_SBCD_EOX 0x00008000 /* Indicates this is last buf in chain */ |
70 | 70 | ||
71 | volatile u32 ctrl; /* control register */ | 71 | volatile u32 ctrl; /* control register */ |
72 | #define HPC3_SCTRL_IRQ 0x01 /* IRQ asserted, either dma done or parity */ | 72 | #define HPC3_SCTRL_IRQ 0x01 /* IRQ asserted, either dma done or parity */ |
73 | #define HPC3_SCTRL_ENDIAN 0x02 /* DMA endian mode, 0=big 1=little */ | 73 | #define HPC3_SCTRL_ENDIAN 0x02 /* DMA endian mode, 0=big 1=little */ |
74 | #define HPC3_SCTRL_DIR 0x04 /* DMA direction, 1=dev2mem 0=mem2dev */ | 74 | #define HPC3_SCTRL_DIR 0x04 /* DMA direction, 1=dev2mem 0=mem2dev */ |
75 | #define HPC3_SCTRL_FLUSH 0x08 /* Tells HPC3 to flush scsi fifos */ | 75 | #define HPC3_SCTRL_FLUSH 0x08 /* Tells HPC3 to flush scsi fifos */ |
76 | #define HPC3_SCTRL_ACTIVE 0x10 /* SCSI DMA channel is active */ | 76 | #define HPC3_SCTRL_ACTIVE 0x10 /* SCSI DMA channel is active */ |
77 | #define HPC3_SCTRL_AMASK 0x20 /* DMA active inhibits PIO */ | 77 | #define HPC3_SCTRL_AMASK 0x20 /* DMA active inhibits PIO */ |
78 | #define HPC3_SCTRL_CRESET 0x40 /* Resets dma channel and external controller */ | 78 | #define HPC3_SCTRL_CRESET 0x40 /* Resets dma channel and external controller */ |
79 | #define HPC3_SCTRL_PERR 0x80 /* Bad parity on HPC3 iface to scsi controller */ | 79 | #define HPC3_SCTRL_PERR 0x80 /* Bad parity on HPC3 iface to scsi controller */ |
80 | 80 | ||
81 | volatile u32 gfptr; /* current GIO fifo ptr */ | 81 | volatile u32 gfptr; /* current GIO fifo ptr */ |
82 | volatile u32 dfptr; /* current device fifo ptr */ | 82 | volatile u32 dfptr; /* current device fifo ptr */ |
83 | volatile u32 dconfig; /* DMA configuration register */ | 83 | volatile u32 dconfig; /* DMA configuration register */ |
84 | #define HPC3_SDCFG_HCLK 0x00001 /* Enable DMA half clock mode */ | 84 | #define HPC3_SDCFG_HCLK 0x00001 /* Enable DMA half clock mode */ |
85 | #define HPC3_SDCFG_D1 0x00006 /* Cycles to spend in D1 state */ | 85 | #define HPC3_SDCFG_D1 0x00006 /* Cycles to spend in D1 state */ |
86 | #define HPC3_SDCFG_D2 0x00038 /* Cycles to spend in D2 state */ | 86 | #define HPC3_SDCFG_D2 0x00038 /* Cycles to spend in D2 state */ |
87 | #define HPC3_SDCFG_D3 0x001c0 /* Cycles to spend in D3 state */ | 87 | #define HPC3_SDCFG_D3 0x001c0 /* Cycles to spend in D3 state */ |
88 | #define HPC3_SDCFG_HWAT 0x00e00 /* DMA high water mark */ | 88 | #define HPC3_SDCFG_HWAT 0x00e00 /* DMA high water mark */ |
89 | #define HPC3_SDCFG_HW 0x01000 /* Enable 16-bit halfword DMA accesses to scsi */ | 89 | #define HPC3_SDCFG_HW 0x01000 /* Enable 16-bit halfword DMA accesses to scsi */ |
90 | #define HPC3_SDCFG_SWAP 0x02000 /* Byte swap all DMA accesses */ | 90 | #define HPC3_SDCFG_SWAP 0x02000 /* Byte swap all DMA accesses */ |
91 | #define HPC3_SDCFG_EPAR 0x04000 /* Enable parity checking for DMA */ | 91 | #define HPC3_SDCFG_EPAR 0x04000 /* Enable parity checking for DMA */ |
92 | #define HPC3_SDCFG_POLL 0x08000 /* hd_dreq polarity control */ | 92 | #define HPC3_SDCFG_POLL 0x08000 /* hd_dreq polarity control */ |
93 | #define HPC3_SDCFG_ERLY 0x30000 /* hd_dreq behavior control bits */ | 93 | #define HPC3_SDCFG_ERLY 0x30000 /* hd_dreq behavior control bits */ |
94 | 94 | ||
95 | volatile u32 pconfig; /* PIO configuration register */ | 95 | volatile u32 pconfig; /* PIO configuration register */ |
96 | #define HPC3_SPCFG_P3 0x0003 /* Cycles to spend in P3 state */ | 96 | #define HPC3_SPCFG_P3 0x0003 /* Cycles to spend in P3 state */ |
97 | #define HPC3_SPCFG_P2W 0x001c /* Cycles to spend in P2 state for writes */ | 97 | #define HPC3_SPCFG_P2W 0x001c /* Cycles to spend in P2 state for writes */ |
98 | #define HPC3_SPCFG_P2R 0x01e0 /* Cycles to spend in P2 state for reads */ | 98 | #define HPC3_SPCFG_P2R 0x01e0 /* Cycles to spend in P2 state for reads */ |
99 | #define HPC3_SPCFG_P1 0x0e00 /* Cycles to spend in P1 state */ | 99 | #define HPC3_SPCFG_P1 0x0e00 /* Cycles to spend in P1 state */ |
100 | #define HPC3_SPCFG_HW 0x1000 /* Enable 16-bit halfword PIO accesses to scsi */ | 100 | #define HPC3_SPCFG_HW 0x1000 /* Enable 16-bit halfword PIO accesses to scsi */ |
101 | #define HPC3_SPCFG_SWAP 0x2000 /* Byte swap all PIO accesses */ | 101 | #define HPC3_SPCFG_SWAP 0x2000 /* Byte swap all PIO accesses */ |
102 | #define HPC3_SPCFG_EPAR 0x4000 /* Enable parity checking for PIO */ | 102 | #define HPC3_SPCFG_EPAR 0x4000 /* Enable parity checking for PIO */ |
103 | #define HPC3_SPCFG_FUJI 0x8000 /* Fujitsu scsi controller mode for faster dma/pio */ | 103 | #define HPC3_SPCFG_FUJI 0x8000 /* Fujitsu scsi controller mode for faster dma/pio */ |
@@ -108,13 +108,13 @@ struct hpc3_scsiregs { | |||
108 | /* SEEQ ethernet HPC3 registers, only one seeq per HPC3. */ | 108 | /* SEEQ ethernet HPC3 registers, only one seeq per HPC3. */ |
109 | struct hpc3_ethregs { | 109 | struct hpc3_ethregs { |
110 | /* Receiver registers. */ | 110 | /* Receiver registers. */ |
111 | volatile u32 rx_cbptr; /* current dma buffer ptr, diagnostic use only */ | 111 | volatile u32 rx_cbptr; /* current dma buffer ptr, diagnostic use only */ |
112 | volatile u32 rx_ndptr; /* next dma descriptor ptr */ | 112 | volatile u32 rx_ndptr; /* next dma descriptor ptr */ |
113 | u32 _unused0[0x1000/4 - 2]; /* padding */ | 113 | u32 _unused0[0x1000/4 - 2]; /* padding */ |
114 | volatile u32 rx_bcd; /* byte count info */ | 114 | volatile u32 rx_bcd; /* byte count info */ |
115 | #define HPC3_ERXBCD_BCNTMSK 0x00003fff /* bytes to be sent to memory */ | 115 | #define HPC3_ERXBCD_BCNTMSK 0x00003fff /* bytes to be sent to memory */ |
116 | #define HPC3_ERXBCD_XIE 0x20000000 /* HPC3 interrupts cpu at end of this buf */ | 116 | #define HPC3_ERXBCD_XIE 0x20000000 /* HPC3 interrupts cpu at end of this buf */ |
117 | #define HPC3_ERXBCD_EOX 0x80000000 /* flags this as end of descriptor chain */ | 117 | #define HPC3_ERXBCD_EOX 0x80000000 /* flags this as end of descriptor chain */ |
118 | 118 | ||
119 | volatile u32 rx_ctrl; /* control register */ | 119 | volatile u32 rx_ctrl; /* control register */ |
120 | #define HPC3_ERXCTRL_STAT50 0x0000003f /* Receive status reg bits of Seeq8003 */ | 120 | #define HPC3_ERXCTRL_STAT50 0x0000003f /* Receive status reg bits of Seeq8003 */ |
@@ -131,23 +131,23 @@ struct hpc3_ethregs { | |||
131 | volatile u32 reset; /* reset register */ | 131 | volatile u32 reset; /* reset register */ |
132 | #define HPC3_ERST_CRESET 0x1 /* Reset dma channel and external controller */ | 132 | #define HPC3_ERST_CRESET 0x1 /* Reset dma channel and external controller */ |
133 | #define HPC3_ERST_CLRIRQ 0x2 /* Clear channel interrupt */ | 133 | #define HPC3_ERST_CLRIRQ 0x2 /* Clear channel interrupt */ |
134 | #define HPC3_ERST_LBACK 0x4 /* Enable diagnostic loopback mode of Seeq8003 */ | 134 | #define HPC3_ERST_LBACK 0x4 /* Enable diagnostic loopback mode of Seeq8003 */ |
135 | 135 | ||
136 | volatile u32 dconfig; /* DMA configuration register */ | 136 | volatile u32 dconfig; /* DMA configuration register */ |
137 | #define HPC3_EDCFG_D1 0x0000f /* Cycles to spend in D1 state for PIO */ | 137 | #define HPC3_EDCFG_D1 0x0000f /* Cycles to spend in D1 state for PIO */ |
138 | #define HPC3_EDCFG_D2 0x000f0 /* Cycles to spend in D2 state for PIO */ | 138 | #define HPC3_EDCFG_D2 0x000f0 /* Cycles to spend in D2 state for PIO */ |
139 | #define HPC3_EDCFG_D3 0x00f00 /* Cycles to spend in D3 state for PIO */ | 139 | #define HPC3_EDCFG_D3 0x00f00 /* Cycles to spend in D3 state for PIO */ |
140 | #define HPC3_EDCFG_WCTRL 0x01000 /* Enable writes of desc into ex ctrl port */ | 140 | #define HPC3_EDCFG_WCTRL 0x01000 /* Enable writes of desc into ex ctrl port */ |
141 | #define HPC3_EDCFG_FRXDC 0x02000 /* Clear eop stat bits upon rxdc, hw seeq fix */ | 141 | #define HPC3_EDCFG_FRXDC 0x02000 /* Clear eop stat bits upon rxdc, hw seeq fix */ |
142 | #define HPC3_EDCFG_FEOP 0x04000 /* Bad packet marker timeout enable */ | 142 | #define HPC3_EDCFG_FEOP 0x04000 /* Bad packet marker timeout enable */ |
143 | #define HPC3_EDCFG_FIRQ 0x08000 /* Another bad packet timeout enable */ | 143 | #define HPC3_EDCFG_FIRQ 0x08000 /* Another bad packet timeout enable */ |
144 | #define HPC3_EDCFG_PTO 0x30000 /* Programmed timeout value for above two */ | 144 | #define HPC3_EDCFG_PTO 0x30000 /* Programmed timeout value for above two */ |
145 | 145 | ||
146 | volatile u32 pconfig; /* PIO configuration register */ | 146 | volatile u32 pconfig; /* PIO configuration register */ |
147 | #define HPC3_EPCFG_P1 0x000f /* Cycles to spend in P1 state for PIO */ | 147 | #define HPC3_EPCFG_P1 0x000f /* Cycles to spend in P1 state for PIO */ |
148 | #define HPC3_EPCFG_P2 0x00f0 /* Cycles to spend in P2 state for PIO */ | 148 | #define HPC3_EPCFG_P2 0x00f0 /* Cycles to spend in P2 state for PIO */ |
149 | #define HPC3_EPCFG_P3 0x0f00 /* Cycles to spend in P3 state for PIO */ | 149 | #define HPC3_EPCFG_P3 0x0f00 /* Cycles to spend in P3 state for PIO */ |
150 | #define HPC3_EPCFG_TST 0x1000 /* Diagnistic ram test feature bit */ | 150 | #define HPC3_EPCFG_TST 0x1000 /* Diagnistic ram test feature bit */ |
151 | 151 | ||
152 | u32 _unused2[0x1000/4 - 8]; /* padding */ | 152 | u32 _unused2[0x1000/4 - 8]; /* padding */ |
153 | 153 | ||
@@ -158,9 +158,9 @@ struct hpc3_ethregs { | |||
158 | volatile u32 tx_bcd; /* byte count info */ | 158 | volatile u32 tx_bcd; /* byte count info */ |
159 | #define HPC3_ETXBCD_BCNTMSK 0x00003fff /* bytes to be read from memory */ | 159 | #define HPC3_ETXBCD_BCNTMSK 0x00003fff /* bytes to be read from memory */ |
160 | #define HPC3_ETXBCD_ESAMP 0x10000000 /* if set, too late to add descriptor */ | 160 | #define HPC3_ETXBCD_ESAMP 0x10000000 /* if set, too late to add descriptor */ |
161 | #define HPC3_ETXBCD_XIE 0x20000000 /* Interrupt cpu at end of cur desc */ | 161 | #define HPC3_ETXBCD_XIE 0x20000000 /* Interrupt cpu at end of cur desc */ |
162 | #define HPC3_ETXBCD_EOP 0x40000000 /* Last byte of cur buf is end of packet */ | 162 | #define HPC3_ETXBCD_EOP 0x40000000 /* Last byte of cur buf is end of packet */ |
163 | #define HPC3_ETXBCD_EOX 0x80000000 /* This buf is the end of desc chain */ | 163 | #define HPC3_ETXBCD_EOX 0x80000000 /* This buf is the end of desc chain */ |
164 | 164 | ||
165 | volatile u32 tx_ctrl; /* control register */ | 165 | volatile u32 tx_ctrl; /* control register */ |
166 | #define HPC3_ETXCTRL_STAT30 0x0000000f /* Rdonly copy of seeq tx stat reg */ | 166 | #define HPC3_ETXCTRL_STAT30 0x0000000f /* Rdonly copy of seeq tx stat reg */ |
@@ -215,10 +215,10 @@ struct hpc3_regs { | |||
215 | 215 | ||
216 | volatile u32 istat1; /* Irq status, only bits <9:5> reliable. */ | 216 | volatile u32 istat1; /* Irq status, only bits <9:5> reliable. */ |
217 | volatile u32 bestat; /* Bus error interrupt status reg. */ | 217 | volatile u32 bestat; /* Bus error interrupt status reg. */ |
218 | #define HPC3_BESTAT_BLMASK 0x000ff /* Bus lane where bad parity occurred */ | 218 | #define HPC3_BESTAT_BLMASK 0x000ff /* Bus lane where bad parity occurred */ |
219 | #define HPC3_BESTAT_CTYPE 0x00100 /* Bus cycle type, 0=PIO 1=DMA */ | 219 | #define HPC3_BESTAT_CTYPE 0x00100 /* Bus cycle type, 0=PIO 1=DMA */ |
220 | #define HPC3_BESTAT_PIDSHIFT 9 | 220 | #define HPC3_BESTAT_PIDSHIFT 9 |
221 | #define HPC3_BESTAT_PIDMASK 0x3f700 /* DMA channel parity identifier */ | 221 | #define HPC3_BESTAT_PIDMASK 0x3f700 /* DMA channel parity identifier */ |
222 | 222 | ||
223 | u32 _unused1[0x14000/4 - 5]; /* padding */ | 223 | u32 _unused1[0x14000/4 - 5]; /* padding */ |
224 | 224 | ||
@@ -259,7 +259,7 @@ struct hpc3_regs { | |||
259 | #define HPC3_DMACFG_RTIME 0x00200000 | 259 | #define HPC3_DMACFG_RTIME 0x00200000 |
260 | /* 5 bit burst count for DMA device */ | 260 | /* 5 bit burst count for DMA device */ |
261 | #define HPC3_DMACFG_BURST_MASK 0x07c00000 | 261 | #define HPC3_DMACFG_BURST_MASK 0x07c00000 |
262 | #define HPC3_DMACFG_BURST_SHIFT 22 | 262 | #define HPC3_DMACFG_BURST_SHIFT 22 |
263 | /* Use live pbus_dreq unsynchronized signal */ | 263 | /* Use live pbus_dreq unsynchronized signal */ |
264 | #define HPC3_DMACFG_DRQLIVE 0x08000000 | 264 | #define HPC3_DMACFG_DRQLIVE 0x08000000 |
265 | volatile u32 pbus_piocfg[16][64]; | 265 | volatile u32 pbus_piocfg[16][64]; |
@@ -288,20 +288,20 @@ struct hpc3_regs { | |||
288 | 288 | ||
289 | /* PBUS PROM control regs. */ | 289 | /* PBUS PROM control regs. */ |
290 | volatile u32 pbus_promwe; /* PROM write enable register */ | 290 | volatile u32 pbus_promwe; /* PROM write enable register */ |
291 | #define HPC3_PROM_WENAB 0x1 /* Enable writes to the PROM */ | 291 | #define HPC3_PROM_WENAB 0x1 /* Enable writes to the PROM */ |
292 | 292 | ||
293 | u32 _unused5[0x0800/4 - 1]; | 293 | u32 _unused5[0x0800/4 - 1]; |
294 | volatile u32 pbus_promswap; /* Chip select swap reg */ | 294 | volatile u32 pbus_promswap; /* Chip select swap reg */ |
295 | #define HPC3_PROM_SWAP 0x1 /* invert GIO addr bit to select prom0 or prom1 */ | 295 | #define HPC3_PROM_SWAP 0x1 /* invert GIO addr bit to select prom0 or prom1 */ |
296 | 296 | ||
297 | u32 _unused6[0x0800/4 - 1]; | 297 | u32 _unused6[0x0800/4 - 1]; |
298 | volatile u32 pbus_gout; /* PROM general purpose output reg */ | 298 | volatile u32 pbus_gout; /* PROM general purpose output reg */ |
299 | #define HPC3_PROM_STAT 0x1 /* General purpose status bit in gout */ | 299 | #define HPC3_PROM_STAT 0x1 /* General purpose status bit in gout */ |
300 | 300 | ||
301 | u32 _unused7[0x1000/4 - 1]; | 301 | u32 _unused7[0x1000/4 - 1]; |
302 | volatile u32 rtcregs[14]; /* Dallas clock registers */ | 302 | volatile u32 rtcregs[14]; /* Dallas clock registers */ |
303 | u32 _unused8[50]; | 303 | u32 _unused8[50]; |
304 | volatile u32 bbram[8192-50-14]; /* Battery backed ram */ | 304 | volatile u32 bbram[8192-50-14]; /* Battery backed ram */ |
305 | }; | 305 | }; |
306 | 306 | ||
307 | /* | 307 | /* |
diff --git a/arch/mips/include/asm/sgi/ioc.h b/arch/mips/include/asm/sgi/ioc.h index 380347b648e2..53c6b1ca6860 100644 --- a/arch/mips/include/asm/sgi/ioc.h +++ b/arch/mips/include/asm/sgi/ioc.h | |||
@@ -138,7 +138,7 @@ struct sgioc_regs { | |||
138 | u8 _sysid[3]; | 138 | u8 _sysid[3]; |
139 | volatile u8 sysid; | 139 | volatile u8 sysid; |
140 | #define SGIOC_SYSID_FULLHOUSE 0x01 | 140 | #define SGIOC_SYSID_FULLHOUSE 0x01 |
141 | #define SGIOC_SYSID_BOARDREV(x) (((x) & 0x1e) >> 1) | 141 | #define SGIOC_SYSID_BOARDREV(x) (((x) & 0x1e) >> 1) |
142 | #define SGIOC_SYSID_CHIPREV(x) (((x) & 0xe0) >> 5) | 142 | #define SGIOC_SYSID_CHIPREV(x) (((x) & 0xe0) >> 5) |
143 | u32 _unused2; | 143 | u32 _unused2; |
144 | u8 _read[3]; | 144 | u8 _read[3]; |
@@ -150,7 +150,7 @@ struct sgioc_regs { | |||
150 | #define SGIOC_DMASEL_ISDNB 0x01 /* enable isdn B */ | 150 | #define SGIOC_DMASEL_ISDNB 0x01 /* enable isdn B */ |
151 | #define SGIOC_DMASEL_ISDNA 0x02 /* enable isdn A */ | 151 | #define SGIOC_DMASEL_ISDNA 0x02 /* enable isdn A */ |
152 | #define SGIOC_DMASEL_PPORT 0x04 /* use parallel DMA */ | 152 | #define SGIOC_DMASEL_PPORT 0x04 /* use parallel DMA */ |
153 | #define SGIOC_DMASEL_SCLK667MHZ 0x10 /* use 6.67MHZ serial clock */ | 153 | #define SGIOC_DMASEL_SCLK667MHZ 0x10 /* use 6.67MHZ serial clock */ |
154 | #define SGIOC_DMASEL_SCLKEXT 0x20 /* use external serial clock */ | 154 | #define SGIOC_DMASEL_SCLKEXT 0x20 /* use external serial clock */ |
155 | u32 _unused4; | 155 | u32 _unused4; |
156 | u8 _reset[3]; | 156 | u8 _reset[3]; |
diff --git a/arch/mips/include/asm/sgi/ip22.h b/arch/mips/include/asm/sgi/ip22.h index c0501f91719b..8db1a3588cf2 100644 --- a/arch/mips/include/asm/sgi/ip22.h +++ b/arch/mips/include/asm/sgi/ip22.h | |||
@@ -38,8 +38,8 @@ | |||
38 | 38 | ||
39 | #define SGI_SOFT_0_IRQ SGINT_CPU + 0 | 39 | #define SGI_SOFT_0_IRQ SGINT_CPU + 0 |
40 | #define SGI_SOFT_1_IRQ SGINT_CPU + 1 | 40 | #define SGI_SOFT_1_IRQ SGINT_CPU + 1 |
41 | #define SGI_LOCAL_0_IRQ SGINT_CPU + 2 | 41 | #define SGI_LOCAL_0_IRQ SGINT_CPU + 2 |
42 | #define SGI_LOCAL_1_IRQ SGINT_CPU + 3 | 42 | #define SGI_LOCAL_1_IRQ SGINT_CPU + 3 |
43 | #define SGI_8254_0_IRQ SGINT_CPU + 4 | 43 | #define SGI_8254_0_IRQ SGINT_CPU + 4 |
44 | #define SGI_8254_1_IRQ SGINT_CPU + 5 | 44 | #define SGI_8254_1_IRQ SGINT_CPU + 5 |
45 | #define SGI_BUSERR_IRQ SGINT_CPU + 6 | 45 | #define SGI_BUSERR_IRQ SGINT_CPU + 6 |
@@ -51,7 +51,7 @@ | |||
51 | #define SGI_WD93_1_IRQ SGINT_LOCAL0 + 2 /* 2nd onboard WD93 */ | 51 | #define SGI_WD93_1_IRQ SGINT_LOCAL0 + 2 /* 2nd onboard WD93 */ |
52 | #define SGI_ENET_IRQ SGINT_LOCAL0 + 3 /* onboard ethernet */ | 52 | #define SGI_ENET_IRQ SGINT_LOCAL0 + 3 /* onboard ethernet */ |
53 | #define SGI_MCDMA_IRQ SGINT_LOCAL0 + 4 /* MC DMA done */ | 53 | #define SGI_MCDMA_IRQ SGINT_LOCAL0 + 4 /* MC DMA done */ |
54 | #define SGI_PARPORT_IRQ SGINT_LOCAL0 + 5 /* Parallel port */ | 54 | #define SGI_PARPORT_IRQ SGINT_LOCAL0 + 5 /* Parallel port */ |
55 | #define SGI_GIO_1_IRQ SGINT_LOCAL0 + 6 /* GE / GIO-1 / 2nd-HPC */ | 55 | #define SGI_GIO_1_IRQ SGINT_LOCAL0 + 6 /* GE / GIO-1 / 2nd-HPC */ |
56 | #define SGI_MAP_0_IRQ SGINT_LOCAL0 + 7 /* Mappable interrupt 0 */ | 56 | #define SGI_MAP_0_IRQ SGINT_LOCAL0 + 7 /* Mappable interrupt 0 */ |
57 | 57 | ||
diff --git a/arch/mips/include/asm/sgi/mc.h b/arch/mips/include/asm/sgi/mc.h index 1576c2394de8..3a070cec97e7 100644 --- a/arch/mips/include/asm/sgi/mc.h +++ b/arch/mips/include/asm/sgi/mc.h | |||
@@ -29,10 +29,10 @@ struct sgimc_regs { | |||
29 | #define SGIMC_CCTRL0_IENAB 0x00002000 /* Allow interrupts from MC */ | 29 | #define SGIMC_CCTRL0_IENAB 0x00002000 /* Allow interrupts from MC */ |
30 | #define SGIMC_CCTRL0_ESNOOP 0x00004000 /* Snooping I/O enable */ | 30 | #define SGIMC_CCTRL0_ESNOOP 0x00004000 /* Snooping I/O enable */ |
31 | #define SGIMC_CCTRL0_EPROMWR 0x00008000 /* Prom writes from cpu enable */ | 31 | #define SGIMC_CCTRL0_EPROMWR 0x00008000 /* Prom writes from cpu enable */ |
32 | #define SGIMC_CCTRL0_WRESETPMEM 0x00010000 /* Perform warm reset, preserves mem */ | 32 | #define SGIMC_CCTRL0_WRESETPMEM 0x00010000 /* Perform warm reset, preserves mem */ |
33 | #define SGIMC_CCTRL0_LENDIAN 0x00020000 /* Put MC in little-endian mode */ | 33 | #define SGIMC_CCTRL0_LENDIAN 0x00020000 /* Put MC in little-endian mode */ |
34 | #define SGIMC_CCTRL0_WRESETDMEM 0x00040000 /* Warm reset, destroys mem contents */ | 34 | #define SGIMC_CCTRL0_WRESETDMEM 0x00040000 /* Warm reset, destroys mem contents */ |
35 | #define SGIMC_CCTRL0_CMEMBADPAR 0x02000000 /* Generate bad perr from cpu to mem */ | 35 | #define SGIMC_CCTRL0_CMEMBADPAR 0x02000000 /* Generate bad perr from cpu to mem */ |
36 | #define SGIMC_CCTRL0_R4KNOCHKPARR 0x04000000 /* Don't chk parity on mem data reads */ | 36 | #define SGIMC_CCTRL0_R4KNOCHKPARR 0x04000000 /* Don't chk parity on mem data reads */ |
37 | #define SGIMC_CCTRL0_GIOBTOB 0x08000000 /* Allow GIO back to back writes */ | 37 | #define SGIMC_CCTRL0_GIOBTOB 0x08000000 /* Allow GIO back to back writes */ |
38 | u32 _unused1; | 38 | u32 _unused1; |
@@ -40,13 +40,13 @@ struct sgimc_regs { | |||
40 | #define SGIMC_CCTRL1_EGIOTIMEO 0x00000010 /* GIO bus timeout enable */ | 40 | #define SGIMC_CCTRL1_EGIOTIMEO 0x00000010 /* GIO bus timeout enable */ |
41 | #define SGIMC_CCTRL1_FIXEDEHPC 0x00001000 /* Fixed HPC endianness */ | 41 | #define SGIMC_CCTRL1_FIXEDEHPC 0x00001000 /* Fixed HPC endianness */ |
42 | #define SGIMC_CCTRL1_LITTLEHPC 0x00002000 /* Little endian HPC */ | 42 | #define SGIMC_CCTRL1_LITTLEHPC 0x00002000 /* Little endian HPC */ |
43 | #define SGIMC_CCTRL1_FIXEDEEXP0 0x00004000 /* Fixed EXP0 endianness */ | 43 | #define SGIMC_CCTRL1_FIXEDEEXP0 0x00004000 /* Fixed EXP0 endianness */ |
44 | #define SGIMC_CCTRL1_LITTLEEXP0 0x00008000 /* Little endian EXP0 */ | 44 | #define SGIMC_CCTRL1_LITTLEEXP0 0x00008000 /* Little endian EXP0 */ |
45 | #define SGIMC_CCTRL1_FIXEDEEXP1 0x00010000 /* Fixed EXP1 endianness */ | 45 | #define SGIMC_CCTRL1_FIXEDEEXP1 0x00010000 /* Fixed EXP1 endianness */ |
46 | #define SGIMC_CCTRL1_LITTLEEXP1 0x00020000 /* Little endian EXP1 */ | 46 | #define SGIMC_CCTRL1_LITTLEEXP1 0x00020000 /* Little endian EXP1 */ |
47 | 47 | ||
48 | u32 _unused2; | 48 | u32 _unused2; |
49 | volatile u32 watchdogt; /* Watchdog reg rdonly, write clears */ | 49 | volatile u32 watchdogt; /* Watchdog reg rdonly, write clears */ |
50 | 50 | ||
51 | u32 _unused3; | 51 | u32 _unused3; |
52 | volatile u32 systemid; /* MC system ID register, readonly */ | 52 | volatile u32 systemid; /* MC system ID register, readonly */ |
@@ -81,11 +81,11 @@ struct sgimc_regs { | |||
81 | #define SGIMC_GIOPAR_RTIMEGFX 0x00000040 /* GFX device has realtime attr */ | 81 | #define SGIMC_GIOPAR_RTIMEGFX 0x00000040 /* GFX device has realtime attr */ |
82 | #define SGIMC_GIOPAR_RTIMEEXP0 0x00000080 /* EXP(slot0) has realtime attr */ | 82 | #define SGIMC_GIOPAR_RTIMEEXP0 0x00000080 /* EXP(slot0) has realtime attr */ |
83 | #define SGIMC_GIOPAR_RTIMEEXP1 0x00000100 /* EXP(slot1) has realtime attr */ | 83 | #define SGIMC_GIOPAR_RTIMEEXP1 0x00000100 /* EXP(slot1) has realtime attr */ |
84 | #define SGIMC_GIOPAR_MASTEREISA 0x00000200 /* EISA bus can act as bus master */ | 84 | #define SGIMC_GIOPAR_MASTEREISA 0x00000200 /* EISA bus can act as bus master */ |
85 | #define SGIMC_GIOPAR_ONEBUS 0x00000400 /* Exists one GIO64 pipelined bus */ | 85 | #define SGIMC_GIOPAR_ONEBUS 0x00000400 /* Exists one GIO64 pipelined bus */ |
86 | #define SGIMC_GIOPAR_MASTERGFX 0x00000800 /* GFX can act as a bus master */ | 86 | #define SGIMC_GIOPAR_MASTERGFX 0x00000800 /* GFX can act as a bus master */ |
87 | #define SGIMC_GIOPAR_MASTEREXP0 0x00001000 /* EXP(slot0) can bus master */ | 87 | #define SGIMC_GIOPAR_MASTEREXP0 0x00001000 /* EXP(slot0) can bus master */ |
88 | #define SGIMC_GIOPAR_MASTEREXP1 0x00002000 /* EXP(slot1) can bus master */ | 88 | #define SGIMC_GIOPAR_MASTEREXP1 0x00002000 /* EXP(slot1) can bus master */ |
89 | #define SGIMC_GIOPAR_PLINEEXP0 0x00004000 /* EXP(slot0) has pipeline attr */ | 89 | #define SGIMC_GIOPAR_PLINEEXP0 0x00004000 /* EXP(slot0) has pipeline attr */ |
90 | #define SGIMC_GIOPAR_PLINEEXP1 0x00008000 /* EXP(slot1) has pipeline attr */ | 90 | #define SGIMC_GIOPAR_PLINEEXP1 0x00008000 /* EXP(slot1) has pipeline attr */ |
91 | 91 | ||
@@ -107,9 +107,9 @@ struct sgimc_regs { | |||
107 | #define SGIMC_MCONFIG_SBANKS 0x00004000 /* Number of subbanks */ | 107 | #define SGIMC_MCONFIG_SBANKS 0x00004000 /* Number of subbanks */ |
108 | 108 | ||
109 | u32 _unused13; | 109 | u32 _unused13; |
110 | volatile u32 cmacc; /* Mem access config for CPU */ | 110 | volatile u32 cmacc; /* Mem access config for CPU */ |
111 | u32 _unused14; | 111 | u32 _unused14; |
112 | volatile u32 gmacc; /* Mem access config for GIO */ | 112 | volatile u32 gmacc; /* Mem access config for GIO */ |
113 | 113 | ||
114 | /* This define applies to both cmacc and gmacc registers above. */ | 114 | /* This define applies to both cmacc and gmacc registers above. */ |
115 | #define SGIMC_MACC_ALIASBIG 0x20000000 /* 512MB home for alias */ | 115 | #define SGIMC_MACC_ALIASBIG 0x20000000 /* 512MB home for alias */ |
diff --git a/arch/mips/include/asm/sgi/pi1.h b/arch/mips/include/asm/sgi/pi1.h index c9506915dc5c..96b1a0771ec3 100644 --- a/arch/mips/include/asm/sgi/pi1.h +++ b/arch/mips/include/asm/sgi/pi1.h | |||
@@ -28,16 +28,16 @@ struct pi1_regs { | |||
28 | #define PI1_STAT_BUSY 0x80 | 28 | #define PI1_STAT_BUSY 0x80 |
29 | u8 _dmactrl[3]; | 29 | u8 _dmactrl[3]; |
30 | volatile u8 dmactrl; | 30 | volatile u8 dmactrl; |
31 | #define PI1_DMACTRL_FIFO_EMPTY 0x01 /* fifo empty R/O */ | 31 | #define PI1_DMACTRL_FIFO_EMPTY 0x01 /* fifo empty R/O */ |
32 | #define PI1_DMACTRL_ABORT 0x02 /* reset DMA and internal fifo W/O */ | 32 | #define PI1_DMACTRL_ABORT 0x02 /* reset DMA and internal fifo W/O */ |
33 | #define PI1_DMACTRL_STDMODE 0x00 /* bits 2-3 */ | 33 | #define PI1_DMACTRL_STDMODE 0x00 /* bits 2-3 */ |
34 | #define PI1_DMACTRL_SGIMODE 0x04 /* bits 2-3 */ | 34 | #define PI1_DMACTRL_SGIMODE 0x04 /* bits 2-3 */ |
35 | #define PI1_DMACTRL_RICOHMODE 0x08 /* bits 2-3 */ | 35 | #define PI1_DMACTRL_RICOHMODE 0x08 /* bits 2-3 */ |
36 | #define PI1_DMACTRL_HPMODE 0x0c /* bits 2-3 */ | 36 | #define PI1_DMACTRL_HPMODE 0x0c /* bits 2-3 */ |
37 | #define PI1_DMACTRL_BLKMODE 0x10 /* block mode */ | 37 | #define PI1_DMACTRL_BLKMODE 0x10 /* block mode */ |
38 | #define PI1_DMACTRL_FIFO_CLEAR 0x20 /* clear fifo W/O */ | 38 | #define PI1_DMACTRL_FIFO_CLEAR 0x20 /* clear fifo W/O */ |
39 | #define PI1_DMACTRL_READ 0x40 /* read */ | 39 | #define PI1_DMACTRL_READ 0x40 /* read */ |
40 | #define PI1_DMACTRL_RUN 0x80 /* pedal to the metal */ | 40 | #define PI1_DMACTRL_RUN 0x80 /* pedal to the metal */ |
41 | u8 _intstat[3]; | 41 | u8 _intstat[3]; |
42 | volatile u8 intstat; | 42 | volatile u8 intstat; |
43 | #define PI1_INTSTAT_ACK 0x04 | 43 | #define PI1_INTSTAT_ACK 0x04 |
diff --git a/arch/mips/include/asm/sgialib.h b/arch/mips/include/asm/sgialib.h index f58115769457..753275accd18 100644 --- a/arch/mips/include/asm/sgialib.h +++ b/arch/mips/include/asm/sgialib.h | |||
@@ -37,7 +37,7 @@ extern char prom_getchar(void); | |||
37 | * in chain is CURR is NULL. | 37 | * in chain is CURR is NULL. |
38 | */ | 38 | */ |
39 | extern struct linux_mdesc *prom_getmdesc(struct linux_mdesc *curr); | 39 | extern struct linux_mdesc *prom_getmdesc(struct linux_mdesc *curr); |
40 | #define PROM_NULL_MDESC ((struct linux_mdesc *) 0) | 40 | #define PROM_NULL_MDESC ((struct linux_mdesc *) 0) |
41 | 41 | ||
42 | /* Called by prom_init to setup the physical memory pmemblock | 42 | /* Called by prom_init to setup the physical memory pmemblock |
43 | * array. | 43 | * array. |
diff --git a/arch/mips/include/asm/sgiarcs.h b/arch/mips/include/asm/sgiarcs.h index 3dce7c788b3e..26ddfff28c8e 100644 --- a/arch/mips/include/asm/sgiarcs.h +++ b/arch/mips/include/asm/sgiarcs.h | |||
@@ -16,33 +16,33 @@ | |||
16 | #include <asm/fw/arc/types.h> | 16 | #include <asm/fw/arc/types.h> |
17 | 17 | ||
18 | /* Various ARCS error codes. */ | 18 | /* Various ARCS error codes. */ |
19 | #define PROM_ESUCCESS 0x00 | 19 | #define PROM_ESUCCESS 0x00 |
20 | #define PROM_E2BIG 0x01 | 20 | #define PROM_E2BIG 0x01 |
21 | #define PROM_EACCESS 0x02 | 21 | #define PROM_EACCESS 0x02 |
22 | #define PROM_EAGAIN 0x03 | 22 | #define PROM_EAGAIN 0x03 |
23 | #define PROM_EBADF 0x04 | 23 | #define PROM_EBADF 0x04 |
24 | #define PROM_EBUSY 0x05 | 24 | #define PROM_EBUSY 0x05 |
25 | #define PROM_EFAULT 0x06 | 25 | #define PROM_EFAULT 0x06 |
26 | #define PROM_EINVAL 0x07 | 26 | #define PROM_EINVAL 0x07 |
27 | #define PROM_EIO 0x08 | 27 | #define PROM_EIO 0x08 |
28 | #define PROM_EISDIR 0x09 | 28 | #define PROM_EISDIR 0x09 |
29 | #define PROM_EMFILE 0x0a | 29 | #define PROM_EMFILE 0x0a |
30 | #define PROM_EMLINK 0x0b | 30 | #define PROM_EMLINK 0x0b |
31 | #define PROM_ENAMETOOLONG 0x0c | 31 | #define PROM_ENAMETOOLONG 0x0c |
32 | #define PROM_ENODEV 0x0d | 32 | #define PROM_ENODEV 0x0d |
33 | #define PROM_ENOENT 0x0e | 33 | #define PROM_ENOENT 0x0e |
34 | #define PROM_ENOEXEC 0x0f | 34 | #define PROM_ENOEXEC 0x0f |
35 | #define PROM_ENOMEM 0x10 | 35 | #define PROM_ENOMEM 0x10 |
36 | #define PROM_ENOSPC 0x11 | 36 | #define PROM_ENOSPC 0x11 |
37 | #define PROM_ENOTDIR 0x12 | 37 | #define PROM_ENOTDIR 0x12 |
38 | #define PROM_ENOTTY 0x13 | 38 | #define PROM_ENOTTY 0x13 |
39 | #define PROM_ENXIO 0x14 | 39 | #define PROM_ENXIO 0x14 |
40 | #define PROM_EROFS 0x15 | 40 | #define PROM_EROFS 0x15 |
41 | /* SGI ARCS specific errno's. */ | 41 | /* SGI ARCS specific errno's. */ |
42 | #define PROM_EADDRNOTAVAIL 0x1f | 42 | #define PROM_EADDRNOTAVAIL 0x1f |
43 | #define PROM_ETIMEDOUT 0x20 | 43 | #define PROM_ETIMEDOUT 0x20 |
44 | #define PROM_ECONNABORTED 0x21 | 44 | #define PROM_ECONNABORTED 0x21 |
45 | #define PROM_ENOCONNECT 0x22 | 45 | #define PROM_ENOCONNECT 0x22 |
46 | 46 | ||
47 | /* Device classes, types, and identifiers for prom | 47 | /* Device classes, types, and identifiers for prom |
48 | * device inventory queries. | 48 | * device inventory queries. |
@@ -77,14 +77,14 @@ enum linux_identifier { | |||
77 | 77 | ||
78 | /* A prom device tree component. */ | 78 | /* A prom device tree component. */ |
79 | struct linux_component { | 79 | struct linux_component { |
80 | enum linux_devclass class; /* node class */ | 80 | enum linux_devclass class; /* node class */ |
81 | enum linux_devtypes type; /* node type */ | 81 | enum linux_devtypes type; /* node type */ |
82 | enum linux_identifier iflags; /* node flags */ | 82 | enum linux_identifier iflags; /* node flags */ |
83 | USHORT vers; /* node version */ | 83 | USHORT vers; /* node version */ |
84 | USHORT rev; /* node revision */ | 84 | USHORT rev; /* node revision */ |
85 | ULONG key; /* completely magic */ | 85 | ULONG key; /* completely magic */ |
86 | ULONG amask; /* XXX affinity mask??? */ | 86 | ULONG amask; /* XXX affinity mask??? */ |
87 | ULONG cdsize; /* size of configuration data */ | 87 | ULONG cdsize; /* size of configuration data */ |
88 | ULONG ilen; /* length of string identifier */ | 88 | ULONG ilen; /* length of string identifier */ |
89 | _PULONG iname; /* string identifier */ | 89 | _PULONG iname; /* string identifier */ |
90 | }; | 90 | }; |
@@ -177,13 +177,13 @@ struct linux_finfo { | |||
177 | struct linux_bigint end; | 177 | struct linux_bigint end; |
178 | struct linux_bigint cur; | 178 | struct linux_bigint cur; |
179 | enum linux_devtypes dtype; | 179 | enum linux_devtypes dtype; |
180 | unsigned long namelen; | 180 | unsigned long namelen; |
181 | unsigned char attr; | 181 | unsigned char attr; |
182 | char name[32]; /* XXX imperical, should be define */ | 182 | char name[32]; /* XXX imperical, should be define */ |
183 | }; | 183 | }; |
184 | 184 | ||
185 | /* This describes the vector containing function pointers to the ARC | 185 | /* This describes the vector containing function pointers to the ARC |
186 | firmware functions. */ | 186 | firmware functions. */ |
187 | struct linux_romvec { | 187 | struct linux_romvec { |
188 | LONG load; /* Load an executable image. */ | 188 | LONG load; /* Load an executable image. */ |
189 | LONG invoke; /* Invoke a standalong image. */ | 189 | LONG invoke; /* Invoke a standalong image. */ |
@@ -244,7 +244,7 @@ struct linux_romvec { | |||
244 | */ | 244 | */ |
245 | typedef struct _SYSTEM_PARAMETER_BLOCK { | 245 | typedef struct _SYSTEM_PARAMETER_BLOCK { |
246 | ULONG magic; /* magic cookie */ | 246 | ULONG magic; /* magic cookie */ |
247 | #define PROMBLOCK_MAGIC 0x53435241 | 247 | #define PROMBLOCK_MAGIC 0x53435241 |
248 | 248 | ||
249 | ULONG len; /* length of parm block */ | 249 | ULONG len; /* length of parm block */ |
250 | USHORT ver; /* ARCS firmware version */ | 250 | USHORT ver; /* ARCS firmware version */ |
@@ -294,16 +294,16 @@ struct linux_cdata { | |||
294 | }; | 294 | }; |
295 | 295 | ||
296 | /* Common SGI ARCS firmware file descriptors. */ | 296 | /* Common SGI ARCS firmware file descriptors. */ |
297 | #define SGIPROM_STDIN 0 | 297 | #define SGIPROM_STDIN 0 |
298 | #define SGIPROM_STDOUT 1 | 298 | #define SGIPROM_STDOUT 1 |
299 | 299 | ||
300 | /* Common SGI ARCS firmware file types. */ | 300 | /* Common SGI ARCS firmware file types. */ |
301 | #define SGIPROM_ROFILE 0x01 /* read-only file */ | 301 | #define SGIPROM_ROFILE 0x01 /* read-only file */ |
302 | #define SGIPROM_HFILE 0x02 /* hidden file */ | 302 | #define SGIPROM_HFILE 0x02 /* hidden file */ |
303 | #define SGIPROM_SFILE 0x04 /* System file */ | 303 | #define SGIPROM_SFILE 0x04 /* System file */ |
304 | #define SGIPROM_AFILE 0x08 /* Archive file */ | 304 | #define SGIPROM_AFILE 0x08 /* Archive file */ |
305 | #define SGIPROM_DFILE 0x10 /* Directory file */ | 305 | #define SGIPROM_DFILE 0x10 /* Directory file */ |
306 | #define SGIPROM_DELFILE 0x20 /* Deleted file */ | 306 | #define SGIPROM_DELFILE 0x20 /* Deleted file */ |
307 | 307 | ||
308 | /* SGI ARCS boot record information. */ | 308 | /* SGI ARCS boot record information. */ |
309 | struct sgi_partition { | 309 | struct sgi_partition { |
@@ -318,7 +318,7 @@ struct sgi_partition { | |||
318 | unsigned char tsect0, tsect1, tsect2, tsect3; | 318 | unsigned char tsect0, tsect1, tsect2, tsect3; |
319 | }; | 319 | }; |
320 | 320 | ||
321 | #define SGIBBLOCK_MAGIC 0xaa55 | 321 | #define SGIBBLOCK_MAGIC 0xaa55 |
322 | #define SGIBBLOCK_MAXPART 0x0004 | 322 | #define SGIBBLOCK_MAXPART 0x0004 |
323 | 323 | ||
324 | struct sgi_bootblock { | 324 | struct sgi_bootblock { |
@@ -332,34 +332,34 @@ struct sgi_bparm_block { | |||
332 | unsigned short bytes_sect; /* bytes per sector */ | 332 | unsigned short bytes_sect; /* bytes per sector */ |
333 | unsigned char sect_clust; /* sectors per cluster */ | 333 | unsigned char sect_clust; /* sectors per cluster */ |
334 | unsigned short sect_resv; /* reserved sectors */ | 334 | unsigned short sect_resv; /* reserved sectors */ |
335 | unsigned char nfats; /* # of allocation tables */ | 335 | unsigned char nfats; /* # of allocation tables */ |
336 | unsigned short nroot_dirents; /* # of root directory entries */ | 336 | unsigned short nroot_dirents; /* # of root directory entries */ |
337 | unsigned short sect_volume; /* sectors in volume */ | 337 | unsigned short sect_volume; /* sectors in volume */ |
338 | unsigned char media_type; /* media descriptor */ | 338 | unsigned char media_type; /* media descriptor */ |
339 | unsigned short sect_fat; /* sectors per allocation table */ | 339 | unsigned short sect_fat; /* sectors per allocation table */ |
340 | unsigned short sect_track; /* sectors per track */ | 340 | unsigned short sect_track; /* sectors per track */ |
341 | unsigned short nheads; /* # of heads */ | 341 | unsigned short nheads; /* # of heads */ |
342 | unsigned short nhsects; /* # of hidden sectors */ | 342 | unsigned short nhsects; /* # of hidden sectors */ |
343 | }; | 343 | }; |
344 | 344 | ||
345 | struct sgi_bsector { | 345 | struct sgi_bsector { |
346 | unsigned char jmpinfo[3]; | 346 | unsigned char jmpinfo[3]; |
347 | unsigned char manuf_name[8]; | 347 | unsigned char manuf_name[8]; |
348 | struct sgi_bparm_block info; | 348 | struct sgi_bparm_block info; |
349 | }; | 349 | }; |
350 | 350 | ||
351 | /* Debugging block used with SGI symmon symbolic debugger. */ | 351 | /* Debugging block used with SGI symmon symbolic debugger. */ |
352 | #define SMB_DEBUG_MAGIC 0xfeeddead | 352 | #define SMB_DEBUG_MAGIC 0xfeeddead |
353 | struct linux_smonblock { | 353 | struct linux_smonblock { |
354 | unsigned long magic; | 354 | unsigned long magic; |
355 | void (*handler)(void); /* Breakpoint routine. */ | 355 | void (*handler)(void); /* Breakpoint routine. */ |
356 | unsigned long dtable_base; /* Base addr of dbg table. */ | 356 | unsigned long dtable_base; /* Base addr of dbg table. */ |
357 | int (*printf)(const char *fmt, ...); | 357 | int (*printf)(const char *fmt, ...); |
358 | unsigned long btable_base; /* Breakpoint table. */ | 358 | unsigned long btable_base; /* Breakpoint table. */ |
359 | unsigned long mpflushreqs; /* SMP cache flush request list. */ | 359 | unsigned long mpflushreqs; /* SMP cache flush request list. */ |
360 | unsigned long ntab; /* Name table. */ | 360 | unsigned long ntab; /* Name table. */ |
361 | unsigned long stab; /* Symbol table. */ | 361 | unsigned long stab; /* Symbol table. */ |
362 | int smax; /* Max # of symbols. */ | 362 | int smax; /* Max # of symbols. */ |
363 | }; | 363 | }; |
364 | 364 | ||
365 | /* | 365 | /* |
@@ -369,7 +369,7 @@ struct linux_smonblock { | |||
369 | #if defined(CONFIG_64BIT) && defined(CONFIG_FW_ARC32) | 369 | #if defined(CONFIG_64BIT) && defined(CONFIG_FW_ARC32) |
370 | 370 | ||
371 | #define __arc_clobbers \ | 371 | #define __arc_clobbers \ |
372 | "$2", "$3" /* ... */, "$8", "$9", "$10", "$11", \ | 372 | "$2", "$3" /* ... */, "$8", "$9", "$10", "$11", \ |
373 | "$12", "$13", "$14", "$15", "$16", "$24", "$25", "$31" | 373 | "$12", "$13", "$14", "$15", "$16", "$24", "$25", "$31" |
374 | 374 | ||
375 | #define ARC_CALL0(dest) \ | 375 | #define ARC_CALL0(dest) \ |
@@ -447,7 +447,7 @@ struct linux_smonblock { | |||
447 | "daddu\t$29, 32\n\t" \ | 447 | "daddu\t$29, 32\n\t" \ |
448 | "move\t%0, $2" \ | 448 | "move\t%0, $2" \ |
449 | : "=r" (__res), "=r" (__vec) \ | 449 | : "=r" (__res), "=r" (__vec) \ |
450 | : "1" (__vec), "r" (__a1), "r" (__a2), "r" (__a3), \ | 450 | : "1" (__vec), "r" (__a1), "r" (__a2), "r" (__a3), \ |
451 | "r" (__a4) \ | 451 | "r" (__a4) \ |
452 | : __arc_clobbers); \ | 452 | : __arc_clobbers); \ |
453 | __res; \ | 453 | __res; \ |
@@ -468,8 +468,8 @@ struct linux_smonblock { | |||
468 | "daddu\t$29, 32\n\t" \ | 468 | "daddu\t$29, 32\n\t" \ |
469 | "move\t%0, $2" \ | 469 | "move\t%0, $2" \ |
470 | : "=r" (__res), "=r" (__vec) \ | 470 | : "=r" (__res), "=r" (__vec) \ |
471 | : "1" (__vec), \ | 471 | : "1" (__vec), \ |
472 | "r" (__a1), "r" (__a2), "r" (__a3), "r" (__a4), \ | 472 | "r" (__a1), "r" (__a2), "r" (__a3), "r" (__a4), \ |
473 | "r" (__a5) \ | 473 | "r" (__a5) \ |
474 | : __arc_clobbers); \ | 474 | : __arc_clobbers); \ |
475 | __res; \ | 475 | __res; \ |
@@ -512,7 +512,7 @@ struct linux_smonblock { | |||
512 | long __a1 = (long) (a1); \ | 512 | long __a1 = (long) (a1); \ |
513 | long __a2 = (long) (a2); \ | 513 | long __a2 = (long) (a2); \ |
514 | long __a3 = (long) (a3); \ | 514 | long __a3 = (long) (a3); \ |
515 | long (*__vec)(long, long, long) = (void *) romvec->dest; \ | 515 | long (*__vec)(long, long, long) = (void *) romvec->dest; \ |
516 | \ | 516 | \ |
517 | __res = __vec(__a1, __a2, __a3); \ | 517 | __res = __vec(__a1, __a2, __a3); \ |
518 | __res; \ | 518 | __res; \ |
diff --git a/arch/mips/include/asm/shmparam.h b/arch/mips/include/asm/shmparam.h index 09290720751c..324d04042bdf 100644 --- a/arch/mips/include/asm/shmparam.h +++ b/arch/mips/include/asm/shmparam.h | |||
@@ -8,6 +8,6 @@ | |||
8 | 8 | ||
9 | #define __ARCH_FORCE_SHMLBA 1 | 9 | #define __ARCH_FORCE_SHMLBA 1 |
10 | 10 | ||
11 | #define SHMLBA 0x40000 /* attach addr a multiple of this */ | 11 | #define SHMLBA 0x40000 /* attach addr a multiple of this */ |
12 | 12 | ||
13 | #endif /* _ASM_SHMPARAM_H */ | 13 | #endif /* _ASM_SHMPARAM_H */ |
diff --git a/arch/mips/include/asm/sibyte/bcm1480_int.h b/arch/mips/include/asm/sibyte/bcm1480_int.h index fffb224d2297..6b82ed3c2359 100644 --- a/arch/mips/include/asm/sibyte/bcm1480_int.h +++ b/arch/mips/include/asm/sibyte/bcm1480_int.h | |||
@@ -60,253 +60,253 @@ | |||
60 | * Interrupt sources (Table 22) | 60 | * Interrupt sources (Table 22) |
61 | */ | 61 | */ |
62 | 62 | ||
63 | #define K_BCM1480_INT_SOURCES 128 | 63 | #define K_BCM1480_INT_SOURCES 128 |
64 | 64 | ||
65 | #define _BCM1480_INT_HIGH(k) (k) | 65 | #define _BCM1480_INT_HIGH(k) (k) |
66 | #define _BCM1480_INT_LOW(k) ((k)+64) | 66 | #define _BCM1480_INT_LOW(k) ((k)+64) |
67 | 67 | ||
68 | #define K_BCM1480_INT_ADDR_TRAP _BCM1480_INT_HIGH(1) | 68 | #define K_BCM1480_INT_ADDR_TRAP _BCM1480_INT_HIGH(1) |
69 | #define K_BCM1480_INT_GPIO_0 _BCM1480_INT_HIGH(4) | 69 | #define K_BCM1480_INT_GPIO_0 _BCM1480_INT_HIGH(4) |
70 | #define K_BCM1480_INT_GPIO_1 _BCM1480_INT_HIGH(5) | 70 | #define K_BCM1480_INT_GPIO_1 _BCM1480_INT_HIGH(5) |
71 | #define K_BCM1480_INT_GPIO_2 _BCM1480_INT_HIGH(6) | 71 | #define K_BCM1480_INT_GPIO_2 _BCM1480_INT_HIGH(6) |
72 | #define K_BCM1480_INT_GPIO_3 _BCM1480_INT_HIGH(7) | 72 | #define K_BCM1480_INT_GPIO_3 _BCM1480_INT_HIGH(7) |
73 | #define K_BCM1480_INT_PCI_INTA _BCM1480_INT_HIGH(8) | 73 | #define K_BCM1480_INT_PCI_INTA _BCM1480_INT_HIGH(8) |
74 | #define K_BCM1480_INT_PCI_INTB _BCM1480_INT_HIGH(9) | 74 | #define K_BCM1480_INT_PCI_INTB _BCM1480_INT_HIGH(9) |
75 | #define K_BCM1480_INT_PCI_INTC _BCM1480_INT_HIGH(10) | 75 | #define K_BCM1480_INT_PCI_INTC _BCM1480_INT_HIGH(10) |
76 | #define K_BCM1480_INT_PCI_INTD _BCM1480_INT_HIGH(11) | 76 | #define K_BCM1480_INT_PCI_INTD _BCM1480_INT_HIGH(11) |
77 | #define K_BCM1480_INT_CYCLE_CP0 _BCM1480_INT_HIGH(12) | 77 | #define K_BCM1480_INT_CYCLE_CP0 _BCM1480_INT_HIGH(12) |
78 | #define K_BCM1480_INT_CYCLE_CP1 _BCM1480_INT_HIGH(13) | 78 | #define K_BCM1480_INT_CYCLE_CP1 _BCM1480_INT_HIGH(13) |
79 | #define K_BCM1480_INT_CYCLE_CP2 _BCM1480_INT_HIGH(14) | 79 | #define K_BCM1480_INT_CYCLE_CP2 _BCM1480_INT_HIGH(14) |
80 | #define K_BCM1480_INT_CYCLE_CP3 _BCM1480_INT_HIGH(15) | 80 | #define K_BCM1480_INT_CYCLE_CP3 _BCM1480_INT_HIGH(15) |
81 | #define K_BCM1480_INT_TIMER_0 _BCM1480_INT_HIGH(20) | 81 | #define K_BCM1480_INT_TIMER_0 _BCM1480_INT_HIGH(20) |
82 | #define K_BCM1480_INT_TIMER_1 _BCM1480_INT_HIGH(21) | 82 | #define K_BCM1480_INT_TIMER_1 _BCM1480_INT_HIGH(21) |
83 | #define K_BCM1480_INT_TIMER_2 _BCM1480_INT_HIGH(22) | 83 | #define K_BCM1480_INT_TIMER_2 _BCM1480_INT_HIGH(22) |
84 | #define K_BCM1480_INT_TIMER_3 _BCM1480_INT_HIGH(23) | 84 | #define K_BCM1480_INT_TIMER_3 _BCM1480_INT_HIGH(23) |
85 | #define K_BCM1480_INT_DM_CH_0 _BCM1480_INT_HIGH(28) | 85 | #define K_BCM1480_INT_DM_CH_0 _BCM1480_INT_HIGH(28) |
86 | #define K_BCM1480_INT_DM_CH_1 _BCM1480_INT_HIGH(29) | 86 | #define K_BCM1480_INT_DM_CH_1 _BCM1480_INT_HIGH(29) |
87 | #define K_BCM1480_INT_DM_CH_2 _BCM1480_INT_HIGH(30) | 87 | #define K_BCM1480_INT_DM_CH_2 _BCM1480_INT_HIGH(30) |
88 | #define K_BCM1480_INT_DM_CH_3 _BCM1480_INT_HIGH(31) | 88 | #define K_BCM1480_INT_DM_CH_3 _BCM1480_INT_HIGH(31) |
89 | #define K_BCM1480_INT_MAC_0 _BCM1480_INT_HIGH(36) | 89 | #define K_BCM1480_INT_MAC_0 _BCM1480_INT_HIGH(36) |
90 | #define K_BCM1480_INT_MAC_0_CH1 _BCM1480_INT_HIGH(37) | 90 | #define K_BCM1480_INT_MAC_0_CH1 _BCM1480_INT_HIGH(37) |
91 | #define K_BCM1480_INT_MAC_1 _BCM1480_INT_HIGH(38) | 91 | #define K_BCM1480_INT_MAC_1 _BCM1480_INT_HIGH(38) |
92 | #define K_BCM1480_INT_MAC_1_CH1 _BCM1480_INT_HIGH(39) | 92 | #define K_BCM1480_INT_MAC_1_CH1 _BCM1480_INT_HIGH(39) |
93 | #define K_BCM1480_INT_MAC_2 _BCM1480_INT_HIGH(40) | 93 | #define K_BCM1480_INT_MAC_2 _BCM1480_INT_HIGH(40) |
94 | #define K_BCM1480_INT_MAC_2_CH1 _BCM1480_INT_HIGH(41) | 94 | #define K_BCM1480_INT_MAC_2_CH1 _BCM1480_INT_HIGH(41) |
95 | #define K_BCM1480_INT_MAC_3 _BCM1480_INT_HIGH(42) | 95 | #define K_BCM1480_INT_MAC_3 _BCM1480_INT_HIGH(42) |
96 | #define K_BCM1480_INT_MAC_3_CH1 _BCM1480_INT_HIGH(43) | 96 | #define K_BCM1480_INT_MAC_3_CH1 _BCM1480_INT_HIGH(43) |
97 | #define K_BCM1480_INT_PMI_LOW _BCM1480_INT_HIGH(52) | 97 | #define K_BCM1480_INT_PMI_LOW _BCM1480_INT_HIGH(52) |
98 | #define K_BCM1480_INT_PMI_HIGH _BCM1480_INT_HIGH(53) | 98 | #define K_BCM1480_INT_PMI_HIGH _BCM1480_INT_HIGH(53) |
99 | #define K_BCM1480_INT_PMO_LOW _BCM1480_INT_HIGH(54) | 99 | #define K_BCM1480_INT_PMO_LOW _BCM1480_INT_HIGH(54) |
100 | #define K_BCM1480_INT_PMO_HIGH _BCM1480_INT_HIGH(55) | 100 | #define K_BCM1480_INT_PMO_HIGH _BCM1480_INT_HIGH(55) |
101 | #define K_BCM1480_INT_MBOX_0_0 _BCM1480_INT_HIGH(56) | 101 | #define K_BCM1480_INT_MBOX_0_0 _BCM1480_INT_HIGH(56) |
102 | #define K_BCM1480_INT_MBOX_0_1 _BCM1480_INT_HIGH(57) | 102 | #define K_BCM1480_INT_MBOX_0_1 _BCM1480_INT_HIGH(57) |
103 | #define K_BCM1480_INT_MBOX_0_2 _BCM1480_INT_HIGH(58) | 103 | #define K_BCM1480_INT_MBOX_0_2 _BCM1480_INT_HIGH(58) |
104 | #define K_BCM1480_INT_MBOX_0_3 _BCM1480_INT_HIGH(59) | 104 | #define K_BCM1480_INT_MBOX_0_3 _BCM1480_INT_HIGH(59) |
105 | #define K_BCM1480_INT_MBOX_1_0 _BCM1480_INT_HIGH(60) | 105 | #define K_BCM1480_INT_MBOX_1_0 _BCM1480_INT_HIGH(60) |
106 | #define K_BCM1480_INT_MBOX_1_1 _BCM1480_INT_HIGH(61) | 106 | #define K_BCM1480_INT_MBOX_1_1 _BCM1480_INT_HIGH(61) |
107 | #define K_BCM1480_INT_MBOX_1_2 _BCM1480_INT_HIGH(62) | 107 | #define K_BCM1480_INT_MBOX_1_2 _BCM1480_INT_HIGH(62) |
108 | #define K_BCM1480_INT_MBOX_1_3 _BCM1480_INT_HIGH(63) | 108 | #define K_BCM1480_INT_MBOX_1_3 _BCM1480_INT_HIGH(63) |
109 | 109 | ||
110 | #define K_BCM1480_INT_BAD_ECC _BCM1480_INT_LOW(1) | 110 | #define K_BCM1480_INT_BAD_ECC _BCM1480_INT_LOW(1) |
111 | #define K_BCM1480_INT_COR_ECC _BCM1480_INT_LOW(2) | 111 | #define K_BCM1480_INT_COR_ECC _BCM1480_INT_LOW(2) |
112 | #define K_BCM1480_INT_IO_BUS _BCM1480_INT_LOW(3) | 112 | #define K_BCM1480_INT_IO_BUS _BCM1480_INT_LOW(3) |
113 | #define K_BCM1480_INT_PERF_CNT _BCM1480_INT_LOW(4) | 113 | #define K_BCM1480_INT_PERF_CNT _BCM1480_INT_LOW(4) |
114 | #define K_BCM1480_INT_SW_PERF_CNT _BCM1480_INT_LOW(5) | 114 | #define K_BCM1480_INT_SW_PERF_CNT _BCM1480_INT_LOW(5) |
115 | #define K_BCM1480_INT_TRACE_FREEZE _BCM1480_INT_LOW(6) | 115 | #define K_BCM1480_INT_TRACE_FREEZE _BCM1480_INT_LOW(6) |
116 | #define K_BCM1480_INT_SW_TRACE_FREEZE _BCM1480_INT_LOW(7) | 116 | #define K_BCM1480_INT_SW_TRACE_FREEZE _BCM1480_INT_LOW(7) |
117 | #define K_BCM1480_INT_WATCHDOG_TIMER_0 _BCM1480_INT_LOW(8) | 117 | #define K_BCM1480_INT_WATCHDOG_TIMER_0 _BCM1480_INT_LOW(8) |
118 | #define K_BCM1480_INT_WATCHDOG_TIMER_1 _BCM1480_INT_LOW(9) | 118 | #define K_BCM1480_INT_WATCHDOG_TIMER_1 _BCM1480_INT_LOW(9) |
119 | #define K_BCM1480_INT_WATCHDOG_TIMER_2 _BCM1480_INT_LOW(10) | 119 | #define K_BCM1480_INT_WATCHDOG_TIMER_2 _BCM1480_INT_LOW(10) |
120 | #define K_BCM1480_INT_WATCHDOG_TIMER_3 _BCM1480_INT_LOW(11) | 120 | #define K_BCM1480_INT_WATCHDOG_TIMER_3 _BCM1480_INT_LOW(11) |
121 | #define K_BCM1480_INT_PCI_ERROR _BCM1480_INT_LOW(16) | 121 | #define K_BCM1480_INT_PCI_ERROR _BCM1480_INT_LOW(16) |
122 | #define K_BCM1480_INT_PCI_RESET _BCM1480_INT_LOW(17) | 122 | #define K_BCM1480_INT_PCI_RESET _BCM1480_INT_LOW(17) |
123 | #define K_BCM1480_INT_NODE_CONTROLLER _BCM1480_INT_LOW(18) | 123 | #define K_BCM1480_INT_NODE_CONTROLLER _BCM1480_INT_LOW(18) |
124 | #define K_BCM1480_INT_HOST_BRIDGE _BCM1480_INT_LOW(19) | 124 | #define K_BCM1480_INT_HOST_BRIDGE _BCM1480_INT_LOW(19) |
125 | #define K_BCM1480_INT_PORT_0_FATAL _BCM1480_INT_LOW(20) | 125 | #define K_BCM1480_INT_PORT_0_FATAL _BCM1480_INT_LOW(20) |
126 | #define K_BCM1480_INT_PORT_0_NONFATAL _BCM1480_INT_LOW(21) | 126 | #define K_BCM1480_INT_PORT_0_NONFATAL _BCM1480_INT_LOW(21) |
127 | #define K_BCM1480_INT_PORT_1_FATAL _BCM1480_INT_LOW(22) | 127 | #define K_BCM1480_INT_PORT_1_FATAL _BCM1480_INT_LOW(22) |
128 | #define K_BCM1480_INT_PORT_1_NONFATAL _BCM1480_INT_LOW(23) | 128 | #define K_BCM1480_INT_PORT_1_NONFATAL _BCM1480_INT_LOW(23) |
129 | #define K_BCM1480_INT_PORT_2_FATAL _BCM1480_INT_LOW(24) | 129 | #define K_BCM1480_INT_PORT_2_FATAL _BCM1480_INT_LOW(24) |
130 | #define K_BCM1480_INT_PORT_2_NONFATAL _BCM1480_INT_LOW(25) | 130 | #define K_BCM1480_INT_PORT_2_NONFATAL _BCM1480_INT_LOW(25) |
131 | #define K_BCM1480_INT_LDT_SMI _BCM1480_INT_LOW(32) | 131 | #define K_BCM1480_INT_LDT_SMI _BCM1480_INT_LOW(32) |
132 | #define K_BCM1480_INT_LDT_NMI _BCM1480_INT_LOW(33) | 132 | #define K_BCM1480_INT_LDT_NMI _BCM1480_INT_LOW(33) |
133 | #define K_BCM1480_INT_LDT_INIT _BCM1480_INT_LOW(34) | 133 | #define K_BCM1480_INT_LDT_INIT _BCM1480_INT_LOW(34) |
134 | #define K_BCM1480_INT_LDT_STARTUP _BCM1480_INT_LOW(35) | 134 | #define K_BCM1480_INT_LDT_STARTUP _BCM1480_INT_LOW(35) |
135 | #define K_BCM1480_INT_LDT_EXT _BCM1480_INT_LOW(36) | 135 | #define K_BCM1480_INT_LDT_EXT _BCM1480_INT_LOW(36) |
136 | #define K_BCM1480_INT_SMB_0 _BCM1480_INT_LOW(40) | 136 | #define K_BCM1480_INT_SMB_0 _BCM1480_INT_LOW(40) |
137 | #define K_BCM1480_INT_SMB_1 _BCM1480_INT_LOW(41) | 137 | #define K_BCM1480_INT_SMB_1 _BCM1480_INT_LOW(41) |
138 | #define K_BCM1480_INT_PCMCIA _BCM1480_INT_LOW(42) | 138 | #define K_BCM1480_INT_PCMCIA _BCM1480_INT_LOW(42) |
139 | #define K_BCM1480_INT_UART_0 _BCM1480_INT_LOW(44) | 139 | #define K_BCM1480_INT_UART_0 _BCM1480_INT_LOW(44) |
140 | #define K_BCM1480_INT_UART_1 _BCM1480_INT_LOW(45) | 140 | #define K_BCM1480_INT_UART_1 _BCM1480_INT_LOW(45) |
141 | #define K_BCM1480_INT_UART_2 _BCM1480_INT_LOW(46) | 141 | #define K_BCM1480_INT_UART_2 _BCM1480_INT_LOW(46) |
142 | #define K_BCM1480_INT_UART_3 _BCM1480_INT_LOW(47) | 142 | #define K_BCM1480_INT_UART_3 _BCM1480_INT_LOW(47) |
143 | #define K_BCM1480_INT_GPIO_4 _BCM1480_INT_LOW(52) | 143 | #define K_BCM1480_INT_GPIO_4 _BCM1480_INT_LOW(52) |
144 | #define K_BCM1480_INT_GPIO_5 _BCM1480_INT_LOW(53) | 144 | #define K_BCM1480_INT_GPIO_5 _BCM1480_INT_LOW(53) |
145 | #define K_BCM1480_INT_GPIO_6 _BCM1480_INT_LOW(54) | 145 | #define K_BCM1480_INT_GPIO_6 _BCM1480_INT_LOW(54) |
146 | #define K_BCM1480_INT_GPIO_7 _BCM1480_INT_LOW(55) | 146 | #define K_BCM1480_INT_GPIO_7 _BCM1480_INT_LOW(55) |
147 | #define K_BCM1480_INT_GPIO_8 _BCM1480_INT_LOW(56) | 147 | #define K_BCM1480_INT_GPIO_8 _BCM1480_INT_LOW(56) |
148 | #define K_BCM1480_INT_GPIO_9 _BCM1480_INT_LOW(57) | 148 | #define K_BCM1480_INT_GPIO_9 _BCM1480_INT_LOW(57) |
149 | #define K_BCM1480_INT_GPIO_10 _BCM1480_INT_LOW(58) | 149 | #define K_BCM1480_INT_GPIO_10 _BCM1480_INT_LOW(58) |
150 | #define K_BCM1480_INT_GPIO_11 _BCM1480_INT_LOW(59) | 150 | #define K_BCM1480_INT_GPIO_11 _BCM1480_INT_LOW(59) |
151 | #define K_BCM1480_INT_GPIO_12 _BCM1480_INT_LOW(60) | 151 | #define K_BCM1480_INT_GPIO_12 _BCM1480_INT_LOW(60) |
152 | #define K_BCM1480_INT_GPIO_13 _BCM1480_INT_LOW(61) | 152 | #define K_BCM1480_INT_GPIO_13 _BCM1480_INT_LOW(61) |
153 | #define K_BCM1480_INT_GPIO_14 _BCM1480_INT_LOW(62) | 153 | #define K_BCM1480_INT_GPIO_14 _BCM1480_INT_LOW(62) |
154 | #define K_BCM1480_INT_GPIO_15 _BCM1480_INT_LOW(63) | 154 | #define K_BCM1480_INT_GPIO_15 _BCM1480_INT_LOW(63) |
155 | 155 | ||
156 | /* | 156 | /* |
157 | * Mask values for each interrupt | 157 | * Mask values for each interrupt |
158 | */ | 158 | */ |
159 | 159 | ||
160 | #define _BCM1480_INT_MASK(w, n) _SB_MAKEMASK(w, ((n) & 0x3F)) | 160 | #define _BCM1480_INT_MASK(w, n) _SB_MAKEMASK(w, ((n) & 0x3F)) |
161 | #define _BCM1480_INT_MASK1(n) _SB_MAKEMASK1(((n) & 0x3F)) | 161 | #define _BCM1480_INT_MASK1(n) _SB_MAKEMASK1(((n) & 0x3F)) |
162 | #define _BCM1480_INT_OFFSET(n) (((n) & 0x40) << 6) | 162 | #define _BCM1480_INT_OFFSET(n) (((n) & 0x40) << 6) |
163 | 163 | ||
164 | #define M_BCM1480_INT_CASCADE _BCM1480_INT_MASK1(_BCM1480_INT_HIGH(0)) | 164 | #define M_BCM1480_INT_CASCADE _BCM1480_INT_MASK1(_BCM1480_INT_HIGH(0)) |
165 | 165 | ||
166 | #define M_BCM1480_INT_ADDR_TRAP _BCM1480_INT_MASK1(K_BCM1480_INT_ADDR_TRAP) | 166 | #define M_BCM1480_INT_ADDR_TRAP _BCM1480_INT_MASK1(K_BCM1480_INT_ADDR_TRAP) |
167 | #define M_BCM1480_INT_GPIO_0 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_0) | 167 | #define M_BCM1480_INT_GPIO_0 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_0) |
168 | #define M_BCM1480_INT_GPIO_1 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_1) | 168 | #define M_BCM1480_INT_GPIO_1 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_1) |
169 | #define M_BCM1480_INT_GPIO_2 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_2) | 169 | #define M_BCM1480_INT_GPIO_2 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_2) |
170 | #define M_BCM1480_INT_GPIO_3 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_3) | 170 | #define M_BCM1480_INT_GPIO_3 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_3) |
171 | #define M_BCM1480_INT_PCI_INTA _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTA) | 171 | #define M_BCM1480_INT_PCI_INTA _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTA) |
172 | #define M_BCM1480_INT_PCI_INTB _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTB) | 172 | #define M_BCM1480_INT_PCI_INTB _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTB) |
173 | #define M_BCM1480_INT_PCI_INTC _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTC) | 173 | #define M_BCM1480_INT_PCI_INTC _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTC) |
174 | #define M_BCM1480_INT_PCI_INTD _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTD) | 174 | #define M_BCM1480_INT_PCI_INTD _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTD) |
175 | #define M_BCM1480_INT_CYCLE_CP0 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP0) | 175 | #define M_BCM1480_INT_CYCLE_CP0 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP0) |
176 | #define M_BCM1480_INT_CYCLE_CP1 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP1) | 176 | #define M_BCM1480_INT_CYCLE_CP1 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP1) |
177 | #define M_BCM1480_INT_CYCLE_CP2 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP2) | 177 | #define M_BCM1480_INT_CYCLE_CP2 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP2) |
178 | #define M_BCM1480_INT_CYCLE_CP3 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP3) | 178 | #define M_BCM1480_INT_CYCLE_CP3 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP3) |
179 | #define M_BCM1480_INT_TIMER_0 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_0) | 179 | #define M_BCM1480_INT_TIMER_0 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_0) |
180 | #define M_BCM1480_INT_TIMER_1 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_1) | 180 | #define M_BCM1480_INT_TIMER_1 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_1) |
181 | #define M_BCM1480_INT_TIMER_2 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_2) | 181 | #define M_BCM1480_INT_TIMER_2 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_2) |
182 | #define M_BCM1480_INT_TIMER_3 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_3) | 182 | #define M_BCM1480_INT_TIMER_3 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_3) |
183 | #define M_BCM1480_INT_DM_CH_0 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_0) | 183 | #define M_BCM1480_INT_DM_CH_0 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_0) |
184 | #define M_BCM1480_INT_DM_CH_1 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_1) | 184 | #define M_BCM1480_INT_DM_CH_1 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_1) |
185 | #define M_BCM1480_INT_DM_CH_2 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_2) | 185 | #define M_BCM1480_INT_DM_CH_2 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_2) |
186 | #define M_BCM1480_INT_DM_CH_3 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_3) | 186 | #define M_BCM1480_INT_DM_CH_3 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_3) |
187 | #define M_BCM1480_INT_MAC_0 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_0) | 187 | #define M_BCM1480_INT_MAC_0 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_0) |
188 | #define M_BCM1480_INT_MAC_0_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_0_CH1) | 188 | #define M_BCM1480_INT_MAC_0_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_0_CH1) |
189 | #define M_BCM1480_INT_MAC_1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_1) | 189 | #define M_BCM1480_INT_MAC_1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_1) |
190 | #define M_BCM1480_INT_MAC_1_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_1_CH1) | 190 | #define M_BCM1480_INT_MAC_1_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_1_CH1) |
191 | #define M_BCM1480_INT_MAC_2 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_2) | 191 | #define M_BCM1480_INT_MAC_2 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_2) |
192 | #define M_BCM1480_INT_MAC_2_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_2_CH1) | 192 | #define M_BCM1480_INT_MAC_2_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_2_CH1) |
193 | #define M_BCM1480_INT_MAC_3 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_3) | 193 | #define M_BCM1480_INT_MAC_3 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_3) |
194 | #define M_BCM1480_INT_MAC_3_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_3_CH1) | 194 | #define M_BCM1480_INT_MAC_3_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_3_CH1) |
195 | #define M_BCM1480_INT_PMI_LOW _BCM1480_INT_MASK1(K_BCM1480_INT_PMI_LOW) | 195 | #define M_BCM1480_INT_PMI_LOW _BCM1480_INT_MASK1(K_BCM1480_INT_PMI_LOW) |
196 | #define M_BCM1480_INT_PMI_HIGH _BCM1480_INT_MASK1(K_BCM1480_INT_PMI_HIGH) | 196 | #define M_BCM1480_INT_PMI_HIGH _BCM1480_INT_MASK1(K_BCM1480_INT_PMI_HIGH) |
197 | #define M_BCM1480_INT_PMO_LOW _BCM1480_INT_MASK1(K_BCM1480_INT_PMO_LOW) | 197 | #define M_BCM1480_INT_PMO_LOW _BCM1480_INT_MASK1(K_BCM1480_INT_PMO_LOW) |
198 | #define M_BCM1480_INT_PMO_HIGH _BCM1480_INT_MASK1(K_BCM1480_INT_PMO_HIGH) | 198 | #define M_BCM1480_INT_PMO_HIGH _BCM1480_INT_MASK1(K_BCM1480_INT_PMO_HIGH) |
199 | #define M_BCM1480_INT_MBOX_ALL _BCM1480_INT_MASK(8, K_BCM1480_INT_MBOX_0_0) | 199 | #define M_BCM1480_INT_MBOX_ALL _BCM1480_INT_MASK(8, K_BCM1480_INT_MBOX_0_0) |
200 | #define M_BCM1480_INT_MBOX_0_0 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_0) | 200 | #define M_BCM1480_INT_MBOX_0_0 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_0) |
201 | #define M_BCM1480_INT_MBOX_0_1 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_1) | 201 | #define M_BCM1480_INT_MBOX_0_1 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_1) |
202 | #define M_BCM1480_INT_MBOX_0_2 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_2) | 202 | #define M_BCM1480_INT_MBOX_0_2 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_2) |
203 | #define M_BCM1480_INT_MBOX_0_3 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_3) | 203 | #define M_BCM1480_INT_MBOX_0_3 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_3) |
204 | #define M_BCM1480_INT_MBOX_1_0 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_0) | 204 | #define M_BCM1480_INT_MBOX_1_0 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_0) |
205 | #define M_BCM1480_INT_MBOX_1_1 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_1) | 205 | #define M_BCM1480_INT_MBOX_1_1 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_1) |
206 | #define M_BCM1480_INT_MBOX_1_2 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_2) | 206 | #define M_BCM1480_INT_MBOX_1_2 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_2) |
207 | #define M_BCM1480_INT_MBOX_1_3 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_3) | 207 | #define M_BCM1480_INT_MBOX_1_3 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_3) |
208 | #define M_BCM1480_INT_BAD_ECC _BCM1480_INT_MASK1(K_BCM1480_INT_BAD_ECC) | 208 | #define M_BCM1480_INT_BAD_ECC _BCM1480_INT_MASK1(K_BCM1480_INT_BAD_ECC) |
209 | #define M_BCM1480_INT_COR_ECC _BCM1480_INT_MASK1(K_BCM1480_INT_COR_ECC) | 209 | #define M_BCM1480_INT_COR_ECC _BCM1480_INT_MASK1(K_BCM1480_INT_COR_ECC) |
210 | #define M_BCM1480_INT_IO_BUS _BCM1480_INT_MASK1(K_BCM1480_INT_IO_BUS) | 210 | #define M_BCM1480_INT_IO_BUS _BCM1480_INT_MASK1(K_BCM1480_INT_IO_BUS) |
211 | #define M_BCM1480_INT_PERF_CNT _BCM1480_INT_MASK1(K_BCM1480_INT_PERF_CNT) | 211 | #define M_BCM1480_INT_PERF_CNT _BCM1480_INT_MASK1(K_BCM1480_INT_PERF_CNT) |
212 | #define M_BCM1480_INT_SW_PERF_CNT _BCM1480_INT_MASK1(K_BCM1480_INT_SW_PERF_CNT) | 212 | #define M_BCM1480_INT_SW_PERF_CNT _BCM1480_INT_MASK1(K_BCM1480_INT_SW_PERF_CNT) |
213 | #define M_BCM1480_INT_TRACE_FREEZE _BCM1480_INT_MASK1(K_BCM1480_INT_TRACE_FREEZE) | 213 | #define M_BCM1480_INT_TRACE_FREEZE _BCM1480_INT_MASK1(K_BCM1480_INT_TRACE_FREEZE) |
214 | #define M_BCM1480_INT_SW_TRACE_FREEZE _BCM1480_INT_MASK1(K_BCM1480_INT_SW_TRACE_FREEZE) | 214 | #define M_BCM1480_INT_SW_TRACE_FREEZE _BCM1480_INT_MASK1(K_BCM1480_INT_SW_TRACE_FREEZE) |
215 | #define M_BCM1480_INT_WATCHDOG_TIMER_0 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_0) | 215 | #define M_BCM1480_INT_WATCHDOG_TIMER_0 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_0) |
216 | #define M_BCM1480_INT_WATCHDOG_TIMER_1 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_1) | 216 | #define M_BCM1480_INT_WATCHDOG_TIMER_1 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_1) |
217 | #define M_BCM1480_INT_WATCHDOG_TIMER_2 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_2) | 217 | #define M_BCM1480_INT_WATCHDOG_TIMER_2 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_2) |
218 | #define M_BCM1480_INT_WATCHDOG_TIMER_3 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_3) | 218 | #define M_BCM1480_INT_WATCHDOG_TIMER_3 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_3) |
219 | #define M_BCM1480_INT_PCI_ERROR _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_ERROR) | 219 | #define M_BCM1480_INT_PCI_ERROR _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_ERROR) |
220 | #define M_BCM1480_INT_PCI_RESET _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_RESET) | 220 | #define M_BCM1480_INT_PCI_RESET _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_RESET) |
221 | #define M_BCM1480_INT_NODE_CONTROLLER _BCM1480_INT_MASK1(K_BCM1480_INT_NODE_CONTROLLER) | 221 | #define M_BCM1480_INT_NODE_CONTROLLER _BCM1480_INT_MASK1(K_BCM1480_INT_NODE_CONTROLLER) |
222 | #define M_BCM1480_INT_HOST_BRIDGE _BCM1480_INT_MASK1(K_BCM1480_INT_HOST_BRIDGE) | 222 | #define M_BCM1480_INT_HOST_BRIDGE _BCM1480_INT_MASK1(K_BCM1480_INT_HOST_BRIDGE) |
223 | #define M_BCM1480_INT_PORT_0_FATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_0_FATAL) | 223 | #define M_BCM1480_INT_PORT_0_FATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_0_FATAL) |
224 | #define M_BCM1480_INT_PORT_0_NONFATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_0_NONFATAL) | 224 | #define M_BCM1480_INT_PORT_0_NONFATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_0_NONFATAL) |
225 | #define M_BCM1480_INT_PORT_1_FATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_1_FATAL) | 225 | #define M_BCM1480_INT_PORT_1_FATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_1_FATAL) |
226 | #define M_BCM1480_INT_PORT_1_NONFATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_1_NONFATAL) | 226 | #define M_BCM1480_INT_PORT_1_NONFATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_1_NONFATAL) |
227 | #define M_BCM1480_INT_PORT_2_FATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_2_FATAL) | 227 | #define M_BCM1480_INT_PORT_2_FATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_2_FATAL) |
228 | #define M_BCM1480_INT_PORT_2_NONFATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_2_NONFATAL) | 228 | #define M_BCM1480_INT_PORT_2_NONFATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_2_NONFATAL) |
229 | #define M_BCM1480_INT_LDT_SMI _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_SMI) | 229 | #define M_BCM1480_INT_LDT_SMI _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_SMI) |
230 | #define M_BCM1480_INT_LDT_NMI _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_NMI) | 230 | #define M_BCM1480_INT_LDT_NMI _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_NMI) |
231 | #define M_BCM1480_INT_LDT_INIT _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_INIT) | 231 | #define M_BCM1480_INT_LDT_INIT _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_INIT) |
232 | #define M_BCM1480_INT_LDT_STARTUP _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_STARTUP) | 232 | #define M_BCM1480_INT_LDT_STARTUP _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_STARTUP) |
233 | #define M_BCM1480_INT_LDT_EXT _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_EXT) | 233 | #define M_BCM1480_INT_LDT_EXT _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_EXT) |
234 | #define M_BCM1480_INT_SMB_0 _BCM1480_INT_MASK1(K_BCM1480_INT_SMB_0) | 234 | #define M_BCM1480_INT_SMB_0 _BCM1480_INT_MASK1(K_BCM1480_INT_SMB_0) |
235 | #define M_BCM1480_INT_SMB_1 _BCM1480_INT_MASK1(K_BCM1480_INT_SMB_1) | 235 | #define M_BCM1480_INT_SMB_1 _BCM1480_INT_MASK1(K_BCM1480_INT_SMB_1) |
236 | #define M_BCM1480_INT_PCMCIA _BCM1480_INT_MASK1(K_BCM1480_INT_PCMCIA) | 236 | #define M_BCM1480_INT_PCMCIA _BCM1480_INT_MASK1(K_BCM1480_INT_PCMCIA) |
237 | #define M_BCM1480_INT_UART_0 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_0) | 237 | #define M_BCM1480_INT_UART_0 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_0) |
238 | #define M_BCM1480_INT_UART_1 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_1) | 238 | #define M_BCM1480_INT_UART_1 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_1) |
239 | #define M_BCM1480_INT_UART_2 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_2) | 239 | #define M_BCM1480_INT_UART_2 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_2) |
240 | #define M_BCM1480_INT_UART_3 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_3) | 240 | #define M_BCM1480_INT_UART_3 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_3) |
241 | #define M_BCM1480_INT_GPIO_4 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_4) | 241 | #define M_BCM1480_INT_GPIO_4 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_4) |
242 | #define M_BCM1480_INT_GPIO_5 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_5) | 242 | #define M_BCM1480_INT_GPIO_5 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_5) |
243 | #define M_BCM1480_INT_GPIO_6 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_6) | 243 | #define M_BCM1480_INT_GPIO_6 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_6) |
244 | #define M_BCM1480_INT_GPIO_7 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_7) | 244 | #define M_BCM1480_INT_GPIO_7 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_7) |
245 | #define M_BCM1480_INT_GPIO_8 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_8) | 245 | #define M_BCM1480_INT_GPIO_8 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_8) |
246 | #define M_BCM1480_INT_GPIO_9 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_9) | 246 | #define M_BCM1480_INT_GPIO_9 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_9) |
247 | #define M_BCM1480_INT_GPIO_10 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_10) | 247 | #define M_BCM1480_INT_GPIO_10 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_10) |
248 | #define M_BCM1480_INT_GPIO_11 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_11) | 248 | #define M_BCM1480_INT_GPIO_11 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_11) |
249 | #define M_BCM1480_INT_GPIO_12 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_12) | 249 | #define M_BCM1480_INT_GPIO_12 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_12) |
250 | #define M_BCM1480_INT_GPIO_13 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_13) | 250 | #define M_BCM1480_INT_GPIO_13 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_13) |
251 | #define M_BCM1480_INT_GPIO_14 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_14) | 251 | #define M_BCM1480_INT_GPIO_14 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_14) |
252 | #define M_BCM1480_INT_GPIO_15 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_15) | 252 | #define M_BCM1480_INT_GPIO_15 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_15) |
253 | 253 | ||
254 | /* | 254 | /* |
255 | * Interrupt mappings (Table 18) | 255 | * Interrupt mappings (Table 18) |
256 | */ | 256 | */ |
257 | 257 | ||
258 | #define K_BCM1480_INT_MAP_I0 0 /* interrupt pins on processor */ | 258 | #define K_BCM1480_INT_MAP_I0 0 /* interrupt pins on processor */ |
259 | #define K_BCM1480_INT_MAP_I1 1 | 259 | #define K_BCM1480_INT_MAP_I1 1 |
260 | #define K_BCM1480_INT_MAP_I2 2 | 260 | #define K_BCM1480_INT_MAP_I2 2 |
261 | #define K_BCM1480_INT_MAP_I3 3 | 261 | #define K_BCM1480_INT_MAP_I3 3 |
262 | #define K_BCM1480_INT_MAP_I4 4 | 262 | #define K_BCM1480_INT_MAP_I4 4 |
263 | #define K_BCM1480_INT_MAP_I5 5 | 263 | #define K_BCM1480_INT_MAP_I5 5 |
264 | #define K_BCM1480_INT_MAP_NMI 6 /* nonmaskable */ | 264 | #define K_BCM1480_INT_MAP_NMI 6 /* nonmaskable */ |
265 | #define K_BCM1480_INT_MAP_DINT 7 /* debug interrupt */ | 265 | #define K_BCM1480_INT_MAP_DINT 7 /* debug interrupt */ |
266 | 266 | ||
267 | /* | 267 | /* |
268 | * Interrupt LDT Set Register (Table 19) | 268 | * Interrupt LDT Set Register (Table 19) |
269 | */ | 269 | */ |
270 | 270 | ||
271 | #define S_BCM1480_INT_HT_INTMSG 0 | 271 | #define S_BCM1480_INT_HT_INTMSG 0 |
272 | #define M_BCM1480_INT_HT_INTMSG _SB_MAKEMASK(3, S_BCM1480_INT_HT_INTMSG) | 272 | #define M_BCM1480_INT_HT_INTMSG _SB_MAKEMASK(3, S_BCM1480_INT_HT_INTMSG) |
273 | #define V_BCM1480_INT_HT_INTMSG(x) _SB_MAKEVALUE(x, S_BCM1480_INT_HT_INTMSG) | 273 | #define V_BCM1480_INT_HT_INTMSG(x) _SB_MAKEVALUE(x, S_BCM1480_INT_HT_INTMSG) |
274 | #define G_BCM1480_INT_HT_INTMSG(x) _SB_GETVALUE(x, S_BCM1480_INT_HT_INTMSG, M_BCM1480_INT_HT_INTMSG) | 274 | #define G_BCM1480_INT_HT_INTMSG(x) _SB_GETVALUE(x, S_BCM1480_INT_HT_INTMSG, M_BCM1480_INT_HT_INTMSG) |
275 | 275 | ||
276 | #define K_BCM1480_INT_HT_INTMSG_FIXED 0 | 276 | #define K_BCM1480_INT_HT_INTMSG_FIXED 0 |
277 | #define K_BCM1480_INT_HT_INTMSG_ARBITRATED 1 | 277 | #define K_BCM1480_INT_HT_INTMSG_ARBITRATED 1 |
278 | #define K_BCM1480_INT_HT_INTMSG_SMI 2 | 278 | #define K_BCM1480_INT_HT_INTMSG_SMI 2 |
279 | #define K_BCM1480_INT_HT_INTMSG_NMI 3 | 279 | #define K_BCM1480_INT_HT_INTMSG_NMI 3 |
280 | #define K_BCM1480_INT_HT_INTMSG_INIT 4 | 280 | #define K_BCM1480_INT_HT_INTMSG_INIT 4 |
281 | #define K_BCM1480_INT_HT_INTMSG_STARTUP 5 | 281 | #define K_BCM1480_INT_HT_INTMSG_STARTUP 5 |
282 | #define K_BCM1480_INT_HT_INTMSG_EXTINT 6 | 282 | #define K_BCM1480_INT_HT_INTMSG_EXTINT 6 |
283 | #define K_BCM1480_INT_HT_INTMSG_RESERVED 7 | 283 | #define K_BCM1480_INT_HT_INTMSG_RESERVED 7 |
284 | 284 | ||
285 | #define M_BCM1480_INT_HT_TRIGGERMODE _SB_MAKEMASK1(3) | 285 | #define M_BCM1480_INT_HT_TRIGGERMODE _SB_MAKEMASK1(3) |
286 | #define V_BCM1480_INT_HT_EDGETRIGGER 0 | 286 | #define V_BCM1480_INT_HT_EDGETRIGGER 0 |
287 | #define V_BCM1480_INT_HT_LEVELTRIGGER M_BCM1480_INT_HT_TRIGGERMODE | 287 | #define V_BCM1480_INT_HT_LEVELTRIGGER M_BCM1480_INT_HT_TRIGGERMODE |
288 | 288 | ||
289 | #define M_BCM1480_INT_HT_DESTMODE _SB_MAKEMASK1(4) | 289 | #define M_BCM1480_INT_HT_DESTMODE _SB_MAKEMASK1(4) |
290 | #define V_BCM1480_INT_HT_PHYSICALDEST 0 | 290 | #define V_BCM1480_INT_HT_PHYSICALDEST 0 |
291 | #define V_BCM1480_INT_HT_LOGICALDEST M_BCM1480_INT_HT_DESTMODE | 291 | #define V_BCM1480_INT_HT_LOGICALDEST M_BCM1480_INT_HT_DESTMODE |
292 | 292 | ||
293 | #define S_BCM1480_INT_HT_INTDEST 5 | 293 | #define S_BCM1480_INT_HT_INTDEST 5 |
294 | #define M_BCM1480_INT_HT_INTDEST _SB_MAKEMASK(8, S_BCM1480_INT_HT_INTDEST) | 294 | #define M_BCM1480_INT_HT_INTDEST _SB_MAKEMASK(8, S_BCM1480_INT_HT_INTDEST) |
295 | #define V_BCM1480_INT_HT_INTDEST(x) _SB_MAKEVALUE(x, S_BCM1480_INT_HT_INTDEST) | 295 | #define V_BCM1480_INT_HT_INTDEST(x) _SB_MAKEVALUE(x, S_BCM1480_INT_HT_INTDEST) |
296 | #define G_BCM1480_INT_HT_INTDEST(x) _SB_GETVALUE(x, S_BCM1480_INT_HT_INTDEST, M_BCM1480_INT_HT_INTDEST) | 296 | #define G_BCM1480_INT_HT_INTDEST(x) _SB_GETVALUE(x, S_BCM1480_INT_HT_INTDEST, M_BCM1480_INT_HT_INTDEST) |
297 | 297 | ||
298 | #define S_BCM1480_INT_HT_VECTOR 13 | 298 | #define S_BCM1480_INT_HT_VECTOR 13 |
299 | #define M_BCM1480_INT_HT_VECTOR _SB_MAKEMASK(8, S_BCM1480_INT_HT_VECTOR) | 299 | #define M_BCM1480_INT_HT_VECTOR _SB_MAKEMASK(8, S_BCM1480_INT_HT_VECTOR) |
300 | #define V_BCM1480_INT_HT_VECTOR(x) _SB_MAKEVALUE(x, S_BCM1480_INT_HT_VECTOR) | 300 | #define V_BCM1480_INT_HT_VECTOR(x) _SB_MAKEVALUE(x, S_BCM1480_INT_HT_VECTOR) |
301 | #define G_BCM1480_INT_HT_VECTOR(x) _SB_GETVALUE(x, S_BCM1480_INT_HT_VECTOR, M_BCM1480_INT_HT_VECTOR) | 301 | #define G_BCM1480_INT_HT_VECTOR(x) _SB_GETVALUE(x, S_BCM1480_INT_HT_VECTOR, M_BCM1480_INT_HT_VECTOR) |
302 | 302 | ||
303 | /* | 303 | /* |
304 | * Vector prefix (Table 4-7) | 304 | * Vector prefix (Table 4-7) |
305 | */ | 305 | */ |
306 | 306 | ||
307 | #define M_BCM1480_HTVECT_RAISE_INTLDT_HIGH 0x00 | 307 | #define M_BCM1480_HTVECT_RAISE_INTLDT_HIGH 0x00 |
308 | #define M_BCM1480_HTVECT_RAISE_MBOX_0 0x40 | 308 | #define M_BCM1480_HTVECT_RAISE_MBOX_0 0x40 |
309 | #define M_BCM1480_HTVECT_RAISE_INTLDT_LO 0x80 | 309 | #define M_BCM1480_HTVECT_RAISE_INTLDT_LO 0x80 |
310 | #define M_BCM1480_HTVECT_RAISE_MBOX_1 0xC0 | 310 | #define M_BCM1480_HTVECT_RAISE_MBOX_1 0xC0 |
311 | 311 | ||
312 | #endif /* _BCM1480_INT_H */ | 312 | #endif /* _BCM1480_INT_H */ |
diff --git a/arch/mips/include/asm/sibyte/bcm1480_l2c.h b/arch/mips/include/asm/sibyte/bcm1480_l2c.h index 725d38cb9d1c..910e5c7e1b08 100644 --- a/arch/mips/include/asm/sibyte/bcm1480_l2c.h +++ b/arch/mips/include/asm/sibyte/bcm1480_l2c.h | |||
@@ -39,120 +39,120 @@ | |||
39 | * Format of level 2 cache management address (Table 55) | 39 | * Format of level 2 cache management address (Table 55) |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #define S_BCM1480_L2C_MGMT_INDEX 5 | 42 | #define S_BCM1480_L2C_MGMT_INDEX 5 |
43 | #define M_BCM1480_L2C_MGMT_INDEX _SB_MAKEMASK(12, S_BCM1480_L2C_MGMT_INDEX) | 43 | #define M_BCM1480_L2C_MGMT_INDEX _SB_MAKEMASK(12, S_BCM1480_L2C_MGMT_INDEX) |
44 | #define V_BCM1480_L2C_MGMT_INDEX(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_MGMT_INDEX) | 44 | #define V_BCM1480_L2C_MGMT_INDEX(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_MGMT_INDEX) |
45 | #define G_BCM1480_L2C_MGMT_INDEX(x) _SB_GETVALUE(x, S_BCM1480_L2C_MGMT_INDEX, M_BCM1480_L2C_MGMT_INDEX) | 45 | #define G_BCM1480_L2C_MGMT_INDEX(x) _SB_GETVALUE(x, S_BCM1480_L2C_MGMT_INDEX, M_BCM1480_L2C_MGMT_INDEX) |
46 | 46 | ||
47 | #define S_BCM1480_L2C_MGMT_WAY 17 | 47 | #define S_BCM1480_L2C_MGMT_WAY 17 |
48 | #define M_BCM1480_L2C_MGMT_WAY _SB_MAKEMASK(3, S_BCM1480_L2C_MGMT_WAY) | 48 | #define M_BCM1480_L2C_MGMT_WAY _SB_MAKEMASK(3, S_BCM1480_L2C_MGMT_WAY) |
49 | #define V_BCM1480_L2C_MGMT_WAY(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_MGMT_WAY) | 49 | #define V_BCM1480_L2C_MGMT_WAY(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_MGMT_WAY) |
50 | #define G_BCM1480_L2C_MGMT_WAY(x) _SB_GETVALUE(x, S_BCM1480_L2C_MGMT_WAY, M_BCM1480_L2C_MGMT_WAY) | 50 | #define G_BCM1480_L2C_MGMT_WAY(x) _SB_GETVALUE(x, S_BCM1480_L2C_MGMT_WAY, M_BCM1480_L2C_MGMT_WAY) |
51 | 51 | ||
52 | #define M_BCM1480_L2C_MGMT_DIRTY _SB_MAKEMASK1(20) | 52 | #define M_BCM1480_L2C_MGMT_DIRTY _SB_MAKEMASK1(20) |
53 | #define M_BCM1480_L2C_MGMT_VALID _SB_MAKEMASK1(21) | 53 | #define M_BCM1480_L2C_MGMT_VALID _SB_MAKEMASK1(21) |
54 | 54 | ||
55 | #define S_BCM1480_L2C_MGMT_ECC_DIAG 22 | 55 | #define S_BCM1480_L2C_MGMT_ECC_DIAG 22 |
56 | #define M_BCM1480_L2C_MGMT_ECC_DIAG _SB_MAKEMASK(2, S_BCM1480_L2C_MGMT_ECC_DIAG) | 56 | #define M_BCM1480_L2C_MGMT_ECC_DIAG _SB_MAKEMASK(2, S_BCM1480_L2C_MGMT_ECC_DIAG) |
57 | #define V_BCM1480_L2C_MGMT_ECC_DIAG(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_MGMT_ECC_DIAG) | 57 | #define V_BCM1480_L2C_MGMT_ECC_DIAG(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_MGMT_ECC_DIAG) |
58 | #define G_BCM1480_L2C_MGMT_ECC_DIAG(x) _SB_GETVALUE(x, S_BCM1480_L2C_MGMT_ECC_DIAG, M_BCM1480_L2C_MGMT_ECC_DIAG) | 58 | #define G_BCM1480_L2C_MGMT_ECC_DIAG(x) _SB_GETVALUE(x, S_BCM1480_L2C_MGMT_ECC_DIAG, M_BCM1480_L2C_MGMT_ECC_DIAG) |
59 | 59 | ||
60 | #define A_BCM1480_L2C_MGMT_TAG_BASE 0x00D0000000 | 60 | #define A_BCM1480_L2C_MGMT_TAG_BASE 0x00D0000000 |
61 | 61 | ||
62 | #define BCM1480_L2C_ENTRIES_PER_WAY 4096 | 62 | #define BCM1480_L2C_ENTRIES_PER_WAY 4096 |
63 | #define BCM1480_L2C_NUM_WAYS 8 | 63 | #define BCM1480_L2C_NUM_WAYS 8 |
64 | 64 | ||
65 | 65 | ||
66 | /* | 66 | /* |
67 | * Level 2 Cache Tag register (Table 59) | 67 | * Level 2 Cache Tag register (Table 59) |
68 | */ | 68 | */ |
69 | 69 | ||
70 | #define S_BCM1480_L2C_TAG_MBZ 0 | 70 | #define S_BCM1480_L2C_TAG_MBZ 0 |
71 | #define M_BCM1480_L2C_TAG_MBZ _SB_MAKEMASK(5, S_BCM1480_L2C_TAG_MBZ) | 71 | #define M_BCM1480_L2C_TAG_MBZ _SB_MAKEMASK(5, S_BCM1480_L2C_TAG_MBZ) |
72 | 72 | ||
73 | #define S_BCM1480_L2C_TAG_INDEX 5 | 73 | #define S_BCM1480_L2C_TAG_INDEX 5 |
74 | #define M_BCM1480_L2C_TAG_INDEX _SB_MAKEMASK(12, S_BCM1480_L2C_TAG_INDEX) | 74 | #define M_BCM1480_L2C_TAG_INDEX _SB_MAKEMASK(12, S_BCM1480_L2C_TAG_INDEX) |
75 | #define V_BCM1480_L2C_TAG_INDEX(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_INDEX) | 75 | #define V_BCM1480_L2C_TAG_INDEX(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_INDEX) |
76 | #define G_BCM1480_L2C_TAG_INDEX(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_INDEX, M_BCM1480_L2C_TAG_INDEX) | 76 | #define G_BCM1480_L2C_TAG_INDEX(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_INDEX, M_BCM1480_L2C_TAG_INDEX) |
77 | 77 | ||
78 | /* Note that index bit 16 is also tag bit 40 */ | 78 | /* Note that index bit 16 is also tag bit 40 */ |
79 | #define S_BCM1480_L2C_TAG_TAG 17 | 79 | #define S_BCM1480_L2C_TAG_TAG 17 |
80 | #define M_BCM1480_L2C_TAG_TAG _SB_MAKEMASK(23, S_BCM1480_L2C_TAG_TAG) | 80 | #define M_BCM1480_L2C_TAG_TAG _SB_MAKEMASK(23, S_BCM1480_L2C_TAG_TAG) |
81 | #define V_BCM1480_L2C_TAG_TAG(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_TAG) | 81 | #define V_BCM1480_L2C_TAG_TAG(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_TAG) |
82 | #define G_BCM1480_L2C_TAG_TAG(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_TAG, M_BCM1480_L2C_TAG_TAG) | 82 | #define G_BCM1480_L2C_TAG_TAG(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_TAG, M_BCM1480_L2C_TAG_TAG) |
83 | 83 | ||
84 | #define S_BCM1480_L2C_TAG_ECC 40 | 84 | #define S_BCM1480_L2C_TAG_ECC 40 |
85 | #define M_BCM1480_L2C_TAG_ECC _SB_MAKEMASK(6, S_BCM1480_L2C_TAG_ECC) | 85 | #define M_BCM1480_L2C_TAG_ECC _SB_MAKEMASK(6, S_BCM1480_L2C_TAG_ECC) |
86 | #define V_BCM1480_L2C_TAG_ECC(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_ECC) | 86 | #define V_BCM1480_L2C_TAG_ECC(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_ECC) |
87 | #define G_BCM1480_L2C_TAG_ECC(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_ECC, M_BCM1480_L2C_TAG_ECC) | 87 | #define G_BCM1480_L2C_TAG_ECC(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_ECC, M_BCM1480_L2C_TAG_ECC) |
88 | 88 | ||
89 | #define S_BCM1480_L2C_TAG_WAY 46 | 89 | #define S_BCM1480_L2C_TAG_WAY 46 |
90 | #define M_BCM1480_L2C_TAG_WAY _SB_MAKEMASK(3, S_BCM1480_L2C_TAG_WAY) | 90 | #define M_BCM1480_L2C_TAG_WAY _SB_MAKEMASK(3, S_BCM1480_L2C_TAG_WAY) |
91 | #define V_BCM1480_L2C_TAG_WAY(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_WAY) | 91 | #define V_BCM1480_L2C_TAG_WAY(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_WAY) |
92 | #define G_BCM1480_L2C_TAG_WAY(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_WAY, M_BCM1480_L2C_TAG_WAY) | 92 | #define G_BCM1480_L2C_TAG_WAY(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_WAY, M_BCM1480_L2C_TAG_WAY) |
93 | 93 | ||
94 | #define M_BCM1480_L2C_TAG_DIRTY _SB_MAKEMASK1(49) | 94 | #define M_BCM1480_L2C_TAG_DIRTY _SB_MAKEMASK1(49) |
95 | #define M_BCM1480_L2C_TAG_VALID _SB_MAKEMASK1(50) | 95 | #define M_BCM1480_L2C_TAG_VALID _SB_MAKEMASK1(50) |
96 | 96 | ||
97 | #define S_BCM1480_L2C_DATA_ECC 51 | 97 | #define S_BCM1480_L2C_DATA_ECC 51 |
98 | #define M_BCM1480_L2C_DATA_ECC _SB_MAKEMASK(10, S_BCM1480_L2C_DATA_ECC) | 98 | #define M_BCM1480_L2C_DATA_ECC _SB_MAKEMASK(10, S_BCM1480_L2C_DATA_ECC) |
99 | #define V_BCM1480_L2C_DATA_ECC(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_DATA_ECC) | 99 | #define V_BCM1480_L2C_DATA_ECC(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_DATA_ECC) |
100 | #define G_BCM1480_L2C_DATA_ECC(x) _SB_GETVALUE(x, S_BCM1480_L2C_DATA_ECC, M_BCM1480_L2C_DATA_ECC) | 100 | #define G_BCM1480_L2C_DATA_ECC(x) _SB_GETVALUE(x, S_BCM1480_L2C_DATA_ECC, M_BCM1480_L2C_DATA_ECC) |
101 | 101 | ||
102 | 102 | ||
103 | /* | 103 | /* |
104 | * L2 Misc0 Value Register (Table 60) | 104 | * L2 Misc0 Value Register (Table 60) |
105 | */ | 105 | */ |
106 | 106 | ||
107 | #define S_BCM1480_L2C_MISC0_WAY_REMOTE 0 | 107 | #define S_BCM1480_L2C_MISC0_WAY_REMOTE 0 |
108 | #define M_BCM1480_L2C_MISC0_WAY_REMOTE _SB_MAKEMASK(8, S_BCM1480_L2C_MISC0_WAY_REMOTE) | 108 | #define M_BCM1480_L2C_MISC0_WAY_REMOTE _SB_MAKEMASK(8, S_BCM1480_L2C_MISC0_WAY_REMOTE) |
109 | #define G_BCM1480_L2C_MISC0_WAY_REMOTE(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_WAY_REMOTE, M_BCM1480_L2C_MISC0_WAY_REMOTE) | 109 | #define G_BCM1480_L2C_MISC0_WAY_REMOTE(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_WAY_REMOTE, M_BCM1480_L2C_MISC0_WAY_REMOTE) |
110 | 110 | ||
111 | #define S_BCM1480_L2C_MISC0_WAY_LOCAL 8 | 111 | #define S_BCM1480_L2C_MISC0_WAY_LOCAL 8 |
112 | #define M_BCM1480_L2C_MISC0_WAY_LOCAL _SB_MAKEMASK(8, S_BCM1480_L2C_MISC0_WAY_LOCAL) | 112 | #define M_BCM1480_L2C_MISC0_WAY_LOCAL _SB_MAKEMASK(8, S_BCM1480_L2C_MISC0_WAY_LOCAL) |
113 | #define G_BCM1480_L2C_MISC0_WAY_LOCAL(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_WAY_LOCAL, M_BCM1480_L2C_MISC0_WAY_LOCAL) | 113 | #define G_BCM1480_L2C_MISC0_WAY_LOCAL(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_WAY_LOCAL, M_BCM1480_L2C_MISC0_WAY_LOCAL) |
114 | 114 | ||
115 | #define S_BCM1480_L2C_MISC0_WAY_ENABLE 16 | 115 | #define S_BCM1480_L2C_MISC0_WAY_ENABLE 16 |
116 | #define M_BCM1480_L2C_MISC0_WAY_ENABLE _SB_MAKEMASK(8, S_BCM1480_L2C_MISC0_WAY_ENABLE) | 116 | #define M_BCM1480_L2C_MISC0_WAY_ENABLE _SB_MAKEMASK(8, S_BCM1480_L2C_MISC0_WAY_ENABLE) |
117 | #define G_BCM1480_L2C_MISC0_WAY_ENABLE(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_WAY_ENABLE, M_BCM1480_L2C_MISC0_WAY_ENABLE) | 117 | #define G_BCM1480_L2C_MISC0_WAY_ENABLE(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_WAY_ENABLE, M_BCM1480_L2C_MISC0_WAY_ENABLE) |
118 | 118 | ||
119 | #define S_BCM1480_L2C_MISC0_CACHE_DISABLE 24 | 119 | #define S_BCM1480_L2C_MISC0_CACHE_DISABLE 24 |
120 | #define M_BCM1480_L2C_MISC0_CACHE_DISABLE _SB_MAKEMASK(2, S_BCM1480_L2C_MISC0_CACHE_DISABLE) | 120 | #define M_BCM1480_L2C_MISC0_CACHE_DISABLE _SB_MAKEMASK(2, S_BCM1480_L2C_MISC0_CACHE_DISABLE) |
121 | #define G_BCM1480_L2C_MISC0_CACHE_DISABLE(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_CACHE_DISABLE, M_BCM1480_L2C_MISC0_CACHE_DISABLE) | 121 | #define G_BCM1480_L2C_MISC0_CACHE_DISABLE(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_CACHE_DISABLE, M_BCM1480_L2C_MISC0_CACHE_DISABLE) |
122 | 122 | ||
123 | #define S_BCM1480_L2C_MISC0_CACHE_QUAD 26 | 123 | #define S_BCM1480_L2C_MISC0_CACHE_QUAD 26 |
124 | #define M_BCM1480_L2C_MISC0_CACHE_QUAD _SB_MAKEMASK(2, S_BCM1480_L2C_MISC0_CACHE_QUAD) | 124 | #define M_BCM1480_L2C_MISC0_CACHE_QUAD _SB_MAKEMASK(2, S_BCM1480_L2C_MISC0_CACHE_QUAD) |
125 | #define G_BCM1480_L2C_MISC0_CACHE_QUAD(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_CACHE_QUAD, M_BCM1480_L2C_MISC0_CACHE_QUAD) | 125 | #define G_BCM1480_L2C_MISC0_CACHE_QUAD(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_CACHE_QUAD, M_BCM1480_L2C_MISC0_CACHE_QUAD) |
126 | 126 | ||
127 | #define S_BCM1480_L2C_MISC0_MC_PRIORITY 30 | 127 | #define S_BCM1480_L2C_MISC0_MC_PRIORITY 30 |
128 | #define M_BCM1480_L2C_MISC0_MC_PRIORITY _SB_MAKEMASK1(S_BCM1480_L2C_MISC0_MC_PRIORITY) | 128 | #define M_BCM1480_L2C_MISC0_MC_PRIORITY _SB_MAKEMASK1(S_BCM1480_L2C_MISC0_MC_PRIORITY) |
129 | 129 | ||
130 | #define S_BCM1480_L2C_MISC0_ECC_CLEANUP 31 | 130 | #define S_BCM1480_L2C_MISC0_ECC_CLEANUP 31 |
131 | #define M_BCM1480_L2C_MISC0_ECC_CLEANUP _SB_MAKEMASK1(S_BCM1480_L2C_MISC0_ECC_CLEANUP) | 131 | #define M_BCM1480_L2C_MISC0_ECC_CLEANUP _SB_MAKEMASK1(S_BCM1480_L2C_MISC0_ECC_CLEANUP) |
132 | 132 | ||
133 | 133 | ||
134 | /* | 134 | /* |
135 | * L2 Misc1 Value Register (Table 60) | 135 | * L2 Misc1 Value Register (Table 60) |
136 | */ | 136 | */ |
137 | 137 | ||
138 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_0 0 | 138 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_0 0 |
139 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_0 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_0) | 139 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_0 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_0) |
140 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_0(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_0, M_BCM1480_L2C_MISC1_WAY_AGENT_0) | 140 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_0(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_0, M_BCM1480_L2C_MISC1_WAY_AGENT_0) |
141 | 141 | ||
142 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_1 8 | 142 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_1 8 |
143 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_1 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_1) | 143 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_1 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_1) |
144 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_1(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_1, M_BCM1480_L2C_MISC1_WAY_AGENT_1) | 144 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_1(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_1, M_BCM1480_L2C_MISC1_WAY_AGENT_1) |
145 | 145 | ||
146 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_2 16 | 146 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_2 16 |
147 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_2 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_2) | 147 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_2 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_2) |
148 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_2(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_2, M_BCM1480_L2C_MISC1_WAY_AGENT_2) | 148 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_2(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_2, M_BCM1480_L2C_MISC1_WAY_AGENT_2) |
149 | 149 | ||
150 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_3 24 | 150 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_3 24 |
151 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_3 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_3) | 151 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_3 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_3) |
152 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_3(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_3, M_BCM1480_L2C_MISC1_WAY_AGENT_3) | 152 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_3(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_3, M_BCM1480_L2C_MISC1_WAY_AGENT_3) |
153 | 153 | ||
154 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_4 32 | 154 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_4 32 |
155 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_4 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_4) | 155 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_4 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_4) |
156 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_4(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_4, M_BCM1480_L2C_MISC1_WAY_AGENT_4) | 156 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_4(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_4, M_BCM1480_L2C_MISC1_WAY_AGENT_4) |
157 | 157 | ||
158 | 158 | ||
@@ -160,16 +160,16 @@ | |||
160 | * L2 Misc2 Value Register (Table 60) | 160 | * L2 Misc2 Value Register (Table 60) |
161 | */ | 161 | */ |
162 | 162 | ||
163 | #define S_BCM1480_L2C_MISC2_WAY_AGENT_8 0 | 163 | #define S_BCM1480_L2C_MISC2_WAY_AGENT_8 0 |
164 | #define M_BCM1480_L2C_MISC2_WAY_AGENT_8 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC2_WAY_AGENT_8) | 164 | #define M_BCM1480_L2C_MISC2_WAY_AGENT_8 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC2_WAY_AGENT_8) |
165 | #define G_BCM1480_L2C_MISC2_WAY_AGENT_8(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC2_WAY_AGENT_8, M_BCM1480_L2C_MISC2_WAY_AGENT_8) | 165 | #define G_BCM1480_L2C_MISC2_WAY_AGENT_8(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC2_WAY_AGENT_8, M_BCM1480_L2C_MISC2_WAY_AGENT_8) |
166 | 166 | ||
167 | #define S_BCM1480_L2C_MISC2_WAY_AGENT_9 8 | 167 | #define S_BCM1480_L2C_MISC2_WAY_AGENT_9 8 |
168 | #define M_BCM1480_L2C_MISC2_WAY_AGENT_9 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC2_WAY_AGENT_9) | 168 | #define M_BCM1480_L2C_MISC2_WAY_AGENT_9 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC2_WAY_AGENT_9) |
169 | #define G_BCM1480_L2C_MISC2_WAY_AGENT_9(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC2_WAY_AGENT_9, M_BCM1480_L2C_MISC2_WAY_AGENT_9) | 169 | #define G_BCM1480_L2C_MISC2_WAY_AGENT_9(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC2_WAY_AGENT_9, M_BCM1480_L2C_MISC2_WAY_AGENT_9) |
170 | 170 | ||
171 | #define S_BCM1480_L2C_MISC2_WAY_AGENT_A 16 | 171 | #define S_BCM1480_L2C_MISC2_WAY_AGENT_A 16 |
172 | #define M_BCM1480_L2C_MISC2_WAY_AGENT_A _SB_MAKEMASK(8, S_BCM1480_L2C_MISC2_WAY_AGENT_A) | 172 | #define M_BCM1480_L2C_MISC2_WAY_AGENT_A _SB_MAKEMASK(8, S_BCM1480_L2C_MISC2_WAY_AGENT_A) |
173 | #define G_BCM1480_L2C_MISC2_WAY_AGENT_A(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC2_WAY_AGENT_A, M_BCM1480_L2C_MISC2_WAY_AGENT_A) | 173 | #define G_BCM1480_L2C_MISC2_WAY_AGENT_A(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC2_WAY_AGENT_A, M_BCM1480_L2C_MISC2_WAY_AGENT_A) |
174 | 174 | ||
175 | 175 | ||
diff --git a/arch/mips/include/asm/sibyte/bcm1480_mc.h b/arch/mips/include/asm/sibyte/bcm1480_mc.h index 4307a758e3bf..86908fdb4032 100644 --- a/arch/mips/include/asm/sibyte/bcm1480_mc.h +++ b/arch/mips/include/asm/sibyte/bcm1480_mc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * BCM1280/BCM1480 Board Support Package | 2 | * BCM1280/BCM1480 Board Support Package |
3 | * | 3 | * |
4 | * Memory Controller constants File: bcm1480_mc.h | 4 | * Memory Controller constants File: bcm1480_mc.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * programming the memory controller. | 7 | * programming the memory controller. |
@@ -39,33 +39,33 @@ | |||
39 | * Memory Channel Configuration Register (Table 81) | 39 | * Memory Channel Configuration Register (Table 81) |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #define S_BCM1480_MC_INTLV0 0 | 42 | #define S_BCM1480_MC_INTLV0 0 |
43 | #define M_BCM1480_MC_INTLV0 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV0) | 43 | #define M_BCM1480_MC_INTLV0 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV0) |
44 | #define V_BCM1480_MC_INTLV0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV0) | 44 | #define V_BCM1480_MC_INTLV0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV0) |
45 | #define G_BCM1480_MC_INTLV0(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV0, M_BCM1480_MC_INTLV0) | 45 | #define G_BCM1480_MC_INTLV0(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV0, M_BCM1480_MC_INTLV0) |
46 | #define V_BCM1480_MC_INTLV0_DEFAULT V_BCM1480_MC_INTLV0(0) | 46 | #define V_BCM1480_MC_INTLV0_DEFAULT V_BCM1480_MC_INTLV0(0) |
47 | 47 | ||
48 | #define S_BCM1480_MC_INTLV1 8 | 48 | #define S_BCM1480_MC_INTLV1 8 |
49 | #define M_BCM1480_MC_INTLV1 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV1) | 49 | #define M_BCM1480_MC_INTLV1 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV1) |
50 | #define V_BCM1480_MC_INTLV1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV1) | 50 | #define V_BCM1480_MC_INTLV1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV1) |
51 | #define G_BCM1480_MC_INTLV1(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV1, M_BCM1480_MC_INTLV1) | 51 | #define G_BCM1480_MC_INTLV1(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV1, M_BCM1480_MC_INTLV1) |
52 | #define V_BCM1480_MC_INTLV1_DEFAULT V_BCM1480_MC_INTLV1(0) | 52 | #define V_BCM1480_MC_INTLV1_DEFAULT V_BCM1480_MC_INTLV1(0) |
53 | 53 | ||
54 | #define S_BCM1480_MC_INTLV2 16 | 54 | #define S_BCM1480_MC_INTLV2 16 |
55 | #define M_BCM1480_MC_INTLV2 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV2) | 55 | #define M_BCM1480_MC_INTLV2 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV2) |
56 | #define V_BCM1480_MC_INTLV2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV2) | 56 | #define V_BCM1480_MC_INTLV2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV2) |
57 | #define G_BCM1480_MC_INTLV2(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV2, M_BCM1480_MC_INTLV2) | 57 | #define G_BCM1480_MC_INTLV2(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV2, M_BCM1480_MC_INTLV2) |
58 | #define V_BCM1480_MC_INTLV2_DEFAULT V_BCM1480_MC_INTLV2(0) | 58 | #define V_BCM1480_MC_INTLV2_DEFAULT V_BCM1480_MC_INTLV2(0) |
59 | 59 | ||
60 | #define S_BCM1480_MC_CS_MODE 32 | 60 | #define S_BCM1480_MC_CS_MODE 32 |
61 | #define M_BCM1480_MC_CS_MODE _SB_MAKEMASK(8, S_BCM1480_MC_CS_MODE) | 61 | #define M_BCM1480_MC_CS_MODE _SB_MAKEMASK(8, S_BCM1480_MC_CS_MODE) |
62 | #define V_BCM1480_MC_CS_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS_MODE) | 62 | #define V_BCM1480_MC_CS_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS_MODE) |
63 | #define G_BCM1480_MC_CS_MODE(x) _SB_GETVALUE(x, S_BCM1480_MC_CS_MODE, M_BCM1480_MC_CS_MODE) | 63 | #define G_BCM1480_MC_CS_MODE(x) _SB_GETVALUE(x, S_BCM1480_MC_CS_MODE, M_BCM1480_MC_CS_MODE) |
64 | #define V_BCM1480_MC_CS_MODE_DEFAULT V_BCM1480_MC_CS_MODE(0) | 64 | #define V_BCM1480_MC_CS_MODE_DEFAULT V_BCM1480_MC_CS_MODE(0) |
65 | 65 | ||
66 | #define V_BCM1480_MC_CONFIG_DEFAULT (V_BCM1480_MC_INTLV0_DEFAULT | \ | 66 | #define V_BCM1480_MC_CONFIG_DEFAULT (V_BCM1480_MC_INTLV0_DEFAULT | \ |
67 | V_BCM1480_MC_INTLV1_DEFAULT | \ | 67 | V_BCM1480_MC_INTLV1_DEFAULT | \ |
68 | V_BCM1480_MC_INTLV2_DEFAULT | \ | 68 | V_BCM1480_MC_INTLV2_DEFAULT | \ |
69 | V_BCM1480_MC_CS_MODE_DEFAULT) | 69 | V_BCM1480_MC_CS_MODE_DEFAULT) |
70 | 70 | ||
71 | #define K_BCM1480_MC_CS01_MODE 0x03 | 71 | #define K_BCM1480_MC_CS01_MODE 0x03 |
@@ -80,254 +80,254 @@ | |||
80 | * Chip Select Start Address Register (Table 82) | 80 | * Chip Select Start Address Register (Table 82) |
81 | */ | 81 | */ |
82 | 82 | ||
83 | #define S_BCM1480_MC_CS0_START 0 | 83 | #define S_BCM1480_MC_CS0_START 0 |
84 | #define M_BCM1480_MC_CS0_START _SB_MAKEMASK(12, S_BCM1480_MC_CS0_START) | 84 | #define M_BCM1480_MC_CS0_START _SB_MAKEMASK(12, S_BCM1480_MC_CS0_START) |
85 | #define V_BCM1480_MC_CS0_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS0_START) | 85 | #define V_BCM1480_MC_CS0_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS0_START) |
86 | #define G_BCM1480_MC_CS0_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS0_START, M_BCM1480_MC_CS0_START) | 86 | #define G_BCM1480_MC_CS0_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS0_START, M_BCM1480_MC_CS0_START) |
87 | 87 | ||
88 | #define S_BCM1480_MC_CS1_START 16 | 88 | #define S_BCM1480_MC_CS1_START 16 |
89 | #define M_BCM1480_MC_CS1_START _SB_MAKEMASK(12, S_BCM1480_MC_CS1_START) | 89 | #define M_BCM1480_MC_CS1_START _SB_MAKEMASK(12, S_BCM1480_MC_CS1_START) |
90 | #define V_BCM1480_MC_CS1_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS1_START) | 90 | #define V_BCM1480_MC_CS1_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS1_START) |
91 | #define G_BCM1480_MC_CS1_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS1_START, M_BCM1480_MC_CS1_START) | 91 | #define G_BCM1480_MC_CS1_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS1_START, M_BCM1480_MC_CS1_START) |
92 | 92 | ||
93 | #define S_BCM1480_MC_CS2_START 32 | 93 | #define S_BCM1480_MC_CS2_START 32 |
94 | #define M_BCM1480_MC_CS2_START _SB_MAKEMASK(12, S_BCM1480_MC_CS2_START) | 94 | #define M_BCM1480_MC_CS2_START _SB_MAKEMASK(12, S_BCM1480_MC_CS2_START) |
95 | #define V_BCM1480_MC_CS2_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS2_START) | 95 | #define V_BCM1480_MC_CS2_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS2_START) |
96 | #define G_BCM1480_MC_CS2_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS2_START, M_BCM1480_MC_CS2_START) | 96 | #define G_BCM1480_MC_CS2_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS2_START, M_BCM1480_MC_CS2_START) |
97 | 97 | ||
98 | #define S_BCM1480_MC_CS3_START 48 | 98 | #define S_BCM1480_MC_CS3_START 48 |
99 | #define M_BCM1480_MC_CS3_START _SB_MAKEMASK(12, S_BCM1480_MC_CS3_START) | 99 | #define M_BCM1480_MC_CS3_START _SB_MAKEMASK(12, S_BCM1480_MC_CS3_START) |
100 | #define V_BCM1480_MC_CS3_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS3_START) | 100 | #define V_BCM1480_MC_CS3_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS3_START) |
101 | #define G_BCM1480_MC_CS3_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS3_START, M_BCM1480_MC_CS3_START) | 101 | #define G_BCM1480_MC_CS3_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS3_START, M_BCM1480_MC_CS3_START) |
102 | 102 | ||
103 | /* | 103 | /* |
104 | * Chip Select End Address Register (Table 83) | 104 | * Chip Select End Address Register (Table 83) |
105 | */ | 105 | */ |
106 | 106 | ||
107 | #define S_BCM1480_MC_CS0_END 0 | 107 | #define S_BCM1480_MC_CS0_END 0 |
108 | #define M_BCM1480_MC_CS0_END _SB_MAKEMASK(12, S_BCM1480_MC_CS0_END) | 108 | #define M_BCM1480_MC_CS0_END _SB_MAKEMASK(12, S_BCM1480_MC_CS0_END) |
109 | #define V_BCM1480_MC_CS0_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS0_END) | 109 | #define V_BCM1480_MC_CS0_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS0_END) |
110 | #define G_BCM1480_MC_CS0_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS0_END, M_BCM1480_MC_CS0_END) | 110 | #define G_BCM1480_MC_CS0_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS0_END, M_BCM1480_MC_CS0_END) |
111 | 111 | ||
112 | #define S_BCM1480_MC_CS1_END 16 | 112 | #define S_BCM1480_MC_CS1_END 16 |
113 | #define M_BCM1480_MC_CS1_END _SB_MAKEMASK(12, S_BCM1480_MC_CS1_END) | 113 | #define M_BCM1480_MC_CS1_END _SB_MAKEMASK(12, S_BCM1480_MC_CS1_END) |
114 | #define V_BCM1480_MC_CS1_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS1_END) | 114 | #define V_BCM1480_MC_CS1_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS1_END) |
115 | #define G_BCM1480_MC_CS1_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS1_END, M_BCM1480_MC_CS1_END) | 115 | #define G_BCM1480_MC_CS1_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS1_END, M_BCM1480_MC_CS1_END) |
116 | 116 | ||
117 | #define S_BCM1480_MC_CS2_END 32 | 117 | #define S_BCM1480_MC_CS2_END 32 |
118 | #define M_BCM1480_MC_CS2_END _SB_MAKEMASK(12, S_BCM1480_MC_CS2_END) | 118 | #define M_BCM1480_MC_CS2_END _SB_MAKEMASK(12, S_BCM1480_MC_CS2_END) |
119 | #define V_BCM1480_MC_CS2_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS2_END) | 119 | #define V_BCM1480_MC_CS2_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS2_END) |
120 | #define G_BCM1480_MC_CS2_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS2_END, M_BCM1480_MC_CS2_END) | 120 | #define G_BCM1480_MC_CS2_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS2_END, M_BCM1480_MC_CS2_END) |
121 | 121 | ||
122 | #define S_BCM1480_MC_CS3_END 48 | 122 | #define S_BCM1480_MC_CS3_END 48 |
123 | #define M_BCM1480_MC_CS3_END _SB_MAKEMASK(12, S_BCM1480_MC_CS3_END) | 123 | #define M_BCM1480_MC_CS3_END _SB_MAKEMASK(12, S_BCM1480_MC_CS3_END) |
124 | #define V_BCM1480_MC_CS3_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS3_END) | 124 | #define V_BCM1480_MC_CS3_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS3_END) |
125 | #define G_BCM1480_MC_CS3_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS3_END, M_BCM1480_MC_CS3_END) | 125 | #define G_BCM1480_MC_CS3_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS3_END, M_BCM1480_MC_CS3_END) |
126 | 126 | ||
127 | /* | 127 | /* |
128 | * Row Address Bit Select Register 0 (Table 84) | 128 | * Row Address Bit Select Register 0 (Table 84) |
129 | */ | 129 | */ |
130 | 130 | ||
131 | #define S_BCM1480_MC_ROW00 0 | 131 | #define S_BCM1480_MC_ROW00 0 |
132 | #define M_BCM1480_MC_ROW00 _SB_MAKEMASK(6, S_BCM1480_MC_ROW00) | 132 | #define M_BCM1480_MC_ROW00 _SB_MAKEMASK(6, S_BCM1480_MC_ROW00) |
133 | #define V_BCM1480_MC_ROW00(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW00) | 133 | #define V_BCM1480_MC_ROW00(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW00) |
134 | #define G_BCM1480_MC_ROW00(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW00, M_BCM1480_MC_ROW00) | 134 | #define G_BCM1480_MC_ROW00(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW00, M_BCM1480_MC_ROW00) |
135 | 135 | ||
136 | #define S_BCM1480_MC_ROW01 8 | 136 | #define S_BCM1480_MC_ROW01 8 |
137 | #define M_BCM1480_MC_ROW01 _SB_MAKEMASK(6, S_BCM1480_MC_ROW01) | 137 | #define M_BCM1480_MC_ROW01 _SB_MAKEMASK(6, S_BCM1480_MC_ROW01) |
138 | #define V_BCM1480_MC_ROW01(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW01) | 138 | #define V_BCM1480_MC_ROW01(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW01) |
139 | #define G_BCM1480_MC_ROW01(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW01, M_BCM1480_MC_ROW01) | 139 | #define G_BCM1480_MC_ROW01(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW01, M_BCM1480_MC_ROW01) |
140 | 140 | ||
141 | #define S_BCM1480_MC_ROW02 16 | 141 | #define S_BCM1480_MC_ROW02 16 |
142 | #define M_BCM1480_MC_ROW02 _SB_MAKEMASK(6, S_BCM1480_MC_ROW02) | 142 | #define M_BCM1480_MC_ROW02 _SB_MAKEMASK(6, S_BCM1480_MC_ROW02) |
143 | #define V_BCM1480_MC_ROW02(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW02) | 143 | #define V_BCM1480_MC_ROW02(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW02) |
144 | #define G_BCM1480_MC_ROW02(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW02, M_BCM1480_MC_ROW02) | 144 | #define G_BCM1480_MC_ROW02(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW02, M_BCM1480_MC_ROW02) |
145 | 145 | ||
146 | #define S_BCM1480_MC_ROW03 24 | 146 | #define S_BCM1480_MC_ROW03 24 |
147 | #define M_BCM1480_MC_ROW03 _SB_MAKEMASK(6, S_BCM1480_MC_ROW03) | 147 | #define M_BCM1480_MC_ROW03 _SB_MAKEMASK(6, S_BCM1480_MC_ROW03) |
148 | #define V_BCM1480_MC_ROW03(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW03) | 148 | #define V_BCM1480_MC_ROW03(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW03) |
149 | #define G_BCM1480_MC_ROW03(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW03, M_BCM1480_MC_ROW03) | 149 | #define G_BCM1480_MC_ROW03(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW03, M_BCM1480_MC_ROW03) |
150 | 150 | ||
151 | #define S_BCM1480_MC_ROW04 32 | 151 | #define S_BCM1480_MC_ROW04 32 |
152 | #define M_BCM1480_MC_ROW04 _SB_MAKEMASK(6, S_BCM1480_MC_ROW04) | 152 | #define M_BCM1480_MC_ROW04 _SB_MAKEMASK(6, S_BCM1480_MC_ROW04) |
153 | #define V_BCM1480_MC_ROW04(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW04) | 153 | #define V_BCM1480_MC_ROW04(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW04) |
154 | #define G_BCM1480_MC_ROW04(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW04, M_BCM1480_MC_ROW04) | 154 | #define G_BCM1480_MC_ROW04(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW04, M_BCM1480_MC_ROW04) |
155 | 155 | ||
156 | #define S_BCM1480_MC_ROW05 40 | 156 | #define S_BCM1480_MC_ROW05 40 |
157 | #define M_BCM1480_MC_ROW05 _SB_MAKEMASK(6, S_BCM1480_MC_ROW05) | 157 | #define M_BCM1480_MC_ROW05 _SB_MAKEMASK(6, S_BCM1480_MC_ROW05) |
158 | #define V_BCM1480_MC_ROW05(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW05) | 158 | #define V_BCM1480_MC_ROW05(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW05) |
159 | #define G_BCM1480_MC_ROW05(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW05, M_BCM1480_MC_ROW05) | 159 | #define G_BCM1480_MC_ROW05(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW05, M_BCM1480_MC_ROW05) |
160 | 160 | ||
161 | #define S_BCM1480_MC_ROW06 48 | 161 | #define S_BCM1480_MC_ROW06 48 |
162 | #define M_BCM1480_MC_ROW06 _SB_MAKEMASK(6, S_BCM1480_MC_ROW06) | 162 | #define M_BCM1480_MC_ROW06 _SB_MAKEMASK(6, S_BCM1480_MC_ROW06) |
163 | #define V_BCM1480_MC_ROW06(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW06) | 163 | #define V_BCM1480_MC_ROW06(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW06) |
164 | #define G_BCM1480_MC_ROW06(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW06, M_BCM1480_MC_ROW06) | 164 | #define G_BCM1480_MC_ROW06(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW06, M_BCM1480_MC_ROW06) |
165 | 165 | ||
166 | #define S_BCM1480_MC_ROW07 56 | 166 | #define S_BCM1480_MC_ROW07 56 |
167 | #define M_BCM1480_MC_ROW07 _SB_MAKEMASK(6, S_BCM1480_MC_ROW07) | 167 | #define M_BCM1480_MC_ROW07 _SB_MAKEMASK(6, S_BCM1480_MC_ROW07) |
168 | #define V_BCM1480_MC_ROW07(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW07) | 168 | #define V_BCM1480_MC_ROW07(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW07) |
169 | #define G_BCM1480_MC_ROW07(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW07, M_BCM1480_MC_ROW07) | 169 | #define G_BCM1480_MC_ROW07(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW07, M_BCM1480_MC_ROW07) |
170 | 170 | ||
171 | /* | 171 | /* |
172 | * Row Address Bit Select Register 1 (Table 85) | 172 | * Row Address Bit Select Register 1 (Table 85) |
173 | */ | 173 | */ |
174 | 174 | ||
175 | #define S_BCM1480_MC_ROW08 0 | 175 | #define S_BCM1480_MC_ROW08 0 |
176 | #define M_BCM1480_MC_ROW08 _SB_MAKEMASK(6, S_BCM1480_MC_ROW08) | 176 | #define M_BCM1480_MC_ROW08 _SB_MAKEMASK(6, S_BCM1480_MC_ROW08) |
177 | #define V_BCM1480_MC_ROW08(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW08) | 177 | #define V_BCM1480_MC_ROW08(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW08) |
178 | #define G_BCM1480_MC_ROW08(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW08, M_BCM1480_MC_ROW08) | 178 | #define G_BCM1480_MC_ROW08(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW08, M_BCM1480_MC_ROW08) |
179 | 179 | ||
180 | #define S_BCM1480_MC_ROW09 8 | 180 | #define S_BCM1480_MC_ROW09 8 |
181 | #define M_BCM1480_MC_ROW09 _SB_MAKEMASK(6, S_BCM1480_MC_ROW09) | 181 | #define M_BCM1480_MC_ROW09 _SB_MAKEMASK(6, S_BCM1480_MC_ROW09) |
182 | #define V_BCM1480_MC_ROW09(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW09) | 182 | #define V_BCM1480_MC_ROW09(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW09) |
183 | #define G_BCM1480_MC_ROW09(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW09, M_BCM1480_MC_ROW09) | 183 | #define G_BCM1480_MC_ROW09(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW09, M_BCM1480_MC_ROW09) |
184 | 184 | ||
185 | #define S_BCM1480_MC_ROW10 16 | 185 | #define S_BCM1480_MC_ROW10 16 |
186 | #define M_BCM1480_MC_ROW10 _SB_MAKEMASK(6, S_BCM1480_MC_ROW10) | 186 | #define M_BCM1480_MC_ROW10 _SB_MAKEMASK(6, S_BCM1480_MC_ROW10) |
187 | #define V_BCM1480_MC_ROW10(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW10) | 187 | #define V_BCM1480_MC_ROW10(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW10) |
188 | #define G_BCM1480_MC_ROW10(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW10, M_BCM1480_MC_ROW10) | 188 | #define G_BCM1480_MC_ROW10(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW10, M_BCM1480_MC_ROW10) |
189 | 189 | ||
190 | #define S_BCM1480_MC_ROW11 24 | 190 | #define S_BCM1480_MC_ROW11 24 |
191 | #define M_BCM1480_MC_ROW11 _SB_MAKEMASK(6, S_BCM1480_MC_ROW11) | 191 | #define M_BCM1480_MC_ROW11 _SB_MAKEMASK(6, S_BCM1480_MC_ROW11) |
192 | #define V_BCM1480_MC_ROW11(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW11) | 192 | #define V_BCM1480_MC_ROW11(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW11) |
193 | #define G_BCM1480_MC_ROW11(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW11, M_BCM1480_MC_ROW11) | 193 | #define G_BCM1480_MC_ROW11(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW11, M_BCM1480_MC_ROW11) |
194 | 194 | ||
195 | #define S_BCM1480_MC_ROW12 32 | 195 | #define S_BCM1480_MC_ROW12 32 |
196 | #define M_BCM1480_MC_ROW12 _SB_MAKEMASK(6, S_BCM1480_MC_ROW12) | 196 | #define M_BCM1480_MC_ROW12 _SB_MAKEMASK(6, S_BCM1480_MC_ROW12) |
197 | #define V_BCM1480_MC_ROW12(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW12) | 197 | #define V_BCM1480_MC_ROW12(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW12) |
198 | #define G_BCM1480_MC_ROW12(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW12, M_BCM1480_MC_ROW12) | 198 | #define G_BCM1480_MC_ROW12(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW12, M_BCM1480_MC_ROW12) |
199 | 199 | ||
200 | #define S_BCM1480_MC_ROW13 40 | 200 | #define S_BCM1480_MC_ROW13 40 |
201 | #define M_BCM1480_MC_ROW13 _SB_MAKEMASK(6, S_BCM1480_MC_ROW13) | 201 | #define M_BCM1480_MC_ROW13 _SB_MAKEMASK(6, S_BCM1480_MC_ROW13) |
202 | #define V_BCM1480_MC_ROW13(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW13) | 202 | #define V_BCM1480_MC_ROW13(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW13) |
203 | #define G_BCM1480_MC_ROW13(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW13, M_BCM1480_MC_ROW13) | 203 | #define G_BCM1480_MC_ROW13(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW13, M_BCM1480_MC_ROW13) |
204 | 204 | ||
205 | #define S_BCM1480_MC_ROW14 48 | 205 | #define S_BCM1480_MC_ROW14 48 |
206 | #define M_BCM1480_MC_ROW14 _SB_MAKEMASK(6, S_BCM1480_MC_ROW14) | 206 | #define M_BCM1480_MC_ROW14 _SB_MAKEMASK(6, S_BCM1480_MC_ROW14) |
207 | #define V_BCM1480_MC_ROW14(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW14) | 207 | #define V_BCM1480_MC_ROW14(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW14) |
208 | #define G_BCM1480_MC_ROW14(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW14, M_BCM1480_MC_ROW14) | 208 | #define G_BCM1480_MC_ROW14(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW14, M_BCM1480_MC_ROW14) |
209 | 209 | ||
210 | #define K_BCM1480_MC_ROWX_BIT_SPACING 8 | 210 | #define K_BCM1480_MC_ROWX_BIT_SPACING 8 |
211 | 211 | ||
212 | /* | 212 | /* |
213 | * Column Address Bit Select Register 0 (Table 86) | 213 | * Column Address Bit Select Register 0 (Table 86) |
214 | */ | 214 | */ |
215 | 215 | ||
216 | #define S_BCM1480_MC_COL00 0 | 216 | #define S_BCM1480_MC_COL00 0 |
217 | #define M_BCM1480_MC_COL00 _SB_MAKEMASK(6, S_BCM1480_MC_COL00) | 217 | #define M_BCM1480_MC_COL00 _SB_MAKEMASK(6, S_BCM1480_MC_COL00) |
218 | #define V_BCM1480_MC_COL00(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL00) | 218 | #define V_BCM1480_MC_COL00(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL00) |
219 | #define G_BCM1480_MC_COL00(x) _SB_GETVALUE(x, S_BCM1480_MC_COL00, M_BCM1480_MC_COL00) | 219 | #define G_BCM1480_MC_COL00(x) _SB_GETVALUE(x, S_BCM1480_MC_COL00, M_BCM1480_MC_COL00) |
220 | 220 | ||
221 | #define S_BCM1480_MC_COL01 8 | 221 | #define S_BCM1480_MC_COL01 8 |
222 | #define M_BCM1480_MC_COL01 _SB_MAKEMASK(6, S_BCM1480_MC_COL01) | 222 | #define M_BCM1480_MC_COL01 _SB_MAKEMASK(6, S_BCM1480_MC_COL01) |
223 | #define V_BCM1480_MC_COL01(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL01) | 223 | #define V_BCM1480_MC_COL01(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL01) |
224 | #define G_BCM1480_MC_COL01(x) _SB_GETVALUE(x, S_BCM1480_MC_COL01, M_BCM1480_MC_COL01) | 224 | #define G_BCM1480_MC_COL01(x) _SB_GETVALUE(x, S_BCM1480_MC_COL01, M_BCM1480_MC_COL01) |
225 | 225 | ||
226 | #define S_BCM1480_MC_COL02 16 | 226 | #define S_BCM1480_MC_COL02 16 |
227 | #define M_BCM1480_MC_COL02 _SB_MAKEMASK(6, S_BCM1480_MC_COL02) | 227 | #define M_BCM1480_MC_COL02 _SB_MAKEMASK(6, S_BCM1480_MC_COL02) |
228 | #define V_BCM1480_MC_COL02(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL02) | 228 | #define V_BCM1480_MC_COL02(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL02) |
229 | #define G_BCM1480_MC_COL02(x) _SB_GETVALUE(x, S_BCM1480_MC_COL02, M_BCM1480_MC_COL02) | 229 | #define G_BCM1480_MC_COL02(x) _SB_GETVALUE(x, S_BCM1480_MC_COL02, M_BCM1480_MC_COL02) |
230 | 230 | ||
231 | #define S_BCM1480_MC_COL03 24 | 231 | #define S_BCM1480_MC_COL03 24 |
232 | #define M_BCM1480_MC_COL03 _SB_MAKEMASK(6, S_BCM1480_MC_COL03) | 232 | #define M_BCM1480_MC_COL03 _SB_MAKEMASK(6, S_BCM1480_MC_COL03) |
233 | #define V_BCM1480_MC_COL03(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL03) | 233 | #define V_BCM1480_MC_COL03(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL03) |
234 | #define G_BCM1480_MC_COL03(x) _SB_GETVALUE(x, S_BCM1480_MC_COL03, M_BCM1480_MC_COL03) | 234 | #define G_BCM1480_MC_COL03(x) _SB_GETVALUE(x, S_BCM1480_MC_COL03, M_BCM1480_MC_COL03) |
235 | 235 | ||
236 | #define S_BCM1480_MC_COL04 32 | 236 | #define S_BCM1480_MC_COL04 32 |
237 | #define M_BCM1480_MC_COL04 _SB_MAKEMASK(6, S_BCM1480_MC_COL04) | 237 | #define M_BCM1480_MC_COL04 _SB_MAKEMASK(6, S_BCM1480_MC_COL04) |
238 | #define V_BCM1480_MC_COL04(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL04) | 238 | #define V_BCM1480_MC_COL04(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL04) |
239 | #define G_BCM1480_MC_COL04(x) _SB_GETVALUE(x, S_BCM1480_MC_COL04, M_BCM1480_MC_COL04) | 239 | #define G_BCM1480_MC_COL04(x) _SB_GETVALUE(x, S_BCM1480_MC_COL04, M_BCM1480_MC_COL04) |
240 | 240 | ||
241 | #define S_BCM1480_MC_COL05 40 | 241 | #define S_BCM1480_MC_COL05 40 |
242 | #define M_BCM1480_MC_COL05 _SB_MAKEMASK(6, S_BCM1480_MC_COL05) | 242 | #define M_BCM1480_MC_COL05 _SB_MAKEMASK(6, S_BCM1480_MC_COL05) |
243 | #define V_BCM1480_MC_COL05(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL05) | 243 | #define V_BCM1480_MC_COL05(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL05) |
244 | #define G_BCM1480_MC_COL05(x) _SB_GETVALUE(x, S_BCM1480_MC_COL05, M_BCM1480_MC_COL05) | 244 | #define G_BCM1480_MC_COL05(x) _SB_GETVALUE(x, S_BCM1480_MC_COL05, M_BCM1480_MC_COL05) |
245 | 245 | ||
246 | #define S_BCM1480_MC_COL06 48 | 246 | #define S_BCM1480_MC_COL06 48 |
247 | #define M_BCM1480_MC_COL06 _SB_MAKEMASK(6, S_BCM1480_MC_COL06) | 247 | #define M_BCM1480_MC_COL06 _SB_MAKEMASK(6, S_BCM1480_MC_COL06) |
248 | #define V_BCM1480_MC_COL06(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL06) | 248 | #define V_BCM1480_MC_COL06(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL06) |
249 | #define G_BCM1480_MC_COL06(x) _SB_GETVALUE(x, S_BCM1480_MC_COL06, M_BCM1480_MC_COL06) | 249 | #define G_BCM1480_MC_COL06(x) _SB_GETVALUE(x, S_BCM1480_MC_COL06, M_BCM1480_MC_COL06) |
250 | 250 | ||
251 | #define S_BCM1480_MC_COL07 56 | 251 | #define S_BCM1480_MC_COL07 56 |
252 | #define M_BCM1480_MC_COL07 _SB_MAKEMASK(6, S_BCM1480_MC_COL07) | 252 | #define M_BCM1480_MC_COL07 _SB_MAKEMASK(6, S_BCM1480_MC_COL07) |
253 | #define V_BCM1480_MC_COL07(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL07) | 253 | #define V_BCM1480_MC_COL07(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL07) |
254 | #define G_BCM1480_MC_COL07(x) _SB_GETVALUE(x, S_BCM1480_MC_COL07, M_BCM1480_MC_COL07) | 254 | #define G_BCM1480_MC_COL07(x) _SB_GETVALUE(x, S_BCM1480_MC_COL07, M_BCM1480_MC_COL07) |
255 | 255 | ||
256 | /* | 256 | /* |
257 | * Column Address Bit Select Register 1 (Table 87) | 257 | * Column Address Bit Select Register 1 (Table 87) |
258 | */ | 258 | */ |
259 | 259 | ||
260 | #define S_BCM1480_MC_COL08 0 | 260 | #define S_BCM1480_MC_COL08 0 |
261 | #define M_BCM1480_MC_COL08 _SB_MAKEMASK(6, S_BCM1480_MC_COL08) | 261 | #define M_BCM1480_MC_COL08 _SB_MAKEMASK(6, S_BCM1480_MC_COL08) |
262 | #define V_BCM1480_MC_COL08(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL08) | 262 | #define V_BCM1480_MC_COL08(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL08) |
263 | #define G_BCM1480_MC_COL08(x) _SB_GETVALUE(x, S_BCM1480_MC_COL08, M_BCM1480_MC_COL08) | 263 | #define G_BCM1480_MC_COL08(x) _SB_GETVALUE(x, S_BCM1480_MC_COL08, M_BCM1480_MC_COL08) |
264 | 264 | ||
265 | #define S_BCM1480_MC_COL09 8 | 265 | #define S_BCM1480_MC_COL09 8 |
266 | #define M_BCM1480_MC_COL09 _SB_MAKEMASK(6, S_BCM1480_MC_COL09) | 266 | #define M_BCM1480_MC_COL09 _SB_MAKEMASK(6, S_BCM1480_MC_COL09) |
267 | #define V_BCM1480_MC_COL09(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL09) | 267 | #define V_BCM1480_MC_COL09(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL09) |
268 | #define G_BCM1480_MC_COL09(x) _SB_GETVALUE(x, S_BCM1480_MC_COL09, M_BCM1480_MC_COL09) | 268 | #define G_BCM1480_MC_COL09(x) _SB_GETVALUE(x, S_BCM1480_MC_COL09, M_BCM1480_MC_COL09) |
269 | 269 | ||
270 | #define S_BCM1480_MC_COL10 16 /* not a valid position, must be prog as 0 */ | 270 | #define S_BCM1480_MC_COL10 16 /* not a valid position, must be prog as 0 */ |
271 | 271 | ||
272 | #define S_BCM1480_MC_COL11 24 | 272 | #define S_BCM1480_MC_COL11 24 |
273 | #define M_BCM1480_MC_COL11 _SB_MAKEMASK(6, S_BCM1480_MC_COL11) | 273 | #define M_BCM1480_MC_COL11 _SB_MAKEMASK(6, S_BCM1480_MC_COL11) |
274 | #define V_BCM1480_MC_COL11(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL11) | 274 | #define V_BCM1480_MC_COL11(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL11) |
275 | #define G_BCM1480_MC_COL11(x) _SB_GETVALUE(x, S_BCM1480_MC_COL11, M_BCM1480_MC_COL11) | 275 | #define G_BCM1480_MC_COL11(x) _SB_GETVALUE(x, S_BCM1480_MC_COL11, M_BCM1480_MC_COL11) |
276 | 276 | ||
277 | #define S_BCM1480_MC_COL12 32 | 277 | #define S_BCM1480_MC_COL12 32 |
278 | #define M_BCM1480_MC_COL12 _SB_MAKEMASK(6, S_BCM1480_MC_COL12) | 278 | #define M_BCM1480_MC_COL12 _SB_MAKEMASK(6, S_BCM1480_MC_COL12) |
279 | #define V_BCM1480_MC_COL12(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL12) | 279 | #define V_BCM1480_MC_COL12(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL12) |
280 | #define G_BCM1480_MC_COL12(x) _SB_GETVALUE(x, S_BCM1480_MC_COL12, M_BCM1480_MC_COL12) | 280 | #define G_BCM1480_MC_COL12(x) _SB_GETVALUE(x, S_BCM1480_MC_COL12, M_BCM1480_MC_COL12) |
281 | 281 | ||
282 | #define S_BCM1480_MC_COL13 40 | 282 | #define S_BCM1480_MC_COL13 40 |
283 | #define M_BCM1480_MC_COL13 _SB_MAKEMASK(6, S_BCM1480_MC_COL13) | 283 | #define M_BCM1480_MC_COL13 _SB_MAKEMASK(6, S_BCM1480_MC_COL13) |
284 | #define V_BCM1480_MC_COL13(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL13) | 284 | #define V_BCM1480_MC_COL13(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL13) |
285 | #define G_BCM1480_MC_COL13(x) _SB_GETVALUE(x, S_BCM1480_MC_COL13, M_BCM1480_MC_COL13) | 285 | #define G_BCM1480_MC_COL13(x) _SB_GETVALUE(x, S_BCM1480_MC_COL13, M_BCM1480_MC_COL13) |
286 | 286 | ||
287 | #define S_BCM1480_MC_COL14 48 | 287 | #define S_BCM1480_MC_COL14 48 |
288 | #define M_BCM1480_MC_COL14 _SB_MAKEMASK(6, S_BCM1480_MC_COL14) | 288 | #define M_BCM1480_MC_COL14 _SB_MAKEMASK(6, S_BCM1480_MC_COL14) |
289 | #define V_BCM1480_MC_COL14(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL14) | 289 | #define V_BCM1480_MC_COL14(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL14) |
290 | #define G_BCM1480_MC_COL14(x) _SB_GETVALUE(x, S_BCM1480_MC_COL14, M_BCM1480_MC_COL14) | 290 | #define G_BCM1480_MC_COL14(x) _SB_GETVALUE(x, S_BCM1480_MC_COL14, M_BCM1480_MC_COL14) |
291 | 291 | ||
292 | #define K_BCM1480_MC_COLX_BIT_SPACING 8 | 292 | #define K_BCM1480_MC_COLX_BIT_SPACING 8 |
293 | 293 | ||
294 | /* | 294 | /* |
295 | * CS0 and CS1 Bank Address Bit Select Register (Table 88) | 295 | * CS0 and CS1 Bank Address Bit Select Register (Table 88) |
296 | */ | 296 | */ |
297 | 297 | ||
298 | #define S_BCM1480_MC_CS01_BANK0 0 | 298 | #define S_BCM1480_MC_CS01_BANK0 0 |
299 | #define M_BCM1480_MC_CS01_BANK0 _SB_MAKEMASK(6, S_BCM1480_MC_CS01_BANK0) | 299 | #define M_BCM1480_MC_CS01_BANK0 _SB_MAKEMASK(6, S_BCM1480_MC_CS01_BANK0) |
300 | #define V_BCM1480_MC_CS01_BANK0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS01_BANK0) | 300 | #define V_BCM1480_MC_CS01_BANK0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS01_BANK0) |
301 | #define G_BCM1480_MC_CS01_BANK0(x) _SB_GETVALUE(x, S_BCM1480_MC_CS01_BANK0, M_BCM1480_MC_CS01_BANK0) | 301 | #define G_BCM1480_MC_CS01_BANK0(x) _SB_GETVALUE(x, S_BCM1480_MC_CS01_BANK0, M_BCM1480_MC_CS01_BANK0) |
302 | 302 | ||
303 | #define S_BCM1480_MC_CS01_BANK1 8 | 303 | #define S_BCM1480_MC_CS01_BANK1 8 |
304 | #define M_BCM1480_MC_CS01_BANK1 _SB_MAKEMASK(6, S_BCM1480_MC_CS01_BANK1) | 304 | #define M_BCM1480_MC_CS01_BANK1 _SB_MAKEMASK(6, S_BCM1480_MC_CS01_BANK1) |
305 | #define V_BCM1480_MC_CS01_BANK1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS01_BANK1) | 305 | #define V_BCM1480_MC_CS01_BANK1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS01_BANK1) |
306 | #define G_BCM1480_MC_CS01_BANK1(x) _SB_GETVALUE(x, S_BCM1480_MC_CS01_BANK1, M_BCM1480_MC_CS01_BANK1) | 306 | #define G_BCM1480_MC_CS01_BANK1(x) _SB_GETVALUE(x, S_BCM1480_MC_CS01_BANK1, M_BCM1480_MC_CS01_BANK1) |
307 | 307 | ||
308 | #define S_BCM1480_MC_CS01_BANK2 16 | 308 | #define S_BCM1480_MC_CS01_BANK2 16 |
309 | #define M_BCM1480_MC_CS01_BANK2 _SB_MAKEMASK(6, S_BCM1480_MC_CS01_BANK2) | 309 | #define M_BCM1480_MC_CS01_BANK2 _SB_MAKEMASK(6, S_BCM1480_MC_CS01_BANK2) |
310 | #define V_BCM1480_MC_CS01_BANK2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS01_BANK2) | 310 | #define V_BCM1480_MC_CS01_BANK2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS01_BANK2) |
311 | #define G_BCM1480_MC_CS01_BANK2(x) _SB_GETVALUE(x, S_BCM1480_MC_CS01_BANK2, M_BCM1480_MC_CS01_BANK2) | 311 | #define G_BCM1480_MC_CS01_BANK2(x) _SB_GETVALUE(x, S_BCM1480_MC_CS01_BANK2, M_BCM1480_MC_CS01_BANK2) |
312 | 312 | ||
313 | /* | 313 | /* |
314 | * CS2 and CS3 Bank Address Bit Select Register (Table 89) | 314 | * CS2 and CS3 Bank Address Bit Select Register (Table 89) |
315 | */ | 315 | */ |
316 | 316 | ||
317 | #define S_BCM1480_MC_CS23_BANK0 0 | 317 | #define S_BCM1480_MC_CS23_BANK0 0 |
318 | #define M_BCM1480_MC_CS23_BANK0 _SB_MAKEMASK(6, S_BCM1480_MC_CS23_BANK0) | 318 | #define M_BCM1480_MC_CS23_BANK0 _SB_MAKEMASK(6, S_BCM1480_MC_CS23_BANK0) |
319 | #define V_BCM1480_MC_CS23_BANK0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS23_BANK0) | 319 | #define V_BCM1480_MC_CS23_BANK0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS23_BANK0) |
320 | #define G_BCM1480_MC_CS23_BANK0(x) _SB_GETVALUE(x, S_BCM1480_MC_CS23_BANK0, M_BCM1480_MC_CS23_BANK0) | 320 | #define G_BCM1480_MC_CS23_BANK0(x) _SB_GETVALUE(x, S_BCM1480_MC_CS23_BANK0, M_BCM1480_MC_CS23_BANK0) |
321 | 321 | ||
322 | #define S_BCM1480_MC_CS23_BANK1 8 | 322 | #define S_BCM1480_MC_CS23_BANK1 8 |
323 | #define M_BCM1480_MC_CS23_BANK1 _SB_MAKEMASK(6, S_BCM1480_MC_CS23_BANK1) | 323 | #define M_BCM1480_MC_CS23_BANK1 _SB_MAKEMASK(6, S_BCM1480_MC_CS23_BANK1) |
324 | #define V_BCM1480_MC_CS23_BANK1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS23_BANK1) | 324 | #define V_BCM1480_MC_CS23_BANK1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS23_BANK1) |
325 | #define G_BCM1480_MC_CS23_BANK1(x) _SB_GETVALUE(x, S_BCM1480_MC_CS23_BANK1, M_BCM1480_MC_CS23_BANK1) | 325 | #define G_BCM1480_MC_CS23_BANK1(x) _SB_GETVALUE(x, S_BCM1480_MC_CS23_BANK1, M_BCM1480_MC_CS23_BANK1) |
326 | 326 | ||
327 | #define S_BCM1480_MC_CS23_BANK2 16 | 327 | #define S_BCM1480_MC_CS23_BANK2 16 |
328 | #define M_BCM1480_MC_CS23_BANK2 _SB_MAKEMASK(6, S_BCM1480_MC_CS23_BANK2) | 328 | #define M_BCM1480_MC_CS23_BANK2 _SB_MAKEMASK(6, S_BCM1480_MC_CS23_BANK2) |
329 | #define V_BCM1480_MC_CS23_BANK2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS23_BANK2) | 329 | #define V_BCM1480_MC_CS23_BANK2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS23_BANK2) |
330 | #define G_BCM1480_MC_CS23_BANK2(x) _SB_GETVALUE(x, S_BCM1480_MC_CS23_BANK2, M_BCM1480_MC_CS23_BANK2) | 330 | #define G_BCM1480_MC_CS23_BANK2(x) _SB_GETVALUE(x, S_BCM1480_MC_CS23_BANK2, M_BCM1480_MC_CS23_BANK2) |
331 | 331 | ||
332 | #define K_BCM1480_MC_CSXX_BANKX_BIT_SPACING 8 | 332 | #define K_BCM1480_MC_CSXX_BANKX_BIT_SPACING 8 |
333 | 333 | ||
@@ -335,19 +335,19 @@ | |||
335 | * DRAM Command Register (Table 90) | 335 | * DRAM Command Register (Table 90) |
336 | */ | 336 | */ |
337 | 337 | ||
338 | #define S_BCM1480_MC_COMMAND 0 | 338 | #define S_BCM1480_MC_COMMAND 0 |
339 | #define M_BCM1480_MC_COMMAND _SB_MAKEMASK(4, S_BCM1480_MC_COMMAND) | 339 | #define M_BCM1480_MC_COMMAND _SB_MAKEMASK(4, S_BCM1480_MC_COMMAND) |
340 | #define V_BCM1480_MC_COMMAND(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COMMAND) | 340 | #define V_BCM1480_MC_COMMAND(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COMMAND) |
341 | #define G_BCM1480_MC_COMMAND(x) _SB_GETVALUE(x, S_BCM1480_MC_COMMAND, M_BCM1480_MC_COMMAND) | 341 | #define G_BCM1480_MC_COMMAND(x) _SB_GETVALUE(x, S_BCM1480_MC_COMMAND, M_BCM1480_MC_COMMAND) |
342 | 342 | ||
343 | #define K_BCM1480_MC_COMMAND_EMRS 0 | 343 | #define K_BCM1480_MC_COMMAND_EMRS 0 |
344 | #define K_BCM1480_MC_COMMAND_MRS 1 | 344 | #define K_BCM1480_MC_COMMAND_MRS 1 |
345 | #define K_BCM1480_MC_COMMAND_PRE 2 | 345 | #define K_BCM1480_MC_COMMAND_PRE 2 |
346 | #define K_BCM1480_MC_COMMAND_AR 3 | 346 | #define K_BCM1480_MC_COMMAND_AR 3 |
347 | #define K_BCM1480_MC_COMMAND_SETRFSH 4 | 347 | #define K_BCM1480_MC_COMMAND_SETRFSH 4 |
348 | #define K_BCM1480_MC_COMMAND_CLRRFSH 5 | 348 | #define K_BCM1480_MC_COMMAND_CLRRFSH 5 |
349 | #define K_BCM1480_MC_COMMAND_SETPWRDN 6 | 349 | #define K_BCM1480_MC_COMMAND_SETPWRDN 6 |
350 | #define K_BCM1480_MC_COMMAND_CLRPWRDN 7 | 350 | #define K_BCM1480_MC_COMMAND_CLRPWRDN 7 |
351 | 351 | ||
352 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 352 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
353 | #define K_BCM1480_MC_COMMAND_EMRS2 8 | 353 | #define K_BCM1480_MC_COMMAND_EMRS2 8 |
@@ -356,61 +356,61 @@ | |||
356 | #define K_BCM1480_MC_COMMAND_DISABLE_MCLK 11 | 356 | #define K_BCM1480_MC_COMMAND_DISABLE_MCLK 11 |
357 | #endif | 357 | #endif |
358 | 358 | ||
359 | #define V_BCM1480_MC_COMMAND_EMRS V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_EMRS) | 359 | #define V_BCM1480_MC_COMMAND_EMRS V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_EMRS) |
360 | #define V_BCM1480_MC_COMMAND_MRS V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_MRS) | 360 | #define V_BCM1480_MC_COMMAND_MRS V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_MRS) |
361 | #define V_BCM1480_MC_COMMAND_PRE V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_PRE) | 361 | #define V_BCM1480_MC_COMMAND_PRE V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_PRE) |
362 | #define V_BCM1480_MC_COMMAND_AR V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_AR) | 362 | #define V_BCM1480_MC_COMMAND_AR V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_AR) |
363 | #define V_BCM1480_MC_COMMAND_SETRFSH V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_SETRFSH) | 363 | #define V_BCM1480_MC_COMMAND_SETRFSH V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_SETRFSH) |
364 | #define V_BCM1480_MC_COMMAND_CLRRFSH V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_CLRRFSH) | 364 | #define V_BCM1480_MC_COMMAND_CLRRFSH V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_CLRRFSH) |
365 | #define V_BCM1480_MC_COMMAND_SETPWRDN V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_SETPWRDN) | 365 | #define V_BCM1480_MC_COMMAND_SETPWRDN V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_SETPWRDN) |
366 | #define V_BCM1480_MC_COMMAND_CLRPWRDN V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_CLRPWRDN) | 366 | #define V_BCM1480_MC_COMMAND_CLRPWRDN V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_CLRPWRDN) |
367 | 367 | ||
368 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 368 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
369 | #define V_BCM1480_MC_COMMAND_EMRS2 V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_EMRS2) | 369 | #define V_BCM1480_MC_COMMAND_EMRS2 V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_EMRS2) |
370 | #define V_BCM1480_MC_COMMAND_EMRS3 V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_EMRS3) | 370 | #define V_BCM1480_MC_COMMAND_EMRS3 V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_EMRS3) |
371 | #define V_BCM1480_MC_COMMAND_ENABLE_MCLK V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_ENABLE_MCLK) | 371 | #define V_BCM1480_MC_COMMAND_ENABLE_MCLK V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_ENABLE_MCLK) |
372 | #define V_BCM1480_MC_COMMAND_DISABLE_MCLK V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_DISABLE_MCLK) | 372 | #define V_BCM1480_MC_COMMAND_DISABLE_MCLK V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_DISABLE_MCLK) |
373 | #endif | 373 | #endif |
374 | 374 | ||
375 | #define S_BCM1480_MC_CS0 4 | 375 | #define S_BCM1480_MC_CS0 4 |
376 | #define M_BCM1480_MC_CS0 _SB_MAKEMASK1(4) | 376 | #define M_BCM1480_MC_CS0 _SB_MAKEMASK1(4) |
377 | #define M_BCM1480_MC_CS1 _SB_MAKEMASK1(5) | 377 | #define M_BCM1480_MC_CS1 _SB_MAKEMASK1(5) |
378 | #define M_BCM1480_MC_CS2 _SB_MAKEMASK1(6) | 378 | #define M_BCM1480_MC_CS2 _SB_MAKEMASK1(6) |
379 | #define M_BCM1480_MC_CS3 _SB_MAKEMASK1(7) | 379 | #define M_BCM1480_MC_CS3 _SB_MAKEMASK1(7) |
380 | #define M_BCM1480_MC_CS4 _SB_MAKEMASK1(8) | 380 | #define M_BCM1480_MC_CS4 _SB_MAKEMASK1(8) |
381 | #define M_BCM1480_MC_CS5 _SB_MAKEMASK1(9) | 381 | #define M_BCM1480_MC_CS5 _SB_MAKEMASK1(9) |
382 | #define M_BCM1480_MC_CS6 _SB_MAKEMASK1(10) | 382 | #define M_BCM1480_MC_CS6 _SB_MAKEMASK1(10) |
383 | #define M_BCM1480_MC_CS7 _SB_MAKEMASK1(11) | 383 | #define M_BCM1480_MC_CS7 _SB_MAKEMASK1(11) |
384 | 384 | ||
385 | #define M_BCM1480_MC_CS _SB_MAKEMASK(8, S_BCM1480_MC_CS0) | 385 | #define M_BCM1480_MC_CS _SB_MAKEMASK(8, S_BCM1480_MC_CS0) |
386 | #define V_BCM1480_MC_CS(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS0) | 386 | #define V_BCM1480_MC_CS(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS0) |
387 | #define G_BCM1480_MC_CS(x) _SB_GETVALUE(x, S_BCM1480_MC_CS0, M_BCM1480_MC_CS0) | 387 | #define G_BCM1480_MC_CS(x) _SB_GETVALUE(x, S_BCM1480_MC_CS0, M_BCM1480_MC_CS0) |
388 | 388 | ||
389 | #define M_BCM1480_MC_CMD_ACTIVE _SB_MAKEMASK1(16) | 389 | #define M_BCM1480_MC_CMD_ACTIVE _SB_MAKEMASK1(16) |
390 | 390 | ||
391 | /* | 391 | /* |
392 | * DRAM Mode Register (Table 91) | 392 | * DRAM Mode Register (Table 91) |
393 | */ | 393 | */ |
394 | 394 | ||
395 | #define S_BCM1480_MC_EMODE 0 | 395 | #define S_BCM1480_MC_EMODE 0 |
396 | #define M_BCM1480_MC_EMODE _SB_MAKEMASK(15, S_BCM1480_MC_EMODE) | 396 | #define M_BCM1480_MC_EMODE _SB_MAKEMASK(15, S_BCM1480_MC_EMODE) |
397 | #define V_BCM1480_MC_EMODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_EMODE) | 397 | #define V_BCM1480_MC_EMODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_EMODE) |
398 | #define G_BCM1480_MC_EMODE(x) _SB_GETVALUE(x, S_BCM1480_MC_EMODE, M_BCM1480_MC_EMODE) | 398 | #define G_BCM1480_MC_EMODE(x) _SB_GETVALUE(x, S_BCM1480_MC_EMODE, M_BCM1480_MC_EMODE) |
399 | #define V_BCM1480_MC_EMODE_DEFAULT V_BCM1480_MC_EMODE(0) | 399 | #define V_BCM1480_MC_EMODE_DEFAULT V_BCM1480_MC_EMODE(0) |
400 | 400 | ||
401 | #define S_BCM1480_MC_MODE 16 | 401 | #define S_BCM1480_MC_MODE 16 |
402 | #define M_BCM1480_MC_MODE _SB_MAKEMASK(15, S_BCM1480_MC_MODE) | 402 | #define M_BCM1480_MC_MODE _SB_MAKEMASK(15, S_BCM1480_MC_MODE) |
403 | #define V_BCM1480_MC_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_MODE) | 403 | #define V_BCM1480_MC_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_MODE) |
404 | #define G_BCM1480_MC_MODE(x) _SB_GETVALUE(x, S_BCM1480_MC_MODE, M_BCM1480_MC_MODE) | 404 | #define G_BCM1480_MC_MODE(x) _SB_GETVALUE(x, S_BCM1480_MC_MODE, M_BCM1480_MC_MODE) |
405 | #define V_BCM1480_MC_MODE_DEFAULT V_BCM1480_MC_MODE(0) | 405 | #define V_BCM1480_MC_MODE_DEFAULT V_BCM1480_MC_MODE(0) |
406 | 406 | ||
407 | #define S_BCM1480_MC_DRAM_TYPE 32 | 407 | #define S_BCM1480_MC_DRAM_TYPE 32 |
408 | #define M_BCM1480_MC_DRAM_TYPE _SB_MAKEMASK(4, S_BCM1480_MC_DRAM_TYPE) | 408 | #define M_BCM1480_MC_DRAM_TYPE _SB_MAKEMASK(4, S_BCM1480_MC_DRAM_TYPE) |
409 | #define V_BCM1480_MC_DRAM_TYPE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DRAM_TYPE) | 409 | #define V_BCM1480_MC_DRAM_TYPE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DRAM_TYPE) |
410 | #define G_BCM1480_MC_DRAM_TYPE(x) _SB_GETVALUE(x, S_BCM1480_MC_DRAM_TYPE, M_BCM1480_MC_DRAM_TYPE) | 410 | #define G_BCM1480_MC_DRAM_TYPE(x) _SB_GETVALUE(x, S_BCM1480_MC_DRAM_TYPE, M_BCM1480_MC_DRAM_TYPE) |
411 | 411 | ||
412 | #define K_BCM1480_MC_DRAM_TYPE_JEDEC 0 | 412 | #define K_BCM1480_MC_DRAM_TYPE_JEDEC 0 |
413 | #define K_BCM1480_MC_DRAM_TYPE_FCRAM 1 | 413 | #define K_BCM1480_MC_DRAM_TYPE_FCRAM 1 |
414 | 414 | ||
415 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 415 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
416 | #define K_BCM1480_MC_DRAM_TYPE_DDR2 2 | 416 | #define K_BCM1480_MC_DRAM_TYPE_DDR2 2 |
@@ -418,27 +418,27 @@ | |||
418 | 418 | ||
419 | #define K_BCM1480_MC_DRAM_TYPE_DDR2_PASS1 0 | 419 | #define K_BCM1480_MC_DRAM_TYPE_DDR2_PASS1 0 |
420 | 420 | ||
421 | #define V_BCM1480_MC_DRAM_TYPE_JEDEC V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_JEDEC) | 421 | #define V_BCM1480_MC_DRAM_TYPE_JEDEC V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_JEDEC) |
422 | #define V_BCM1480_MC_DRAM_TYPE_FCRAM V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_FCRAM) | 422 | #define V_BCM1480_MC_DRAM_TYPE_FCRAM V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_FCRAM) |
423 | 423 | ||
424 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 424 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
425 | #define V_BCM1480_MC_DRAM_TYPE_DDR2 V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_DDR2) | 425 | #define V_BCM1480_MC_DRAM_TYPE_DDR2 V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_DDR2) |
426 | #endif | 426 | #endif |
427 | 427 | ||
428 | #define M_BCM1480_MC_GANGED _SB_MAKEMASK1(36) | 428 | #define M_BCM1480_MC_GANGED _SB_MAKEMASK1(36) |
429 | #define M_BCM1480_MC_BY9_INTF _SB_MAKEMASK1(37) | 429 | #define M_BCM1480_MC_BY9_INTF _SB_MAKEMASK1(37) |
430 | #define M_BCM1480_MC_FORCE_ECC64 _SB_MAKEMASK1(38) | 430 | #define M_BCM1480_MC_FORCE_ECC64 _SB_MAKEMASK1(38) |
431 | #define M_BCM1480_MC_ECC_DISABLE _SB_MAKEMASK1(39) | 431 | #define M_BCM1480_MC_ECC_DISABLE _SB_MAKEMASK1(39) |
432 | 432 | ||
433 | #define S_BCM1480_MC_PG_POLICY 40 | 433 | #define S_BCM1480_MC_PG_POLICY 40 |
434 | #define M_BCM1480_MC_PG_POLICY _SB_MAKEMASK(2, S_BCM1480_MC_PG_POLICY) | 434 | #define M_BCM1480_MC_PG_POLICY _SB_MAKEMASK(2, S_BCM1480_MC_PG_POLICY) |
435 | #define V_BCM1480_MC_PG_POLICY(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PG_POLICY) | 435 | #define V_BCM1480_MC_PG_POLICY(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PG_POLICY) |
436 | #define G_BCM1480_MC_PG_POLICY(x) _SB_GETVALUE(x, S_BCM1480_MC_PG_POLICY, M_BCM1480_MC_PG_POLICY) | 436 | #define G_BCM1480_MC_PG_POLICY(x) _SB_GETVALUE(x, S_BCM1480_MC_PG_POLICY, M_BCM1480_MC_PG_POLICY) |
437 | 437 | ||
438 | #define K_BCM1480_MC_PG_POLICY_CLOSED 0 | 438 | #define K_BCM1480_MC_PG_POLICY_CLOSED 0 |
439 | #define K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK 1 | 439 | #define K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK 1 |
440 | 440 | ||
441 | #define V_BCM1480_MC_PG_POLICY_CLOSED V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CLOSED) | 441 | #define V_BCM1480_MC_PG_POLICY_CLOSED V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CLOSED) |
442 | #define V_BCM1480_MC_PG_POLICY_CAS_TIME_CHK V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK) | 442 | #define V_BCM1480_MC_PG_POLICY_CAS_TIME_CHK V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK) |
443 | 443 | ||
444 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 444 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
@@ -447,32 +447,32 @@ | |||
447 | #endif | 447 | #endif |
448 | 448 | ||
449 | #define V_BCM1480_MC_DRAMMODE_DEFAULT V_BCM1480_MC_EMODE_DEFAULT | V_BCM1480_MC_MODE_DEFAULT | V_BCM1480_MC_DRAM_TYPE_JEDEC | \ | 449 | #define V_BCM1480_MC_DRAMMODE_DEFAULT V_BCM1480_MC_EMODE_DEFAULT | V_BCM1480_MC_MODE_DEFAULT | V_BCM1480_MC_DRAM_TYPE_JEDEC | \ |
450 | V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK) | 450 | V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK) |
451 | 451 | ||
452 | /* | 452 | /* |
453 | * Memory Clock Configuration Register (Table 92) | 453 | * Memory Clock Configuration Register (Table 92) |
454 | */ | 454 | */ |
455 | 455 | ||
456 | #define S_BCM1480_MC_CLK_RATIO 0 | 456 | #define S_BCM1480_MC_CLK_RATIO 0 |
457 | #define M_BCM1480_MC_CLK_RATIO _SB_MAKEMASK(6, S_BCM1480_MC_CLK_RATIO) | 457 | #define M_BCM1480_MC_CLK_RATIO _SB_MAKEMASK(6, S_BCM1480_MC_CLK_RATIO) |
458 | #define V_BCM1480_MC_CLK_RATIO(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CLK_RATIO) | 458 | #define V_BCM1480_MC_CLK_RATIO(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CLK_RATIO) |
459 | #define G_BCM1480_MC_CLK_RATIO(x) _SB_GETVALUE(x, S_BCM1480_MC_CLK_RATIO, M_BCM1480_MC_CLK_RATIO) | 459 | #define G_BCM1480_MC_CLK_RATIO(x) _SB_GETVALUE(x, S_BCM1480_MC_CLK_RATIO, M_BCM1480_MC_CLK_RATIO) |
460 | 460 | ||
461 | #define V_BCM1480_MC_CLK_RATIO_DEFAULT V_BCM1480_MC_CLK_RATIO(10) | 461 | #define V_BCM1480_MC_CLK_RATIO_DEFAULT V_BCM1480_MC_CLK_RATIO(10) |
462 | 462 | ||
463 | #define S_BCM1480_MC_REF_RATE 8 | 463 | #define S_BCM1480_MC_REF_RATE 8 |
464 | #define M_BCM1480_MC_REF_RATE _SB_MAKEMASK(8, S_BCM1480_MC_REF_RATE) | 464 | #define M_BCM1480_MC_REF_RATE _SB_MAKEMASK(8, S_BCM1480_MC_REF_RATE) |
465 | #define V_BCM1480_MC_REF_RATE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_REF_RATE) | 465 | #define V_BCM1480_MC_REF_RATE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_REF_RATE) |
466 | #define G_BCM1480_MC_REF_RATE(x) _SB_GETVALUE(x, S_BCM1480_MC_REF_RATE, M_BCM1480_MC_REF_RATE) | 466 | #define G_BCM1480_MC_REF_RATE(x) _SB_GETVALUE(x, S_BCM1480_MC_REF_RATE, M_BCM1480_MC_REF_RATE) |
467 | 467 | ||
468 | #define K_BCM1480_MC_REF_RATE_100MHz 0x31 | 468 | #define K_BCM1480_MC_REF_RATE_100MHz 0x31 |
469 | #define K_BCM1480_MC_REF_RATE_200MHz 0x62 | 469 | #define K_BCM1480_MC_REF_RATE_200MHz 0x62 |
470 | #define K_BCM1480_MC_REF_RATE_400MHz 0xC4 | 470 | #define K_BCM1480_MC_REF_RATE_400MHz 0xC4 |
471 | 471 | ||
472 | #define V_BCM1480_MC_REF_RATE_100MHz V_BCM1480_MC_REF_RATE(K_BCM1480_MC_REF_RATE_100MHz) | 472 | #define V_BCM1480_MC_REF_RATE_100MHz V_BCM1480_MC_REF_RATE(K_BCM1480_MC_REF_RATE_100MHz) |
473 | #define V_BCM1480_MC_REF_RATE_200MHz V_BCM1480_MC_REF_RATE(K_BCM1480_MC_REF_RATE_200MHz) | 473 | #define V_BCM1480_MC_REF_RATE_200MHz V_BCM1480_MC_REF_RATE(K_BCM1480_MC_REF_RATE_200MHz) |
474 | #define V_BCM1480_MC_REF_RATE_400MHz V_BCM1480_MC_REF_RATE(K_BCM1480_MC_REF_RATE_400MHz) | 474 | #define V_BCM1480_MC_REF_RATE_400MHz V_BCM1480_MC_REF_RATE(K_BCM1480_MC_REF_RATE_400MHz) |
475 | #define V_BCM1480_MC_REF_RATE_DEFAULT V_BCM1480_MC_REF_RATE_400MHz | 475 | #define V_BCM1480_MC_REF_RATE_DEFAULT V_BCM1480_MC_REF_RATE_400MHz |
476 | 476 | ||
477 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 477 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
478 | #define M_BCM1480_MC_AUTO_REF_DIS _SB_MAKEMASK1(16) | 478 | #define M_BCM1480_MC_AUTO_REF_DIS _SB_MAKEMASK1(16) |
@@ -518,19 +518,19 @@ | |||
518 | 518 | ||
519 | #define M_BCM1480_MC_CS_ODD_ODT_EN _SB_MAKEMASK1(32) | 519 | #define M_BCM1480_MC_CS_ODD_ODT_EN _SB_MAKEMASK1(32) |
520 | 520 | ||
521 | #define S_BCM1480_MC_ODT0 0 | 521 | #define S_BCM1480_MC_ODT0 0 |
522 | #define M_BCM1480_MC_ODT0 _SB_MAKEMASK(8, S_BCM1480_MC_ODT0) | 522 | #define M_BCM1480_MC_ODT0 _SB_MAKEMASK(8, S_BCM1480_MC_ODT0) |
523 | #define V_BCM1480_MC_ODT0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT0) | 523 | #define V_BCM1480_MC_ODT0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT0) |
524 | 524 | ||
525 | #define S_BCM1480_MC_ODT2 8 | 525 | #define S_BCM1480_MC_ODT2 8 |
526 | #define M_BCM1480_MC_ODT2 _SB_MAKEMASK(8, S_BCM1480_MC_ODT2) | 526 | #define M_BCM1480_MC_ODT2 _SB_MAKEMASK(8, S_BCM1480_MC_ODT2) |
527 | #define V_BCM1480_MC_ODT2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT2) | 527 | #define V_BCM1480_MC_ODT2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT2) |
528 | 528 | ||
529 | #define S_BCM1480_MC_ODT4 16 | 529 | #define S_BCM1480_MC_ODT4 16 |
530 | #define M_BCM1480_MC_ODT4 _SB_MAKEMASK(8, S_BCM1480_MC_ODT4) | 530 | #define M_BCM1480_MC_ODT4 _SB_MAKEMASK(8, S_BCM1480_MC_ODT4) |
531 | #define V_BCM1480_MC_ODT4(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT4) | 531 | #define V_BCM1480_MC_ODT4(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT4) |
532 | 532 | ||
533 | #define S_BCM1480_MC_ODT6 24 | 533 | #define S_BCM1480_MC_ODT6 24 |
534 | #define M_BCM1480_MC_ODT6 _SB_MAKEMASK(8, S_BCM1480_MC_ODT6) | 534 | #define M_BCM1480_MC_ODT6 _SB_MAKEMASK(8, S_BCM1480_MC_ODT6) |
535 | #define V_BCM1480_MC_ODT6(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT6) | 535 | #define V_BCM1480_MC_ODT6(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT6) |
536 | #endif | 536 | #endif |
@@ -539,139 +539,139 @@ | |||
539 | * Memory DLL Configuration Register (Table 93) | 539 | * Memory DLL Configuration Register (Table 93) |
540 | */ | 540 | */ |
541 | 541 | ||
542 | #define S_BCM1480_MC_ADDR_COARSE_ADJ 0 | 542 | #define S_BCM1480_MC_ADDR_COARSE_ADJ 0 |
543 | #define M_BCM1480_MC_ADDR_COARSE_ADJ _SB_MAKEMASK(6, S_BCM1480_MC_ADDR_COARSE_ADJ) | 543 | #define M_BCM1480_MC_ADDR_COARSE_ADJ _SB_MAKEMASK(6, S_BCM1480_MC_ADDR_COARSE_ADJ) |
544 | #define V_BCM1480_MC_ADDR_COARSE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ADDR_COARSE_ADJ) | 544 | #define V_BCM1480_MC_ADDR_COARSE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ADDR_COARSE_ADJ) |
545 | #define G_BCM1480_MC_ADDR_COARSE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_ADDR_COARSE_ADJ, M_BCM1480_MC_ADDR_COARSE_ADJ) | 545 | #define G_BCM1480_MC_ADDR_COARSE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_ADDR_COARSE_ADJ, M_BCM1480_MC_ADDR_COARSE_ADJ) |
546 | #define V_BCM1480_MC_ADDR_COARSE_ADJ_DEFAULT V_BCM1480_MC_ADDR_COARSE_ADJ(0x0) | 546 | #define V_BCM1480_MC_ADDR_COARSE_ADJ_DEFAULT V_BCM1480_MC_ADDR_COARSE_ADJ(0x0) |
547 | 547 | ||
548 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 548 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
549 | #define S_BCM1480_MC_ADDR_FREQ_RANGE 8 | 549 | #define S_BCM1480_MC_ADDR_FREQ_RANGE 8 |
550 | #define M_BCM1480_MC_ADDR_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_ADDR_FREQ_RANGE) | 550 | #define M_BCM1480_MC_ADDR_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_ADDR_FREQ_RANGE) |
551 | #define V_BCM1480_MC_ADDR_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ADDR_FREQ_RANGE) | 551 | #define V_BCM1480_MC_ADDR_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ADDR_FREQ_RANGE) |
552 | #define G_BCM1480_MC_ADDR_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_ADDR_FREQ_RANGE, M_BCM1480_MC_ADDR_FREQ_RANGE) | 552 | #define G_BCM1480_MC_ADDR_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_ADDR_FREQ_RANGE, M_BCM1480_MC_ADDR_FREQ_RANGE) |
553 | #define V_BCM1480_MC_ADDR_FREQ_RANGE_DEFAULT V_BCM1480_MC_ADDR_FREQ_RANGE(0x4) | 553 | #define V_BCM1480_MC_ADDR_FREQ_RANGE_DEFAULT V_BCM1480_MC_ADDR_FREQ_RANGE(0x4) |
554 | #endif | 554 | #endif |
555 | 555 | ||
556 | #define S_BCM1480_MC_ADDR_FINE_ADJ 8 | 556 | #define S_BCM1480_MC_ADDR_FINE_ADJ 8 |
557 | #define M_BCM1480_MC_ADDR_FINE_ADJ _SB_MAKEMASK(4, S_BCM1480_MC_ADDR_FINE_ADJ) | 557 | #define M_BCM1480_MC_ADDR_FINE_ADJ _SB_MAKEMASK(4, S_BCM1480_MC_ADDR_FINE_ADJ) |
558 | #define V_BCM1480_MC_ADDR_FINE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ADDR_FINE_ADJ) | 558 | #define V_BCM1480_MC_ADDR_FINE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ADDR_FINE_ADJ) |
559 | #define G_BCM1480_MC_ADDR_FINE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_ADDR_FINE_ADJ, M_BCM1480_MC_ADDR_FINE_ADJ) | 559 | #define G_BCM1480_MC_ADDR_FINE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_ADDR_FINE_ADJ, M_BCM1480_MC_ADDR_FINE_ADJ) |
560 | #define V_BCM1480_MC_ADDR_FINE_ADJ_DEFAULT V_BCM1480_MC_ADDR_FINE_ADJ(0x8) | 560 | #define V_BCM1480_MC_ADDR_FINE_ADJ_DEFAULT V_BCM1480_MC_ADDR_FINE_ADJ(0x8) |
561 | 561 | ||
562 | #define S_BCM1480_MC_DQI_COARSE_ADJ 16 | 562 | #define S_BCM1480_MC_DQI_COARSE_ADJ 16 |
563 | #define M_BCM1480_MC_DQI_COARSE_ADJ _SB_MAKEMASK(6, S_BCM1480_MC_DQI_COARSE_ADJ) | 563 | #define M_BCM1480_MC_DQI_COARSE_ADJ _SB_MAKEMASK(6, S_BCM1480_MC_DQI_COARSE_ADJ) |
564 | #define V_BCM1480_MC_DQI_COARSE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQI_COARSE_ADJ) | 564 | #define V_BCM1480_MC_DQI_COARSE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQI_COARSE_ADJ) |
565 | #define G_BCM1480_MC_DQI_COARSE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQI_COARSE_ADJ, M_BCM1480_MC_DQI_COARSE_ADJ) | 565 | #define G_BCM1480_MC_DQI_COARSE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQI_COARSE_ADJ, M_BCM1480_MC_DQI_COARSE_ADJ) |
566 | #define V_BCM1480_MC_DQI_COARSE_ADJ_DEFAULT V_BCM1480_MC_DQI_COARSE_ADJ(0x0) | 566 | #define V_BCM1480_MC_DQI_COARSE_ADJ_DEFAULT V_BCM1480_MC_DQI_COARSE_ADJ(0x0) |
567 | 567 | ||
568 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 568 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
569 | #define S_BCM1480_MC_DQI_FREQ_RANGE 24 | 569 | #define S_BCM1480_MC_DQI_FREQ_RANGE 24 |
570 | #define M_BCM1480_MC_DQI_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_DQI_FREQ_RANGE) | 570 | #define M_BCM1480_MC_DQI_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_DQI_FREQ_RANGE) |
571 | #define V_BCM1480_MC_DQI_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQI_FREQ_RANGE) | 571 | #define V_BCM1480_MC_DQI_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQI_FREQ_RANGE) |
572 | #define G_BCM1480_MC_DQI_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_DQI_FREQ_RANGE, M_BCM1480_MC_DQI_FREQ_RANGE) | 572 | #define G_BCM1480_MC_DQI_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_DQI_FREQ_RANGE, M_BCM1480_MC_DQI_FREQ_RANGE) |
573 | #define V_BCM1480_MC_DQI_FREQ_RANGE_DEFAULT V_BCM1480_MC_DQI_FREQ_RANGE(0x4) | 573 | #define V_BCM1480_MC_DQI_FREQ_RANGE_DEFAULT V_BCM1480_MC_DQI_FREQ_RANGE(0x4) |
574 | #endif | 574 | #endif |
575 | 575 | ||
576 | #define S_BCM1480_MC_DQI_FINE_ADJ 24 | 576 | #define S_BCM1480_MC_DQI_FINE_ADJ 24 |
577 | #define M_BCM1480_MC_DQI_FINE_ADJ _SB_MAKEMASK(4, S_BCM1480_MC_DQI_FINE_ADJ) | 577 | #define M_BCM1480_MC_DQI_FINE_ADJ _SB_MAKEMASK(4, S_BCM1480_MC_DQI_FINE_ADJ) |
578 | #define V_BCM1480_MC_DQI_FINE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQI_FINE_ADJ) | 578 | #define V_BCM1480_MC_DQI_FINE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQI_FINE_ADJ) |
579 | #define G_BCM1480_MC_DQI_FINE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQI_FINE_ADJ, M_BCM1480_MC_DQI_FINE_ADJ) | 579 | #define G_BCM1480_MC_DQI_FINE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQI_FINE_ADJ, M_BCM1480_MC_DQI_FINE_ADJ) |
580 | #define V_BCM1480_MC_DQI_FINE_ADJ_DEFAULT V_BCM1480_MC_DQI_FINE_ADJ(0x8) | 580 | #define V_BCM1480_MC_DQI_FINE_ADJ_DEFAULT V_BCM1480_MC_DQI_FINE_ADJ(0x8) |
581 | 581 | ||
582 | #define S_BCM1480_MC_DQO_COARSE_ADJ 32 | 582 | #define S_BCM1480_MC_DQO_COARSE_ADJ 32 |
583 | #define M_BCM1480_MC_DQO_COARSE_ADJ _SB_MAKEMASK(6, S_BCM1480_MC_DQO_COARSE_ADJ) | 583 | #define M_BCM1480_MC_DQO_COARSE_ADJ _SB_MAKEMASK(6, S_BCM1480_MC_DQO_COARSE_ADJ) |
584 | #define V_BCM1480_MC_DQO_COARSE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQO_COARSE_ADJ) | 584 | #define V_BCM1480_MC_DQO_COARSE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQO_COARSE_ADJ) |
585 | #define G_BCM1480_MC_DQO_COARSE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQO_COARSE_ADJ, M_BCM1480_MC_DQO_COARSE_ADJ) | 585 | #define G_BCM1480_MC_DQO_COARSE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQO_COARSE_ADJ, M_BCM1480_MC_DQO_COARSE_ADJ) |
586 | #define V_BCM1480_MC_DQO_COARSE_ADJ_DEFAULT V_BCM1480_MC_DQO_COARSE_ADJ(0x0) | 586 | #define V_BCM1480_MC_DQO_COARSE_ADJ_DEFAULT V_BCM1480_MC_DQO_COARSE_ADJ(0x0) |
587 | 587 | ||
588 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 588 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
589 | #define S_BCM1480_MC_DQO_FREQ_RANGE 40 | 589 | #define S_BCM1480_MC_DQO_FREQ_RANGE 40 |
590 | #define M_BCM1480_MC_DQO_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_DQO_FREQ_RANGE) | 590 | #define M_BCM1480_MC_DQO_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_DQO_FREQ_RANGE) |
591 | #define V_BCM1480_MC_DQO_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQO_FREQ_RANGE) | 591 | #define V_BCM1480_MC_DQO_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQO_FREQ_RANGE) |
592 | #define G_BCM1480_MC_DQO_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_DQO_FREQ_RANGE, M_BCM1480_MC_DQO_FREQ_RANGE) | 592 | #define G_BCM1480_MC_DQO_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_DQO_FREQ_RANGE, M_BCM1480_MC_DQO_FREQ_RANGE) |
593 | #define V_BCM1480_MC_DQO_FREQ_RANGE_DEFAULT V_BCM1480_MC_DQO_FREQ_RANGE(0x4) | 593 | #define V_BCM1480_MC_DQO_FREQ_RANGE_DEFAULT V_BCM1480_MC_DQO_FREQ_RANGE(0x4) |
594 | #endif | 594 | #endif |
595 | 595 | ||
596 | #define S_BCM1480_MC_DQO_FINE_ADJ 40 | 596 | #define S_BCM1480_MC_DQO_FINE_ADJ 40 |
597 | #define M_BCM1480_MC_DQO_FINE_ADJ _SB_MAKEMASK(4, S_BCM1480_MC_DQO_FINE_ADJ) | 597 | #define M_BCM1480_MC_DQO_FINE_ADJ _SB_MAKEMASK(4, S_BCM1480_MC_DQO_FINE_ADJ) |
598 | #define V_BCM1480_MC_DQO_FINE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQO_FINE_ADJ) | 598 | #define V_BCM1480_MC_DQO_FINE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQO_FINE_ADJ) |
599 | #define G_BCM1480_MC_DQO_FINE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQO_FINE_ADJ, M_BCM1480_MC_DQO_FINE_ADJ) | 599 | #define G_BCM1480_MC_DQO_FINE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQO_FINE_ADJ, M_BCM1480_MC_DQO_FINE_ADJ) |
600 | #define V_BCM1480_MC_DQO_FINE_ADJ_DEFAULT V_BCM1480_MC_DQO_FINE_ADJ(0x8) | 600 | #define V_BCM1480_MC_DQO_FINE_ADJ_DEFAULT V_BCM1480_MC_DQO_FINE_ADJ(0x8) |
601 | 601 | ||
602 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 602 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
603 | #define S_BCM1480_MC_DLL_PDSEL 44 | 603 | #define S_BCM1480_MC_DLL_PDSEL 44 |
604 | #define M_BCM1480_MC_DLL_PDSEL _SB_MAKEMASK(2, S_BCM1480_MC_DLL_PDSEL) | 604 | #define M_BCM1480_MC_DLL_PDSEL _SB_MAKEMASK(2, S_BCM1480_MC_DLL_PDSEL) |
605 | #define V_BCM1480_MC_DLL_PDSEL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_PDSEL) | 605 | #define V_BCM1480_MC_DLL_PDSEL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_PDSEL) |
606 | #define G_BCM1480_MC_DLL_PDSEL(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_PDSEL, M_BCM1480_MC_DLL_PDSEL) | 606 | #define G_BCM1480_MC_DLL_PDSEL(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_PDSEL, M_BCM1480_MC_DLL_PDSEL) |
607 | #define V_BCM1480_MC_DLL_DEFAULT_PDSEL V_BCM1480_MC_DLL_PDSEL(0x0) | 607 | #define V_BCM1480_MC_DLL_DEFAULT_PDSEL V_BCM1480_MC_DLL_PDSEL(0x0) |
608 | 608 | ||
609 | #define M_BCM1480_MC_DLL_REGBYPASS _SB_MAKEMASK1(46) | 609 | #define M_BCM1480_MC_DLL_REGBYPASS _SB_MAKEMASK1(46) |
610 | #define M_BCM1480_MC_DQO_SHIFT _SB_MAKEMASK1(47) | 610 | #define M_BCM1480_MC_DQO_SHIFT _SB_MAKEMASK1(47) |
611 | #endif | 611 | #endif |
612 | 612 | ||
613 | #define S_BCM1480_MC_DLL_DEFAULT 48 | 613 | #define S_BCM1480_MC_DLL_DEFAULT 48 |
614 | #define M_BCM1480_MC_DLL_DEFAULT _SB_MAKEMASK(6, S_BCM1480_MC_DLL_DEFAULT) | 614 | #define M_BCM1480_MC_DLL_DEFAULT _SB_MAKEMASK(6, S_BCM1480_MC_DLL_DEFAULT) |
615 | #define V_BCM1480_MC_DLL_DEFAULT(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_DEFAULT) | 615 | #define V_BCM1480_MC_DLL_DEFAULT(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_DEFAULT) |
616 | #define G_BCM1480_MC_DLL_DEFAULT(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_DEFAULT, M_BCM1480_MC_DLL_DEFAULT) | 616 | #define G_BCM1480_MC_DLL_DEFAULT(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_DEFAULT, M_BCM1480_MC_DLL_DEFAULT) |
617 | #define V_BCM1480_MC_DLL_DEFAULT_DEFAULT V_BCM1480_MC_DLL_DEFAULT(0x10) | 617 | #define V_BCM1480_MC_DLL_DEFAULT_DEFAULT V_BCM1480_MC_DLL_DEFAULT(0x10) |
618 | 618 | ||
619 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 619 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
620 | #define S_BCM1480_MC_DLL_REGCTRL 54 | 620 | #define S_BCM1480_MC_DLL_REGCTRL 54 |
621 | #define M_BCM1480_MC_DLL_REGCTRL _SB_MAKEMASK(2, S_BCM1480_MC_DLL_REGCTRL) | 621 | #define M_BCM1480_MC_DLL_REGCTRL _SB_MAKEMASK(2, S_BCM1480_MC_DLL_REGCTRL) |
622 | #define V_BCM1480_MC_DLL_REGCTRL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_REGCTRL) | 622 | #define V_BCM1480_MC_DLL_REGCTRL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_REGCTRL) |
623 | #define G_BCM1480_MC_DLL_REGCTRL(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_REGCTRL, M_BCM1480_MC_DLL_REGCTRL) | 623 | #define G_BCM1480_MC_DLL_REGCTRL(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_REGCTRL, M_BCM1480_MC_DLL_REGCTRL) |
624 | #define V_BCM1480_MC_DLL_DEFAULT_REGCTRL V_BCM1480_MC_DLL_REGCTRL(0x0) | 624 | #define V_BCM1480_MC_DLL_DEFAULT_REGCTRL V_BCM1480_MC_DLL_REGCTRL(0x0) |
625 | #endif | 625 | #endif |
626 | 626 | ||
627 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 627 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
628 | #define S_BCM1480_MC_DLL_FREQ_RANGE 56 | 628 | #define S_BCM1480_MC_DLL_FREQ_RANGE 56 |
629 | #define M_BCM1480_MC_DLL_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_DLL_FREQ_RANGE) | 629 | #define M_BCM1480_MC_DLL_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_DLL_FREQ_RANGE) |
630 | #define V_BCM1480_MC_DLL_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_FREQ_RANGE) | 630 | #define V_BCM1480_MC_DLL_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_FREQ_RANGE) |
631 | #define G_BCM1480_MC_DLL_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_FREQ_RANGE, M_BCM1480_MC_DLL_FREQ_RANGE) | 631 | #define G_BCM1480_MC_DLL_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_FREQ_RANGE, M_BCM1480_MC_DLL_FREQ_RANGE) |
632 | #define V_BCM1480_MC_DLL_FREQ_RANGE_DEFAULT V_BCM1480_MC_DLL_FREQ_RANGE(0x4) | 632 | #define V_BCM1480_MC_DLL_FREQ_RANGE_DEFAULT V_BCM1480_MC_DLL_FREQ_RANGE(0x4) |
633 | #endif | 633 | #endif |
634 | 634 | ||
635 | #define S_BCM1480_MC_DLL_STEP_SIZE 56 | 635 | #define S_BCM1480_MC_DLL_STEP_SIZE 56 |
636 | #define M_BCM1480_MC_DLL_STEP_SIZE _SB_MAKEMASK(4, S_BCM1480_MC_DLL_STEP_SIZE) | 636 | #define M_BCM1480_MC_DLL_STEP_SIZE _SB_MAKEMASK(4, S_BCM1480_MC_DLL_STEP_SIZE) |
637 | #define V_BCM1480_MC_DLL_STEP_SIZE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_STEP_SIZE) | 637 | #define V_BCM1480_MC_DLL_STEP_SIZE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_STEP_SIZE) |
638 | #define G_BCM1480_MC_DLL_STEP_SIZE(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_STEP_SIZE, M_BCM1480_MC_DLL_STEP_SIZE) | 638 | #define G_BCM1480_MC_DLL_STEP_SIZE(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_STEP_SIZE, M_BCM1480_MC_DLL_STEP_SIZE) |
639 | #define V_BCM1480_MC_DLL_STEP_SIZE_DEFAULT V_BCM1480_MC_DLL_STEP_SIZE(0x8) | 639 | #define V_BCM1480_MC_DLL_STEP_SIZE_DEFAULT V_BCM1480_MC_DLL_STEP_SIZE(0x8) |
640 | 640 | ||
641 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 641 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
642 | #define S_BCM1480_MC_DLL_BGCTRL 60 | 642 | #define S_BCM1480_MC_DLL_BGCTRL 60 |
643 | #define M_BCM1480_MC_DLL_BGCTRL _SB_MAKEMASK(2, S_BCM1480_MC_DLL_BGCTRL) | 643 | #define M_BCM1480_MC_DLL_BGCTRL _SB_MAKEMASK(2, S_BCM1480_MC_DLL_BGCTRL) |
644 | #define V_BCM1480_MC_DLL_BGCTRL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_BGCTRL) | 644 | #define V_BCM1480_MC_DLL_BGCTRL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_BGCTRL) |
645 | #define G_BCM1480_MC_DLL_BGCTRL(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_BGCTRL, M_BCM1480_MC_DLL_BGCTRL) | 645 | #define G_BCM1480_MC_DLL_BGCTRL(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_BGCTRL, M_BCM1480_MC_DLL_BGCTRL) |
646 | #define V_BCM1480_MC_DLL_DEFAULT_BGCTRL V_BCM1480_MC_DLL_BGCTRL(0x0) | 646 | #define V_BCM1480_MC_DLL_DEFAULT_BGCTRL V_BCM1480_MC_DLL_BGCTRL(0x0) |
647 | #endif | 647 | #endif |
648 | 648 | ||
649 | #define M_BCM1480_MC_DLL_BYPASS _SB_MAKEMASK1(63) | 649 | #define M_BCM1480_MC_DLL_BYPASS _SB_MAKEMASK1(63) |
650 | 650 | ||
651 | /* | 651 | /* |
652 | * Memory Drive Configuration Register (Table 94) | 652 | * Memory Drive Configuration Register (Table 94) |
653 | */ | 653 | */ |
654 | 654 | ||
655 | #define S_BCM1480_MC_RTT_BYP_PULLDOWN 0 | 655 | #define S_BCM1480_MC_RTT_BYP_PULLDOWN 0 |
656 | #define M_BCM1480_MC_RTT_BYP_PULLDOWN _SB_MAKEMASK(3, S_BCM1480_MC_RTT_BYP_PULLDOWN) | 656 | #define M_BCM1480_MC_RTT_BYP_PULLDOWN _SB_MAKEMASK(3, S_BCM1480_MC_RTT_BYP_PULLDOWN) |
657 | #define V_BCM1480_MC_RTT_BYP_PULLDOWN(x) _SB_MAKEVALUE(x, S_BCM1480_MC_RTT_BYP_PULLDOWN) | 657 | #define V_BCM1480_MC_RTT_BYP_PULLDOWN(x) _SB_MAKEVALUE(x, S_BCM1480_MC_RTT_BYP_PULLDOWN) |
658 | #define G_BCM1480_MC_RTT_BYP_PULLDOWN(x) _SB_GETVALUE(x, S_BCM1480_MC_RTT_BYP_PULLDOWN, M_BCM1480_MC_RTT_BYP_PULLDOWN) | 658 | #define G_BCM1480_MC_RTT_BYP_PULLDOWN(x) _SB_GETVALUE(x, S_BCM1480_MC_RTT_BYP_PULLDOWN, M_BCM1480_MC_RTT_BYP_PULLDOWN) |
659 | 659 | ||
660 | #define S_BCM1480_MC_RTT_BYP_PULLUP 6 | 660 | #define S_BCM1480_MC_RTT_BYP_PULLUP 6 |
661 | #define M_BCM1480_MC_RTT_BYP_PULLUP _SB_MAKEMASK(3, S_BCM1480_MC_RTT_BYP_PULLUP) | 661 | #define M_BCM1480_MC_RTT_BYP_PULLUP _SB_MAKEMASK(3, S_BCM1480_MC_RTT_BYP_PULLUP) |
662 | #define V_BCM1480_MC_RTT_BYP_PULLUP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_RTT_BYP_PULLUP) | 662 | #define V_BCM1480_MC_RTT_BYP_PULLUP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_RTT_BYP_PULLUP) |
663 | #define G_BCM1480_MC_RTT_BYP_PULLUP(x) _SB_GETVALUE(x, S_BCM1480_MC_RTT_BYP_PULLUP, M_BCM1480_MC_RTT_BYP_PULLUP) | 663 | #define G_BCM1480_MC_RTT_BYP_PULLUP(x) _SB_GETVALUE(x, S_BCM1480_MC_RTT_BYP_PULLUP, M_BCM1480_MC_RTT_BYP_PULLUP) |
664 | 664 | ||
665 | #define M_BCM1480_MC_RTT_BYPASS _SB_MAKEMASK1(8) | 665 | #define M_BCM1480_MC_RTT_BYPASS _SB_MAKEMASK1(8) |
666 | #define M_BCM1480_MC_RTT_COMP_MOV_AVG _SB_MAKEMASK1(9) | 666 | #define M_BCM1480_MC_RTT_COMP_MOV_AVG _SB_MAKEMASK1(9) |
667 | 667 | ||
668 | #define S_BCM1480_MC_PVT_BYP_C1_PULLDOWN 10 | 668 | #define S_BCM1480_MC_PVT_BYP_C1_PULLDOWN 10 |
669 | #define M_BCM1480_MC_PVT_BYP_C1_PULLDOWN _SB_MAKEMASK(4, S_BCM1480_MC_PVT_BYP_C1_PULLDOWN) | 669 | #define M_BCM1480_MC_PVT_BYP_C1_PULLDOWN _SB_MAKEMASK(4, S_BCM1480_MC_PVT_BYP_C1_PULLDOWN) |
670 | #define V_BCM1480_MC_PVT_BYP_C1_PULLDOWN(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLDOWN) | 670 | #define V_BCM1480_MC_PVT_BYP_C1_PULLDOWN(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLDOWN) |
671 | #define G_BCM1480_MC_PVT_BYP_C1_PULLDOWN(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLDOWN, M_BCM1480_MC_PVT_BYP_C1_PULLDOWN) | 671 | #define G_BCM1480_MC_PVT_BYP_C1_PULLDOWN(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLDOWN, M_BCM1480_MC_PVT_BYP_C1_PULLDOWN) |
672 | 672 | ||
673 | #define S_BCM1480_MC_PVT_BYP_C1_PULLUP 15 | 673 | #define S_BCM1480_MC_PVT_BYP_C1_PULLUP 15 |
674 | #define M_BCM1480_MC_PVT_BYP_C1_PULLUP _SB_MAKEMASK(4, S_BCM1480_MC_PVT_BYP_C1_PULLUP) | 674 | #define M_BCM1480_MC_PVT_BYP_C1_PULLUP _SB_MAKEMASK(4, S_BCM1480_MC_PVT_BYP_C1_PULLUP) |
675 | #define V_BCM1480_MC_PVT_BYP_C1_PULLUP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLUP) | 675 | #define V_BCM1480_MC_PVT_BYP_C1_PULLUP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLUP) |
676 | #define G_BCM1480_MC_PVT_BYP_C1_PULLUP(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLUP, M_BCM1480_MC_PVT_BYP_C1_PULLUP) | 676 | #define G_BCM1480_MC_PVT_BYP_C1_PULLUP(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLUP, M_BCM1480_MC_PVT_BYP_C1_PULLUP) |
677 | 677 | ||
@@ -680,153 +680,153 @@ | |||
680 | #define V_BCM1480_MC_PVT_BYP_C2_PULLDOWN(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLDOWN) | 680 | #define V_BCM1480_MC_PVT_BYP_C2_PULLDOWN(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLDOWN) |
681 | #define G_BCM1480_MC_PVT_BYP_C2_PULLDOWN(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLDOWN, M_BCM1480_MC_PVT_BYP_C2_PULLDOWN) | 681 | #define G_BCM1480_MC_PVT_BYP_C2_PULLDOWN(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLDOWN, M_BCM1480_MC_PVT_BYP_C2_PULLDOWN) |
682 | 682 | ||
683 | #define S_BCM1480_MC_PVT_BYP_C2_PULLUP 25 | 683 | #define S_BCM1480_MC_PVT_BYP_C2_PULLUP 25 |
684 | #define M_BCM1480_MC_PVT_BYP_C2_PULLUP _SB_MAKEMASK(4, S_BCM1480_MC_PVT_BYP_C2_PULLUP) | 684 | #define M_BCM1480_MC_PVT_BYP_C2_PULLUP _SB_MAKEMASK(4, S_BCM1480_MC_PVT_BYP_C2_PULLUP) |
685 | #define V_BCM1480_MC_PVT_BYP_C2_PULLUP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLUP) | 685 | #define V_BCM1480_MC_PVT_BYP_C2_PULLUP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLUP) |
686 | #define G_BCM1480_MC_PVT_BYP_C2_PULLUP(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLUP, M_BCM1480_MC_PVT_BYP_C2_PULLUP) | 686 | #define G_BCM1480_MC_PVT_BYP_C2_PULLUP(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLUP, M_BCM1480_MC_PVT_BYP_C2_PULLUP) |
687 | 687 | ||
688 | #define M_BCM1480_MC_PVT_BYPASS _SB_MAKEMASK1(30) | 688 | #define M_BCM1480_MC_PVT_BYPASS _SB_MAKEMASK1(30) |
689 | #define M_BCM1480_MC_PVT_COMP_MOV_AVG _SB_MAKEMASK1(31) | 689 | #define M_BCM1480_MC_PVT_COMP_MOV_AVG _SB_MAKEMASK1(31) |
690 | 690 | ||
691 | #define M_BCM1480_MC_CLK_CLASS _SB_MAKEMASK1(34) | 691 | #define M_BCM1480_MC_CLK_CLASS _SB_MAKEMASK1(34) |
692 | #define M_BCM1480_MC_DATA_CLASS _SB_MAKEMASK1(35) | 692 | #define M_BCM1480_MC_DATA_CLASS _SB_MAKEMASK1(35) |
693 | #define M_BCM1480_MC_ADDR_CLASS _SB_MAKEMASK1(36) | 693 | #define M_BCM1480_MC_ADDR_CLASS _SB_MAKEMASK1(36) |
694 | 694 | ||
695 | #define M_BCM1480_MC_DQ_ODT_75 _SB_MAKEMASK1(37) | 695 | #define M_BCM1480_MC_DQ_ODT_75 _SB_MAKEMASK1(37) |
696 | #define M_BCM1480_MC_DQ_ODT_150 _SB_MAKEMASK1(38) | 696 | #define M_BCM1480_MC_DQ_ODT_150 _SB_MAKEMASK1(38) |
697 | #define M_BCM1480_MC_DQS_ODT_75 _SB_MAKEMASK1(39) | 697 | #define M_BCM1480_MC_DQS_ODT_75 _SB_MAKEMASK1(39) |
698 | #define M_BCM1480_MC_DQS_ODT_150 _SB_MAKEMASK1(40) | 698 | #define M_BCM1480_MC_DQS_ODT_150 _SB_MAKEMASK1(40) |
699 | #define M_BCM1480_MC_DQS_DIFF _SB_MAKEMASK1(41) | 699 | #define M_BCM1480_MC_DQS_DIFF _SB_MAKEMASK1(41) |
700 | 700 | ||
701 | /* | 701 | /* |
702 | * ECC Test Data Register (Table 95) | 702 | * ECC Test Data Register (Table 95) |
703 | */ | 703 | */ |
704 | 704 | ||
705 | #define S_BCM1480_MC_DATA_INVERT 0 | 705 | #define S_BCM1480_MC_DATA_INVERT 0 |
706 | #define M_DATA_ECC_INVERT _SB_MAKEMASK(64, S_BCM1480_MC_ECC_INVERT) | 706 | #define M_DATA_ECC_INVERT _SB_MAKEMASK(64, S_BCM1480_MC_ECC_INVERT) |
707 | 707 | ||
708 | /* | 708 | /* |
709 | * ECC Test ECC Register (Table 96) | 709 | * ECC Test ECC Register (Table 96) |
710 | */ | 710 | */ |
711 | 711 | ||
712 | #define S_BCM1480_MC_ECC_INVERT 0 | 712 | #define S_BCM1480_MC_ECC_INVERT 0 |
713 | #define M_BCM1480_MC_ECC_INVERT _SB_MAKEMASK(8, S_BCM1480_MC_ECC_INVERT) | 713 | #define M_BCM1480_MC_ECC_INVERT _SB_MAKEMASK(8, S_BCM1480_MC_ECC_INVERT) |
714 | 714 | ||
715 | /* | 715 | /* |
716 | * SDRAM Timing Register (Table 97) | 716 | * SDRAM Timing Register (Table 97) |
717 | */ | 717 | */ |
718 | 718 | ||
719 | #define S_BCM1480_MC_tRCD 0 | 719 | #define S_BCM1480_MC_tRCD 0 |
720 | #define M_BCM1480_MC_tRCD _SB_MAKEMASK(4, S_BCM1480_MC_tRCD) | 720 | #define M_BCM1480_MC_tRCD _SB_MAKEMASK(4, S_BCM1480_MC_tRCD) |
721 | #define V_BCM1480_MC_tRCD(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRCD) | 721 | #define V_BCM1480_MC_tRCD(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRCD) |
722 | #define G_BCM1480_MC_tRCD(x) _SB_GETVALUE(x, S_BCM1480_MC_tRCD, M_BCM1480_MC_tRCD) | 722 | #define G_BCM1480_MC_tRCD(x) _SB_GETVALUE(x, S_BCM1480_MC_tRCD, M_BCM1480_MC_tRCD) |
723 | #define K_BCM1480_MC_tRCD_DEFAULT 3 | 723 | #define K_BCM1480_MC_tRCD_DEFAULT 3 |
724 | #define V_BCM1480_MC_tRCD_DEFAULT V_BCM1480_MC_tRCD(K_BCM1480_MC_tRCD_DEFAULT) | 724 | #define V_BCM1480_MC_tRCD_DEFAULT V_BCM1480_MC_tRCD(K_BCM1480_MC_tRCD_DEFAULT) |
725 | 725 | ||
726 | #define S_BCM1480_MC_tCL 4 | 726 | #define S_BCM1480_MC_tCL 4 |
727 | #define M_BCM1480_MC_tCL _SB_MAKEMASK(4, S_BCM1480_MC_tCL) | 727 | #define M_BCM1480_MC_tCL _SB_MAKEMASK(4, S_BCM1480_MC_tCL) |
728 | #define V_BCM1480_MC_tCL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tCL) | 728 | #define V_BCM1480_MC_tCL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tCL) |
729 | #define G_BCM1480_MC_tCL(x) _SB_GETVALUE(x, S_BCM1480_MC_tCL, M_BCM1480_MC_tCL) | 729 | #define G_BCM1480_MC_tCL(x) _SB_GETVALUE(x, S_BCM1480_MC_tCL, M_BCM1480_MC_tCL) |
730 | #define K_BCM1480_MC_tCL_DEFAULT 2 | 730 | #define K_BCM1480_MC_tCL_DEFAULT 2 |
731 | #define V_BCM1480_MC_tCL_DEFAULT V_BCM1480_MC_tCL(K_BCM1480_MC_tCL_DEFAULT) | 731 | #define V_BCM1480_MC_tCL_DEFAULT V_BCM1480_MC_tCL(K_BCM1480_MC_tCL_DEFAULT) |
732 | 732 | ||
733 | #define M_BCM1480_MC_tCrDh _SB_MAKEMASK1(8) | 733 | #define M_BCM1480_MC_tCrDh _SB_MAKEMASK1(8) |
734 | 734 | ||
735 | #define S_BCM1480_MC_tWR 9 | 735 | #define S_BCM1480_MC_tWR 9 |
736 | #define M_BCM1480_MC_tWR _SB_MAKEMASK(3, S_BCM1480_MC_tWR) | 736 | #define M_BCM1480_MC_tWR _SB_MAKEMASK(3, S_BCM1480_MC_tWR) |
737 | #define V_BCM1480_MC_tWR(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tWR) | 737 | #define V_BCM1480_MC_tWR(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tWR) |
738 | #define G_BCM1480_MC_tWR(x) _SB_GETVALUE(x, S_BCM1480_MC_tWR, M_BCM1480_MC_tWR) | 738 | #define G_BCM1480_MC_tWR(x) _SB_GETVALUE(x, S_BCM1480_MC_tWR, M_BCM1480_MC_tWR) |
739 | #define K_BCM1480_MC_tWR_DEFAULT 2 | 739 | #define K_BCM1480_MC_tWR_DEFAULT 2 |
740 | #define V_BCM1480_MC_tWR_DEFAULT V_BCM1480_MC_tWR(K_BCM1480_MC_tWR_DEFAULT) | 740 | #define V_BCM1480_MC_tWR_DEFAULT V_BCM1480_MC_tWR(K_BCM1480_MC_tWR_DEFAULT) |
741 | 741 | ||
742 | #define S_BCM1480_MC_tCwD 12 | 742 | #define S_BCM1480_MC_tCwD 12 |
743 | #define M_BCM1480_MC_tCwD _SB_MAKEMASK(4, S_BCM1480_MC_tCwD) | 743 | #define M_BCM1480_MC_tCwD _SB_MAKEMASK(4, S_BCM1480_MC_tCwD) |
744 | #define V_BCM1480_MC_tCwD(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tCwD) | 744 | #define V_BCM1480_MC_tCwD(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tCwD) |
745 | #define G_BCM1480_MC_tCwD(x) _SB_GETVALUE(x, S_BCM1480_MC_tCwD, M_BCM1480_MC_tCwD) | 745 | #define G_BCM1480_MC_tCwD(x) _SB_GETVALUE(x, S_BCM1480_MC_tCwD, M_BCM1480_MC_tCwD) |
746 | #define K_BCM1480_MC_tCwD_DEFAULT 1 | 746 | #define K_BCM1480_MC_tCwD_DEFAULT 1 |
747 | #define V_BCM1480_MC_tCwD_DEFAULT V_BCM1480_MC_tCwD(K_BCM1480_MC_tCwD_DEFAULT) | 747 | #define V_BCM1480_MC_tCwD_DEFAULT V_BCM1480_MC_tCwD(K_BCM1480_MC_tCwD_DEFAULT) |
748 | 748 | ||
749 | #define S_BCM1480_MC_tRP 16 | 749 | #define S_BCM1480_MC_tRP 16 |
750 | #define M_BCM1480_MC_tRP _SB_MAKEMASK(4, S_BCM1480_MC_tRP) | 750 | #define M_BCM1480_MC_tRP _SB_MAKEMASK(4, S_BCM1480_MC_tRP) |
751 | #define V_BCM1480_MC_tRP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRP) | 751 | #define V_BCM1480_MC_tRP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRP) |
752 | #define G_BCM1480_MC_tRP(x) _SB_GETVALUE(x, S_BCM1480_MC_tRP, M_BCM1480_MC_tRP) | 752 | #define G_BCM1480_MC_tRP(x) _SB_GETVALUE(x, S_BCM1480_MC_tRP, M_BCM1480_MC_tRP) |
753 | #define K_BCM1480_MC_tRP_DEFAULT 4 | 753 | #define K_BCM1480_MC_tRP_DEFAULT 4 |
754 | #define V_BCM1480_MC_tRP_DEFAULT V_BCM1480_MC_tRP(K_BCM1480_MC_tRP_DEFAULT) | 754 | #define V_BCM1480_MC_tRP_DEFAULT V_BCM1480_MC_tRP(K_BCM1480_MC_tRP_DEFAULT) |
755 | 755 | ||
756 | #define S_BCM1480_MC_tRRD 20 | 756 | #define S_BCM1480_MC_tRRD 20 |
757 | #define M_BCM1480_MC_tRRD _SB_MAKEMASK(4, S_BCM1480_MC_tRRD) | 757 | #define M_BCM1480_MC_tRRD _SB_MAKEMASK(4, S_BCM1480_MC_tRRD) |
758 | #define V_BCM1480_MC_tRRD(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRRD) | 758 | #define V_BCM1480_MC_tRRD(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRRD) |
759 | #define G_BCM1480_MC_tRRD(x) _SB_GETVALUE(x, S_BCM1480_MC_tRRD, M_BCM1480_MC_tRRD) | 759 | #define G_BCM1480_MC_tRRD(x) _SB_GETVALUE(x, S_BCM1480_MC_tRRD, M_BCM1480_MC_tRRD) |
760 | #define K_BCM1480_MC_tRRD_DEFAULT 2 | 760 | #define K_BCM1480_MC_tRRD_DEFAULT 2 |
761 | #define V_BCM1480_MC_tRRD_DEFAULT V_BCM1480_MC_tRRD(K_BCM1480_MC_tRRD_DEFAULT) | 761 | #define V_BCM1480_MC_tRRD_DEFAULT V_BCM1480_MC_tRRD(K_BCM1480_MC_tRRD_DEFAULT) |
762 | 762 | ||
763 | #define S_BCM1480_MC_tRCw 24 | 763 | #define S_BCM1480_MC_tRCw 24 |
764 | #define M_BCM1480_MC_tRCw _SB_MAKEMASK(5, S_BCM1480_MC_tRCw) | 764 | #define M_BCM1480_MC_tRCw _SB_MAKEMASK(5, S_BCM1480_MC_tRCw) |
765 | #define V_BCM1480_MC_tRCw(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRCw) | 765 | #define V_BCM1480_MC_tRCw(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRCw) |
766 | #define G_BCM1480_MC_tRCw(x) _SB_GETVALUE(x, S_BCM1480_MC_tRCw, M_BCM1480_MC_tRCw) | 766 | #define G_BCM1480_MC_tRCw(x) _SB_GETVALUE(x, S_BCM1480_MC_tRCw, M_BCM1480_MC_tRCw) |
767 | #define K_BCM1480_MC_tRCw_DEFAULT 10 | 767 | #define K_BCM1480_MC_tRCw_DEFAULT 10 |
768 | #define V_BCM1480_MC_tRCw_DEFAULT V_BCM1480_MC_tRCw(K_BCM1480_MC_tRCw_DEFAULT) | 768 | #define V_BCM1480_MC_tRCw_DEFAULT V_BCM1480_MC_tRCw(K_BCM1480_MC_tRCw_DEFAULT) |
769 | 769 | ||
770 | #define S_BCM1480_MC_tRCr 32 | 770 | #define S_BCM1480_MC_tRCr 32 |
771 | #define M_BCM1480_MC_tRCr _SB_MAKEMASK(5, S_BCM1480_MC_tRCr) | 771 | #define M_BCM1480_MC_tRCr _SB_MAKEMASK(5, S_BCM1480_MC_tRCr) |
772 | #define V_BCM1480_MC_tRCr(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRCr) | 772 | #define V_BCM1480_MC_tRCr(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRCr) |
773 | #define G_BCM1480_MC_tRCr(x) _SB_GETVALUE(x, S_BCM1480_MC_tRCr, M_BCM1480_MC_tRCr) | 773 | #define G_BCM1480_MC_tRCr(x) _SB_GETVALUE(x, S_BCM1480_MC_tRCr, M_BCM1480_MC_tRCr) |
774 | #define K_BCM1480_MC_tRCr_DEFAULT 9 | 774 | #define K_BCM1480_MC_tRCr_DEFAULT 9 |
775 | #define V_BCM1480_MC_tRCr_DEFAULT V_BCM1480_MC_tRCr(K_BCM1480_MC_tRCr_DEFAULT) | 775 | #define V_BCM1480_MC_tRCr_DEFAULT V_BCM1480_MC_tRCr(K_BCM1480_MC_tRCr_DEFAULT) |
776 | 776 | ||
777 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 777 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
778 | #define S_BCM1480_MC_tFAW 40 | 778 | #define S_BCM1480_MC_tFAW 40 |
779 | #define M_BCM1480_MC_tFAW _SB_MAKEMASK(6, S_BCM1480_MC_tFAW) | 779 | #define M_BCM1480_MC_tFAW _SB_MAKEMASK(6, S_BCM1480_MC_tFAW) |
780 | #define V_BCM1480_MC_tFAW(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tFAW) | 780 | #define V_BCM1480_MC_tFAW(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tFAW) |
781 | #define G_BCM1480_MC_tFAW(x) _SB_GETVALUE(x, S_BCM1480_MC_tFAW, M_BCM1480_MC_tFAW) | 781 | #define G_BCM1480_MC_tFAW(x) _SB_GETVALUE(x, S_BCM1480_MC_tFAW, M_BCM1480_MC_tFAW) |
782 | #define K_BCM1480_MC_tFAW_DEFAULT 0 | 782 | #define K_BCM1480_MC_tFAW_DEFAULT 0 |
783 | #define V_BCM1480_MC_tFAW_DEFAULT V_BCM1480_MC_tFAW(K_BCM1480_MC_tFAW_DEFAULT) | 783 | #define V_BCM1480_MC_tFAW_DEFAULT V_BCM1480_MC_tFAW(K_BCM1480_MC_tFAW_DEFAULT) |
784 | #endif | 784 | #endif |
785 | 785 | ||
786 | #define S_BCM1480_MC_tRFC 48 | 786 | #define S_BCM1480_MC_tRFC 48 |
787 | #define M_BCM1480_MC_tRFC _SB_MAKEMASK(7, S_BCM1480_MC_tRFC) | 787 | #define M_BCM1480_MC_tRFC _SB_MAKEMASK(7, S_BCM1480_MC_tRFC) |
788 | #define V_BCM1480_MC_tRFC(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRFC) | 788 | #define V_BCM1480_MC_tRFC(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRFC) |
789 | #define G_BCM1480_MC_tRFC(x) _SB_GETVALUE(x, S_BCM1480_MC_tRFC, M_BCM1480_MC_tRFC) | 789 | #define G_BCM1480_MC_tRFC(x) _SB_GETVALUE(x, S_BCM1480_MC_tRFC, M_BCM1480_MC_tRFC) |
790 | #define K_BCM1480_MC_tRFC_DEFAULT 12 | 790 | #define K_BCM1480_MC_tRFC_DEFAULT 12 |
791 | #define V_BCM1480_MC_tRFC_DEFAULT V_BCM1480_MC_tRFC(K_BCM1480_MC_tRFC_DEFAULT) | 791 | #define V_BCM1480_MC_tRFC_DEFAULT V_BCM1480_MC_tRFC(K_BCM1480_MC_tRFC_DEFAULT) |
792 | 792 | ||
793 | #define S_BCM1480_MC_tFIFO 56 | 793 | #define S_BCM1480_MC_tFIFO 56 |
794 | #define M_BCM1480_MC_tFIFO _SB_MAKEMASK(2, S_BCM1480_MC_tFIFO) | 794 | #define M_BCM1480_MC_tFIFO _SB_MAKEMASK(2, S_BCM1480_MC_tFIFO) |
795 | #define V_BCM1480_MC_tFIFO(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tFIFO) | 795 | #define V_BCM1480_MC_tFIFO(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tFIFO) |
796 | #define G_BCM1480_MC_tFIFO(x) _SB_GETVALUE(x, S_BCM1480_MC_tFIFO, M_BCM1480_MC_tFIFO) | 796 | #define G_BCM1480_MC_tFIFO(x) _SB_GETVALUE(x, S_BCM1480_MC_tFIFO, M_BCM1480_MC_tFIFO) |
797 | #define K_BCM1480_MC_tFIFO_DEFAULT 0 | 797 | #define K_BCM1480_MC_tFIFO_DEFAULT 0 |
798 | #define V_BCM1480_MC_tFIFO_DEFAULT V_BCM1480_MC_tFIFO(K_BCM1480_MC_tFIFO_DEFAULT) | 798 | #define V_BCM1480_MC_tFIFO_DEFAULT V_BCM1480_MC_tFIFO(K_BCM1480_MC_tFIFO_DEFAULT) |
799 | 799 | ||
800 | #define S_BCM1480_MC_tW2R 58 | 800 | #define S_BCM1480_MC_tW2R 58 |
801 | #define M_BCM1480_MC_tW2R _SB_MAKEMASK(2, S_BCM1480_MC_tW2R) | 801 | #define M_BCM1480_MC_tW2R _SB_MAKEMASK(2, S_BCM1480_MC_tW2R) |
802 | #define V_BCM1480_MC_tW2R(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tW2R) | 802 | #define V_BCM1480_MC_tW2R(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tW2R) |
803 | #define G_BCM1480_MC_tW2R(x) _SB_GETVALUE(x, S_BCM1480_MC_tW2R, M_BCM1480_MC_tW2R) | 803 | #define G_BCM1480_MC_tW2R(x) _SB_GETVALUE(x, S_BCM1480_MC_tW2R, M_BCM1480_MC_tW2R) |
804 | #define K_BCM1480_MC_tW2R_DEFAULT 1 | 804 | #define K_BCM1480_MC_tW2R_DEFAULT 1 |
805 | #define V_BCM1480_MC_tW2R_DEFAULT V_BCM1480_MC_tW2R(K_BCM1480_MC_tW2R_DEFAULT) | 805 | #define V_BCM1480_MC_tW2R_DEFAULT V_BCM1480_MC_tW2R(K_BCM1480_MC_tW2R_DEFAULT) |
806 | 806 | ||
807 | #define S_BCM1480_MC_tR2W 60 | 807 | #define S_BCM1480_MC_tR2W 60 |
808 | #define M_BCM1480_MC_tR2W _SB_MAKEMASK(2, S_BCM1480_MC_tR2W) | 808 | #define M_BCM1480_MC_tR2W _SB_MAKEMASK(2, S_BCM1480_MC_tR2W) |
809 | #define V_BCM1480_MC_tR2W(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tR2W) | 809 | #define V_BCM1480_MC_tR2W(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tR2W) |
810 | #define G_BCM1480_MC_tR2W(x) _SB_GETVALUE(x, S_BCM1480_MC_tR2W, M_BCM1480_MC_tR2W) | 810 | #define G_BCM1480_MC_tR2W(x) _SB_GETVALUE(x, S_BCM1480_MC_tR2W, M_BCM1480_MC_tR2W) |
811 | #define K_BCM1480_MC_tR2W_DEFAULT 0 | 811 | #define K_BCM1480_MC_tR2W_DEFAULT 0 |
812 | #define V_BCM1480_MC_tR2W_DEFAULT V_BCM1480_MC_tR2W(K_BCM1480_MC_tR2W_DEFAULT) | 812 | #define V_BCM1480_MC_tR2W_DEFAULT V_BCM1480_MC_tR2W(K_BCM1480_MC_tR2W_DEFAULT) |
813 | 813 | ||
814 | #define M_BCM1480_MC_tR2R _SB_MAKEMASK1(62) | 814 | #define M_BCM1480_MC_tR2R _SB_MAKEMASK1(62) |
815 | 815 | ||
816 | #define V_BCM1480_MC_TIMING_DEFAULT (M_BCM1480_MC_tR2R | \ | 816 | #define V_BCM1480_MC_TIMING_DEFAULT (M_BCM1480_MC_tR2R | \ |
817 | V_BCM1480_MC_tFIFO_DEFAULT | \ | 817 | V_BCM1480_MC_tFIFO_DEFAULT | \ |
818 | V_BCM1480_MC_tR2W_DEFAULT | \ | 818 | V_BCM1480_MC_tR2W_DEFAULT | \ |
819 | V_BCM1480_MC_tW2R_DEFAULT | \ | 819 | V_BCM1480_MC_tW2R_DEFAULT | \ |
820 | V_BCM1480_MC_tRFC_DEFAULT | \ | 820 | V_BCM1480_MC_tRFC_DEFAULT | \ |
821 | V_BCM1480_MC_tRCr_DEFAULT | \ | 821 | V_BCM1480_MC_tRCr_DEFAULT | \ |
822 | V_BCM1480_MC_tRCw_DEFAULT | \ | 822 | V_BCM1480_MC_tRCw_DEFAULT | \ |
823 | V_BCM1480_MC_tRRD_DEFAULT | \ | 823 | V_BCM1480_MC_tRRD_DEFAULT | \ |
824 | V_BCM1480_MC_tRP_DEFAULT | \ | 824 | V_BCM1480_MC_tRP_DEFAULT | \ |
825 | V_BCM1480_MC_tCwD_DEFAULT | \ | 825 | V_BCM1480_MC_tCwD_DEFAULT | \ |
826 | V_BCM1480_MC_tWR_DEFAULT | \ | 826 | V_BCM1480_MC_tWR_DEFAULT | \ |
827 | M_BCM1480_MC_tCrDh | \ | 827 | M_BCM1480_MC_tCrDh | \ |
828 | V_BCM1480_MC_tCL_DEFAULT | \ | 828 | V_BCM1480_MC_tCL_DEFAULT | \ |
829 | V_BCM1480_MC_tRCD_DEFAULT) | 829 | V_BCM1480_MC_tRCD_DEFAULT) |
830 | 830 | ||
831 | /* | 831 | /* |
832 | * SDRAM Timing Register 2 | 832 | * SDRAM Timing Register 2 |
@@ -834,33 +834,33 @@ | |||
834 | 834 | ||
835 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 835 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
836 | 836 | ||
837 | #define S_BCM1480_MC_tAL 0 | 837 | #define S_BCM1480_MC_tAL 0 |
838 | #define M_BCM1480_MC_tAL _SB_MAKEMASK(4, S_BCM1480_MC_tAL) | 838 | #define M_BCM1480_MC_tAL _SB_MAKEMASK(4, S_BCM1480_MC_tAL) |
839 | #define V_BCM1480_MC_tAL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tAL) | 839 | #define V_BCM1480_MC_tAL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tAL) |
840 | #define G_BCM1480_MC_tAL(x) _SB_GETVALUE(x, S_BCM1480_MC_tAL, M_BCM1480_MC_tAL) | 840 | #define G_BCM1480_MC_tAL(x) _SB_GETVALUE(x, S_BCM1480_MC_tAL, M_BCM1480_MC_tAL) |
841 | #define K_BCM1480_MC_tAL_DEFAULT 0 | 841 | #define K_BCM1480_MC_tAL_DEFAULT 0 |
842 | #define V_BCM1480_MC_tAL_DEFAULT V_BCM1480_MC_tAL(K_BCM1480_MC_tAL_DEFAULT) | 842 | #define V_BCM1480_MC_tAL_DEFAULT V_BCM1480_MC_tAL(K_BCM1480_MC_tAL_DEFAULT) |
843 | 843 | ||
844 | #define S_BCM1480_MC_tRTP 4 | 844 | #define S_BCM1480_MC_tRTP 4 |
845 | #define M_BCM1480_MC_tRTP _SB_MAKEMASK(3, S_BCM1480_MC_tRTP) | 845 | #define M_BCM1480_MC_tRTP _SB_MAKEMASK(3, S_BCM1480_MC_tRTP) |
846 | #define V_BCM1480_MC_tRTP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRTP) | 846 | #define V_BCM1480_MC_tRTP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRTP) |
847 | #define G_BCM1480_MC_tRTP(x) _SB_GETVALUE(x, S_BCM1480_MC_tRTP, M_BCM1480_MC_tRTP) | 847 | #define G_BCM1480_MC_tRTP(x) _SB_GETVALUE(x, S_BCM1480_MC_tRTP, M_BCM1480_MC_tRTP) |
848 | #define K_BCM1480_MC_tRTP_DEFAULT 2 | 848 | #define K_BCM1480_MC_tRTP_DEFAULT 2 |
849 | #define V_BCM1480_MC_tRTP_DEFAULT V_BCM1480_MC_tRTP(K_BCM1480_MC_tRTP_DEFAULT) | 849 | #define V_BCM1480_MC_tRTP_DEFAULT V_BCM1480_MC_tRTP(K_BCM1480_MC_tRTP_DEFAULT) |
850 | 850 | ||
851 | #define S_BCM1480_MC_tW2W 8 | 851 | #define S_BCM1480_MC_tW2W 8 |
852 | #define M_BCM1480_MC_tW2W _SB_MAKEMASK(2, S_BCM1480_MC_tW2W) | 852 | #define M_BCM1480_MC_tW2W _SB_MAKEMASK(2, S_BCM1480_MC_tW2W) |
853 | #define V_BCM1480_MC_tW2W(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tW2W) | 853 | #define V_BCM1480_MC_tW2W(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tW2W) |
854 | #define G_BCM1480_MC_tW2W(x) _SB_GETVALUE(x, S_BCM1480_MC_tW2W, M_BCM1480_MC_tW2W) | 854 | #define G_BCM1480_MC_tW2W(x) _SB_GETVALUE(x, S_BCM1480_MC_tW2W, M_BCM1480_MC_tW2W) |
855 | #define K_BCM1480_MC_tW2W_DEFAULT 0 | 855 | #define K_BCM1480_MC_tW2W_DEFAULT 0 |
856 | #define V_BCM1480_MC_tW2W_DEFAULT V_BCM1480_MC_tW2W(K_BCM1480_MC_tW2W_DEFAULT) | 856 | #define V_BCM1480_MC_tW2W_DEFAULT V_BCM1480_MC_tW2W(K_BCM1480_MC_tW2W_DEFAULT) |
857 | 857 | ||
858 | #define S_BCM1480_MC_tRAP 12 | 858 | #define S_BCM1480_MC_tRAP 12 |
859 | #define M_BCM1480_MC_tRAP _SB_MAKEMASK(4, S_BCM1480_MC_tRAP) | 859 | #define M_BCM1480_MC_tRAP _SB_MAKEMASK(4, S_BCM1480_MC_tRAP) |
860 | #define V_BCM1480_MC_tRAP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRAP) | 860 | #define V_BCM1480_MC_tRAP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRAP) |
861 | #define G_BCM1480_MC_tRAP(x) _SB_GETVALUE(x, S_BCM1480_MC_tRAP, M_BCM1480_MC_tRAP) | 861 | #define G_BCM1480_MC_tRAP(x) _SB_GETVALUE(x, S_BCM1480_MC_tRAP, M_BCM1480_MC_tRAP) |
862 | #define K_BCM1480_MC_tRAP_DEFAULT 0 | 862 | #define K_BCM1480_MC_tRAP_DEFAULT 0 |
863 | #define V_BCM1480_MC_tRAP_DEFAULT V_BCM1480_MC_tRAP(K_BCM1480_MC_tRAP_DEFAULT) | 863 | #define V_BCM1480_MC_tRAP_DEFAULT V_BCM1480_MC_tRAP(K_BCM1480_MC_tRAP_DEFAULT) |
864 | 864 | ||
865 | #endif | 865 | #endif |
866 | 866 | ||
@@ -874,111 +874,111 @@ | |||
874 | * Global Configuration Register (Table 99) | 874 | * Global Configuration Register (Table 99) |
875 | */ | 875 | */ |
876 | 876 | ||
877 | #define S_BCM1480_MC_BLK_SET_MARK 8 | 877 | #define S_BCM1480_MC_BLK_SET_MARK 8 |
878 | #define M_BCM1480_MC_BLK_SET_MARK _SB_MAKEMASK(4, S_BCM1480_MC_BLK_SET_MARK) | 878 | #define M_BCM1480_MC_BLK_SET_MARK _SB_MAKEMASK(4, S_BCM1480_MC_BLK_SET_MARK) |
879 | #define V_BCM1480_MC_BLK_SET_MARK(x) _SB_MAKEVALUE(x, S_BCM1480_MC_BLK_SET_MARK) | 879 | #define V_BCM1480_MC_BLK_SET_MARK(x) _SB_MAKEVALUE(x, S_BCM1480_MC_BLK_SET_MARK) |
880 | #define G_BCM1480_MC_BLK_SET_MARK(x) _SB_GETVALUE(x, S_BCM1480_MC_BLK_SET_MARK, M_BCM1480_MC_BLK_SET_MARK) | 880 | #define G_BCM1480_MC_BLK_SET_MARK(x) _SB_GETVALUE(x, S_BCM1480_MC_BLK_SET_MARK, M_BCM1480_MC_BLK_SET_MARK) |
881 | 881 | ||
882 | #define S_BCM1480_MC_BLK_CLR_MARK 12 | 882 | #define S_BCM1480_MC_BLK_CLR_MARK 12 |
883 | #define M_BCM1480_MC_BLK_CLR_MARK _SB_MAKEMASK(4, S_BCM1480_MC_BLK_CLR_MARK) | 883 | #define M_BCM1480_MC_BLK_CLR_MARK _SB_MAKEMASK(4, S_BCM1480_MC_BLK_CLR_MARK) |
884 | #define V_BCM1480_MC_BLK_CLR_MARK(x) _SB_MAKEVALUE(x, S_BCM1480_MC_BLK_CLR_MARK) | 884 | #define V_BCM1480_MC_BLK_CLR_MARK(x) _SB_MAKEVALUE(x, S_BCM1480_MC_BLK_CLR_MARK) |
885 | #define G_BCM1480_MC_BLK_CLR_MARK(x) _SB_GETVALUE(x, S_BCM1480_MC_BLK_CLR_MARK, M_BCM1480_MC_BLK_CLR_MARK) | 885 | #define G_BCM1480_MC_BLK_CLR_MARK(x) _SB_GETVALUE(x, S_BCM1480_MC_BLK_CLR_MARK, M_BCM1480_MC_BLK_CLR_MARK) |
886 | 886 | ||
887 | #define M_BCM1480_MC_PKT_PRIORITY _SB_MAKEMASK1(16) | 887 | #define M_BCM1480_MC_PKT_PRIORITY _SB_MAKEMASK1(16) |
888 | 888 | ||
889 | #define S_BCM1480_MC_MAX_AGE 20 | 889 | #define S_BCM1480_MC_MAX_AGE 20 |
890 | #define M_BCM1480_MC_MAX_AGE _SB_MAKEMASK(4, S_BCM1480_MC_MAX_AGE) | 890 | #define M_BCM1480_MC_MAX_AGE _SB_MAKEMASK(4, S_BCM1480_MC_MAX_AGE) |
891 | #define V_BCM1480_MC_MAX_AGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_MAX_AGE) | 891 | #define V_BCM1480_MC_MAX_AGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_MAX_AGE) |
892 | #define G_BCM1480_MC_MAX_AGE(x) _SB_GETVALUE(x, S_BCM1480_MC_MAX_AGE, M_BCM1480_MC_MAX_AGE) | 892 | #define G_BCM1480_MC_MAX_AGE(x) _SB_GETVALUE(x, S_BCM1480_MC_MAX_AGE, M_BCM1480_MC_MAX_AGE) |
893 | 893 | ||
894 | #define M_BCM1480_MC_BERR_DISABLE _SB_MAKEMASK1(29) | 894 | #define M_BCM1480_MC_BERR_DISABLE _SB_MAKEMASK1(29) |
895 | #define M_BCM1480_MC_FORCE_SEQ _SB_MAKEMASK1(30) | 895 | #define M_BCM1480_MC_FORCE_SEQ _SB_MAKEMASK1(30) |
896 | #define M_BCM1480_MC_VGEN _SB_MAKEMASK1(32) | 896 | #define M_BCM1480_MC_VGEN _SB_MAKEMASK1(32) |
897 | 897 | ||
898 | #define S_BCM1480_MC_SLEW 33 | 898 | #define S_BCM1480_MC_SLEW 33 |
899 | #define M_BCM1480_MC_SLEW _SB_MAKEMASK(2, S_BCM1480_MC_SLEW) | 899 | #define M_BCM1480_MC_SLEW _SB_MAKEMASK(2, S_BCM1480_MC_SLEW) |
900 | #define V_BCM1480_MC_SLEW(x) _SB_MAKEVALUE(x, S_BCM1480_MC_SLEW) | 900 | #define V_BCM1480_MC_SLEW(x) _SB_MAKEVALUE(x, S_BCM1480_MC_SLEW) |
901 | #define G_BCM1480_MC_SLEW(x) _SB_GETVALUE(x, S_BCM1480_MC_SLEW, M_BCM1480_MC_SLEW) | 901 | #define G_BCM1480_MC_SLEW(x) _SB_GETVALUE(x, S_BCM1480_MC_SLEW, M_BCM1480_MC_SLEW) |
902 | 902 | ||
903 | #define M_BCM1480_MC_SSTL_VOLTAGE _SB_MAKEMASK1(35) | 903 | #define M_BCM1480_MC_SSTL_VOLTAGE _SB_MAKEMASK1(35) |
904 | 904 | ||
905 | /* | 905 | /* |
906 | * Global Channel Interleave Register (Table 100) | 906 | * Global Channel Interleave Register (Table 100) |
907 | */ | 907 | */ |
908 | 908 | ||
909 | #define S_BCM1480_MC_INTLV0 0 | 909 | #define S_BCM1480_MC_INTLV0 0 |
910 | #define M_BCM1480_MC_INTLV0 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV0) | 910 | #define M_BCM1480_MC_INTLV0 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV0) |
911 | #define V_BCM1480_MC_INTLV0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV0) | 911 | #define V_BCM1480_MC_INTLV0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV0) |
912 | #define G_BCM1480_MC_INTLV0(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV0, M_BCM1480_MC_INTLV0) | 912 | #define G_BCM1480_MC_INTLV0(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV0, M_BCM1480_MC_INTLV0) |
913 | 913 | ||
914 | #define S_BCM1480_MC_INTLV1 8 | 914 | #define S_BCM1480_MC_INTLV1 8 |
915 | #define M_BCM1480_MC_INTLV1 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV1) | 915 | #define M_BCM1480_MC_INTLV1 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV1) |
916 | #define V_BCM1480_MC_INTLV1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV1) | 916 | #define V_BCM1480_MC_INTLV1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV1) |
917 | #define G_BCM1480_MC_INTLV1(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV1, M_BCM1480_MC_INTLV1) | 917 | #define G_BCM1480_MC_INTLV1(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV1, M_BCM1480_MC_INTLV1) |
918 | 918 | ||
919 | #define S_BCM1480_MC_INTLV_MODE 16 | 919 | #define S_BCM1480_MC_INTLV_MODE 16 |
920 | #define M_BCM1480_MC_INTLV_MODE _SB_MAKEMASK(3, S_BCM1480_MC_INTLV_MODE) | 920 | #define M_BCM1480_MC_INTLV_MODE _SB_MAKEMASK(3, S_BCM1480_MC_INTLV_MODE) |
921 | #define V_BCM1480_MC_INTLV_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV_MODE) | 921 | #define V_BCM1480_MC_INTLV_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV_MODE) |
922 | #define G_BCM1480_MC_INTLV_MODE(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV_MODE, M_BCM1480_MC_INTLV_MODE) | 922 | #define G_BCM1480_MC_INTLV_MODE(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV_MODE, M_BCM1480_MC_INTLV_MODE) |
923 | 923 | ||
924 | #define K_BCM1480_MC_INTLV_MODE_NONE 0x0 | 924 | #define K_BCM1480_MC_INTLV_MODE_NONE 0x0 |
925 | #define K_BCM1480_MC_INTLV_MODE_01 0x1 | 925 | #define K_BCM1480_MC_INTLV_MODE_01 0x1 |
926 | #define K_BCM1480_MC_INTLV_MODE_23 0x2 | 926 | #define K_BCM1480_MC_INTLV_MODE_23 0x2 |
927 | #define K_BCM1480_MC_INTLV_MODE_01_23 0x3 | 927 | #define K_BCM1480_MC_INTLV_MODE_01_23 0x3 |
928 | #define K_BCM1480_MC_INTLV_MODE_0123 0x4 | 928 | #define K_BCM1480_MC_INTLV_MODE_0123 0x4 |
929 | 929 | ||
930 | #define V_BCM1480_MC_INTLV_MODE_NONE V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_NONE) | 930 | #define V_BCM1480_MC_INTLV_MODE_NONE V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_NONE) |
931 | #define V_BCM1480_MC_INTLV_MODE_01 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_01) | 931 | #define V_BCM1480_MC_INTLV_MODE_01 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_01) |
932 | #define V_BCM1480_MC_INTLV_MODE_23 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_23) | 932 | #define V_BCM1480_MC_INTLV_MODE_23 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_23) |
933 | #define V_BCM1480_MC_INTLV_MODE_01_23 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_01_23) | 933 | #define V_BCM1480_MC_INTLV_MODE_01_23 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_01_23) |
934 | #define V_BCM1480_MC_INTLV_MODE_0123 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_0123) | 934 | #define V_BCM1480_MC_INTLV_MODE_0123 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_0123) |
935 | 935 | ||
936 | /* | 936 | /* |
937 | * ECC Status Register | 937 | * ECC Status Register |
938 | */ | 938 | */ |
939 | 939 | ||
940 | #define S_BCM1480_MC_ECC_ERR_ADDR 0 | 940 | #define S_BCM1480_MC_ECC_ERR_ADDR 0 |
941 | #define M_BCM1480_MC_ECC_ERR_ADDR _SB_MAKEMASK(37, S_BCM1480_MC_ECC_ERR_ADDR) | 941 | #define M_BCM1480_MC_ECC_ERR_ADDR _SB_MAKEMASK(37, S_BCM1480_MC_ECC_ERR_ADDR) |
942 | #define V_BCM1480_MC_ECC_ERR_ADDR(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ECC_ERR_ADDR) | 942 | #define V_BCM1480_MC_ECC_ERR_ADDR(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ECC_ERR_ADDR) |
943 | #define G_BCM1480_MC_ECC_ERR_ADDR(x) _SB_GETVALUE(x, S_BCM1480_MC_ECC_ERR_ADDR, M_BCM1480_MC_ECC_ERR_ADDR) | 943 | #define G_BCM1480_MC_ECC_ERR_ADDR(x) _SB_GETVALUE(x, S_BCM1480_MC_ECC_ERR_ADDR, M_BCM1480_MC_ECC_ERR_ADDR) |
944 | 944 | ||
945 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 945 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
946 | #define M_BCM1480_MC_ECC_ERR_RMW _SB_MAKEMASK1(60) | 946 | #define M_BCM1480_MC_ECC_ERR_RMW _SB_MAKEMASK1(60) |
947 | #endif | 947 | #endif |
948 | 948 | ||
949 | #define M_BCM1480_MC_ECC_MULT_ERR_DET _SB_MAKEMASK1(61) | 949 | #define M_BCM1480_MC_ECC_MULT_ERR_DET _SB_MAKEMASK1(61) |
950 | #define M_BCM1480_MC_ECC_UERR_DET _SB_MAKEMASK1(62) | 950 | #define M_BCM1480_MC_ECC_UERR_DET _SB_MAKEMASK1(62) |
951 | #define M_BCM1480_MC_ECC_CERR_DET _SB_MAKEMASK1(63) | 951 | #define M_BCM1480_MC_ECC_CERR_DET _SB_MAKEMASK1(63) |
952 | 952 | ||
953 | /* | 953 | /* |
954 | * Global ECC Address Register (Table 102) | 954 | * Global ECC Address Register (Table 102) |
955 | */ | 955 | */ |
956 | 956 | ||
957 | #define S_BCM1480_MC_ECC_CORR_ADDR 0 | 957 | #define S_BCM1480_MC_ECC_CORR_ADDR 0 |
958 | #define M_BCM1480_MC_ECC_CORR_ADDR _SB_MAKEMASK(37, S_BCM1480_MC_ECC_CORR_ADDR) | 958 | #define M_BCM1480_MC_ECC_CORR_ADDR _SB_MAKEMASK(37, S_BCM1480_MC_ECC_CORR_ADDR) |
959 | #define V_BCM1480_MC_ECC_CORR_ADDR(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ECC_CORR_ADDR) | 959 | #define V_BCM1480_MC_ECC_CORR_ADDR(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ECC_CORR_ADDR) |
960 | #define G_BCM1480_MC_ECC_CORR_ADDR(x) _SB_GETVALUE(x, S_BCM1480_MC_ECC_CORR_ADDR, M_BCM1480_MC_ECC_CORR_ADDR) | 960 | #define G_BCM1480_MC_ECC_CORR_ADDR(x) _SB_GETVALUE(x, S_BCM1480_MC_ECC_CORR_ADDR, M_BCM1480_MC_ECC_CORR_ADDR) |
961 | 961 | ||
962 | /* | 962 | /* |
963 | * Global ECC Correction Register (Table 103) | 963 | * Global ECC Correction Register (Table 103) |
964 | */ | 964 | */ |
965 | 965 | ||
966 | #define S_BCM1480_MC_ECC_CORRECT 0 | 966 | #define S_BCM1480_MC_ECC_CORRECT 0 |
967 | #define M_BCM1480_MC_ECC_CORRECT _SB_MAKEMASK(64, S_BCM1480_MC_ECC_CORRECT) | 967 | #define M_BCM1480_MC_ECC_CORRECT _SB_MAKEMASK(64, S_BCM1480_MC_ECC_CORRECT) |
968 | #define V_BCM1480_MC_ECC_CORRECT(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ECC_CORRECT) | 968 | #define V_BCM1480_MC_ECC_CORRECT(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ECC_CORRECT) |
969 | #define G_BCM1480_MC_ECC_CORRECT(x) _SB_GETVALUE(x, S_BCM1480_MC_ECC_CORRECT, M_BCM1480_MC_ECC_CORRECT) | 969 | #define G_BCM1480_MC_ECC_CORRECT(x) _SB_GETVALUE(x, S_BCM1480_MC_ECC_CORRECT, M_BCM1480_MC_ECC_CORRECT) |
970 | 970 | ||
971 | /* | 971 | /* |
972 | * Global ECC Performance Counters Control Register (Table 104) | 972 | * Global ECC Performance Counters Control Register (Table 104) |
973 | */ | 973 | */ |
974 | 974 | ||
975 | #define S_BCM1480_MC_CHANNEL_SELECT 0 | 975 | #define S_BCM1480_MC_CHANNEL_SELECT 0 |
976 | #define M_BCM1480_MC_CHANNEL_SELECT _SB_MAKEMASK(4, S_BCM1480_MC_CHANNEL_SELECT) | 976 | #define M_BCM1480_MC_CHANNEL_SELECT _SB_MAKEMASK(4, S_BCM1480_MC_CHANNEL_SELECT) |
977 | #define V_BCM1480_MC_CHANNEL_SELECT(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CHANNEL_SELECT) | 977 | #define V_BCM1480_MC_CHANNEL_SELECT(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CHANNEL_SELECT) |
978 | #define G_BCM1480_MC_CHANNEL_SELECT(x) _SB_GETVALUE(x, S_BCM1480_MC_CHANNEL_SELECT, M_BCM1480_MC_CHANNEL_SELECT) | 978 | #define G_BCM1480_MC_CHANNEL_SELECT(x) _SB_GETVALUE(x, S_BCM1480_MC_CHANNEL_SELECT, M_BCM1480_MC_CHANNEL_SELECT) |
979 | #define K_BCM1480_MC_CHANNEL_SELECT_0 0x1 | 979 | #define K_BCM1480_MC_CHANNEL_SELECT_0 0x1 |
980 | #define K_BCM1480_MC_CHANNEL_SELECT_1 0x2 | 980 | #define K_BCM1480_MC_CHANNEL_SELECT_1 0x2 |
981 | #define K_BCM1480_MC_CHANNEL_SELECT_2 0x4 | 981 | #define K_BCM1480_MC_CHANNEL_SELECT_2 0x4 |
982 | #define K_BCM1480_MC_CHANNEL_SELECT_3 0x8 | 982 | #define K_BCM1480_MC_CHANNEL_SELECT_3 0x8 |
983 | 983 | ||
984 | #endif /* _BCM1480_MC_H */ | 984 | #endif /* _BCM1480_MC_H */ |
diff --git a/arch/mips/include/asm/sibyte/bcm1480_regs.h b/arch/mips/include/asm/sibyte/bcm1480_regs.h index 84d168ddfebb..ec0dacf6f0cb 100644 --- a/arch/mips/include/asm/sibyte/bcm1480_regs.h +++ b/arch/mips/include/asm/sibyte/bcm1480_regs.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * BCM1255/BCM1280/BCM1455/BCM1480 Board Support Package | 2 | * BCM1255/BCM1280/BCM1455/BCM1480 Board Support Package |
3 | * | 3 | * |
4 | * Register Definitions File: bcm1480_regs.h | 4 | * Register Definitions File: bcm1480_regs.h |
5 | * | 5 | * |
6 | * This module contains the addresses of the on-chip peripherals | 6 | * This module contains the addresses of the on-chip peripherals |
7 | * on the BCM1280 and BCM1480. | 7 | * on the BCM1280 and BCM1480. |
@@ -80,48 +80,48 @@ | |||
80 | * Memory Controller Registers (Section 6) | 80 | * Memory Controller Registers (Section 6) |
81 | ********************************************************************* */ | 81 | ********************************************************************* */ |
82 | 82 | ||
83 | #define A_BCM1480_MC_BASE_0 0x0010050000 | 83 | #define A_BCM1480_MC_BASE_0 0x0010050000 |
84 | #define A_BCM1480_MC_BASE_1 0x0010051000 | 84 | #define A_BCM1480_MC_BASE_1 0x0010051000 |
85 | #define A_BCM1480_MC_BASE_2 0x0010052000 | 85 | #define A_BCM1480_MC_BASE_2 0x0010052000 |
86 | #define A_BCM1480_MC_BASE_3 0x0010053000 | 86 | #define A_BCM1480_MC_BASE_3 0x0010053000 |
87 | #define BCM1480_MC_REGISTER_SPACING 0x1000 | 87 | #define BCM1480_MC_REGISTER_SPACING 0x1000 |
88 | 88 | ||
89 | #define A_BCM1480_MC_BASE(ctlid) (A_BCM1480_MC_BASE_0+(ctlid)*BCM1480_MC_REGISTER_SPACING) | 89 | #define A_BCM1480_MC_BASE(ctlid) (A_BCM1480_MC_BASE_0+(ctlid)*BCM1480_MC_REGISTER_SPACING) |
90 | #define A_BCM1480_MC_REGISTER(ctlid, reg) (A_BCM1480_MC_BASE(ctlid)+(reg)) | 90 | #define A_BCM1480_MC_REGISTER(ctlid, reg) (A_BCM1480_MC_BASE(ctlid)+(reg)) |
91 | 91 | ||
92 | #define R_BCM1480_MC_CONFIG 0x0000000100 | 92 | #define R_BCM1480_MC_CONFIG 0x0000000100 |
93 | #define R_BCM1480_MC_CS_START 0x0000000120 | 93 | #define R_BCM1480_MC_CS_START 0x0000000120 |
94 | #define R_BCM1480_MC_CS_END 0x0000000140 | 94 | #define R_BCM1480_MC_CS_END 0x0000000140 |
95 | #define S_BCM1480_MC_CS_STARTEND 24 | 95 | #define S_BCM1480_MC_CS_STARTEND 24 |
96 | 96 | ||
97 | #define R_BCM1480_MC_CS01_ROW0 0x0000000180 | 97 | #define R_BCM1480_MC_CS01_ROW0 0x0000000180 |
98 | #define R_BCM1480_MC_CS01_ROW1 0x00000001A0 | 98 | #define R_BCM1480_MC_CS01_ROW1 0x00000001A0 |
99 | #define R_BCM1480_MC_CS23_ROW0 0x0000000200 | 99 | #define R_BCM1480_MC_CS23_ROW0 0x0000000200 |
100 | #define R_BCM1480_MC_CS23_ROW1 0x0000000220 | 100 | #define R_BCM1480_MC_CS23_ROW1 0x0000000220 |
101 | #define R_BCM1480_MC_CS01_COL0 0x0000000280 | 101 | #define R_BCM1480_MC_CS01_COL0 0x0000000280 |
102 | #define R_BCM1480_MC_CS01_COL1 0x00000002A0 | 102 | #define R_BCM1480_MC_CS01_COL1 0x00000002A0 |
103 | #define R_BCM1480_MC_CS23_COL0 0x0000000300 | 103 | #define R_BCM1480_MC_CS23_COL0 0x0000000300 |
104 | #define R_BCM1480_MC_CS23_COL1 0x0000000320 | 104 | #define R_BCM1480_MC_CS23_COL1 0x0000000320 |
105 | 105 | ||
106 | #define R_BCM1480_MC_CSX_BASE 0x0000000180 | 106 | #define R_BCM1480_MC_CSX_BASE 0x0000000180 |
107 | #define R_BCM1480_MC_CSX_ROW0 0x0000000000 /* relative to CSX_BASE */ | 107 | #define R_BCM1480_MC_CSX_ROW0 0x0000000000 /* relative to CSX_BASE */ |
108 | #define R_BCM1480_MC_CSX_ROW1 0x0000000020 /* relative to CSX_BASE */ | 108 | #define R_BCM1480_MC_CSX_ROW1 0x0000000020 /* relative to CSX_BASE */ |
109 | #define R_BCM1480_MC_CSX_COL0 0x0000000100 /* relative to CSX_BASE */ | 109 | #define R_BCM1480_MC_CSX_COL0 0x0000000100 /* relative to CSX_BASE */ |
110 | #define R_BCM1480_MC_CSX_COL1 0x0000000120 /* relative to CSX_BASE */ | 110 | #define R_BCM1480_MC_CSX_COL1 0x0000000120 /* relative to CSX_BASE */ |
111 | #define BCM1480_MC_CSX_SPACING 0x0000000080 /* CS23 relative to CS01 */ | 111 | #define BCM1480_MC_CSX_SPACING 0x0000000080 /* CS23 relative to CS01 */ |
112 | 112 | ||
113 | #define R_BCM1480_MC_CS01_BA 0x0000000380 | 113 | #define R_BCM1480_MC_CS01_BA 0x0000000380 |
114 | #define R_BCM1480_MC_CS23_BA 0x00000003A0 | 114 | #define R_BCM1480_MC_CS23_BA 0x00000003A0 |
115 | #define R_BCM1480_MC_DRAMCMD 0x0000000400 | 115 | #define R_BCM1480_MC_DRAMCMD 0x0000000400 |
116 | #define R_BCM1480_MC_DRAMMODE 0x0000000420 | 116 | #define R_BCM1480_MC_DRAMMODE 0x0000000420 |
117 | #define R_BCM1480_MC_CLOCK_CFG 0x0000000440 | 117 | #define R_BCM1480_MC_CLOCK_CFG 0x0000000440 |
118 | #define R_BCM1480_MC_MCLK_CFG R_BCM1480_MC_CLOCK_CFG | 118 | #define R_BCM1480_MC_MCLK_CFG R_BCM1480_MC_CLOCK_CFG |
119 | #define R_BCM1480_MC_TEST_DATA 0x0000000480 | 119 | #define R_BCM1480_MC_TEST_DATA 0x0000000480 |
120 | #define R_BCM1480_MC_TEST_ECC 0x00000004A0 | 120 | #define R_BCM1480_MC_TEST_ECC 0x00000004A0 |
121 | #define R_BCM1480_MC_TIMING1 0x00000004C0 | 121 | #define R_BCM1480_MC_TIMING1 0x00000004C0 |
122 | #define R_BCM1480_MC_TIMING2 0x00000004E0 | 122 | #define R_BCM1480_MC_TIMING2 0x00000004E0 |
123 | #define R_BCM1480_MC_DLL_CFG 0x0000000500 | 123 | #define R_BCM1480_MC_DLL_CFG 0x0000000500 |
124 | #define R_BCM1480_MC_DRIVE_CFG 0x0000000520 | 124 | #define R_BCM1480_MC_DRIVE_CFG 0x0000000520 |
125 | 125 | ||
126 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 126 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
127 | #define R_BCM1480_MC_ODT 0x0000000460 | 127 | #define R_BCM1480_MC_ODT 0x0000000460 |
@@ -129,55 +129,55 @@ | |||
129 | #endif | 129 | #endif |
130 | 130 | ||
131 | /* Global registers (single instance) */ | 131 | /* Global registers (single instance) */ |
132 | #define A_BCM1480_MC_GLB_CONFIG 0x0010054100 | 132 | #define A_BCM1480_MC_GLB_CONFIG 0x0010054100 |
133 | #define A_BCM1480_MC_GLB_INTLV 0x0010054120 | 133 | #define A_BCM1480_MC_GLB_INTLV 0x0010054120 |
134 | #define A_BCM1480_MC_GLB_ECC_STATUS 0x0010054140 | 134 | #define A_BCM1480_MC_GLB_ECC_STATUS 0x0010054140 |
135 | #define A_BCM1480_MC_GLB_ECC_ADDR 0x0010054160 | 135 | #define A_BCM1480_MC_GLB_ECC_ADDR 0x0010054160 |
136 | #define A_BCM1480_MC_GLB_ECC_CORRECT 0x0010054180 | 136 | #define A_BCM1480_MC_GLB_ECC_CORRECT 0x0010054180 |
137 | #define A_BCM1480_MC_GLB_PERF_CNT_CONTROL 0x00100541A0 | 137 | #define A_BCM1480_MC_GLB_PERF_CNT_CONTROL 0x00100541A0 |
138 | 138 | ||
139 | /* ********************************************************************* | 139 | /* ********************************************************************* |
140 | * L2 Cache Control Registers (Section 5) | 140 | * L2 Cache Control Registers (Section 5) |
141 | ********************************************************************* */ | 141 | ********************************************************************* */ |
142 | 142 | ||
143 | #define A_BCM1480_L2_BASE 0x0010040000 | 143 | #define A_BCM1480_L2_BASE 0x0010040000 |
144 | 144 | ||
145 | #define A_BCM1480_L2_READ_TAG 0x0010040018 | 145 | #define A_BCM1480_L2_READ_TAG 0x0010040018 |
146 | #define A_BCM1480_L2_ECC_TAG 0x0010040038 | 146 | #define A_BCM1480_L2_ECC_TAG 0x0010040038 |
147 | #define A_BCM1480_L2_MISC0_VALUE 0x0010040058 | 147 | #define A_BCM1480_L2_MISC0_VALUE 0x0010040058 |
148 | #define A_BCM1480_L2_MISC1_VALUE 0x0010040078 | 148 | #define A_BCM1480_L2_MISC1_VALUE 0x0010040078 |
149 | #define A_BCM1480_L2_MISC2_VALUE 0x0010040098 | 149 | #define A_BCM1480_L2_MISC2_VALUE 0x0010040098 |
150 | #define A_BCM1480_L2_MISC_CONFIG 0x0010040040 /* x040 */ | 150 | #define A_BCM1480_L2_MISC_CONFIG 0x0010040040 /* x040 */ |
151 | #define A_BCM1480_L2_CACHE_DISABLE 0x0010040060 /* x060 */ | 151 | #define A_BCM1480_L2_CACHE_DISABLE 0x0010040060 /* x060 */ |
152 | #define A_BCM1480_L2_MAKECACHEDISABLE(x) (A_BCM1480_L2_CACHE_DISABLE | (((x)&0xF) << 12)) | 152 | #define A_BCM1480_L2_MAKECACHEDISABLE(x) (A_BCM1480_L2_CACHE_DISABLE | (((x)&0xF) << 12)) |
153 | #define A_BCM1480_L2_WAY_ENABLE_3_0 0x0010040080 /* x080 */ | 153 | #define A_BCM1480_L2_WAY_ENABLE_3_0 0x0010040080 /* x080 */ |
154 | #define A_BCM1480_L2_WAY_ENABLE_7_4 0x00100400A0 /* x0A0 */ | 154 | #define A_BCM1480_L2_WAY_ENABLE_7_4 0x00100400A0 /* x0A0 */ |
155 | #define A_BCM1480_L2_MAKE_WAY_ENABLE_LO(x) (A_BCM1480_L2_WAY_ENABLE_3_0 | (((x)&0xF) << 12)) | 155 | #define A_BCM1480_L2_MAKE_WAY_ENABLE_LO(x) (A_BCM1480_L2_WAY_ENABLE_3_0 | (((x)&0xF) << 12)) |
156 | #define A_BCM1480_L2_MAKE_WAY_ENABLE_HI(x) (A_BCM1480_L2_WAY_ENABLE_7_4 | (((x)&0xF) << 12)) | 156 | #define A_BCM1480_L2_MAKE_WAY_ENABLE_HI(x) (A_BCM1480_L2_WAY_ENABLE_7_4 | (((x)&0xF) << 12)) |
157 | #define A_BCM1480_L2_MAKE_WAY_DISABLE_LO(x) (A_BCM1480_L2_WAY_ENABLE_3_0 | (((~x)&0xF) << 12)) | 157 | #define A_BCM1480_L2_MAKE_WAY_DISABLE_LO(x) (A_BCM1480_L2_WAY_ENABLE_3_0 | (((~x)&0xF) << 12)) |
158 | #define A_BCM1480_L2_MAKE_WAY_DISABLE_HI(x) (A_BCM1480_L2_WAY_ENABLE_7_4 | (((~x)&0xF) << 12)) | 158 | #define A_BCM1480_L2_MAKE_WAY_DISABLE_HI(x) (A_BCM1480_L2_WAY_ENABLE_7_4 | (((~x)&0xF) << 12)) |
159 | #define A_BCM1480_L2_WAY_LOCAL_3_0 0x0010040100 /* x100 */ | 159 | #define A_BCM1480_L2_WAY_LOCAL_3_0 0x0010040100 /* x100 */ |
160 | #define A_BCM1480_L2_WAY_LOCAL_7_4 0x0010040120 /* x120 */ | 160 | #define A_BCM1480_L2_WAY_LOCAL_7_4 0x0010040120 /* x120 */ |
161 | #define A_BCM1480_L2_WAY_REMOTE_3_0 0x0010040140 /* x140 */ | 161 | #define A_BCM1480_L2_WAY_REMOTE_3_0 0x0010040140 /* x140 */ |
162 | #define A_BCM1480_L2_WAY_REMOTE_7_4 0x0010040160 /* x160 */ | 162 | #define A_BCM1480_L2_WAY_REMOTE_7_4 0x0010040160 /* x160 */ |
163 | #define A_BCM1480_L2_WAY_AGENT_3_0 0x00100400C0 /* xxC0 */ | 163 | #define A_BCM1480_L2_WAY_AGENT_3_0 0x00100400C0 /* xxC0 */ |
164 | #define A_BCM1480_L2_WAY_AGENT_7_4 0x00100400E0 /* xxE0 */ | 164 | #define A_BCM1480_L2_WAY_AGENT_7_4 0x00100400E0 /* xxE0 */ |
165 | #define A_BCM1480_L2_WAY_ENABLE(A, banks) (A | (((~(banks))&0x0F) << 8)) | 165 | #define A_BCM1480_L2_WAY_ENABLE(A, banks) (A | (((~(banks))&0x0F) << 8)) |
166 | #define A_BCM1480_L2_BANK_BASE 0x00D0300000 | 166 | #define A_BCM1480_L2_BANK_BASE 0x00D0300000 |
167 | #define A_BCM1480_L2_BANK_ADDRESS(b) (A_BCM1480_L2_BANK_BASE | (((b)&0x7)<<17)) | 167 | #define A_BCM1480_L2_BANK_ADDRESS(b) (A_BCM1480_L2_BANK_BASE | (((b)&0x7)<<17)) |
168 | #define A_BCM1480_L2_MGMT_TAG_BASE 0x00D0000000 | 168 | #define A_BCM1480_L2_MGMT_TAG_BASE 0x00D0000000 |
169 | 169 | ||
170 | 170 | ||
171 | /* ********************************************************************* | 171 | /* ********************************************************************* |
172 | * PCI-X Interface Registers (Section 7) | 172 | * PCI-X Interface Registers (Section 7) |
173 | ********************************************************************* */ | 173 | ********************************************************************* */ |
174 | 174 | ||
175 | #define A_BCM1480_PCI_BASE 0x0010061400 | 175 | #define A_BCM1480_PCI_BASE 0x0010061400 |
176 | 176 | ||
177 | #define A_BCM1480_PCI_RESET 0x0010061400 | 177 | #define A_BCM1480_PCI_RESET 0x0010061400 |
178 | #define A_BCM1480_PCI_DLL 0x0010061500 | 178 | #define A_BCM1480_PCI_DLL 0x0010061500 |
179 | 179 | ||
180 | #define A_BCM1480_PCI_TYPE00_HEADER 0x002E000000 | 180 | #define A_BCM1480_PCI_TYPE00_HEADER 0x002E000000 |
181 | 181 | ||
182 | /* ********************************************************************* | 182 | /* ********************************************************************* |
183 | * Ethernet MAC Registers (Section 11) and DMA Registers (Section 10.6) | 183 | * Ethernet MAC Registers (Section 11) and DMA Registers (Section 10.6) |
@@ -185,19 +185,19 @@ | |||
185 | 185 | ||
186 | /* No register changes with Rev.C BCM1250, but one additional MAC */ | 186 | /* No register changes with Rev.C BCM1250, but one additional MAC */ |
187 | 187 | ||
188 | #define A_BCM1480_MAC_BASE_2 0x0010066000 | 188 | #define A_BCM1480_MAC_BASE_2 0x0010066000 |
189 | 189 | ||
190 | #ifndef A_MAC_BASE_2 | 190 | #ifndef A_MAC_BASE_2 |
191 | #define A_MAC_BASE_2 A_BCM1480_MAC_BASE_2 | 191 | #define A_MAC_BASE_2 A_BCM1480_MAC_BASE_2 |
192 | #endif | 192 | #endif |
193 | 193 | ||
194 | #define A_BCM1480_MAC_BASE_3 0x0010067000 | 194 | #define A_BCM1480_MAC_BASE_3 0x0010067000 |
195 | #define A_MAC_BASE_3 A_BCM1480_MAC_BASE_3 | 195 | #define A_MAC_BASE_3 A_BCM1480_MAC_BASE_3 |
196 | 196 | ||
197 | #define R_BCM1480_MAC_DMA_OODPKTLOST 0x00000038 | 197 | #define R_BCM1480_MAC_DMA_OODPKTLOST 0x00000038 |
198 | 198 | ||
199 | #ifndef R_MAC_DMA_OODPKTLOST | 199 | #ifndef R_MAC_DMA_OODPKTLOST |
200 | #define R_MAC_DMA_OODPKTLOST R_BCM1480_MAC_DMA_OODPKTLOST | 200 | #define R_MAC_DMA_OODPKTLOST R_BCM1480_MAC_DMA_OODPKTLOST |
201 | #endif | 201 | #endif |
202 | 202 | ||
203 | 203 | ||
@@ -208,18 +208,18 @@ | |||
208 | /* No significant differences from BCM1250, two DUARTs */ | 208 | /* No significant differences from BCM1250, two DUARTs */ |
209 | 209 | ||
210 | /* Conventions, per user manual: | 210 | /* Conventions, per user manual: |
211 | * DUART generic, channels A,B,C,D | 211 | * DUART generic, channels A,B,C,D |
212 | * DUART0 implementing channels A,B | 212 | * DUART0 implementing channels A,B |
213 | * DUART1 inplementing channels C,D | 213 | * DUART1 inplementing channels C,D |
214 | */ | 214 | */ |
215 | 215 | ||
216 | #define BCM1480_DUART_NUM_PORTS 4 | 216 | #define BCM1480_DUART_NUM_PORTS 4 |
217 | 217 | ||
218 | #define A_BCM1480_DUART0 0x0010060000 | 218 | #define A_BCM1480_DUART0 0x0010060000 |
219 | #define A_BCM1480_DUART1 0x0010060400 | 219 | #define A_BCM1480_DUART1 0x0010060400 |
220 | #define A_BCM1480_DUART(chan) ((((chan)&2) == 0)? A_BCM1480_DUART0 : A_BCM1480_DUART1) | 220 | #define A_BCM1480_DUART(chan) ((((chan)&2) == 0)? A_BCM1480_DUART0 : A_BCM1480_DUART1) |
221 | 221 | ||
222 | #define BCM1480_DUART_CHANREG_SPACING 0x100 | 222 | #define BCM1480_DUART_CHANREG_SPACING 0x100 |
223 | #define A_BCM1480_DUART_CHANREG(chan, reg) \ | 223 | #define A_BCM1480_DUART_CHANREG(chan, reg) \ |
224 | (A_BCM1480_DUART(chan) + \ | 224 | (A_BCM1480_DUART(chan) + \ |
225 | BCM1480_DUART_CHANREG_SPACING * (((chan) & 1) + 1) + (reg)) | 225 | BCM1480_DUART_CHANREG_SPACING * (((chan) & 1) + 1) + (reg)) |
@@ -249,43 +249,43 @@ | |||
249 | * These constants are the absolute addresses. | 249 | * These constants are the absolute addresses. |
250 | */ | 250 | */ |
251 | 251 | ||
252 | #define A_BCM1480_DUART_MODE_REG_1_C 0x0010060400 | 252 | #define A_BCM1480_DUART_MODE_REG_1_C 0x0010060400 |
253 | #define A_BCM1480_DUART_MODE_REG_2_C 0x0010060410 | 253 | #define A_BCM1480_DUART_MODE_REG_2_C 0x0010060410 |
254 | #define A_BCM1480_DUART_STATUS_C 0x0010060420 | 254 | #define A_BCM1480_DUART_STATUS_C 0x0010060420 |
255 | #define A_BCM1480_DUART_CLK_SEL_C 0x0010060430 | 255 | #define A_BCM1480_DUART_CLK_SEL_C 0x0010060430 |
256 | #define A_BCM1480_DUART_FULL_CTL_C 0x0010060440 | 256 | #define A_BCM1480_DUART_FULL_CTL_C 0x0010060440 |
257 | #define A_BCM1480_DUART_CMD_C 0x0010060450 | 257 | #define A_BCM1480_DUART_CMD_C 0x0010060450 |
258 | #define A_BCM1480_DUART_RX_HOLD_C 0x0010060460 | 258 | #define A_BCM1480_DUART_RX_HOLD_C 0x0010060460 |
259 | #define A_BCM1480_DUART_TX_HOLD_C 0x0010060470 | 259 | #define A_BCM1480_DUART_TX_HOLD_C 0x0010060470 |
260 | #define A_BCM1480_DUART_OPCR_C 0x0010060480 | 260 | #define A_BCM1480_DUART_OPCR_C 0x0010060480 |
261 | #define A_BCM1480_DUART_AUX_CTRL_C 0x0010060490 | 261 | #define A_BCM1480_DUART_AUX_CTRL_C 0x0010060490 |
262 | 262 | ||
263 | #define A_BCM1480_DUART_MODE_REG_1_D 0x0010060500 | 263 | #define A_BCM1480_DUART_MODE_REG_1_D 0x0010060500 |
264 | #define A_BCM1480_DUART_MODE_REG_2_D 0x0010060510 | 264 | #define A_BCM1480_DUART_MODE_REG_2_D 0x0010060510 |
265 | #define A_BCM1480_DUART_STATUS_D 0x0010060520 | 265 | #define A_BCM1480_DUART_STATUS_D 0x0010060520 |
266 | #define A_BCM1480_DUART_CLK_SEL_D 0x0010060530 | 266 | #define A_BCM1480_DUART_CLK_SEL_D 0x0010060530 |
267 | #define A_BCM1480_DUART_FULL_CTL_D 0x0010060540 | 267 | #define A_BCM1480_DUART_FULL_CTL_D 0x0010060540 |
268 | #define A_BCM1480_DUART_CMD_D 0x0010060550 | 268 | #define A_BCM1480_DUART_CMD_D 0x0010060550 |
269 | #define A_BCM1480_DUART_RX_HOLD_D 0x0010060560 | 269 | #define A_BCM1480_DUART_RX_HOLD_D 0x0010060560 |
270 | #define A_BCM1480_DUART_TX_HOLD_D 0x0010060570 | 270 | #define A_BCM1480_DUART_TX_HOLD_D 0x0010060570 |
271 | #define A_BCM1480_DUART_OPCR_D 0x0010060580 | 271 | #define A_BCM1480_DUART_OPCR_D 0x0010060580 |
272 | #define A_BCM1480_DUART_AUX_CTRL_D 0x0010060590 | 272 | #define A_BCM1480_DUART_AUX_CTRL_D 0x0010060590 |
273 | 273 | ||
274 | #define A_BCM1480_DUART_INPORT_CHNG_CD 0x0010060600 | 274 | #define A_BCM1480_DUART_INPORT_CHNG_CD 0x0010060600 |
275 | #define A_BCM1480_DUART_AUX_CTRL_CD 0x0010060610 | 275 | #define A_BCM1480_DUART_AUX_CTRL_CD 0x0010060610 |
276 | #define A_BCM1480_DUART_ISR_C 0x0010060620 | 276 | #define A_BCM1480_DUART_ISR_C 0x0010060620 |
277 | #define A_BCM1480_DUART_IMR_C 0x0010060630 | 277 | #define A_BCM1480_DUART_IMR_C 0x0010060630 |
278 | #define A_BCM1480_DUART_ISR_D 0x0010060640 | 278 | #define A_BCM1480_DUART_ISR_D 0x0010060640 |
279 | #define A_BCM1480_DUART_IMR_D 0x0010060650 | 279 | #define A_BCM1480_DUART_IMR_D 0x0010060650 |
280 | #define A_BCM1480_DUART_OUT_PORT_CD 0x0010060660 | 280 | #define A_BCM1480_DUART_OUT_PORT_CD 0x0010060660 |
281 | #define A_BCM1480_DUART_OPCR_CD 0x0010060670 | 281 | #define A_BCM1480_DUART_OPCR_CD 0x0010060670 |
282 | #define A_BCM1480_DUART_IN_PORT_CD 0x0010060680 | 282 | #define A_BCM1480_DUART_IN_PORT_CD 0x0010060680 |
283 | #define A_BCM1480_DUART_ISR_CD 0x0010060690 | 283 | #define A_BCM1480_DUART_ISR_CD 0x0010060690 |
284 | #define A_BCM1480_DUART_IMR_CD 0x00100606A0 | 284 | #define A_BCM1480_DUART_IMR_CD 0x00100606A0 |
285 | #define A_BCM1480_DUART_SET_OPR_CD 0x00100606B0 | 285 | #define A_BCM1480_DUART_SET_OPR_CD 0x00100606B0 |
286 | #define A_BCM1480_DUART_CLEAR_OPR_CD 0x00100606C0 | 286 | #define A_BCM1480_DUART_CLEAR_OPR_CD 0x00100606C0 |
287 | #define A_BCM1480_DUART_INPORT_CHNG_C 0x00100606D0 | 287 | #define A_BCM1480_DUART_INPORT_CHNG_C 0x00100606D0 |
288 | #define A_BCM1480_DUART_INPORT_CHNG_D 0x00100606E0 | 288 | #define A_BCM1480_DUART_INPORT_CHNG_D 0x00100606E0 |
289 | 289 | ||
290 | 290 | ||
291 | /* ********************************************************************* | 291 | /* ********************************************************************* |
@@ -301,8 +301,8 @@ | |||
301 | 301 | ||
302 | /* One additional GPIO register, placed _before_ the BCM1250's GPIO block base */ | 302 | /* One additional GPIO register, placed _before_ the BCM1250's GPIO block base */ |
303 | 303 | ||
304 | #define A_BCM1480_GPIO_INT_ADD_TYPE 0x0010061A78 | 304 | #define A_BCM1480_GPIO_INT_ADD_TYPE 0x0010061A78 |
305 | #define R_BCM1480_GPIO_INT_ADD_TYPE (-8) | 305 | #define R_BCM1480_GPIO_INT_ADD_TYPE (-8) |
306 | 306 | ||
307 | #define A_GPIO_INT_ADD_TYPE A_BCM1480_GPIO_INT_ADD_TYPE | 307 | #define A_GPIO_INT_ADD_TYPE A_BCM1480_GPIO_INT_ADD_TYPE |
308 | #define R_GPIO_INT_ADD_TYPE R_BCM1480_GPIO_INT_ADD_TYPE | 308 | #define R_GPIO_INT_ADD_TYPE R_BCM1480_GPIO_INT_ADD_TYPE |
@@ -321,30 +321,30 @@ | |||
321 | 321 | ||
322 | /* Watchdog timers */ | 322 | /* Watchdog timers */ |
323 | 323 | ||
324 | #define A_BCM1480_SCD_WDOG_2 0x0010022050 | 324 | #define A_BCM1480_SCD_WDOG_2 0x0010022050 |
325 | #define A_BCM1480_SCD_WDOG_3 0x0010022150 | 325 | #define A_BCM1480_SCD_WDOG_3 0x0010022150 |
326 | 326 | ||
327 | #define BCM1480_SCD_NUM_WDOGS 4 | 327 | #define BCM1480_SCD_NUM_WDOGS 4 |
328 | 328 | ||
329 | #define A_BCM1480_SCD_WDOG_BASE(w) (A_BCM1480_SCD_WDOG_0+((w)&2)*0x1000 + ((w)&1)*0x100) | 329 | #define A_BCM1480_SCD_WDOG_BASE(w) (A_BCM1480_SCD_WDOG_0+((w)&2)*0x1000 + ((w)&1)*0x100) |
330 | #define A_BCM1480_SCD_WDOG_REGISTER(w, r) (A_BCM1480_SCD_WDOG_BASE(w) + (r)) | 330 | #define A_BCM1480_SCD_WDOG_REGISTER(w, r) (A_BCM1480_SCD_WDOG_BASE(w) + (r)) |
331 | 331 | ||
332 | #define A_BCM1480_SCD_WDOG_INIT_2 0x0010022050 | 332 | #define A_BCM1480_SCD_WDOG_INIT_2 0x0010022050 |
333 | #define A_BCM1480_SCD_WDOG_CNT_2 0x0010022058 | 333 | #define A_BCM1480_SCD_WDOG_CNT_2 0x0010022058 |
334 | #define A_BCM1480_SCD_WDOG_CFG_2 0x0010022060 | 334 | #define A_BCM1480_SCD_WDOG_CFG_2 0x0010022060 |
335 | 335 | ||
336 | #define A_BCM1480_SCD_WDOG_INIT_3 0x0010022150 | 336 | #define A_BCM1480_SCD_WDOG_INIT_3 0x0010022150 |
337 | #define A_BCM1480_SCD_WDOG_CNT_3 0x0010022158 | 337 | #define A_BCM1480_SCD_WDOG_CNT_3 0x0010022158 |
338 | #define A_BCM1480_SCD_WDOG_CFG_3 0x0010022160 | 338 | #define A_BCM1480_SCD_WDOG_CFG_3 0x0010022160 |
339 | 339 | ||
340 | /* BCM1480 has two additional compare registers */ | 340 | /* BCM1480 has two additional compare registers */ |
341 | 341 | ||
342 | #define A_BCM1480_SCD_ZBBUS_CYCLE_COUNT A_SCD_ZBBUS_CYCLE_COUNT | 342 | #define A_BCM1480_SCD_ZBBUS_CYCLE_COUNT A_SCD_ZBBUS_CYCLE_COUNT |
343 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP_BASE 0x0010020C00 | 343 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP_BASE 0x0010020C00 |
344 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP0 A_SCD_ZBBUS_CYCLE_CP0 | 344 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP0 A_SCD_ZBBUS_CYCLE_CP0 |
345 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP1 A_SCD_ZBBUS_CYCLE_CP1 | 345 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP1 A_SCD_ZBBUS_CYCLE_CP1 |
346 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP2 0x0010020C10 | 346 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP2 0x0010020C10 |
347 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP3 0x0010020C18 | 347 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP3 0x0010020C18 |
348 | 348 | ||
349 | /* ********************************************************************* | 349 | /* ********************************************************************* |
350 | * System Control Registers (Section 4.2) | 350 | * System Control Registers (Section 4.2) |
@@ -352,7 +352,7 @@ | |||
352 | 352 | ||
353 | /* Scratch register in different place */ | 353 | /* Scratch register in different place */ |
354 | 354 | ||
355 | #define A_BCM1480_SCD_SCRATCH 0x100200A0 | 355 | #define A_BCM1480_SCD_SCRATCH 0x100200A0 |
356 | 356 | ||
357 | /* ********************************************************************* | 357 | /* ********************************************************************* |
358 | * System Address Trap Registers (Section 4.9) | 358 | * System Address Trap Registers (Section 4.9) |
@@ -364,68 +364,68 @@ | |||
364 | * System Interrupt Mapper Registers (Sections 4.3-4.5) | 364 | * System Interrupt Mapper Registers (Sections 4.3-4.5) |
365 | ********************************************************************* */ | 365 | ********************************************************************* */ |
366 | 366 | ||
367 | #define A_BCM1480_IMR_CPU0_BASE 0x0010020000 | 367 | #define A_BCM1480_IMR_CPU0_BASE 0x0010020000 |
368 | #define A_BCM1480_IMR_CPU1_BASE 0x0010022000 | 368 | #define A_BCM1480_IMR_CPU1_BASE 0x0010022000 |
369 | #define A_BCM1480_IMR_CPU2_BASE 0x0010024000 | 369 | #define A_BCM1480_IMR_CPU2_BASE 0x0010024000 |
370 | #define A_BCM1480_IMR_CPU3_BASE 0x0010026000 | 370 | #define A_BCM1480_IMR_CPU3_BASE 0x0010026000 |
371 | #define BCM1480_IMR_REGISTER_SPACING 0x2000 | 371 | #define BCM1480_IMR_REGISTER_SPACING 0x2000 |
372 | #define BCM1480_IMR_REGISTER_SPACING_SHIFT 13 | 372 | #define BCM1480_IMR_REGISTER_SPACING_SHIFT 13 |
373 | 373 | ||
374 | #define A_BCM1480_IMR_MAPPER(cpu) (A_BCM1480_IMR_CPU0_BASE+(cpu)*BCM1480_IMR_REGISTER_SPACING) | 374 | #define A_BCM1480_IMR_MAPPER(cpu) (A_BCM1480_IMR_CPU0_BASE+(cpu)*BCM1480_IMR_REGISTER_SPACING) |
375 | #define A_BCM1480_IMR_REGISTER(cpu, reg) (A_BCM1480_IMR_MAPPER(cpu)+(reg)) | 375 | #define A_BCM1480_IMR_REGISTER(cpu, reg) (A_BCM1480_IMR_MAPPER(cpu)+(reg)) |
376 | 376 | ||
377 | /* Most IMR registers are 128 bits, implemented as non-contiguous | 377 | /* Most IMR registers are 128 bits, implemented as non-contiguous |
378 | 64-bit registers high (_H) and low (_L) */ | 378 | 64-bit registers high (_H) and low (_L) */ |
379 | #define BCM1480_IMR_HL_SPACING 0x1000 | 379 | #define BCM1480_IMR_HL_SPACING 0x1000 |
380 | 380 | ||
381 | #define R_BCM1480_IMR_INTERRUPT_DIAG_H 0x0010 | 381 | #define R_BCM1480_IMR_INTERRUPT_DIAG_H 0x0010 |
382 | #define R_BCM1480_IMR_LDT_INTERRUPT_H 0x0018 | 382 | #define R_BCM1480_IMR_LDT_INTERRUPT_H 0x0018 |
383 | #define R_BCM1480_IMR_LDT_INTERRUPT_CLR_H 0x0020 | 383 | #define R_BCM1480_IMR_LDT_INTERRUPT_CLR_H 0x0020 |
384 | #define R_BCM1480_IMR_INTERRUPT_MASK_H 0x0028 | 384 | #define R_BCM1480_IMR_INTERRUPT_MASK_H 0x0028 |
385 | #define R_BCM1480_IMR_INTERRUPT_TRACE_H 0x0038 | 385 | #define R_BCM1480_IMR_INTERRUPT_TRACE_H 0x0038 |
386 | #define R_BCM1480_IMR_INTERRUPT_SOURCE_STATUS_H 0x0040 | 386 | #define R_BCM1480_IMR_INTERRUPT_SOURCE_STATUS_H 0x0040 |
387 | #define R_BCM1480_IMR_LDT_INTERRUPT_SET 0x0048 | 387 | #define R_BCM1480_IMR_LDT_INTERRUPT_SET 0x0048 |
388 | #define R_BCM1480_IMR_MAILBOX_0_CPU 0x00C0 | 388 | #define R_BCM1480_IMR_MAILBOX_0_CPU 0x00C0 |
389 | #define R_BCM1480_IMR_MAILBOX_0_SET_CPU 0x00C8 | 389 | #define R_BCM1480_IMR_MAILBOX_0_SET_CPU 0x00C8 |
390 | #define R_BCM1480_IMR_MAILBOX_0_CLR_CPU 0x00D0 | 390 | #define R_BCM1480_IMR_MAILBOX_0_CLR_CPU 0x00D0 |
391 | #define R_BCM1480_IMR_MAILBOX_1_CPU 0x00E0 | 391 | #define R_BCM1480_IMR_MAILBOX_1_CPU 0x00E0 |
392 | #define R_BCM1480_IMR_MAILBOX_1_SET_CPU 0x00E8 | 392 | #define R_BCM1480_IMR_MAILBOX_1_SET_CPU 0x00E8 |
393 | #define R_BCM1480_IMR_MAILBOX_1_CLR_CPU 0x00F0 | 393 | #define R_BCM1480_IMR_MAILBOX_1_CLR_CPU 0x00F0 |
394 | #define R_BCM1480_IMR_INTERRUPT_STATUS_BASE_H 0x0100 | 394 | #define R_BCM1480_IMR_INTERRUPT_STATUS_BASE_H 0x0100 |
395 | #define BCM1480_IMR_INTERRUPT_STATUS_COUNT 8 | 395 | #define BCM1480_IMR_INTERRUPT_STATUS_COUNT 8 |
396 | #define R_BCM1480_IMR_INTERRUPT_MAP_BASE_H 0x0200 | 396 | #define R_BCM1480_IMR_INTERRUPT_MAP_BASE_H 0x0200 |
397 | #define BCM1480_IMR_INTERRUPT_MAP_COUNT 64 | 397 | #define BCM1480_IMR_INTERRUPT_MAP_COUNT 64 |
398 | 398 | ||
399 | #define R_BCM1480_IMR_INTERRUPT_DIAG_L 0x1010 | 399 | #define R_BCM1480_IMR_INTERRUPT_DIAG_L 0x1010 |
400 | #define R_BCM1480_IMR_LDT_INTERRUPT_L 0x1018 | 400 | #define R_BCM1480_IMR_LDT_INTERRUPT_L 0x1018 |
401 | #define R_BCM1480_IMR_LDT_INTERRUPT_CLR_L 0x1020 | 401 | #define R_BCM1480_IMR_LDT_INTERRUPT_CLR_L 0x1020 |
402 | #define R_BCM1480_IMR_INTERRUPT_MASK_L 0x1028 | 402 | #define R_BCM1480_IMR_INTERRUPT_MASK_L 0x1028 |
403 | #define R_BCM1480_IMR_INTERRUPT_TRACE_L 0x1038 | 403 | #define R_BCM1480_IMR_INTERRUPT_TRACE_L 0x1038 |
404 | #define R_BCM1480_IMR_INTERRUPT_SOURCE_STATUS_L 0x1040 | 404 | #define R_BCM1480_IMR_INTERRUPT_SOURCE_STATUS_L 0x1040 |
405 | #define R_BCM1480_IMR_INTERRUPT_STATUS_BASE_L 0x1100 | 405 | #define R_BCM1480_IMR_INTERRUPT_STATUS_BASE_L 0x1100 |
406 | #define R_BCM1480_IMR_INTERRUPT_MAP_BASE_L 0x1200 | 406 | #define R_BCM1480_IMR_INTERRUPT_MAP_BASE_L 0x1200 |
407 | 407 | ||
408 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU0_BASE 0x0010028000 | 408 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU0_BASE 0x0010028000 |
409 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU1_BASE 0x0010028100 | 409 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU1_BASE 0x0010028100 |
410 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU2_BASE 0x0010028200 | 410 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU2_BASE 0x0010028200 |
411 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU3_BASE 0x0010028300 | 411 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU3_BASE 0x0010028300 |
412 | #define BCM1480_IMR_ALIAS_MAILBOX_SPACING 0100 | 412 | #define BCM1480_IMR_ALIAS_MAILBOX_SPACING 0100 |
413 | 413 | ||
414 | #define A_BCM1480_IMR_ALIAS_MAILBOX(cpu) (A_BCM1480_IMR_ALIAS_MAILBOX_CPU0_BASE + \ | 414 | #define A_BCM1480_IMR_ALIAS_MAILBOX(cpu) (A_BCM1480_IMR_ALIAS_MAILBOX_CPU0_BASE + \ |
415 | (cpu)*BCM1480_IMR_ALIAS_MAILBOX_SPACING) | 415 | (cpu)*BCM1480_IMR_ALIAS_MAILBOX_SPACING) |
416 | #define A_BCM1480_IMR_ALIAS_MAILBOX_REGISTER(cpu, reg) (A_BCM1480_IMR_ALIAS_MAILBOX(cpu)+(reg)) | 416 | #define A_BCM1480_IMR_ALIAS_MAILBOX_REGISTER(cpu, reg) (A_BCM1480_IMR_ALIAS_MAILBOX(cpu)+(reg)) |
417 | 417 | ||
418 | #define R_BCM1480_IMR_ALIAS_MAILBOX_0 0x0000 /* 0x0x0 */ | 418 | #define R_BCM1480_IMR_ALIAS_MAILBOX_0 0x0000 /* 0x0x0 */ |
419 | #define R_BCM1480_IMR_ALIAS_MAILBOX_0_SET 0x0008 /* 0x0x8 */ | 419 | #define R_BCM1480_IMR_ALIAS_MAILBOX_0_SET 0x0008 /* 0x0x8 */ |
420 | 420 | ||
421 | /* | 421 | /* |
422 | * these macros work together to build the address of a mailbox | 422 | * these macros work together to build the address of a mailbox |
423 | * register, e.g., A_BCM1480_MAILBOX_REGISTER(0,R_BCM1480_IMR_MAILBOX_SET,2) | 423 | * register, e.g., A_BCM1480_MAILBOX_REGISTER(0,R_BCM1480_IMR_MAILBOX_SET,2) |
424 | * for mbox_0_set_cpu2 returns 0x00100240C8 | 424 | * for mbox_0_set_cpu2 returns 0x00100240C8 |
425 | */ | 425 | */ |
426 | #define R_BCM1480_IMR_MAILBOX_CPU 0x00 | 426 | #define R_BCM1480_IMR_MAILBOX_CPU 0x00 |
427 | #define R_BCM1480_IMR_MAILBOX_SET 0x08 | 427 | #define R_BCM1480_IMR_MAILBOX_SET 0x08 |
428 | #define R_BCM1480_IMR_MAILBOX_CLR 0x10 | 428 | #define R_BCM1480_IMR_MAILBOX_CLR 0x10 |
429 | #define R_BCM1480_IMR_MAILBOX_NUM_SPACING 0x20 | 429 | #define R_BCM1480_IMR_MAILBOX_NUM_SPACING 0x20 |
430 | #define A_BCM1480_MAILBOX_REGISTER(num, reg, cpu) \ | 430 | #define A_BCM1480_MAILBOX_REGISTER(num, reg, cpu) \ |
431 | (A_BCM1480_IMR_CPU0_BASE + \ | 431 | (A_BCM1480_IMR_CPU0_BASE + \ |
@@ -440,22 +440,22 @@ | |||
440 | /* BCM1480 has four more performance counter registers, and two control | 440 | /* BCM1480 has four more performance counter registers, and two control |
441 | registers. */ | 441 | registers. */ |
442 | 442 | ||
443 | #define A_BCM1480_SCD_PERF_CNT_BASE 0x00100204C0 | 443 | #define A_BCM1480_SCD_PERF_CNT_BASE 0x00100204C0 |
444 | 444 | ||
445 | #define A_BCM1480_SCD_PERF_CNT_CFG0 0x00100204C0 | 445 | #define A_BCM1480_SCD_PERF_CNT_CFG0 0x00100204C0 |
446 | #define A_BCM1480_SCD_PERF_CNT_CFG_0 A_BCM1480_SCD_PERF_CNT_CFG0 | 446 | #define A_BCM1480_SCD_PERF_CNT_CFG_0 A_BCM1480_SCD_PERF_CNT_CFG0 |
447 | #define A_BCM1480_SCD_PERF_CNT_CFG1 0x00100204C8 | 447 | #define A_BCM1480_SCD_PERF_CNT_CFG1 0x00100204C8 |
448 | #define A_BCM1480_SCD_PERF_CNT_CFG_1 A_BCM1480_SCD_PERF_CNT_CFG1 | 448 | #define A_BCM1480_SCD_PERF_CNT_CFG_1 A_BCM1480_SCD_PERF_CNT_CFG1 |
449 | 449 | ||
450 | #define A_BCM1480_SCD_PERF_CNT_0 A_SCD_PERF_CNT_0 | 450 | #define A_BCM1480_SCD_PERF_CNT_0 A_SCD_PERF_CNT_0 |
451 | #define A_BCM1480_SCD_PERF_CNT_1 A_SCD_PERF_CNT_1 | 451 | #define A_BCM1480_SCD_PERF_CNT_1 A_SCD_PERF_CNT_1 |
452 | #define A_BCM1480_SCD_PERF_CNT_2 A_SCD_PERF_CNT_2 | 452 | #define A_BCM1480_SCD_PERF_CNT_2 A_SCD_PERF_CNT_2 |
453 | #define A_BCM1480_SCD_PERF_CNT_3 A_SCD_PERF_CNT_3 | 453 | #define A_BCM1480_SCD_PERF_CNT_3 A_SCD_PERF_CNT_3 |
454 | 454 | ||
455 | #define A_BCM1480_SCD_PERF_CNT_4 0x00100204F0 | 455 | #define A_BCM1480_SCD_PERF_CNT_4 0x00100204F0 |
456 | #define A_BCM1480_SCD_PERF_CNT_5 0x00100204F8 | 456 | #define A_BCM1480_SCD_PERF_CNT_5 0x00100204F8 |
457 | #define A_BCM1480_SCD_PERF_CNT_6 0x0010020500 | 457 | #define A_BCM1480_SCD_PERF_CNT_6 0x0010020500 |
458 | #define A_BCM1480_SCD_PERF_CNT_7 0x0010020508 | 458 | #define A_BCM1480_SCD_PERF_CNT_7 0x0010020508 |
459 | 459 | ||
460 | #define BCM1480_SCD_NUM_PERF_CNT 8 | 460 | #define BCM1480_SCD_NUM_PERF_CNT 8 |
461 | #define BCM1480_SCD_PERF_CNT_SPACING 8 | 461 | #define BCM1480_SCD_PERF_CNT_SPACING 8 |
@@ -468,7 +468,7 @@ | |||
468 | 468 | ||
469 | /* Same as 1250 except BUS_ERR_STATUS_DEBUG is in a different place. */ | 469 | /* Same as 1250 except BUS_ERR_STATUS_DEBUG is in a different place. */ |
470 | 470 | ||
471 | #define A_BCM1480_BUS_ERR_STATUS_DEBUG 0x00100208D8 | 471 | #define A_BCM1480_BUS_ERR_STATUS_DEBUG 0x00100208D8 |
472 | 472 | ||
473 | /* ********************************************************************* | 473 | /* ********************************************************************* |
474 | * System Debug Controller Registers (Section 19) | 474 | * System Debug Controller Registers (Section 19) |
@@ -497,46 +497,46 @@ | |||
497 | #define BCM1480_HT_PORT_SPACING 0x800 | 497 | #define BCM1480_HT_PORT_SPACING 0x800 |
498 | #define A_BCM1480_HT_PORT_HEADER(x) (A_BCM1480_HT_PORT0_HEADER + ((x)*BCM1480_HT_PORT_SPACING)) | 498 | #define A_BCM1480_HT_PORT_HEADER(x) (A_BCM1480_HT_PORT0_HEADER + ((x)*BCM1480_HT_PORT_SPACING)) |
499 | 499 | ||
500 | #define A_BCM1480_HT_PORT0_HEADER 0x00FE000000 | 500 | #define A_BCM1480_HT_PORT0_HEADER 0x00FE000000 |
501 | #define A_BCM1480_HT_PORT1_HEADER 0x00FE000800 | 501 | #define A_BCM1480_HT_PORT1_HEADER 0x00FE000800 |
502 | #define A_BCM1480_HT_PORT2_HEADER 0x00FE001000 | 502 | #define A_BCM1480_HT_PORT2_HEADER 0x00FE001000 |
503 | #define A_BCM1480_HT_TYPE00_HEADER 0x00FE002000 | 503 | #define A_BCM1480_HT_TYPE00_HEADER 0x00FE002000 |
504 | 504 | ||
505 | 505 | ||
506 | /* ********************************************************************* | 506 | /* ********************************************************************* |
507 | * Node Controller Registers (Section 9) | 507 | * Node Controller Registers (Section 9) |
508 | ********************************************************************* */ | 508 | ********************************************************************* */ |
509 | 509 | ||
510 | #define A_BCM1480_NC_BASE 0x00DFBD0000 | 510 | #define A_BCM1480_NC_BASE 0x00DFBD0000 |
511 | 511 | ||
512 | #define A_BCM1480_NC_RLD_FIELD 0x00DFBD0000 | 512 | #define A_BCM1480_NC_RLD_FIELD 0x00DFBD0000 |
513 | #define A_BCM1480_NC_RLD_TRIGGER 0x00DFBD0020 | 513 | #define A_BCM1480_NC_RLD_TRIGGER 0x00DFBD0020 |
514 | #define A_BCM1480_NC_RLD_BAD_ERROR 0x00DFBD0040 | 514 | #define A_BCM1480_NC_RLD_BAD_ERROR 0x00DFBD0040 |
515 | #define A_BCM1480_NC_RLD_COR_ERROR 0x00DFBD0060 | 515 | #define A_BCM1480_NC_RLD_COR_ERROR 0x00DFBD0060 |
516 | #define A_BCM1480_NC_RLD_ECC_STATUS 0x00DFBD0080 | 516 | #define A_BCM1480_NC_RLD_ECC_STATUS 0x00DFBD0080 |
517 | #define A_BCM1480_NC_RLD_WAY_ENABLE 0x00DFBD00A0 | 517 | #define A_BCM1480_NC_RLD_WAY_ENABLE 0x00DFBD00A0 |
518 | #define A_BCM1480_NC_RLD_RANDOM_LFSR 0x00DFBD00C0 | 518 | #define A_BCM1480_NC_RLD_RANDOM_LFSR 0x00DFBD00C0 |
519 | 519 | ||
520 | #define A_BCM1480_NC_INTERRUPT_STATUS 0x00DFBD00E0 | 520 | #define A_BCM1480_NC_INTERRUPT_STATUS 0x00DFBD00E0 |
521 | #define A_BCM1480_NC_INTERRUPT_ENABLE 0x00DFBD0100 | 521 | #define A_BCM1480_NC_INTERRUPT_ENABLE 0x00DFBD0100 |
522 | #define A_BCM1480_NC_TIMEOUT_COUNTER 0x00DFBD0120 | 522 | #define A_BCM1480_NC_TIMEOUT_COUNTER 0x00DFBD0120 |
523 | #define A_BCM1480_NC_TIMEOUT_COUNTER_SEL 0x00DFBD0140 | 523 | #define A_BCM1480_NC_TIMEOUT_COUNTER_SEL 0x00DFBD0140 |
524 | 524 | ||
525 | #define A_BCM1480_NC_CREDIT_STATUS_REG0 0x00DFBD0200 | 525 | #define A_BCM1480_NC_CREDIT_STATUS_REG0 0x00DFBD0200 |
526 | #define A_BCM1480_NC_CREDIT_STATUS_REG1 0x00DFBD0220 | 526 | #define A_BCM1480_NC_CREDIT_STATUS_REG1 0x00DFBD0220 |
527 | #define A_BCM1480_NC_CREDIT_STATUS_REG2 0x00DFBD0240 | 527 | #define A_BCM1480_NC_CREDIT_STATUS_REG2 0x00DFBD0240 |
528 | #define A_BCM1480_NC_CREDIT_STATUS_REG3 0x00DFBD0260 | 528 | #define A_BCM1480_NC_CREDIT_STATUS_REG3 0x00DFBD0260 |
529 | #define A_BCM1480_NC_CREDIT_STATUS_REG4 0x00DFBD0280 | 529 | #define A_BCM1480_NC_CREDIT_STATUS_REG4 0x00DFBD0280 |
530 | #define A_BCM1480_NC_CREDIT_STATUS_REG5 0x00DFBD02A0 | 530 | #define A_BCM1480_NC_CREDIT_STATUS_REG5 0x00DFBD02A0 |
531 | #define A_BCM1480_NC_CREDIT_STATUS_REG6 0x00DFBD02C0 | 531 | #define A_BCM1480_NC_CREDIT_STATUS_REG6 0x00DFBD02C0 |
532 | #define A_BCM1480_NC_CREDIT_STATUS_REG7 0x00DFBD02E0 | 532 | #define A_BCM1480_NC_CREDIT_STATUS_REG7 0x00DFBD02E0 |
533 | #define A_BCM1480_NC_CREDIT_STATUS_REG8 0x00DFBD0300 | 533 | #define A_BCM1480_NC_CREDIT_STATUS_REG8 0x00DFBD0300 |
534 | #define A_BCM1480_NC_CREDIT_STATUS_REG9 0x00DFBD0320 | 534 | #define A_BCM1480_NC_CREDIT_STATUS_REG9 0x00DFBD0320 |
535 | #define A_BCM1480_NC_CREDIT_STATUS_REG10 0x00DFBE0000 | 535 | #define A_BCM1480_NC_CREDIT_STATUS_REG10 0x00DFBE0000 |
536 | #define A_BCM1480_NC_CREDIT_STATUS_REG11 0x00DFBE0020 | 536 | #define A_BCM1480_NC_CREDIT_STATUS_REG11 0x00DFBE0020 |
537 | #define A_BCM1480_NC_CREDIT_STATUS_REG12 0x00DFBE0040 | 537 | #define A_BCM1480_NC_CREDIT_STATUS_REG12 0x00DFBE0040 |
538 | 538 | ||
539 | #define A_BCM1480_NC_SR_TIMEOUT_COUNTER 0x00DFBE0060 | 539 | #define A_BCM1480_NC_SR_TIMEOUT_COUNTER 0x00DFBE0060 |
540 | #define A_BCM1480_NC_SR_TIMEOUT_COUNTER_SEL 0x00DFBE0080 | 540 | #define A_BCM1480_NC_SR_TIMEOUT_COUNTER_SEL 0x00DFBE0080 |
541 | 541 | ||
542 | 542 | ||
@@ -544,43 +544,43 @@ | |||
544 | * H&R Block Configuration Registers (Section 12.4) | 544 | * H&R Block Configuration Registers (Section 12.4) |
545 | ********************************************************************* */ | 545 | ********************************************************************* */ |
546 | 546 | ||
547 | #define A_BCM1480_HR_BASE_0 0x00DF820000 | 547 | #define A_BCM1480_HR_BASE_0 0x00DF820000 |
548 | #define A_BCM1480_HR_BASE_1 0x00DF8A0000 | 548 | #define A_BCM1480_HR_BASE_1 0x00DF8A0000 |
549 | #define A_BCM1480_HR_BASE_2 0x00DF920000 | 549 | #define A_BCM1480_HR_BASE_2 0x00DF920000 |
550 | #define BCM1480_HR_REGISTER_SPACING 0x80000 | 550 | #define BCM1480_HR_REGISTER_SPACING 0x80000 |
551 | 551 | ||
552 | #define A_BCM1480_HR_BASE(idx) (A_BCM1480_HR_BASE_0 + ((idx)*BCM1480_HR_REGISTER_SPACING)) | 552 | #define A_BCM1480_HR_BASE(idx) (A_BCM1480_HR_BASE_0 + ((idx)*BCM1480_HR_REGISTER_SPACING)) |
553 | #define A_BCM1480_HR_REGISTER(idx, reg) (A_BCM1480_HR_BASE(idx) + (reg)) | 553 | #define A_BCM1480_HR_REGISTER(idx, reg) (A_BCM1480_HR_BASE(idx) + (reg)) |
554 | 554 | ||
555 | #define R_BCM1480_HR_CFG 0x0000000000 | 555 | #define R_BCM1480_HR_CFG 0x0000000000 |
556 | 556 | ||
557 | #define R_BCM1480_HR_MAPPING 0x0000010010 | 557 | #define R_BCM1480_HR_MAPPING 0x0000010010 |
558 | 558 | ||
559 | #define BCM1480_HR_RULE_SPACING 0x0000000010 | 559 | #define BCM1480_HR_RULE_SPACING 0x0000000010 |
560 | #define BCM1480_HR_NUM_RULES 16 | 560 | #define BCM1480_HR_NUM_RULES 16 |
561 | #define BCM1480_HR_OP_OFFSET 0x0000000100 | 561 | #define BCM1480_HR_OP_OFFSET 0x0000000100 |
562 | #define BCM1480_HR_TYPE_OFFSET 0x0000000108 | 562 | #define BCM1480_HR_TYPE_OFFSET 0x0000000108 |
563 | #define R_BCM1480_HR_RULE_OP(idx) (BCM1480_HR_OP_OFFSET + ((idx)*BCM1480_HR_RULE_SPACING)) | 563 | #define R_BCM1480_HR_RULE_OP(idx) (BCM1480_HR_OP_OFFSET + ((idx)*BCM1480_HR_RULE_SPACING)) |
564 | #define R_BCM1480_HR_RULE_TYPE(idx) (BCM1480_HR_TYPE_OFFSET + ((idx)*BCM1480_HR_RULE_SPACING)) | 564 | #define R_BCM1480_HR_RULE_TYPE(idx) (BCM1480_HR_TYPE_OFFSET + ((idx)*BCM1480_HR_RULE_SPACING)) |
565 | 565 | ||
566 | #define BCM1480_HR_LEAF_SPACING 0x0000000010 | 566 | #define BCM1480_HR_LEAF_SPACING 0x0000000010 |
567 | #define BCM1480_HR_NUM_LEAVES 10 | 567 | #define BCM1480_HR_NUM_LEAVES 10 |
568 | #define BCM1480_HR_LEAF_OFFSET 0x0000000300 | 568 | #define BCM1480_HR_LEAF_OFFSET 0x0000000300 |
569 | #define R_BCM1480_HR_HA_LEAF0(idx) (BCM1480_HR_LEAF_OFFSET + ((idx)*BCM1480_HR_LEAF_SPACING)) | 569 | #define R_BCM1480_HR_HA_LEAF0(idx) (BCM1480_HR_LEAF_OFFSET + ((idx)*BCM1480_HR_LEAF_SPACING)) |
570 | 570 | ||
571 | #define R_BCM1480_HR_EX_LEAF0 0x00000003A0 | 571 | #define R_BCM1480_HR_EX_LEAF0 0x00000003A0 |
572 | 572 | ||
573 | #define BCM1480_HR_PATH_SPACING 0x0000000010 | 573 | #define BCM1480_HR_PATH_SPACING 0x0000000010 |
574 | #define BCM1480_HR_NUM_PATHS 16 | 574 | #define BCM1480_HR_NUM_PATHS 16 |
575 | #define BCM1480_HR_PATH_OFFSET 0x0000000600 | 575 | #define BCM1480_HR_PATH_OFFSET 0x0000000600 |
576 | #define R_BCM1480_HR_PATH(idx) (BCM1480_HR_PATH_OFFSET + ((idx)*BCM1480_HR_PATH_SPACING)) | 576 | #define R_BCM1480_HR_PATH(idx) (BCM1480_HR_PATH_OFFSET + ((idx)*BCM1480_HR_PATH_SPACING)) |
577 | 577 | ||
578 | #define R_BCM1480_HR_PATH_DEFAULT 0x0000000700 | 578 | #define R_BCM1480_HR_PATH_DEFAULT 0x0000000700 |
579 | 579 | ||
580 | #define BCM1480_HR_ROUTE_SPACING 8 | 580 | #define BCM1480_HR_ROUTE_SPACING 8 |
581 | #define BCM1480_HR_NUM_ROUTES 512 | 581 | #define BCM1480_HR_NUM_ROUTES 512 |
582 | #define BCM1480_HR_ROUTE_OFFSET 0x0000001000 | 582 | #define BCM1480_HR_ROUTE_OFFSET 0x0000001000 |
583 | #define R_BCM1480_HR_RT_WORD(idx) (BCM1480_HR_ROUTE_OFFSET + ((idx)*BCM1480_HR_ROUTE_SPACING)) | 583 | #define R_BCM1480_HR_RT_WORD(idx) (BCM1480_HR_ROUTE_OFFSET + ((idx)*BCM1480_HR_ROUTE_SPACING)) |
584 | 584 | ||
585 | 585 | ||
586 | /* checked to here - ehs */ | 586 | /* checked to here - ehs */ |
@@ -588,55 +588,55 @@ | |||
588 | * Packet Manager DMA Registers (Section 12.5) | 588 | * Packet Manager DMA Registers (Section 12.5) |
589 | ********************************************************************* */ | 589 | ********************************************************************* */ |
590 | 590 | ||
591 | #define A_BCM1480_PM_BASE 0x0010056000 | 591 | #define A_BCM1480_PM_BASE 0x0010056000 |
592 | 592 | ||
593 | #define A_BCM1480_PMI_LCL_0 0x0010058000 | 593 | #define A_BCM1480_PMI_LCL_0 0x0010058000 |
594 | #define A_BCM1480_PMO_LCL_0 0x001005C000 | 594 | #define A_BCM1480_PMO_LCL_0 0x001005C000 |
595 | #define A_BCM1480_PMI_OFFSET_0 (A_BCM1480_PMI_LCL_0 - A_BCM1480_PM_BASE) | 595 | #define A_BCM1480_PMI_OFFSET_0 (A_BCM1480_PMI_LCL_0 - A_BCM1480_PM_BASE) |
596 | #define A_BCM1480_PMO_OFFSET_0 (A_BCM1480_PMO_LCL_0 - A_BCM1480_PM_BASE) | 596 | #define A_BCM1480_PMO_OFFSET_0 (A_BCM1480_PMO_LCL_0 - A_BCM1480_PM_BASE) |
597 | 597 | ||
598 | #define BCM1480_PM_LCL_REGISTER_SPACING 0x100 | 598 | #define BCM1480_PM_LCL_REGISTER_SPACING 0x100 |
599 | #define BCM1480_PM_NUM_CHANNELS 32 | 599 | #define BCM1480_PM_NUM_CHANNELS 32 |
600 | 600 | ||
601 | #define A_BCM1480_PMI_LCL_BASE(idx) (A_BCM1480_PMI_LCL_0 + ((idx)*BCM1480_PM_LCL_REGISTER_SPACING)) | 601 | #define A_BCM1480_PMI_LCL_BASE(idx) (A_BCM1480_PMI_LCL_0 + ((idx)*BCM1480_PM_LCL_REGISTER_SPACING)) |
602 | #define A_BCM1480_PMI_LCL_REGISTER(idx, reg) (A_BCM1480_PMI_LCL_BASE(idx) + (reg)) | 602 | #define A_BCM1480_PMI_LCL_REGISTER(idx, reg) (A_BCM1480_PMI_LCL_BASE(idx) + (reg)) |
603 | #define A_BCM1480_PMO_LCL_BASE(idx) (A_BCM1480_PMO_LCL_0 + ((idx)*BCM1480_PM_LCL_REGISTER_SPACING)) | 603 | #define A_BCM1480_PMO_LCL_BASE(idx) (A_BCM1480_PMO_LCL_0 + ((idx)*BCM1480_PM_LCL_REGISTER_SPACING)) |
604 | #define A_BCM1480_PMO_LCL_REGISTER(idx, reg) (A_BCM1480_PMO_LCL_BASE(idx) + (reg)) | 604 | #define A_BCM1480_PMO_LCL_REGISTER(idx, reg) (A_BCM1480_PMO_LCL_BASE(idx) + (reg)) |
605 | 605 | ||
606 | #define BCM1480_PM_INT_PACKING 8 | 606 | #define BCM1480_PM_INT_PACKING 8 |
607 | #define BCM1480_PM_INT_FUNCTION_SPACING 0x40 | 607 | #define BCM1480_PM_INT_FUNCTION_SPACING 0x40 |
608 | #define BCM1480_PM_INT_NUM_FUNCTIONS 3 | 608 | #define BCM1480_PM_INT_NUM_FUNCTIONS 3 |
609 | 609 | ||
610 | /* | 610 | /* |
611 | * DMA channel registers relative to A_BCM1480_PMI_LCL_BASE(n) and A_BCM1480_PMO_LCL_BASE(n) | 611 | * DMA channel registers relative to A_BCM1480_PMI_LCL_BASE(n) and A_BCM1480_PMO_LCL_BASE(n) |
612 | */ | 612 | */ |
613 | 613 | ||
614 | #define R_BCM1480_PM_BASE_SIZE 0x0000000000 | 614 | #define R_BCM1480_PM_BASE_SIZE 0x0000000000 |
615 | #define R_BCM1480_PM_CNT 0x0000000008 | 615 | #define R_BCM1480_PM_CNT 0x0000000008 |
616 | #define R_BCM1480_PM_PFCNT 0x0000000010 | 616 | #define R_BCM1480_PM_PFCNT 0x0000000010 |
617 | #define R_BCM1480_PM_LAST 0x0000000018 | 617 | #define R_BCM1480_PM_LAST 0x0000000018 |
618 | #define R_BCM1480_PM_PFINDX 0x0000000020 | 618 | #define R_BCM1480_PM_PFINDX 0x0000000020 |
619 | #define R_BCM1480_PM_INT_WMK 0x0000000028 | 619 | #define R_BCM1480_PM_INT_WMK 0x0000000028 |
620 | #define R_BCM1480_PM_CONFIG0 0x0000000030 | 620 | #define R_BCM1480_PM_CONFIG0 0x0000000030 |
621 | #define R_BCM1480_PM_LOCALDEBUG 0x0000000078 | 621 | #define R_BCM1480_PM_LOCALDEBUG 0x0000000078 |
622 | #define R_BCM1480_PM_CACHEABILITY 0x0000000080 /* PMI only */ | 622 | #define R_BCM1480_PM_CACHEABILITY 0x0000000080 /* PMI only */ |
623 | #define R_BCM1480_PM_INT_CNFG 0x0000000088 | 623 | #define R_BCM1480_PM_INT_CNFG 0x0000000088 |
624 | #define R_BCM1480_PM_DESC_MERGE_TIMER 0x0000000090 | 624 | #define R_BCM1480_PM_DESC_MERGE_TIMER 0x0000000090 |
625 | #define R_BCM1480_PM_LOCALDEBUG_PIB 0x00000000F8 /* PMI only */ | 625 | #define R_BCM1480_PM_LOCALDEBUG_PIB 0x00000000F8 /* PMI only */ |
626 | #define R_BCM1480_PM_LOCALDEBUG_POB 0x00000000F8 /* PMO only */ | 626 | #define R_BCM1480_PM_LOCALDEBUG_POB 0x00000000F8 /* PMO only */ |
627 | 627 | ||
628 | /* | 628 | /* |
629 | * Global Registers (Not Channelized) | 629 | * Global Registers (Not Channelized) |
630 | */ | 630 | */ |
631 | 631 | ||
632 | #define A_BCM1480_PMI_GLB_0 0x0010056000 | 632 | #define A_BCM1480_PMI_GLB_0 0x0010056000 |
633 | #define A_BCM1480_PMO_GLB_0 0x0010057000 | 633 | #define A_BCM1480_PMO_GLB_0 0x0010057000 |
634 | 634 | ||
635 | /* | 635 | /* |
636 | * PM to TX Mapping Register relative to A_BCM1480_PMI_GLB_0 and A_BCM1480_PMO_GLB_0 | 636 | * PM to TX Mapping Register relative to A_BCM1480_PMI_GLB_0 and A_BCM1480_PMO_GLB_0 |
637 | */ | 637 | */ |
638 | 638 | ||
639 | #define R_BCM1480_PM_PMO_MAPPING 0x00000008C8 /* PMO only */ | 639 | #define R_BCM1480_PM_PMO_MAPPING 0x00000008C8 /* PMO only */ |
640 | 640 | ||
641 | #define A_BCM1480_PM_PMO_MAPPING (A_BCM1480_PMO_GLB_0 + R_BCM1480_PM_PMO_MAPPING) | 641 | #define A_BCM1480_PM_PMO_MAPPING (A_BCM1480_PMO_GLB_0 + R_BCM1480_PM_PMO_MAPPING) |
642 | 642 | ||
@@ -645,32 +645,32 @@ | |||
645 | */ | 645 | */ |
646 | 646 | ||
647 | 647 | ||
648 | #define A_BCM1480_PMI_INT_0 0x0010056800 | 648 | #define A_BCM1480_PMI_INT_0 0x0010056800 |
649 | #define A_BCM1480_PMI_INT(q) (A_BCM1480_PMI_INT_0 + ((q>>8)<<8)) | 649 | #define A_BCM1480_PMI_INT(q) (A_BCM1480_PMI_INT_0 + ((q>>8)<<8)) |
650 | #define A_BCM1480_PMI_INT_OFFSET_0 (A_BCM1480_PMI_INT_0 - A_BCM1480_PM_BASE) | 650 | #define A_BCM1480_PMI_INT_OFFSET_0 (A_BCM1480_PMI_INT_0 - A_BCM1480_PM_BASE) |
651 | #define A_BCM1480_PMO_INT_0 0x0010057800 | 651 | #define A_BCM1480_PMO_INT_0 0x0010057800 |
652 | #define A_BCM1480_PMO_INT(q) (A_BCM1480_PMO_INT_0 + ((q>>8)<<8)) | 652 | #define A_BCM1480_PMO_INT(q) (A_BCM1480_PMO_INT_0 + ((q>>8)<<8)) |
653 | #define A_BCM1480_PMO_INT_OFFSET_0 (A_BCM1480_PMO_INT_0 - A_BCM1480_PM_BASE) | 653 | #define A_BCM1480_PMO_INT_OFFSET_0 (A_BCM1480_PMO_INT_0 - A_BCM1480_PM_BASE) |
654 | 654 | ||
655 | /* | 655 | /* |
656 | * Interrupt registers relative to A_BCM1480_PMI_INT_0 and A_BCM1480_PMO_INT_0 | 656 | * Interrupt registers relative to A_BCM1480_PMI_INT_0 and A_BCM1480_PMO_INT_0 |
657 | */ | 657 | */ |
658 | 658 | ||
659 | #define R_BCM1480_PM_INT_ST 0x0000000000 | 659 | #define R_BCM1480_PM_INT_ST 0x0000000000 |
660 | #define R_BCM1480_PM_INT_MSK 0x0000000040 | 660 | #define R_BCM1480_PM_INT_MSK 0x0000000040 |
661 | #define R_BCM1480_PM_INT_CLR 0x0000000080 | 661 | #define R_BCM1480_PM_INT_CLR 0x0000000080 |
662 | #define R_BCM1480_PM_MRGD_INT 0x00000000C0 | 662 | #define R_BCM1480_PM_MRGD_INT 0x00000000C0 |
663 | 663 | ||
664 | /* | 664 | /* |
665 | * Debug registers (global) | 665 | * Debug registers (global) |
666 | */ | 666 | */ |
667 | 667 | ||
668 | #define A_BCM1480_PM_GLOBALDEBUGMODE_PMI 0x0010056000 | 668 | #define A_BCM1480_PM_GLOBALDEBUGMODE_PMI 0x0010056000 |
669 | #define A_BCM1480_PM_GLOBALDEBUG_PID 0x00100567F8 | 669 | #define A_BCM1480_PM_GLOBALDEBUG_PID 0x00100567F8 |
670 | #define A_BCM1480_PM_GLOBALDEBUG_PIB 0x0010056FF8 | 670 | #define A_BCM1480_PM_GLOBALDEBUG_PIB 0x0010056FF8 |
671 | #define A_BCM1480_PM_GLOBALDEBUGMODE_PMO 0x0010057000 | 671 | #define A_BCM1480_PM_GLOBALDEBUGMODE_PMO 0x0010057000 |
672 | #define A_BCM1480_PM_GLOBALDEBUG_POD 0x00100577F8 | 672 | #define A_BCM1480_PM_GLOBALDEBUG_POD 0x00100577F8 |
673 | #define A_BCM1480_PM_GLOBALDEBUG_POB 0x0010057FF8 | 673 | #define A_BCM1480_PM_GLOBALDEBUG_POB 0x0010057FF8 |
674 | 674 | ||
675 | /* ********************************************************************* | 675 | /* ********************************************************************* |
676 | * Switch performance counters | 676 | * Switch performance counters |
@@ -715,16 +715,16 @@ | |||
715 | * High-Speed Port Registers (Section 13) | 715 | * High-Speed Port Registers (Section 13) |
716 | ********************************************************************* */ | 716 | ********************************************************************* */ |
717 | 717 | ||
718 | #define A_BCM1480_HSP_BASE_0 0x00DF810000 | 718 | #define A_BCM1480_HSP_BASE_0 0x00DF810000 |
719 | #define A_BCM1480_HSP_BASE_1 0x00DF890000 | 719 | #define A_BCM1480_HSP_BASE_1 0x00DF890000 |
720 | #define A_BCM1480_HSP_BASE_2 0x00DF910000 | 720 | #define A_BCM1480_HSP_BASE_2 0x00DF910000 |
721 | #define BCM1480_HSP_REGISTER_SPACING 0x80000 | 721 | #define BCM1480_HSP_REGISTER_SPACING 0x80000 |
722 | 722 | ||
723 | #define A_BCM1480_HSP_BASE(idx) (A_BCM1480_HSP_BASE_0 + ((idx)*BCM1480_HSP_REGISTER_SPACING)) | 723 | #define A_BCM1480_HSP_BASE(idx) (A_BCM1480_HSP_BASE_0 + ((idx)*BCM1480_HSP_REGISTER_SPACING)) |
724 | #define A_BCM1480_HSP_REGISTER(idx, reg) (A_BCM1480_HSP_BASE(idx) + (reg)) | 724 | #define A_BCM1480_HSP_REGISTER(idx, reg) (A_BCM1480_HSP_BASE(idx) + (reg)) |
725 | 725 | ||
726 | #define R_BCM1480_HSP_RX_SPI4_CFG_0 0x0000000000 | 726 | #define R_BCM1480_HSP_RX_SPI4_CFG_0 0x0000000000 |
727 | #define R_BCM1480_HSP_RX_SPI4_CFG_1 0x0000000008 | 727 | #define R_BCM1480_HSP_RX_SPI4_CFG_1 0x0000000008 |
728 | #define R_BCM1480_HSP_RX_SPI4_DESKEW_OVERRIDE 0x0000000010 | 728 | #define R_BCM1480_HSP_RX_SPI4_DESKEW_OVERRIDE 0x0000000010 |
729 | #define R_BCM1480_HSP_RX_SPI4_DESKEW_DATAPATH 0x0000000018 | 729 | #define R_BCM1480_HSP_RX_SPI4_DESKEW_DATAPATH 0x0000000018 |
730 | #define R_BCM1480_HSP_RX_SPI4_PORT_INT_EN 0x0000000020 | 730 | #define R_BCM1480_HSP_RX_SPI4_PORT_INT_EN 0x0000000020 |
@@ -733,34 +733,34 @@ | |||
733 | #define R_BCM1480_HSP_RX_SPI4_CALENDAR_0 0x0000000200 | 733 | #define R_BCM1480_HSP_RX_SPI4_CALENDAR_0 0x0000000200 |
734 | #define R_BCM1480_HSP_RX_SPI4_CALENDAR_1 0x0000000208 | 734 | #define R_BCM1480_HSP_RX_SPI4_CALENDAR_1 0x0000000208 |
735 | 735 | ||
736 | #define R_BCM1480_HSP_RX_PLL_CNFG 0x0000000800 | 736 | #define R_BCM1480_HSP_RX_PLL_CNFG 0x0000000800 |
737 | #define R_BCM1480_HSP_RX_CALIBRATION 0x0000000808 | 737 | #define R_BCM1480_HSP_RX_CALIBRATION 0x0000000808 |
738 | #define R_BCM1480_HSP_RX_TEST 0x0000000810 | 738 | #define R_BCM1480_HSP_RX_TEST 0x0000000810 |
739 | #define R_BCM1480_HSP_RX_DIAG_DETAILS 0x0000000818 | 739 | #define R_BCM1480_HSP_RX_DIAG_DETAILS 0x0000000818 |
740 | #define R_BCM1480_HSP_RX_DIAG_CRC_0 0x0000000820 | 740 | #define R_BCM1480_HSP_RX_DIAG_CRC_0 0x0000000820 |
741 | #define R_BCM1480_HSP_RX_DIAG_CRC_1 0x0000000828 | 741 | #define R_BCM1480_HSP_RX_DIAG_CRC_1 0x0000000828 |
742 | #define R_BCM1480_HSP_RX_DIAG_HTCMD 0x0000000830 | 742 | #define R_BCM1480_HSP_RX_DIAG_HTCMD 0x0000000830 |
743 | #define R_BCM1480_HSP_RX_DIAG_PKTCTL 0x0000000838 | 743 | #define R_BCM1480_HSP_RX_DIAG_PKTCTL 0x0000000838 |
744 | 744 | ||
745 | #define R_BCM1480_HSP_RX_VIS_FLCTRL_COUNTER 0x0000000870 | 745 | #define R_BCM1480_HSP_RX_VIS_FLCTRL_COUNTER 0x0000000870 |
746 | 746 | ||
747 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_0 0x0000020020 | 747 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_0 0x0000020020 |
748 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_1 0x0000020028 | 748 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_1 0x0000020028 |
749 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_2 0x0000020030 | 749 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_2 0x0000020030 |
750 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_3 0x0000020038 | 750 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_3 0x0000020038 |
751 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_4 0x0000020040 | 751 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_4 0x0000020040 |
752 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_5 0x0000020048 | 752 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_5 0x0000020048 |
753 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_6 0x0000020050 | 753 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_6 0x0000020050 |
754 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_7 0x0000020058 | 754 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_7 0x0000020058 |
755 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC(idx) (R_BCM1480_HSP_RX_PKT_RAMALLOC_0 + 8*(idx)) | 755 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC(idx) (R_BCM1480_HSP_RX_PKT_RAMALLOC_0 + 8*(idx)) |
756 | 756 | ||
757 | /* XXX Following registers were shuffled. Renamed/renumbered per errata. */ | 757 | /* XXX Following registers were shuffled. Renamed/renumbered per errata. */ |
758 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_0 0x0000020078 | 758 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_0 0x0000020078 |
759 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_1 0x0000020080 | 759 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_1 0x0000020080 |
760 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_2 0x0000020088 | 760 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_2 0x0000020088 |
761 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_3 0x0000020090 | 761 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_3 0x0000020090 |
762 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_4 0x0000020098 | 762 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_4 0x0000020098 |
763 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_5 0x00000200A0 | 763 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_5 0x00000200A0 |
764 | 764 | ||
765 | #define R_BCM1480_HSP_RX_SPI_WATERMARK_0 0x00000200B0 | 765 | #define R_BCM1480_HSP_RX_SPI_WATERMARK_0 0x00000200B0 |
766 | #define R_BCM1480_HSP_RX_SPI_WATERMARK_1 0x00000200B8 | 766 | #define R_BCM1480_HSP_RX_SPI_WATERMARK_1 0x00000200B8 |
@@ -772,30 +772,30 @@ | |||
772 | #define R_BCM1480_HSP_RX_SPI_WATERMARK_7 0x00000200E8 | 772 | #define R_BCM1480_HSP_RX_SPI_WATERMARK_7 0x00000200E8 |
773 | #define R_BCM1480_HSP_RX_SPI_WATERMARK(idx) (R_BCM1480_HSP_RX_SPI_WATERMARK_0 + 8*(idx)) | 773 | #define R_BCM1480_HSP_RX_SPI_WATERMARK(idx) (R_BCM1480_HSP_RX_SPI_WATERMARK_0 + 8*(idx)) |
774 | 774 | ||
775 | #define R_BCM1480_HSP_RX_VIS_CMDQ_0 0x00000200F0 | 775 | #define R_BCM1480_HSP_RX_VIS_CMDQ_0 0x00000200F0 |
776 | #define R_BCM1480_HSP_RX_VIS_CMDQ_1 0x00000200F8 | 776 | #define R_BCM1480_HSP_RX_VIS_CMDQ_1 0x00000200F8 |
777 | #define R_BCM1480_HSP_RX_VIS_CMDQ_2 0x0000020100 | 777 | #define R_BCM1480_HSP_RX_VIS_CMDQ_2 0x0000020100 |
778 | #define R_BCM1480_HSP_RX_RAM_READCTL 0x0000020108 | 778 | #define R_BCM1480_HSP_RX_RAM_READCTL 0x0000020108 |
779 | #define R_BCM1480_HSP_RX_RAM_READWINDOW 0x0000020110 | 779 | #define R_BCM1480_HSP_RX_RAM_READWINDOW 0x0000020110 |
780 | #define R_BCM1480_HSP_RX_RF_READCTL 0x0000020118 | 780 | #define R_BCM1480_HSP_RX_RF_READCTL 0x0000020118 |
781 | #define R_BCM1480_HSP_RX_RF_READWINDOW 0x0000020120 | 781 | #define R_BCM1480_HSP_RX_RF_READWINDOW 0x0000020120 |
782 | 782 | ||
783 | #define R_BCM1480_HSP_TX_SPI4_CFG_0 0x0000040000 | 783 | #define R_BCM1480_HSP_TX_SPI4_CFG_0 0x0000040000 |
784 | #define R_BCM1480_HSP_TX_SPI4_CFG_1 0x0000040008 | 784 | #define R_BCM1480_HSP_TX_SPI4_CFG_1 0x0000040008 |
785 | #define R_BCM1480_HSP_TX_SPI4_TRAINING_FMT 0x0000040010 | 785 | #define R_BCM1480_HSP_TX_SPI4_TRAINING_FMT 0x0000040010 |
786 | 786 | ||
787 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_0 0x0000040020 | 787 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_0 0x0000040020 |
788 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_1 0x0000040028 | 788 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_1 0x0000040028 |
789 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_2 0x0000040030 | 789 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_2 0x0000040030 |
790 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_3 0x0000040038 | 790 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_3 0x0000040038 |
791 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_4 0x0000040040 | 791 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_4 0x0000040040 |
792 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_5 0x0000040048 | 792 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_5 0x0000040048 |
793 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_6 0x0000040050 | 793 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_6 0x0000040050 |
794 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_7 0x0000040058 | 794 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_7 0x0000040058 |
795 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC(idx) (R_BCM1480_HSP_TX_PKT_RAMALLOC_0 + 8*(idx)) | 795 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC(idx) (R_BCM1480_HSP_TX_PKT_RAMALLOC_0 + 8*(idx)) |
796 | #define R_BCM1480_HSP_TX_NPC_RAMALLOC 0x0000040078 | 796 | #define R_BCM1480_HSP_TX_NPC_RAMALLOC 0x0000040078 |
797 | #define R_BCM1480_HSP_TX_RSP_RAMALLOC 0x0000040080 | 797 | #define R_BCM1480_HSP_TX_RSP_RAMALLOC 0x0000040080 |
798 | #define R_BCM1480_HSP_TX_PC_RAMALLOC 0x0000040088 | 798 | #define R_BCM1480_HSP_TX_PC_RAMALLOC 0x0000040088 |
799 | #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_0 0x0000040090 | 799 | #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_0 0x0000040090 |
800 | #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_1 0x0000040098 | 800 | #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_1 0x0000040098 |
801 | #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_2 0x00000400A0 | 801 | #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_2 0x00000400A0 |
@@ -805,37 +805,37 @@ | |||
805 | #define R_BCM1480_HSP_TX_PKT_RXPHITCNT_2 0x00000400C0 | 805 | #define R_BCM1480_HSP_TX_PKT_RXPHITCNT_2 0x00000400C0 |
806 | #define R_BCM1480_HSP_TX_PKT_RXPHITCNT_3 0x00000400C8 | 806 | #define R_BCM1480_HSP_TX_PKT_RXPHITCNT_3 0x00000400C8 |
807 | #define R_BCM1480_HSP_TX_PKT_RXPHITCNT(idx) (R_BCM1480_HSP_TX_PKT_RXPHITCNT_0 + 8*(idx)) | 807 | #define R_BCM1480_HSP_TX_PKT_RXPHITCNT(idx) (R_BCM1480_HSP_TX_PKT_RXPHITCNT_0 + 8*(idx)) |
808 | #define R_BCM1480_HSP_TX_HTIO_RXPHITCNT 0x00000400D0 | 808 | #define R_BCM1480_HSP_TX_HTIO_RXPHITCNT 0x00000400D0 |
809 | #define R_BCM1480_HSP_TX_HTCC_RXPHITCNT 0x00000400D8 | 809 | #define R_BCM1480_HSP_TX_HTCC_RXPHITCNT 0x00000400D8 |
810 | 810 | ||
811 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_0 0x00000400E0 | 811 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_0 0x00000400E0 |
812 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_1 0x00000400E8 | 812 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_1 0x00000400E8 |
813 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_2 0x00000400F0 | 813 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_2 0x00000400F0 |
814 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_3 0x00000400F8 | 814 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_3 0x00000400F8 |
815 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT(idx) (R_BCM1480_HSP_TX_PKT_TXPHITCNT_0 + 8*(idx)) | 815 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT(idx) (R_BCM1480_HSP_TX_PKT_TXPHITCNT_0 + 8*(idx)) |
816 | #define R_BCM1480_HSP_TX_HTIO_TXPHITCNT 0x0000040100 | 816 | #define R_BCM1480_HSP_TX_HTIO_TXPHITCNT 0x0000040100 |
817 | #define R_BCM1480_HSP_TX_HTCC_TXPHITCNT 0x0000040108 | 817 | #define R_BCM1480_HSP_TX_HTCC_TXPHITCNT 0x0000040108 |
818 | 818 | ||
819 | #define R_BCM1480_HSP_TX_SPI4_CALENDAR_0 0x0000040200 | 819 | #define R_BCM1480_HSP_TX_SPI4_CALENDAR_0 0x0000040200 |
820 | #define R_BCM1480_HSP_TX_SPI4_CALENDAR_1 0x0000040208 | 820 | #define R_BCM1480_HSP_TX_SPI4_CALENDAR_1 0x0000040208 |
821 | 821 | ||
822 | #define R_BCM1480_HSP_TX_PLL_CNFG 0x0000040800 | 822 | #define R_BCM1480_HSP_TX_PLL_CNFG 0x0000040800 |
823 | #define R_BCM1480_HSP_TX_CALIBRATION 0x0000040808 | 823 | #define R_BCM1480_HSP_TX_CALIBRATION 0x0000040808 |
824 | #define R_BCM1480_HSP_TX_TEST 0x0000040810 | 824 | #define R_BCM1480_HSP_TX_TEST 0x0000040810 |
825 | 825 | ||
826 | #define R_BCM1480_HSP_TX_VIS_CMDQ_0 0x0000040840 | 826 | #define R_BCM1480_HSP_TX_VIS_CMDQ_0 0x0000040840 |
827 | #define R_BCM1480_HSP_TX_VIS_CMDQ_1 0x0000040848 | 827 | #define R_BCM1480_HSP_TX_VIS_CMDQ_1 0x0000040848 |
828 | #define R_BCM1480_HSP_TX_VIS_CMDQ_2 0x0000040850 | 828 | #define R_BCM1480_HSP_TX_VIS_CMDQ_2 0x0000040850 |
829 | #define R_BCM1480_HSP_TX_RAM_READCTL 0x0000040860 | 829 | #define R_BCM1480_HSP_TX_RAM_READCTL 0x0000040860 |
830 | #define R_BCM1480_HSP_TX_RAM_READWINDOW 0x0000040868 | 830 | #define R_BCM1480_HSP_TX_RAM_READWINDOW 0x0000040868 |
831 | #define R_BCM1480_HSP_TX_RF_READCTL 0x0000040870 | 831 | #define R_BCM1480_HSP_TX_RF_READCTL 0x0000040870 |
832 | #define R_BCM1480_HSP_TX_RF_READWINDOW 0x0000040878 | 832 | #define R_BCM1480_HSP_TX_RF_READWINDOW 0x0000040878 |
833 | 833 | ||
834 | #define R_BCM1480_HSP_TX_SPI4_PORT_INT_STATUS 0x0000040880 | 834 | #define R_BCM1480_HSP_TX_SPI4_PORT_INT_STATUS 0x0000040880 |
835 | #define R_BCM1480_HSP_TX_SPI4_PORT_INT_EN 0x0000040888 | 835 | #define R_BCM1480_HSP_TX_SPI4_PORT_INT_EN 0x0000040888 |
836 | 836 | ||
837 | #define R_BCM1480_HSP_TX_NEXT_ADDR_BASE 0x000040400 | 837 | #define R_BCM1480_HSP_TX_NEXT_ADDR_BASE 0x000040400 |
838 | #define R_BCM1480_HSP_TX_NEXT_ADDR_REGISTER(x) (R_BCM1480_HSP_TX_NEXT_ADDR_BASE+ 8*(x)) | 838 | #define R_BCM1480_HSP_TX_NEXT_ADDR_REGISTER(x) (R_BCM1480_HSP_TX_NEXT_ADDR_BASE+ 8*(x)) |
839 | 839 | ||
840 | 840 | ||
841 | 841 | ||
@@ -843,60 +843,60 @@ | |||
843 | * Physical Address Map (Table 10 and Figure 7) | 843 | * Physical Address Map (Table 10 and Figure 7) |
844 | ********************************************************************* */ | 844 | ********************************************************************* */ |
845 | 845 | ||
846 | #define A_BCM1480_PHYS_MEMORY_0 _SB_MAKE64(0x0000000000) | 846 | #define A_BCM1480_PHYS_MEMORY_0 _SB_MAKE64(0x0000000000) |
847 | #define A_BCM1480_PHYS_MEMORY_SIZE _SB_MAKE64((256*1024*1024)) | 847 | #define A_BCM1480_PHYS_MEMORY_SIZE _SB_MAKE64((256*1024*1024)) |
848 | #define A_BCM1480_PHYS_SYSTEM_CTL _SB_MAKE64(0x0010000000) | 848 | #define A_BCM1480_PHYS_SYSTEM_CTL _SB_MAKE64(0x0010000000) |
849 | #define A_BCM1480_PHYS_IO_SYSTEM _SB_MAKE64(0x0010060000) | 849 | #define A_BCM1480_PHYS_IO_SYSTEM _SB_MAKE64(0x0010060000) |
850 | #define A_BCM1480_PHYS_GENBUS _SB_MAKE64(0x0010090000) | 850 | #define A_BCM1480_PHYS_GENBUS _SB_MAKE64(0x0010090000) |
851 | #define A_BCM1480_PHYS_GENBUS_END _SB_MAKE64(0x0028000000) | 851 | #define A_BCM1480_PHYS_GENBUS_END _SB_MAKE64(0x0028000000) |
852 | #define A_BCM1480_PHYS_PCI_MISC_MATCH_BYTES _SB_MAKE64(0x0028000000) | 852 | #define A_BCM1480_PHYS_PCI_MISC_MATCH_BYTES _SB_MAKE64(0x0028000000) |
853 | #define A_BCM1480_PHYS_PCI_IACK_MATCH_BYTES _SB_MAKE64(0x0029000000) | 853 | #define A_BCM1480_PHYS_PCI_IACK_MATCH_BYTES _SB_MAKE64(0x0029000000) |
854 | #define A_BCM1480_PHYS_PCI_IO_MATCH_BYTES _SB_MAKE64(0x002C000000) | 854 | #define A_BCM1480_PHYS_PCI_IO_MATCH_BYTES _SB_MAKE64(0x002C000000) |
855 | #define A_BCM1480_PHYS_PCI_CFG_MATCH_BYTES _SB_MAKE64(0x002E000000) | 855 | #define A_BCM1480_PHYS_PCI_CFG_MATCH_BYTES _SB_MAKE64(0x002E000000) |
856 | #define A_BCM1480_PHYS_PCI_OMAP_MATCH_BYTES _SB_MAKE64(0x002F000000) | 856 | #define A_BCM1480_PHYS_PCI_OMAP_MATCH_BYTES _SB_MAKE64(0x002F000000) |
857 | #define A_BCM1480_PHYS_PCI_MEM_MATCH_BYTES _SB_MAKE64(0x0030000000) | 857 | #define A_BCM1480_PHYS_PCI_MEM_MATCH_BYTES _SB_MAKE64(0x0030000000) |
858 | #define A_BCM1480_PHYS_HT_MEM_MATCH_BYTES _SB_MAKE64(0x0040000000) | 858 | #define A_BCM1480_PHYS_HT_MEM_MATCH_BYTES _SB_MAKE64(0x0040000000) |
859 | #define A_BCM1480_PHYS_HT_MEM_MATCH_BITS _SB_MAKE64(0x0060000000) | 859 | #define A_BCM1480_PHYS_HT_MEM_MATCH_BITS _SB_MAKE64(0x0060000000) |
860 | #define A_BCM1480_PHYS_MEMORY_1 _SB_MAKE64(0x0080000000) | 860 | #define A_BCM1480_PHYS_MEMORY_1 _SB_MAKE64(0x0080000000) |
861 | #define A_BCM1480_PHYS_MEMORY_2 _SB_MAKE64(0x0090000000) | 861 | #define A_BCM1480_PHYS_MEMORY_2 _SB_MAKE64(0x0090000000) |
862 | #define A_BCM1480_PHYS_PCI_MISC_MATCH_BITS _SB_MAKE64(0x00A8000000) | 862 | #define A_BCM1480_PHYS_PCI_MISC_MATCH_BITS _SB_MAKE64(0x00A8000000) |
863 | #define A_BCM1480_PHYS_PCI_IACK_MATCH_BITS _SB_MAKE64(0x00A9000000) | 863 | #define A_BCM1480_PHYS_PCI_IACK_MATCH_BITS _SB_MAKE64(0x00A9000000) |
864 | #define A_BCM1480_PHYS_PCI_IO_MATCH_BITS _SB_MAKE64(0x00AC000000) | 864 | #define A_BCM1480_PHYS_PCI_IO_MATCH_BITS _SB_MAKE64(0x00AC000000) |
865 | #define A_BCM1480_PHYS_PCI_CFG_MATCH_BITS _SB_MAKE64(0x00AE000000) | 865 | #define A_BCM1480_PHYS_PCI_CFG_MATCH_BITS _SB_MAKE64(0x00AE000000) |
866 | #define A_BCM1480_PHYS_PCI_OMAP_MATCH_BITS _SB_MAKE64(0x00AF000000) | 866 | #define A_BCM1480_PHYS_PCI_OMAP_MATCH_BITS _SB_MAKE64(0x00AF000000) |
867 | #define A_BCM1480_PHYS_PCI_MEM_MATCH_BITS _SB_MAKE64(0x00B0000000) | 867 | #define A_BCM1480_PHYS_PCI_MEM_MATCH_BITS _SB_MAKE64(0x00B0000000) |
868 | #define A_BCM1480_PHYS_MEMORY_3 _SB_MAKE64(0x00C0000000) | 868 | #define A_BCM1480_PHYS_MEMORY_3 _SB_MAKE64(0x00C0000000) |
869 | #define A_BCM1480_PHYS_L2_CACHE_TEST _SB_MAKE64(0x00D0000000) | 869 | #define A_BCM1480_PHYS_L2_CACHE_TEST _SB_MAKE64(0x00D0000000) |
870 | #define A_BCM1480_PHYS_HT_SPECIAL_MATCH_BYTES _SB_MAKE64(0x00D8000000) | 870 | #define A_BCM1480_PHYS_HT_SPECIAL_MATCH_BYTES _SB_MAKE64(0x00D8000000) |
871 | #define A_BCM1480_PHYS_HT_IO_MATCH_BYTES _SB_MAKE64(0x00DC000000) | 871 | #define A_BCM1480_PHYS_HT_IO_MATCH_BYTES _SB_MAKE64(0x00DC000000) |
872 | #define A_BCM1480_PHYS_HT_CFG_MATCH_BYTES _SB_MAKE64(0x00DE000000) | 872 | #define A_BCM1480_PHYS_HT_CFG_MATCH_BYTES _SB_MAKE64(0x00DE000000) |
873 | #define A_BCM1480_PHYS_HS_SUBSYS _SB_MAKE64(0x00DF000000) | 873 | #define A_BCM1480_PHYS_HS_SUBSYS _SB_MAKE64(0x00DF000000) |
874 | #define A_BCM1480_PHYS_HT_SPECIAL_MATCH_BITS _SB_MAKE64(0x00F8000000) | 874 | #define A_BCM1480_PHYS_HT_SPECIAL_MATCH_BITS _SB_MAKE64(0x00F8000000) |
875 | #define A_BCM1480_PHYS_HT_IO_MATCH_BITS _SB_MAKE64(0x00FC000000) | 875 | #define A_BCM1480_PHYS_HT_IO_MATCH_BITS _SB_MAKE64(0x00FC000000) |
876 | #define A_BCM1480_PHYS_HT_CFG_MATCH_BITS _SB_MAKE64(0x00FE000000) | 876 | #define A_BCM1480_PHYS_HT_CFG_MATCH_BITS _SB_MAKE64(0x00FE000000) |
877 | #define A_BCM1480_PHYS_MEMORY_EXP _SB_MAKE64(0x0100000000) | 877 | #define A_BCM1480_PHYS_MEMORY_EXP _SB_MAKE64(0x0100000000) |
878 | #define A_BCM1480_PHYS_MEMORY_EXP_SIZE _SB_MAKE64((508*1024*1024*1024)) | 878 | #define A_BCM1480_PHYS_MEMORY_EXP_SIZE _SB_MAKE64((508*1024*1024*1024)) |
879 | #define A_BCM1480_PHYS_PCI_UPPER _SB_MAKE64(0x1000000000) | 879 | #define A_BCM1480_PHYS_PCI_UPPER _SB_MAKE64(0x1000000000) |
880 | #define A_BCM1480_PHYS_HT_UPPER_MATCH_BYTES _SB_MAKE64(0x2000000000) | 880 | #define A_BCM1480_PHYS_HT_UPPER_MATCH_BYTES _SB_MAKE64(0x2000000000) |
881 | #define A_BCM1480_PHYS_HT_UPPER_MATCH_BITS _SB_MAKE64(0x3000000000) | 881 | #define A_BCM1480_PHYS_HT_UPPER_MATCH_BITS _SB_MAKE64(0x3000000000) |
882 | #define A_BCM1480_PHYS_HT_NODE_ALIAS _SB_MAKE64(0x4000000000) | 882 | #define A_BCM1480_PHYS_HT_NODE_ALIAS _SB_MAKE64(0x4000000000) |
883 | #define A_BCM1480_PHYS_HT_FULLACCESS _SB_MAKE64(0xF000000000) | 883 | #define A_BCM1480_PHYS_HT_FULLACCESS _SB_MAKE64(0xF000000000) |
884 | 884 | ||
885 | 885 | ||
886 | /* ********************************************************************* | 886 | /* ********************************************************************* |
887 | * L2 Cache as RAM (Table 54) | 887 | * L2 Cache as RAM (Table 54) |
888 | ********************************************************************* */ | 888 | ********************************************************************* */ |
889 | 889 | ||
890 | #define A_BCM1480_PHYS_L2CACHE_WAY_SIZE _SB_MAKE64(0x0000020000) | 890 | #define A_BCM1480_PHYS_L2CACHE_WAY_SIZE _SB_MAKE64(0x0000020000) |
891 | #define BCM1480_PHYS_L2CACHE_NUM_WAYS 8 | 891 | #define BCM1480_PHYS_L2CACHE_NUM_WAYS 8 |
892 | #define A_BCM1480_PHYS_L2CACHE_TOTAL_SIZE _SB_MAKE64(0x0000100000) | 892 | #define A_BCM1480_PHYS_L2CACHE_TOTAL_SIZE _SB_MAKE64(0x0000100000) |
893 | #define A_BCM1480_PHYS_L2CACHE_WAY0 _SB_MAKE64(0x00D0300000) | 893 | #define A_BCM1480_PHYS_L2CACHE_WAY0 _SB_MAKE64(0x00D0300000) |
894 | #define A_BCM1480_PHYS_L2CACHE_WAY1 _SB_MAKE64(0x00D0320000) | 894 | #define A_BCM1480_PHYS_L2CACHE_WAY1 _SB_MAKE64(0x00D0320000) |
895 | #define A_BCM1480_PHYS_L2CACHE_WAY2 _SB_MAKE64(0x00D0340000) | 895 | #define A_BCM1480_PHYS_L2CACHE_WAY2 _SB_MAKE64(0x00D0340000) |
896 | #define A_BCM1480_PHYS_L2CACHE_WAY3 _SB_MAKE64(0x00D0360000) | 896 | #define A_BCM1480_PHYS_L2CACHE_WAY3 _SB_MAKE64(0x00D0360000) |
897 | #define A_BCM1480_PHYS_L2CACHE_WAY4 _SB_MAKE64(0x00D0380000) | 897 | #define A_BCM1480_PHYS_L2CACHE_WAY4 _SB_MAKE64(0x00D0380000) |
898 | #define A_BCM1480_PHYS_L2CACHE_WAY5 _SB_MAKE64(0x00D03A0000) | 898 | #define A_BCM1480_PHYS_L2CACHE_WAY5 _SB_MAKE64(0x00D03A0000) |
899 | #define A_BCM1480_PHYS_L2CACHE_WAY6 _SB_MAKE64(0x00D03C0000) | 899 | #define A_BCM1480_PHYS_L2CACHE_WAY6 _SB_MAKE64(0x00D03C0000) |
900 | #define A_BCM1480_PHYS_L2CACHE_WAY7 _SB_MAKE64(0x00D03E0000) | 900 | #define A_BCM1480_PHYS_L2CACHE_WAY7 _SB_MAKE64(0x00D03E0000) |
901 | 901 | ||
902 | #endif /* _BCM1480_REGS_H */ | 902 | #endif /* _BCM1480_REGS_H */ |
diff --git a/arch/mips/include/asm/sibyte/bcm1480_scd.h b/arch/mips/include/asm/sibyte/bcm1480_scd.h index 2af3706b9648..8a1e2b05a626 100644 --- a/arch/mips/include/asm/sibyte/bcm1480_scd.h +++ b/arch/mips/include/asm/sibyte/bcm1480_scd.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * BCM1280/BCM1400 Board Support Package | 2 | * BCM1280/BCM1400 Board Support Package |
3 | * | 3 | * |
4 | * SCD Constants and Macros File: bcm1480_scd.h | 4 | * SCD Constants and Macros File: bcm1480_scd.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the System Control and Debug module. | 7 | * manipulating the System Control and Debug module. |
@@ -74,11 +74,11 @@ | |||
74 | * New part definitions | 74 | * New part definitions |
75 | */ | 75 | */ |
76 | 76 | ||
77 | #define K_SYS_PART_BCM1480 0x1406 | 77 | #define K_SYS_PART_BCM1480 0x1406 |
78 | #define K_SYS_PART_BCM1280 0x1206 | 78 | #define K_SYS_PART_BCM1280 0x1206 |
79 | #define K_SYS_PART_BCM1455 0x1407 | 79 | #define K_SYS_PART_BCM1455 0x1407 |
80 | #define K_SYS_PART_BCM1255 0x1257 | 80 | #define K_SYS_PART_BCM1255 0x1257 |
81 | #define K_SYS_PART_BCM1158 0x1156 | 81 | #define K_SYS_PART_BCM1158 0x1156 |
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Manufacturing Information Register (Table 14) | 84 | * Manufacturing Information Register (Table 14) |
@@ -91,73 +91,73 @@ | |||
91 | * Entire register is different from 1250, all new constants below | 91 | * Entire register is different from 1250, all new constants below |
92 | */ | 92 | */ |
93 | 93 | ||
94 | #define M_BCM1480_SYS_RESERVED0 _SB_MAKEMASK1(0) | 94 | #define M_BCM1480_SYS_RESERVED0 _SB_MAKEMASK1(0) |
95 | #define M_BCM1480_SYS_HT_MINRSTCNT _SB_MAKEMASK1(1) | 95 | #define M_BCM1480_SYS_HT_MINRSTCNT _SB_MAKEMASK1(1) |
96 | #define M_BCM1480_SYS_RESERVED2 _SB_MAKEMASK1(2) | 96 | #define M_BCM1480_SYS_RESERVED2 _SB_MAKEMASK1(2) |
97 | #define M_BCM1480_SYS_RESERVED3 _SB_MAKEMASK1(3) | 97 | #define M_BCM1480_SYS_RESERVED3 _SB_MAKEMASK1(3) |
98 | #define M_BCM1480_SYS_RESERVED4 _SB_MAKEMASK1(4) | 98 | #define M_BCM1480_SYS_RESERVED4 _SB_MAKEMASK1(4) |
99 | #define M_BCM1480_SYS_IOB_DIV _SB_MAKEMASK1(5) | 99 | #define M_BCM1480_SYS_IOB_DIV _SB_MAKEMASK1(5) |
100 | 100 | ||
101 | #define S_BCM1480_SYS_PLL_DIV _SB_MAKE64(6) | 101 | #define S_BCM1480_SYS_PLL_DIV _SB_MAKE64(6) |
102 | #define M_BCM1480_SYS_PLL_DIV _SB_MAKEMASK(5, S_BCM1480_SYS_PLL_DIV) | 102 | #define M_BCM1480_SYS_PLL_DIV _SB_MAKEMASK(5, S_BCM1480_SYS_PLL_DIV) |
103 | #define V_BCM1480_SYS_PLL_DIV(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_PLL_DIV) | 103 | #define V_BCM1480_SYS_PLL_DIV(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_PLL_DIV) |
104 | #define G_BCM1480_SYS_PLL_DIV(x) _SB_GETVALUE(x, S_BCM1480_SYS_PLL_DIV, M_BCM1480_SYS_PLL_DIV) | 104 | #define G_BCM1480_SYS_PLL_DIV(x) _SB_GETVALUE(x, S_BCM1480_SYS_PLL_DIV, M_BCM1480_SYS_PLL_DIV) |
105 | 105 | ||
106 | #define S_BCM1480_SYS_SW_DIV _SB_MAKE64(11) | 106 | #define S_BCM1480_SYS_SW_DIV _SB_MAKE64(11) |
107 | #define M_BCM1480_SYS_SW_DIV _SB_MAKEMASK(5, S_BCM1480_SYS_SW_DIV) | 107 | #define M_BCM1480_SYS_SW_DIV _SB_MAKEMASK(5, S_BCM1480_SYS_SW_DIV) |
108 | #define V_BCM1480_SYS_SW_DIV(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_SW_DIV) | 108 | #define V_BCM1480_SYS_SW_DIV(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_SW_DIV) |
109 | #define G_BCM1480_SYS_SW_DIV(x) _SB_GETVALUE(x, S_BCM1480_SYS_SW_DIV, M_BCM1480_SYS_SW_DIV) | 109 | #define G_BCM1480_SYS_SW_DIV(x) _SB_GETVALUE(x, S_BCM1480_SYS_SW_DIV, M_BCM1480_SYS_SW_DIV) |
110 | 110 | ||
111 | #define M_BCM1480_SYS_PCMCIA_ENABLE _SB_MAKEMASK1(16) | 111 | #define M_BCM1480_SYS_PCMCIA_ENABLE _SB_MAKEMASK1(16) |
112 | #define M_BCM1480_SYS_DUART1_ENABLE _SB_MAKEMASK1(17) | 112 | #define M_BCM1480_SYS_DUART1_ENABLE _SB_MAKEMASK1(17) |
113 | 113 | ||
114 | #define S_BCM1480_SYS_BOOT_MODE _SB_MAKE64(18) | 114 | #define S_BCM1480_SYS_BOOT_MODE _SB_MAKE64(18) |
115 | #define M_BCM1480_SYS_BOOT_MODE _SB_MAKEMASK(2, S_BCM1480_SYS_BOOT_MODE) | 115 | #define M_BCM1480_SYS_BOOT_MODE _SB_MAKEMASK(2, S_BCM1480_SYS_BOOT_MODE) |
116 | #define V_BCM1480_SYS_BOOT_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_BOOT_MODE) | 116 | #define V_BCM1480_SYS_BOOT_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_BOOT_MODE) |
117 | #define G_BCM1480_SYS_BOOT_MODE(x) _SB_GETVALUE(x, S_BCM1480_SYS_BOOT_MODE, M_BCM1480_SYS_BOOT_MODE) | 117 | #define G_BCM1480_SYS_BOOT_MODE(x) _SB_GETVALUE(x, S_BCM1480_SYS_BOOT_MODE, M_BCM1480_SYS_BOOT_MODE) |
118 | #define K_BCM1480_SYS_BOOT_MODE_ROM32 0 | 118 | #define K_BCM1480_SYS_BOOT_MODE_ROM32 0 |
119 | #define K_BCM1480_SYS_BOOT_MODE_ROM8 1 | 119 | #define K_BCM1480_SYS_BOOT_MODE_ROM8 1 |
120 | #define K_BCM1480_SYS_BOOT_MODE_SMBUS_SMALL 2 | 120 | #define K_BCM1480_SYS_BOOT_MODE_SMBUS_SMALL 2 |
121 | #define K_BCM1480_SYS_BOOT_MODE_SMBUS_BIG 3 | 121 | #define K_BCM1480_SYS_BOOT_MODE_SMBUS_BIG 3 |
122 | #define M_BCM1480_SYS_BOOT_MODE_SMBUS _SB_MAKEMASK1(19) | 122 | #define M_BCM1480_SYS_BOOT_MODE_SMBUS _SB_MAKEMASK1(19) |
123 | 123 | ||
124 | #define M_BCM1480_SYS_PCI_HOST _SB_MAKEMASK1(20) | 124 | #define M_BCM1480_SYS_PCI_HOST _SB_MAKEMASK1(20) |
125 | #define M_BCM1480_SYS_PCI_ARBITER _SB_MAKEMASK1(21) | 125 | #define M_BCM1480_SYS_PCI_ARBITER _SB_MAKEMASK1(21) |
126 | #define M_BCM1480_SYS_BIG_ENDIAN _SB_MAKEMASK1(22) | 126 | #define M_BCM1480_SYS_BIG_ENDIAN _SB_MAKEMASK1(22) |
127 | #define M_BCM1480_SYS_GENCLK_EN _SB_MAKEMASK1(23) | 127 | #define M_BCM1480_SYS_GENCLK_EN _SB_MAKEMASK1(23) |
128 | #define M_BCM1480_SYS_GEN_PARITY_EN _SB_MAKEMASK1(24) | 128 | #define M_BCM1480_SYS_GEN_PARITY_EN _SB_MAKEMASK1(24) |
129 | #define M_BCM1480_SYS_RESERVED25 _SB_MAKEMASK1(25) | 129 | #define M_BCM1480_SYS_RESERVED25 _SB_MAKEMASK1(25) |
130 | 130 | ||
131 | #define S_BCM1480_SYS_CONFIG 26 | 131 | #define S_BCM1480_SYS_CONFIG 26 |
132 | #define M_BCM1480_SYS_CONFIG _SB_MAKEMASK(6, S_BCM1480_SYS_CONFIG) | 132 | #define M_BCM1480_SYS_CONFIG _SB_MAKEMASK(6, S_BCM1480_SYS_CONFIG) |
133 | #define V_BCM1480_SYS_CONFIG(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_CONFIG) | 133 | #define V_BCM1480_SYS_CONFIG(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_CONFIG) |
134 | #define G_BCM1480_SYS_CONFIG(x) _SB_GETVALUE(x, S_BCM1480_SYS_CONFIG, M_BCM1480_SYS_CONFIG) | 134 | #define G_BCM1480_SYS_CONFIG(x) _SB_GETVALUE(x, S_BCM1480_SYS_CONFIG, M_BCM1480_SYS_CONFIG) |
135 | 135 | ||
136 | #define M_BCM1480_SYS_RESERVED32 _SB_MAKEMASK(32, 15) | 136 | #define M_BCM1480_SYS_RESERVED32 _SB_MAKEMASK(32, 15) |
137 | 137 | ||
138 | #define S_BCM1480_SYS_NODEID 47 | 138 | #define S_BCM1480_SYS_NODEID 47 |
139 | #define M_BCM1480_SYS_NODEID _SB_MAKEMASK(4, S_BCM1480_SYS_NODEID) | 139 | #define M_BCM1480_SYS_NODEID _SB_MAKEMASK(4, S_BCM1480_SYS_NODEID) |
140 | #define V_BCM1480_SYS_NODEID(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_NODEID) | 140 | #define V_BCM1480_SYS_NODEID(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_NODEID) |
141 | #define G_BCM1480_SYS_NODEID(x) _SB_GETVALUE(x, S_BCM1480_SYS_NODEID, M_BCM1480_SYS_NODEID) | 141 | #define G_BCM1480_SYS_NODEID(x) _SB_GETVALUE(x, S_BCM1480_SYS_NODEID, M_BCM1480_SYS_NODEID) |
142 | 142 | ||
143 | #define M_BCM1480_SYS_CCNUMA_EN _SB_MAKEMASK1(51) | 143 | #define M_BCM1480_SYS_CCNUMA_EN _SB_MAKEMASK1(51) |
144 | #define M_BCM1480_SYS_CPU_RESET_0 _SB_MAKEMASK1(52) | 144 | #define M_BCM1480_SYS_CPU_RESET_0 _SB_MAKEMASK1(52) |
145 | #define M_BCM1480_SYS_CPU_RESET_1 _SB_MAKEMASK1(53) | 145 | #define M_BCM1480_SYS_CPU_RESET_1 _SB_MAKEMASK1(53) |
146 | #define M_BCM1480_SYS_CPU_RESET_2 _SB_MAKEMASK1(54) | 146 | #define M_BCM1480_SYS_CPU_RESET_2 _SB_MAKEMASK1(54) |
147 | #define M_BCM1480_SYS_CPU_RESET_3 _SB_MAKEMASK1(55) | 147 | #define M_BCM1480_SYS_CPU_RESET_3 _SB_MAKEMASK1(55) |
148 | #define S_BCM1480_SYS_DISABLECPU0 56 | 148 | #define S_BCM1480_SYS_DISABLECPU0 56 |
149 | #define M_BCM1480_SYS_DISABLECPU0 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU0) | 149 | #define M_BCM1480_SYS_DISABLECPU0 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU0) |
150 | #define S_BCM1480_SYS_DISABLECPU1 57 | 150 | #define S_BCM1480_SYS_DISABLECPU1 57 |
151 | #define M_BCM1480_SYS_DISABLECPU1 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU1) | 151 | #define M_BCM1480_SYS_DISABLECPU1 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU1) |
152 | #define S_BCM1480_SYS_DISABLECPU2 58 | 152 | #define S_BCM1480_SYS_DISABLECPU2 58 |
153 | #define M_BCM1480_SYS_DISABLECPU2 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU2) | 153 | #define M_BCM1480_SYS_DISABLECPU2 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU2) |
154 | #define S_BCM1480_SYS_DISABLECPU3 59 | 154 | #define S_BCM1480_SYS_DISABLECPU3 59 |
155 | #define M_BCM1480_SYS_DISABLECPU3 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU3) | 155 | #define M_BCM1480_SYS_DISABLECPU3 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU3) |
156 | 156 | ||
157 | #define M_BCM1480_SYS_SB_SOFTRES _SB_MAKEMASK1(60) | 157 | #define M_BCM1480_SYS_SB_SOFTRES _SB_MAKEMASK1(60) |
158 | #define M_BCM1480_SYS_EXT_RESET _SB_MAKEMASK1(61) | 158 | #define M_BCM1480_SYS_EXT_RESET _SB_MAKEMASK1(61) |
159 | #define M_BCM1480_SYS_SYSTEM_RESET _SB_MAKEMASK1(62) | 159 | #define M_BCM1480_SYS_SYSTEM_RESET _SB_MAKEMASK1(62) |
160 | #define M_BCM1480_SYS_SW_FLAG _SB_MAKEMASK1(63) | 160 | #define M_BCM1480_SYS_SW_FLAG _SB_MAKEMASK1(63) |
161 | 161 | ||
162 | /* | 162 | /* |
163 | * Scratch Register (Table 16) | 163 | * Scratch Register (Table 16) |
@@ -193,23 +193,23 @@ | |||
193 | * Registers: SCD_WDOG_CFG_x | 193 | * Registers: SCD_WDOG_CFG_x |
194 | */ | 194 | */ |
195 | 195 | ||
196 | #define M_BCM1480_SCD_WDOG_ENABLE _SB_MAKEMASK1(0) | 196 | #define M_BCM1480_SCD_WDOG_ENABLE _SB_MAKEMASK1(0) |
197 | 197 | ||
198 | #define S_BCM1480_SCD_WDOG_RESET_TYPE 2 | 198 | #define S_BCM1480_SCD_WDOG_RESET_TYPE 2 |
199 | #define M_BCM1480_SCD_WDOG_RESET_TYPE _SB_MAKEMASK(5, S_BCM1480_SCD_WDOG_RESET_TYPE) | 199 | #define M_BCM1480_SCD_WDOG_RESET_TYPE _SB_MAKEMASK(5, S_BCM1480_SCD_WDOG_RESET_TYPE) |
200 | #define V_BCM1480_SCD_WDOG_RESET_TYPE(x) _SB_MAKEVALUE(x, S_BCM1480_SCD_WDOG_RESET_TYPE) | 200 | #define V_BCM1480_SCD_WDOG_RESET_TYPE(x) _SB_MAKEVALUE(x, S_BCM1480_SCD_WDOG_RESET_TYPE) |
201 | #define G_BCM1480_SCD_WDOG_RESET_TYPE(x) _SB_GETVALUE(x, S_BCM1480_SCD_WDOG_RESET_TYPE, M_BCM1480_SCD_WDOG_RESET_TYPE) | 201 | #define G_BCM1480_SCD_WDOG_RESET_TYPE(x) _SB_GETVALUE(x, S_BCM1480_SCD_WDOG_RESET_TYPE, M_BCM1480_SCD_WDOG_RESET_TYPE) |
202 | 202 | ||
203 | #define K_BCM1480_SCD_WDOG_RESET_FULL 0 /* actually, (x & 1) == 0 */ | 203 | #define K_BCM1480_SCD_WDOG_RESET_FULL 0 /* actually, (x & 1) == 0 */ |
204 | #define K_BCM1480_SCD_WDOG_RESET_SOFT 1 | 204 | #define K_BCM1480_SCD_WDOG_RESET_SOFT 1 |
205 | #define K_BCM1480_SCD_WDOG_RESET_CPU0 3 | 205 | #define K_BCM1480_SCD_WDOG_RESET_CPU0 3 |
206 | #define K_BCM1480_SCD_WDOG_RESET_CPU1 5 | 206 | #define K_BCM1480_SCD_WDOG_RESET_CPU1 5 |
207 | #define K_BCM1480_SCD_WDOG_RESET_CPU2 9 | 207 | #define K_BCM1480_SCD_WDOG_RESET_CPU2 9 |
208 | #define K_BCM1480_SCD_WDOG_RESET_CPU3 17 | 208 | #define K_BCM1480_SCD_WDOG_RESET_CPU3 17 |
209 | #define K_BCM1480_SCD_WDOG_RESET_ALL_CPUS 31 | 209 | #define K_BCM1480_SCD_WDOG_RESET_ALL_CPUS 31 |
210 | 210 | ||
211 | 211 | ||
212 | #define M_BCM1480_SCD_WDOG_HAS_RESET _SB_MAKEMASK1(8) | 212 | #define M_BCM1480_SCD_WDOG_HAS_RESET _SB_MAKEMASK1(8) |
213 | 213 | ||
214 | /* | 214 | /* |
215 | * General Timer Initial Count Registers (Table 26) | 215 | * General Timer Initial Count Registers (Table 26) |
@@ -243,32 +243,32 @@ | |||
243 | * The clear/enable bits are in different locations on the 1250 and 1480. | 243 | * The clear/enable bits are in different locations on the 1250 and 1480. |
244 | */ | 244 | */ |
245 | 245 | ||
246 | #define S_SPC_CFG_SRC4 32 | 246 | #define S_SPC_CFG_SRC4 32 |
247 | #define M_SPC_CFG_SRC4 _SB_MAKEMASK(8, S_SPC_CFG_SRC4) | 247 | #define M_SPC_CFG_SRC4 _SB_MAKEMASK(8, S_SPC_CFG_SRC4) |
248 | #define V_SPC_CFG_SRC4(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC4) | 248 | #define V_SPC_CFG_SRC4(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC4) |
249 | #define G_SPC_CFG_SRC4(x) _SB_GETVALUE(x, S_SPC_CFG_SRC4, M_SPC_CFG_SRC4) | 249 | #define G_SPC_CFG_SRC4(x) _SB_GETVALUE(x, S_SPC_CFG_SRC4, M_SPC_CFG_SRC4) |
250 | 250 | ||
251 | #define S_SPC_CFG_SRC5 40 | 251 | #define S_SPC_CFG_SRC5 40 |
252 | #define M_SPC_CFG_SRC5 _SB_MAKEMASK(8, S_SPC_CFG_SRC5) | 252 | #define M_SPC_CFG_SRC5 _SB_MAKEMASK(8, S_SPC_CFG_SRC5) |
253 | #define V_SPC_CFG_SRC5(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC5) | 253 | #define V_SPC_CFG_SRC5(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC5) |
254 | #define G_SPC_CFG_SRC5(x) _SB_GETVALUE(x, S_SPC_CFG_SRC5, M_SPC_CFG_SRC5) | 254 | #define G_SPC_CFG_SRC5(x) _SB_GETVALUE(x, S_SPC_CFG_SRC5, M_SPC_CFG_SRC5) |
255 | 255 | ||
256 | #define S_SPC_CFG_SRC6 48 | 256 | #define S_SPC_CFG_SRC6 48 |
257 | #define M_SPC_CFG_SRC6 _SB_MAKEMASK(8, S_SPC_CFG_SRC6) | 257 | #define M_SPC_CFG_SRC6 _SB_MAKEMASK(8, S_SPC_CFG_SRC6) |
258 | #define V_SPC_CFG_SRC6(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC6) | 258 | #define V_SPC_CFG_SRC6(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC6) |
259 | #define G_SPC_CFG_SRC6(x) _SB_GETVALUE(x, S_SPC_CFG_SRC6, M_SPC_CFG_SRC6) | 259 | #define G_SPC_CFG_SRC6(x) _SB_GETVALUE(x, S_SPC_CFG_SRC6, M_SPC_CFG_SRC6) |
260 | 260 | ||
261 | #define S_SPC_CFG_SRC7 56 | 261 | #define S_SPC_CFG_SRC7 56 |
262 | #define M_SPC_CFG_SRC7 _SB_MAKEMASK(8, S_SPC_CFG_SRC7) | 262 | #define M_SPC_CFG_SRC7 _SB_MAKEMASK(8, S_SPC_CFG_SRC7) |
263 | #define V_SPC_CFG_SRC7(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC7) | 263 | #define V_SPC_CFG_SRC7(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC7) |
264 | #define G_SPC_CFG_SRC7(x) _SB_GETVALUE(x, S_SPC_CFG_SRC7, M_SPC_CFG_SRC7) | 264 | #define G_SPC_CFG_SRC7(x) _SB_GETVALUE(x, S_SPC_CFG_SRC7, M_SPC_CFG_SRC7) |
265 | 265 | ||
266 | /* | 266 | /* |
267 | * System Performance Counter Control Register (Table 32) | 267 | * System Performance Counter Control Register (Table 32) |
268 | * Register: PERF_CNT_CFG_1 | 268 | * Register: PERF_CNT_CFG_1 |
269 | * BCM1480 specific | 269 | * BCM1480 specific |
270 | */ | 270 | */ |
271 | #define M_BCM1480_SPC_CFG_CLEAR _SB_MAKEMASK1(0) | 271 | #define M_BCM1480_SPC_CFG_CLEAR _SB_MAKEMASK1(0) |
272 | #define M_BCM1480_SPC_CFG_ENABLE _SB_MAKEMASK1(1) | 272 | #define M_BCM1480_SPC_CFG_ENABLE _SB_MAKEMASK1(1) |
273 | #if SIBYTE_HDR_FEATURE_CHIP(1480) | 273 | #if SIBYTE_HDR_FEATURE_CHIP(1480) |
274 | #define M_SPC_CFG_CLEAR M_BCM1480_SPC_CFG_CLEAR | 274 | #define M_SPC_CFG_CLEAR M_BCM1480_SPC_CFG_CLEAR |
@@ -280,12 +280,12 @@ | |||
280 | * Registers: PERF_CNT_x | 280 | * Registers: PERF_CNT_x |
281 | */ | 281 | */ |
282 | 282 | ||
283 | #define S_BCM1480_SPC_CNT_COUNT 0 | 283 | #define S_BCM1480_SPC_CNT_COUNT 0 |
284 | #define M_BCM1480_SPC_CNT_COUNT _SB_MAKEMASK(40, S_BCM1480_SPC_CNT_COUNT) | 284 | #define M_BCM1480_SPC_CNT_COUNT _SB_MAKEMASK(40, S_BCM1480_SPC_CNT_COUNT) |
285 | #define V_BCM1480_SPC_CNT_COUNT(x) _SB_MAKEVALUE(x, S_BCM1480_SPC_CNT_COUNT) | 285 | #define V_BCM1480_SPC_CNT_COUNT(x) _SB_MAKEVALUE(x, S_BCM1480_SPC_CNT_COUNT) |
286 | #define G_BCM1480_SPC_CNT_COUNT(x) _SB_GETVALUE(x, S_BCM1480_SPC_CNT_COUNT, M_BCM1480_SPC_CNT_COUNT) | 286 | #define G_BCM1480_SPC_CNT_COUNT(x) _SB_GETVALUE(x, S_BCM1480_SPC_CNT_COUNT, M_BCM1480_SPC_CNT_COUNT) |
287 | 287 | ||
288 | #define M_BCM1480_SPC_CNT_OFLOW _SB_MAKEMASK1(40) | 288 | #define M_BCM1480_SPC_CNT_OFLOW _SB_MAKEMASK1(40) |
289 | 289 | ||
290 | 290 | ||
291 | /* | 291 | /* |
@@ -325,45 +325,45 @@ | |||
325 | #define M_BCM1480_ATRAP_INDEX _SB_MAKEMASK(4, 0) | 325 | #define M_BCM1480_ATRAP_INDEX _SB_MAKEMASK(4, 0) |
326 | #define M_BCM1480_ATRAP_ADDRESS _SB_MAKEMASK(40, 0) | 326 | #define M_BCM1480_ATRAP_ADDRESS _SB_MAKEMASK(40, 0) |
327 | 327 | ||
328 | #define S_BCM1480_ATRAP_CFG_CNT 0 | 328 | #define S_BCM1480_ATRAP_CFG_CNT 0 |
329 | #define M_BCM1480_ATRAP_CFG_CNT _SB_MAKEMASK(3, S_BCM1480_ATRAP_CFG_CNT) | 329 | #define M_BCM1480_ATRAP_CFG_CNT _SB_MAKEMASK(3, S_BCM1480_ATRAP_CFG_CNT) |
330 | #define V_BCM1480_ATRAP_CFG_CNT(x) _SB_MAKEVALUE(x, S_BCM1480_ATRAP_CFG_CNT) | 330 | #define V_BCM1480_ATRAP_CFG_CNT(x) _SB_MAKEVALUE(x, S_BCM1480_ATRAP_CFG_CNT) |
331 | #define G_BCM1480_ATRAP_CFG_CNT(x) _SB_GETVALUE(x, S_BCM1480_ATRAP_CFG_CNT, M_BCM1480_ATRAP_CFG_CNT) | 331 | #define G_BCM1480_ATRAP_CFG_CNT(x) _SB_GETVALUE(x, S_BCM1480_ATRAP_CFG_CNT, M_BCM1480_ATRAP_CFG_CNT) |
332 | 332 | ||
333 | #define M_BCM1480_ATRAP_CFG_WRITE _SB_MAKEMASK1(3) | 333 | #define M_BCM1480_ATRAP_CFG_WRITE _SB_MAKEMASK1(3) |
334 | #define M_BCM1480_ATRAP_CFG_ALL _SB_MAKEMASK1(4) | 334 | #define M_BCM1480_ATRAP_CFG_ALL _SB_MAKEMASK1(4) |
335 | #define M_BCM1480_ATRAP_CFG_INV _SB_MAKEMASK1(5) | 335 | #define M_BCM1480_ATRAP_CFG_INV _SB_MAKEMASK1(5) |
336 | #define M_BCM1480_ATRAP_CFG_USESRC _SB_MAKEMASK1(6) | 336 | #define M_BCM1480_ATRAP_CFG_USESRC _SB_MAKEMASK1(6) |
337 | #define M_BCM1480_ATRAP_CFG_SRCINV _SB_MAKEMASK1(7) | 337 | #define M_BCM1480_ATRAP_CFG_SRCINV _SB_MAKEMASK1(7) |
338 | 338 | ||
339 | #define S_BCM1480_ATRAP_CFG_AGENTID 8 | 339 | #define S_BCM1480_ATRAP_CFG_AGENTID 8 |
340 | #define M_BCM1480_ATRAP_CFG_AGENTID _SB_MAKEMASK(4, S_BCM1480_ATRAP_CFG_AGENTID) | 340 | #define M_BCM1480_ATRAP_CFG_AGENTID _SB_MAKEMASK(4, S_BCM1480_ATRAP_CFG_AGENTID) |
341 | #define V_BCM1480_ATRAP_CFG_AGENTID(x) _SB_MAKEVALUE(x, S_BCM1480_ATRAP_CFG_AGENTID) | 341 | #define V_BCM1480_ATRAP_CFG_AGENTID(x) _SB_MAKEVALUE(x, S_BCM1480_ATRAP_CFG_AGENTID) |
342 | #define G_BCM1480_ATRAP_CFG_AGENTID(x) _SB_GETVALUE(x, S_BCM1480_ATRAP_CFG_AGENTID, M_BCM1480_ATRAP_CFG_AGENTID) | 342 | #define G_BCM1480_ATRAP_CFG_AGENTID(x) _SB_GETVALUE(x, S_BCM1480_ATRAP_CFG_AGENTID, M_BCM1480_ATRAP_CFG_AGENTID) |
343 | 343 | ||
344 | 344 | ||
345 | #define K_BCM1480_BUS_AGENT_CPU0 0 | 345 | #define K_BCM1480_BUS_AGENT_CPU0 0 |
346 | #define K_BCM1480_BUS_AGENT_CPU1 1 | 346 | #define K_BCM1480_BUS_AGENT_CPU1 1 |
347 | #define K_BCM1480_BUS_AGENT_NC 2 | 347 | #define K_BCM1480_BUS_AGENT_NC 2 |
348 | #define K_BCM1480_BUS_AGENT_IOB 3 | 348 | #define K_BCM1480_BUS_AGENT_IOB 3 |
349 | #define K_BCM1480_BUS_AGENT_SCD 4 | 349 | #define K_BCM1480_BUS_AGENT_SCD 4 |
350 | #define K_BCM1480_BUS_AGENT_L2C 6 | 350 | #define K_BCM1480_BUS_AGENT_L2C 6 |
351 | #define K_BCM1480_BUS_AGENT_MC 7 | 351 | #define K_BCM1480_BUS_AGENT_MC 7 |
352 | #define K_BCM1480_BUS_AGENT_CPU2 8 | 352 | #define K_BCM1480_BUS_AGENT_CPU2 8 |
353 | #define K_BCM1480_BUS_AGENT_CPU3 9 | 353 | #define K_BCM1480_BUS_AGENT_CPU3 9 |
354 | #define K_BCM1480_BUS_AGENT_PM 10 | 354 | #define K_BCM1480_BUS_AGENT_PM 10 |
355 | 355 | ||
356 | #define S_BCM1480_ATRAP_CFG_CATTR 12 | 356 | #define S_BCM1480_ATRAP_CFG_CATTR 12 |
357 | #define M_BCM1480_ATRAP_CFG_CATTR _SB_MAKEMASK(2, S_BCM1480_ATRAP_CFG_CATTR) | 357 | #define M_BCM1480_ATRAP_CFG_CATTR _SB_MAKEMASK(2, S_BCM1480_ATRAP_CFG_CATTR) |
358 | #define V_BCM1480_ATRAP_CFG_CATTR(x) _SB_MAKEVALUE(x, S_BCM1480_ATRAP_CFG_CATTR) | 358 | #define V_BCM1480_ATRAP_CFG_CATTR(x) _SB_MAKEVALUE(x, S_BCM1480_ATRAP_CFG_CATTR) |
359 | #define G_BCM1480_ATRAP_CFG_CATTR(x) _SB_GETVALUE(x, S_BCM1480_ATRAP_CFG_CATTR, M_BCM1480_ATRAP_CFG_CATTR) | 359 | #define G_BCM1480_ATRAP_CFG_CATTR(x) _SB_GETVALUE(x, S_BCM1480_ATRAP_CFG_CATTR, M_BCM1480_ATRAP_CFG_CATTR) |
360 | 360 | ||
361 | #define K_BCM1480_ATRAP_CFG_CATTR_IGNORE 0 | 361 | #define K_BCM1480_ATRAP_CFG_CATTR_IGNORE 0 |
362 | #define K_BCM1480_ATRAP_CFG_CATTR_UNC 1 | 362 | #define K_BCM1480_ATRAP_CFG_CATTR_UNC 1 |
363 | #define K_BCM1480_ATRAP_CFG_CATTR_NONCOH 2 | 363 | #define K_BCM1480_ATRAP_CFG_CATTR_NONCOH 2 |
364 | #define K_BCM1480_ATRAP_CFG_CATTR_COHERENT 3 | 364 | #define K_BCM1480_ATRAP_CFG_CATTR_COHERENT 3 |
365 | 365 | ||
366 | #define M_BCM1480_ATRAP_CFG_CATTRINV _SB_MAKEMASK1(14) | 366 | #define M_BCM1480_ATRAP_CFG_CATTRINV _SB_MAKEMASK1(14) |
367 | 367 | ||
368 | 368 | ||
369 | /* | 369 | /* |
@@ -381,10 +381,10 @@ | |||
381 | 381 | ||
382 | #define M_BCM1480_SCD_TRSEQ_TID_MATCH_EN _SB_MAKEMASK1(25) | 382 | #define M_BCM1480_SCD_TRSEQ_TID_MATCH_EN _SB_MAKEMASK1(25) |
383 | 383 | ||
384 | #define S_BCM1480_SCD_TRSEQ_SWFUNC 26 | 384 | #define S_BCM1480_SCD_TRSEQ_SWFUNC 26 |
385 | #define M_BCM1480_SCD_TRSEQ_SWFUNC _SB_MAKEMASK(2, S_BCM1480_SCD_TRSEQ_SWFUNC) | 385 | #define M_BCM1480_SCD_TRSEQ_SWFUNC _SB_MAKEMASK(2, S_BCM1480_SCD_TRSEQ_SWFUNC) |
386 | #define V_BCM1480_SCD_TRSEQ_SWFUNC(x) _SB_MAKEVALUE(x, S_BCM1480_SCD_TRSEQ_SWFUNC) | 386 | #define V_BCM1480_SCD_TRSEQ_SWFUNC(x) _SB_MAKEVALUE(x, S_BCM1480_SCD_TRSEQ_SWFUNC) |
387 | #define G_BCM1480_SCD_TRSEQ_SWFUNC(x) _SB_GETVALUE(x, S_BCM1480_SCD_TRSEQ_SWFUNC, M_BCM1480_SCD_TRSEQ_SWFUNC) | 387 | #define G_BCM1480_SCD_TRSEQ_SWFUNC(x) _SB_GETVALUE(x, S_BCM1480_SCD_TRSEQ_SWFUNC, M_BCM1480_SCD_TRSEQ_SWFUNC) |
388 | 388 | ||
389 | /* | 389 | /* |
390 | * Trace Control Register (Table 49) | 390 | * Trace Control Register (Table 49) |
@@ -394,13 +394,13 @@ | |||
394 | * are defined below. | 394 | * are defined below. |
395 | */ | 395 | */ |
396 | 396 | ||
397 | #define S_BCM1480_SCD_TRACE_CFG_MODE 16 | 397 | #define S_BCM1480_SCD_TRACE_CFG_MODE 16 |
398 | #define M_BCM1480_SCD_TRACE_CFG_MODE _SB_MAKEMASK(2, S_BCM1480_SCD_TRACE_CFG_MODE) | 398 | #define M_BCM1480_SCD_TRACE_CFG_MODE _SB_MAKEMASK(2, S_BCM1480_SCD_TRACE_CFG_MODE) |
399 | #define V_BCM1480_SCD_TRACE_CFG_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_SCD_TRACE_CFG_MODE) | 399 | #define V_BCM1480_SCD_TRACE_CFG_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_SCD_TRACE_CFG_MODE) |
400 | #define G_BCM1480_SCD_TRACE_CFG_MODE(x) _SB_GETVALUE(x, S_BCM1480_SCD_TRACE_CFG_MODE, M_BCM1480_SCD_TRACE_CFG_MODE) | 400 | #define G_BCM1480_SCD_TRACE_CFG_MODE(x) _SB_GETVALUE(x, S_BCM1480_SCD_TRACE_CFG_MODE, M_BCM1480_SCD_TRACE_CFG_MODE) |
401 | 401 | ||
402 | #define K_BCM1480_SCD_TRACE_CFG_MODE_BLOCKERS 0 | 402 | #define K_BCM1480_SCD_TRACE_CFG_MODE_BLOCKERS 0 |
403 | #define K_BCM1480_SCD_TRACE_CFG_MODE_BYTEEN_INT 1 | 403 | #define K_BCM1480_SCD_TRACE_CFG_MODE_BYTEEN_INT 1 |
404 | #define K_BCM1480_SCD_TRACE_CFG_MODE_FLOW_ID 2 | 404 | #define K_BCM1480_SCD_TRACE_CFG_MODE_FLOW_ID 2 |
405 | 405 | ||
406 | #endif /* _BCM1480_SCD_H */ | 406 | #endif /* _BCM1480_SCD_H */ |
diff --git a/arch/mips/include/asm/sibyte/bigsur.h b/arch/mips/include/asm/sibyte/bigsur.h index 2d1a26d3436a..ae29dae41554 100644 --- a/arch/mips/include/asm/sibyte/bigsur.h +++ b/arch/mips/include/asm/sibyte/bigsur.h | |||
@@ -24,25 +24,25 @@ | |||
24 | #ifdef CONFIG_SIBYTE_BIGSUR | 24 | #ifdef CONFIG_SIBYTE_BIGSUR |
25 | #define SIBYTE_BOARD_NAME "BCM91x80A/B (BigSur)" | 25 | #define SIBYTE_BOARD_NAME "BCM91x80A/B (BigSur)" |
26 | #define SIBYTE_HAVE_PCMCIA 1 | 26 | #define SIBYTE_HAVE_PCMCIA 1 |
27 | #define SIBYTE_HAVE_IDE 1 | 27 | #define SIBYTE_HAVE_IDE 1 |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | /* Generic bus chip selects */ | 30 | /* Generic bus chip selects */ |
31 | #define LEDS_CS 3 | 31 | #define LEDS_CS 3 |
32 | #define LEDS_PHYS 0x100a0000 | 32 | #define LEDS_PHYS 0x100a0000 |
33 | 33 | ||
34 | #ifdef SIBYTE_HAVE_IDE | 34 | #ifdef SIBYTE_HAVE_IDE |
35 | #define IDE_CS 4 | 35 | #define IDE_CS 4 |
36 | #define IDE_PHYS 0x100b0000 | 36 | #define IDE_PHYS 0x100b0000 |
37 | #define K_GPIO_GB_IDE 4 | 37 | #define K_GPIO_GB_IDE 4 |
38 | #define K_INT_GB_IDE (K_INT_GPIO_0 + K_GPIO_GB_IDE) | 38 | #define K_INT_GB_IDE (K_INT_GPIO_0 + K_GPIO_GB_IDE) |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #ifdef SIBYTE_HAVE_PCMCIA | 41 | #ifdef SIBYTE_HAVE_PCMCIA |
42 | #define PCMCIA_CS 6 | 42 | #define PCMCIA_CS 6 |
43 | #define PCMCIA_PHYS 0x11000000 | 43 | #define PCMCIA_PHYS 0x11000000 |
44 | #define K_GPIO_PC_READY 9 | 44 | #define K_GPIO_PC_READY 9 |
45 | #define K_INT_PC_READY (K_INT_GPIO_0 + K_GPIO_PC_READY) | 45 | #define K_INT_PC_READY (K_INT_GPIO_0 + K_GPIO_PC_READY) |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #endif /* __ASM_SIBYTE_BIGSUR_H */ | 48 | #endif /* __ASM_SIBYTE_BIGSUR_H */ |
diff --git a/arch/mips/include/asm/sibyte/carmel.h b/arch/mips/include/asm/sibyte/carmel.h index 11cad71323e8..793edba73aa4 100644 --- a/arch/mips/include/asm/sibyte/carmel.h +++ b/arch/mips/include/asm/sibyte/carmel.h | |||
@@ -23,35 +23,35 @@ | |||
23 | 23 | ||
24 | #define SIBYTE_BOARD_NAME "Carmel" | 24 | #define SIBYTE_BOARD_NAME "Carmel" |
25 | 25 | ||
26 | #define GPIO_PHY_INTERRUPT 2 | 26 | #define GPIO_PHY_INTERRUPT 2 |
27 | #define GPIO_NONMASKABLE_INT 3 | 27 | #define GPIO_NONMASKABLE_INT 3 |
28 | #define GPIO_CF_INSERTED 6 | 28 | #define GPIO_CF_INSERTED 6 |
29 | #define GPIO_MONTEREY_RESET 7 | 29 | #define GPIO_MONTEREY_RESET 7 |
30 | #define GPIO_QUADUART_INT 8 | 30 | #define GPIO_QUADUART_INT 8 |
31 | #define GPIO_CF_INT 9 | 31 | #define GPIO_CF_INT 9 |
32 | #define GPIO_FPGA_CCLK 10 | 32 | #define GPIO_FPGA_CCLK 10 |
33 | #define GPIO_FPGA_DOUT 11 | 33 | #define GPIO_FPGA_DOUT 11 |
34 | #define GPIO_FPGA_DIN 12 | 34 | #define GPIO_FPGA_DIN 12 |
35 | #define GPIO_FPGA_PGM 13 | 35 | #define GPIO_FPGA_PGM 13 |
36 | #define GPIO_FPGA_DONE 14 | 36 | #define GPIO_FPGA_DONE 14 |
37 | #define GPIO_FPGA_INIT 15 | 37 | #define GPIO_FPGA_INIT 15 |
38 | 38 | ||
39 | #define LEDS_CS 2 | 39 | #define LEDS_CS 2 |
40 | #define LEDS_PHYS 0x100C0000 | 40 | #define LEDS_PHYS 0x100C0000 |
41 | #define MLEDS_CS 3 | 41 | #define MLEDS_CS 3 |
42 | #define MLEDS_PHYS 0x100A0000 | 42 | #define MLEDS_PHYS 0x100A0000 |
43 | #define UART_CS 4 | 43 | #define UART_CS 4 |
44 | #define UART_PHYS 0x100D0000 | 44 | #define UART_PHYS 0x100D0000 |
45 | #define ARAVALI_CS 5 | 45 | #define ARAVALI_CS 5 |
46 | #define ARAVALI_PHYS 0x11000000 | 46 | #define ARAVALI_PHYS 0x11000000 |
47 | #define IDE_CS 6 | 47 | #define IDE_CS 6 |
48 | #define IDE_PHYS 0x100B0000 | 48 | #define IDE_PHYS 0x100B0000 |
49 | #define ARAVALI2_CS 7 | 49 | #define ARAVALI2_CS 7 |
50 | #define ARAVALI2_PHYS 0x100E0000 | 50 | #define ARAVALI2_PHYS 0x100E0000 |
51 | 51 | ||
52 | #if defined(CONFIG_SIBYTE_CARMEL) | 52 | #if defined(CONFIG_SIBYTE_CARMEL) |
53 | #define K_GPIO_GB_IDE 9 | 53 | #define K_GPIO_GB_IDE 9 |
54 | #define K_INT_GB_IDE (K_INT_GPIO_0 + K_GPIO_GB_IDE) | 54 | #define K_INT_GB_IDE (K_INT_GPIO_0 + K_GPIO_GB_IDE) |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | 57 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250.h b/arch/mips/include/asm/sibyte/sb1250.h index 80c1a052662a..d45dff9753d3 100644 --- a/arch/mips/include/asm/sibyte/sb1250.h +++ b/arch/mips/include/asm/sibyte/sb1250.h | |||
@@ -27,8 +27,8 @@ | |||
27 | 27 | ||
28 | #define SB1250_NR_IRQS 64 | 28 | #define SB1250_NR_IRQS 64 |
29 | 29 | ||
30 | #define BCM1480_NR_IRQS 128 | 30 | #define BCM1480_NR_IRQS 128 |
31 | #define BCM1480_NR_IRQS_HALF 64 | 31 | #define BCM1480_NR_IRQS_HALF 64 |
32 | 32 | ||
33 | #define SB1250_DUART_MINOR_BASE 64 | 33 | #define SB1250_DUART_MINOR_BASE 64 |
34 | 34 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250_defs.h b/arch/mips/include/asm/sibyte/sb1250_defs.h index 09365f9111fa..4364eb8d22ab 100644 --- a/arch/mips/include/asm/sibyte/sb1250_defs.h +++ b/arch/mips/include/asm/sibyte/sb1250_defs.h | |||
@@ -51,15 +51,15 @@ | |||
51 | * | 51 | * |
52 | * Use like: | 52 | * Use like: |
53 | * | 53 | * |
54 | * #define SIBYTE_HDR_FEATURES SIBYTE_HDR_FMASK_112x_PASS1 | 54 | * #define SIBYTE_HDR_FEATURES SIBYTE_HDR_FMASK_112x_PASS1 |
55 | * | 55 | * |
56 | * Generate defines only for that revision of chip. | 56 | * Generate defines only for that revision of chip. |
57 | * | 57 | * |
58 | * #if SIBYTE_HDR_FEATURE(chip,pass) | 58 | * #if SIBYTE_HDR_FEATURE(chip,pass) |
59 | * | 59 | * |
60 | * True if header features for that revision or later of | 60 | * True if header features for that revision or later of |
61 | * that particular chip type are enabled in SIBYTE_HDR_FEATURES. | 61 | * that particular chip type are enabled in SIBYTE_HDR_FEATURES. |
62 | * (Use this to bracket #defines for features present in a given | 62 | * (Use this to bracket #defines for features present in a given |
63 | * revision and later.) | 63 | * revision and later.) |
64 | * | 64 | * |
65 | * Note that there is no implied ordering between chip types. | 65 | * Note that there is no implied ordering between chip types. |
@@ -69,12 +69,12 @@ | |||
69 | * SIBYTE_HDR_FEATURE(112x, PASS1) is OK, but | 69 | * SIBYTE_HDR_FEATURE(112x, PASS1) is OK, but |
70 | * SIBYTE_HDR_FEATURE(1120, pass1) is not (for two reasons). | 70 | * SIBYTE_HDR_FEATURE(1120, pass1) is not (for two reasons). |
71 | * | 71 | * |
72 | * #if SIBYTE_HDR_FEATURE_UP_TO(chip,pass) | 72 | * #if SIBYTE_HDR_FEATURE_UP_TO(chip,pass) |
73 | * | 73 | * |
74 | * Same as SIBYTE_HDR_FEATURE, but true for the named revision | 74 | * Same as SIBYTE_HDR_FEATURE, but true for the named revision |
75 | * and earlier revisions of the named chip type. | 75 | * and earlier revisions of the named chip type. |
76 | * | 76 | * |
77 | * #if SIBYTE_HDR_FEATURE_EXACT(chip,pass) | 77 | * #if SIBYTE_HDR_FEATURE_EXACT(chip,pass) |
78 | * | 78 | * |
79 | * Same as SIBYTE_HDR_FEATURE, but only true for the named | 79 | * Same as SIBYTE_HDR_FEATURE, but only true for the named |
80 | * revision of the named chip type. (Note that this CANNOT | 80 | * revision of the named chip type. (Note that this CANNOT |
@@ -82,7 +82,7 @@ | |||
82 | * particular chip/revision. It will be true any time this | 82 | * particular chip/revision. It will be true any time this |
83 | * chip/revision is included in SIBYTE_HDR_FEATURES.) | 83 | * chip/revision is included in SIBYTE_HDR_FEATURES.) |
84 | * | 84 | * |
85 | * #if SIBYTE_HDR_FEATURE_CHIP(chip) | 85 | * #if SIBYTE_HDR_FEATURE_CHIP(chip) |
86 | * | 86 | * |
87 | * True if header features for (any revision of) that chip type | 87 | * True if header features for (any revision of) that chip type |
88 | * are enabled in SIBYTE_HDR_FEATURES. (Use this to bracket | 88 | * are enabled in SIBYTE_HDR_FEATURES. (Use this to bracket |
@@ -95,47 +95,47 @@ | |||
95 | * ordering, so be careful when adding support for new minor revs. | 95 | * ordering, so be careful when adding support for new minor revs. |
96 | ********************************************************************* */ | 96 | ********************************************************************* */ |
97 | 97 | ||
98 | #define SIBYTE_HDR_FMASK_1250_ALL 0x000000ff | 98 | #define SIBYTE_HDR_FMASK_1250_ALL 0x000000ff |
99 | #define SIBYTE_HDR_FMASK_1250_PASS1 0x00000001 | 99 | #define SIBYTE_HDR_FMASK_1250_PASS1 0x00000001 |
100 | #define SIBYTE_HDR_FMASK_1250_PASS2 0x00000002 | 100 | #define SIBYTE_HDR_FMASK_1250_PASS2 0x00000002 |
101 | #define SIBYTE_HDR_FMASK_1250_PASS3 0x00000004 | 101 | #define SIBYTE_HDR_FMASK_1250_PASS3 0x00000004 |
102 | 102 | ||
103 | #define SIBYTE_HDR_FMASK_112x_ALL 0x00000f00 | 103 | #define SIBYTE_HDR_FMASK_112x_ALL 0x00000f00 |
104 | #define SIBYTE_HDR_FMASK_112x_PASS1 0x00000100 | 104 | #define SIBYTE_HDR_FMASK_112x_PASS1 0x00000100 |
105 | 105 | ||
106 | #define SIBYTE_HDR_FMASK_1480_ALL 0x0000f000 | 106 | #define SIBYTE_HDR_FMASK_1480_ALL 0x0000f000 |
107 | #define SIBYTE_HDR_FMASK_1480_PASS1 0x00001000 | 107 | #define SIBYTE_HDR_FMASK_1480_PASS1 0x00001000 |
108 | #define SIBYTE_HDR_FMASK_1480_PASS2 0x00002000 | 108 | #define SIBYTE_HDR_FMASK_1480_PASS2 0x00002000 |
109 | 109 | ||
110 | /* Bit mask for chip/revision. (use _ALL for all revisions of a chip). */ | 110 | /* Bit mask for chip/revision. (use _ALL for all revisions of a chip). */ |
111 | #define SIBYTE_HDR_FMASK(chip, pass) \ | 111 | #define SIBYTE_HDR_FMASK(chip, pass) \ |
112 | (SIBYTE_HDR_FMASK_ ## chip ## _ ## pass) | 112 | (SIBYTE_HDR_FMASK_ ## chip ## _ ## pass) |
113 | #define SIBYTE_HDR_FMASK_ALLREVS(chip) \ | 113 | #define SIBYTE_HDR_FMASK_ALLREVS(chip) \ |
114 | (SIBYTE_HDR_FMASK_ ## chip ## _ALL) | 114 | (SIBYTE_HDR_FMASK_ ## chip ## _ALL) |
115 | 115 | ||
116 | /* Default constant value for all chips, all revisions */ | 116 | /* Default constant value for all chips, all revisions */ |
117 | #define SIBYTE_HDR_FMASK_ALL \ | 117 | #define SIBYTE_HDR_FMASK_ALL \ |
118 | (SIBYTE_HDR_FMASK_1250_ALL | SIBYTE_HDR_FMASK_112x_ALL \ | 118 | (SIBYTE_HDR_FMASK_1250_ALL | SIBYTE_HDR_FMASK_112x_ALL \ |
119 | | SIBYTE_HDR_FMASK_1480_ALL) | 119 | | SIBYTE_HDR_FMASK_1480_ALL) |
120 | 120 | ||
121 | /* This one is used for the "original" BCM1250/BCM112x chips. We use this | 121 | /* This one is used for the "original" BCM1250/BCM112x chips. We use this |
122 | to weed out constants and macros that do not exist on later chips like | 122 | to weed out constants and macros that do not exist on later chips like |
123 | the BCM1480 */ | 123 | the BCM1480 */ |
124 | #define SIBYTE_HDR_FMASK_1250_112x_ALL \ | 124 | #define SIBYTE_HDR_FMASK_1250_112x_ALL \ |
125 | (SIBYTE_HDR_FMASK_1250_ALL | SIBYTE_HDR_FMASK_112x_ALL) | 125 | (SIBYTE_HDR_FMASK_1250_ALL | SIBYTE_HDR_FMASK_112x_ALL) |
126 | #define SIBYTE_HDR_FMASK_1250_112x SIBYTE_HDR_FMASK_1250_112x_ALL | 126 | #define SIBYTE_HDR_FMASK_1250_112x SIBYTE_HDR_FMASK_1250_112x_ALL |
127 | 127 | ||
128 | #ifndef SIBYTE_HDR_FEATURES | 128 | #ifndef SIBYTE_HDR_FEATURES |
129 | #define SIBYTE_HDR_FEATURES SIBYTE_HDR_FMASK_ALL | 129 | #define SIBYTE_HDR_FEATURES SIBYTE_HDR_FMASK_ALL |
130 | #endif | 130 | #endif |
131 | 131 | ||
132 | 132 | ||
133 | /* Bit mask for revisions of chip exclusively before the named revision. */ | 133 | /* Bit mask for revisions of chip exclusively before the named revision. */ |
134 | #define SIBYTE_HDR_FMASK_BEFORE(chip, pass) \ | 134 | #define SIBYTE_HDR_FMASK_BEFORE(chip, pass) \ |
135 | ((SIBYTE_HDR_FMASK(chip, pass) - 1) & SIBYTE_HDR_FMASK_ALLREVS(chip)) | 135 | ((SIBYTE_HDR_FMASK(chip, pass) - 1) & SIBYTE_HDR_FMASK_ALLREVS(chip)) |
136 | 136 | ||
137 | /* Bit mask for revisions of chip exclusively after the named revision. */ | 137 | /* Bit mask for revisions of chip exclusively after the named revision. */ |
138 | #define SIBYTE_HDR_FMASK_AFTER(chip, pass) \ | 138 | #define SIBYTE_HDR_FMASK_AFTER(chip, pass) \ |
139 | (~(SIBYTE_HDR_FMASK(chip, pass) \ | 139 | (~(SIBYTE_HDR_FMASK(chip, pass) \ |
140 | | (SIBYTE_HDR_FMASK(chip, pass) - 1)) & SIBYTE_HDR_FMASK_ALLREVS(chip)) | 140 | | (SIBYTE_HDR_FMASK(chip, pass) - 1)) & SIBYTE_HDR_FMASK_ALLREVS(chip)) |
141 | 141 | ||
@@ -168,38 +168,38 @@ | |||
168 | /* ********************************************************************* | 168 | /* ********************************************************************* |
169 | * Naming schemes for constants in these files: | 169 | * Naming schemes for constants in these files: |
170 | * | 170 | * |
171 | * M_xxx MASK constant (identifies bits in a register). | 171 | * M_xxx MASK constant (identifies bits in a register). |
172 | * For multi-bit fields, all bits in the field will | 172 | * For multi-bit fields, all bits in the field will |
173 | * be set. | 173 | * be set. |
174 | * | 174 | * |
175 | * K_xxx "Code" constant (value for data in a multi-bit | 175 | * K_xxx "Code" constant (value for data in a multi-bit |
176 | * field). The value is right justified. | 176 | * field). The value is right justified. |
177 | * | 177 | * |
178 | * V_xxx "Value" constant. This is the same as the | 178 | * V_xxx "Value" constant. This is the same as the |
179 | * corresponding "K_xxx" constant, except it is | 179 | * corresponding "K_xxx" constant, except it is |
180 | * shifted to the correct position in the register. | 180 | * shifted to the correct position in the register. |
181 | * | 181 | * |
182 | * S_xxx SHIFT constant. This is the number of bits that | 182 | * S_xxx SHIFT constant. This is the number of bits that |
183 | * a field value (code) needs to be shifted | 183 | * a field value (code) needs to be shifted |
184 | * (towards the left) to put the value in the right | 184 | * (towards the left) to put the value in the right |
185 | * position for the register. | 185 | * position for the register. |
186 | * | 186 | * |
187 | * A_xxx ADDRESS constant. This will be a physical | 187 | * A_xxx ADDRESS constant. This will be a physical |
188 | * address. Use the PHYS_TO_K1 macro to generate | 188 | * address. Use the PHYS_TO_K1 macro to generate |
189 | * a K1SEG address. | 189 | * a K1SEG address. |
190 | * | 190 | * |
191 | * R_xxx RELATIVE offset constant. This is an offset from | 191 | * R_xxx RELATIVE offset constant. This is an offset from |
192 | * an A_xxx constant (usually the first register in | 192 | * an A_xxx constant (usually the first register in |
193 | * a group). | 193 | * a group). |
194 | * | 194 | * |
195 | * G_xxx(X) GET value. This macro obtains a multi-bit field | 195 | * G_xxx(X) GET value. This macro obtains a multi-bit field |
196 | * from a register, masks it, and shifts it to | 196 | * from a register, masks it, and shifts it to |
197 | * the bottom of the register (retrieving a K_xxx | 197 | * the bottom of the register (retrieving a K_xxx |
198 | * value, for example). | 198 | * value, for example). |
199 | * | 199 | * |
200 | * V_xxx(X) VALUE. This macro computes the value of a | 200 | * V_xxx(X) VALUE. This macro computes the value of a |
201 | * K_xxx constant shifted to the correct position | 201 | * K_xxx constant shifted to the correct position |
202 | * in the register. | 202 | * in the register. |
203 | ********************************************************************* */ | 203 | ********************************************************************* */ |
204 | 204 | ||
205 | 205 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250_dma.h b/arch/mips/include/asm/sibyte/sb1250_dma.h index 6c44dfb52878..ea81713b78d6 100644 --- a/arch/mips/include/asm/sibyte/sb1250_dma.h +++ b/arch/mips/include/asm/sibyte/sb1250_dma.h | |||
@@ -51,15 +51,15 @@ | |||
51 | */ | 51 | */ |
52 | 52 | ||
53 | 53 | ||
54 | #define M_DMA_DROP _SB_MAKEMASK1(0) | 54 | #define M_DMA_DROP _SB_MAKEMASK1(0) |
55 | 55 | ||
56 | #define M_DMA_CHAIN_SEL _SB_MAKEMASK1(1) | 56 | #define M_DMA_CHAIN_SEL _SB_MAKEMASK1(1) |
57 | #define M_DMA_RESERVED1 _SB_MAKEMASK1(2) | 57 | #define M_DMA_RESERVED1 _SB_MAKEMASK1(2) |
58 | 58 | ||
59 | #define S_DMA_DESC_TYPE _SB_MAKE64(1) | 59 | #define S_DMA_DESC_TYPE _SB_MAKE64(1) |
60 | #define M_DMA_DESC_TYPE _SB_MAKEMASK(2, S_DMA_DESC_TYPE) | 60 | #define M_DMA_DESC_TYPE _SB_MAKEMASK(2, S_DMA_DESC_TYPE) |
61 | #define V_DMA_DESC_TYPE(x) _SB_MAKEVALUE(x, S_DMA_DESC_TYPE) | 61 | #define V_DMA_DESC_TYPE(x) _SB_MAKEVALUE(x, S_DMA_DESC_TYPE) |
62 | #define G_DMA_DESC_TYPE(x) _SB_GETVALUE(x, S_DMA_DESC_TYPE, M_DMA_DESC_TYPE) | 62 | #define G_DMA_DESC_TYPE(x) _SB_GETVALUE(x, S_DMA_DESC_TYPE, M_DMA_DESC_TYPE) |
63 | 63 | ||
64 | #define K_DMA_DESC_TYPE_RING_AL 0 | 64 | #define K_DMA_DESC_TYPE_RING_AL 0 |
65 | #define K_DMA_DESC_TYPE_CHAIN_AL 1 | 65 | #define K_DMA_DESC_TYPE_CHAIN_AL 1 |
@@ -69,31 +69,31 @@ | |||
69 | #define K_DMA_DESC_TYPE_RING_UAL_RMW 3 | 69 | #define K_DMA_DESC_TYPE_RING_UAL_RMW 3 |
70 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 70 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
71 | 71 | ||
72 | #define M_DMA_EOP_INT_EN _SB_MAKEMASK1(3) | 72 | #define M_DMA_EOP_INT_EN _SB_MAKEMASK1(3) |
73 | #define M_DMA_HWM_INT_EN _SB_MAKEMASK1(4) | 73 | #define M_DMA_HWM_INT_EN _SB_MAKEMASK1(4) |
74 | #define M_DMA_LWM_INT_EN _SB_MAKEMASK1(5) | 74 | #define M_DMA_LWM_INT_EN _SB_MAKEMASK1(5) |
75 | #define M_DMA_TBX_EN _SB_MAKEMASK1(6) | 75 | #define M_DMA_TBX_EN _SB_MAKEMASK1(6) |
76 | #define M_DMA_TDX_EN _SB_MAKEMASK1(7) | 76 | #define M_DMA_TDX_EN _SB_MAKEMASK1(7) |
77 | 77 | ||
78 | #define S_DMA_INT_PKTCNT _SB_MAKE64(8) | 78 | #define S_DMA_INT_PKTCNT _SB_MAKE64(8) |
79 | #define M_DMA_INT_PKTCNT _SB_MAKEMASK(8, S_DMA_INT_PKTCNT) | 79 | #define M_DMA_INT_PKTCNT _SB_MAKEMASK(8, S_DMA_INT_PKTCNT) |
80 | #define V_DMA_INT_PKTCNT(x) _SB_MAKEVALUE(x, S_DMA_INT_PKTCNT) | 80 | #define V_DMA_INT_PKTCNT(x) _SB_MAKEVALUE(x, S_DMA_INT_PKTCNT) |
81 | #define G_DMA_INT_PKTCNT(x) _SB_GETVALUE(x, S_DMA_INT_PKTCNT, M_DMA_INT_PKTCNT) | 81 | #define G_DMA_INT_PKTCNT(x) _SB_GETVALUE(x, S_DMA_INT_PKTCNT, M_DMA_INT_PKTCNT) |
82 | 82 | ||
83 | #define S_DMA_RINGSZ _SB_MAKE64(16) | 83 | #define S_DMA_RINGSZ _SB_MAKE64(16) |
84 | #define M_DMA_RINGSZ _SB_MAKEMASK(16, S_DMA_RINGSZ) | 84 | #define M_DMA_RINGSZ _SB_MAKEMASK(16, S_DMA_RINGSZ) |
85 | #define V_DMA_RINGSZ(x) _SB_MAKEVALUE(x, S_DMA_RINGSZ) | 85 | #define V_DMA_RINGSZ(x) _SB_MAKEVALUE(x, S_DMA_RINGSZ) |
86 | #define G_DMA_RINGSZ(x) _SB_GETVALUE(x, S_DMA_RINGSZ, M_DMA_RINGSZ) | 86 | #define G_DMA_RINGSZ(x) _SB_GETVALUE(x, S_DMA_RINGSZ, M_DMA_RINGSZ) |
87 | 87 | ||
88 | #define S_DMA_HIGH_WATERMARK _SB_MAKE64(32) | 88 | #define S_DMA_HIGH_WATERMARK _SB_MAKE64(32) |
89 | #define M_DMA_HIGH_WATERMARK _SB_MAKEMASK(16, S_DMA_HIGH_WATERMARK) | 89 | #define M_DMA_HIGH_WATERMARK _SB_MAKEMASK(16, S_DMA_HIGH_WATERMARK) |
90 | #define V_DMA_HIGH_WATERMARK(x) _SB_MAKEVALUE(x, S_DMA_HIGH_WATERMARK) | 90 | #define V_DMA_HIGH_WATERMARK(x) _SB_MAKEVALUE(x, S_DMA_HIGH_WATERMARK) |
91 | #define G_DMA_HIGH_WATERMARK(x) _SB_GETVALUE(x, S_DMA_HIGH_WATERMARK, M_DMA_HIGH_WATERMARK) | 91 | #define G_DMA_HIGH_WATERMARK(x) _SB_GETVALUE(x, S_DMA_HIGH_WATERMARK, M_DMA_HIGH_WATERMARK) |
92 | 92 | ||
93 | #define S_DMA_LOW_WATERMARK _SB_MAKE64(48) | 93 | #define S_DMA_LOW_WATERMARK _SB_MAKE64(48) |
94 | #define M_DMA_LOW_WATERMARK _SB_MAKEMASK(16, S_DMA_LOW_WATERMARK) | 94 | #define M_DMA_LOW_WATERMARK _SB_MAKEMASK(16, S_DMA_LOW_WATERMARK) |
95 | #define V_DMA_LOW_WATERMARK(x) _SB_MAKEVALUE(x, S_DMA_LOW_WATERMARK) | 95 | #define V_DMA_LOW_WATERMARK(x) _SB_MAKEVALUE(x, S_DMA_LOW_WATERMARK) |
96 | #define G_DMA_LOW_WATERMARK(x) _SB_GETVALUE(x, S_DMA_LOW_WATERMARK, M_DMA_LOW_WATERMARK) | 96 | #define G_DMA_LOW_WATERMARK(x) _SB_GETVALUE(x, S_DMA_LOW_WATERMARK, M_DMA_LOW_WATERMARK) |
97 | 97 | ||
98 | /* | 98 | /* |
99 | * Ethernet and Serial DMA Configuration Register 1 (Table 7-5) | 99 | * Ethernet and Serial DMA Configuration Register 1 (Table 7-5) |
@@ -103,11 +103,11 @@ | |||
103 | * Registers: DMA_CONFIG1_SER_x_TX | 103 | * Registers: DMA_CONFIG1_SER_x_TX |
104 | */ | 104 | */ |
105 | 105 | ||
106 | #define M_DMA_HDR_CF_EN _SB_MAKEMASK1(0) | 106 | #define M_DMA_HDR_CF_EN _SB_MAKEMASK1(0) |
107 | #define M_DMA_ASIC_XFR_EN _SB_MAKEMASK1(1) | 107 | #define M_DMA_ASIC_XFR_EN _SB_MAKEMASK1(1) |
108 | #define M_DMA_PRE_ADDR_EN _SB_MAKEMASK1(2) | 108 | #define M_DMA_PRE_ADDR_EN _SB_MAKEMASK1(2) |
109 | #define M_DMA_FLOW_CTL_EN _SB_MAKEMASK1(3) | 109 | #define M_DMA_FLOW_CTL_EN _SB_MAKEMASK1(3) |
110 | #define M_DMA_NO_DSCR_UPDT _SB_MAKEMASK1(4) | 110 | #define M_DMA_NO_DSCR_UPDT _SB_MAKEMASK1(4) |
111 | #define M_DMA_L2CA _SB_MAKEMASK1(5) | 111 | #define M_DMA_L2CA _SB_MAKEMASK1(5) |
112 | 112 | ||
113 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 113 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
@@ -116,37 +116,37 @@ | |||
116 | #define M_DMA_TX_FC_PAUSE_EN _SB_MAKEMASK1(7) | 116 | #define M_DMA_TX_FC_PAUSE_EN _SB_MAKEMASK1(7) |
117 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 117 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
118 | 118 | ||
119 | #define M_DMA_MBZ1 _SB_MAKEMASK(6, 15) | 119 | #define M_DMA_MBZ1 _SB_MAKEMASK(6, 15) |
120 | 120 | ||
121 | #define S_DMA_HDR_SIZE _SB_MAKE64(21) | 121 | #define S_DMA_HDR_SIZE _SB_MAKE64(21) |
122 | #define M_DMA_HDR_SIZE _SB_MAKEMASK(9, S_DMA_HDR_SIZE) | 122 | #define M_DMA_HDR_SIZE _SB_MAKEMASK(9, S_DMA_HDR_SIZE) |
123 | #define V_DMA_HDR_SIZE(x) _SB_MAKEVALUE(x, S_DMA_HDR_SIZE) | 123 | #define V_DMA_HDR_SIZE(x) _SB_MAKEVALUE(x, S_DMA_HDR_SIZE) |
124 | #define G_DMA_HDR_SIZE(x) _SB_GETVALUE(x, S_DMA_HDR_SIZE, M_DMA_HDR_SIZE) | 124 | #define G_DMA_HDR_SIZE(x) _SB_GETVALUE(x, S_DMA_HDR_SIZE, M_DMA_HDR_SIZE) |
125 | 125 | ||
126 | #define M_DMA_MBZ2 _SB_MAKEMASK(5, 32) | 126 | #define M_DMA_MBZ2 _SB_MAKEMASK(5, 32) |
127 | 127 | ||
128 | #define S_DMA_ASICXFR_SIZE _SB_MAKE64(37) | 128 | #define S_DMA_ASICXFR_SIZE _SB_MAKE64(37) |
129 | #define M_DMA_ASICXFR_SIZE _SB_MAKEMASK(9, S_DMA_ASICXFR_SIZE) | 129 | #define M_DMA_ASICXFR_SIZE _SB_MAKEMASK(9, S_DMA_ASICXFR_SIZE) |
130 | #define V_DMA_ASICXFR_SIZE(x) _SB_MAKEVALUE(x, S_DMA_ASICXFR_SIZE) | 130 | #define V_DMA_ASICXFR_SIZE(x) _SB_MAKEVALUE(x, S_DMA_ASICXFR_SIZE) |
131 | #define G_DMA_ASICXFR_SIZE(x) _SB_GETVALUE(x, S_DMA_ASICXFR_SIZE, M_DMA_ASICXFR_SIZE) | 131 | #define G_DMA_ASICXFR_SIZE(x) _SB_GETVALUE(x, S_DMA_ASICXFR_SIZE, M_DMA_ASICXFR_SIZE) |
132 | 132 | ||
133 | #define S_DMA_INT_TIMEOUT _SB_MAKE64(48) | 133 | #define S_DMA_INT_TIMEOUT _SB_MAKE64(48) |
134 | #define M_DMA_INT_TIMEOUT _SB_MAKEMASK(16, S_DMA_INT_TIMEOUT) | 134 | #define M_DMA_INT_TIMEOUT _SB_MAKEMASK(16, S_DMA_INT_TIMEOUT) |
135 | #define V_DMA_INT_TIMEOUT(x) _SB_MAKEVALUE(x, S_DMA_INT_TIMEOUT) | 135 | #define V_DMA_INT_TIMEOUT(x) _SB_MAKEVALUE(x, S_DMA_INT_TIMEOUT) |
136 | #define G_DMA_INT_TIMEOUT(x) _SB_GETVALUE(x, S_DMA_INT_TIMEOUT, M_DMA_INT_TIMEOUT) | 136 | #define G_DMA_INT_TIMEOUT(x) _SB_GETVALUE(x, S_DMA_INT_TIMEOUT, M_DMA_INT_TIMEOUT) |
137 | 137 | ||
138 | /* | 138 | /* |
139 | * Ethernet and Serial DMA Descriptor base address (Table 7-6) | 139 | * Ethernet and Serial DMA Descriptor base address (Table 7-6) |
140 | */ | 140 | */ |
141 | 141 | ||
142 | #define M_DMA_DSCRBASE_MBZ _SB_MAKEMASK(4, 0) | 142 | #define M_DMA_DSCRBASE_MBZ _SB_MAKEMASK(4, 0) |
143 | 143 | ||
144 | 144 | ||
145 | /* | 145 | /* |
146 | * ASIC Mode Base Address (Table 7-7) | 146 | * ASIC Mode Base Address (Table 7-7) |
147 | */ | 147 | */ |
148 | 148 | ||
149 | #define M_DMA_ASIC_BASE_MBZ _SB_MAKEMASK(20, 0) | 149 | #define M_DMA_ASIC_BASE_MBZ _SB_MAKEMASK(20, 0) |
150 | 150 | ||
151 | /* | 151 | /* |
152 | * DMA Descriptor Count Registers (Table 7-8) | 152 | * DMA Descriptor Count Registers (Table 7-8) |
@@ -159,10 +159,10 @@ | |||
159 | * Current Descriptor Address Register (Table 7-11) | 159 | * Current Descriptor Address Register (Table 7-11) |
160 | */ | 160 | */ |
161 | 161 | ||
162 | #define S_DMA_CURDSCR_ADDR _SB_MAKE64(0) | 162 | #define S_DMA_CURDSCR_ADDR _SB_MAKE64(0) |
163 | #define M_DMA_CURDSCR_ADDR _SB_MAKEMASK(40, S_DMA_CURDSCR_ADDR) | 163 | #define M_DMA_CURDSCR_ADDR _SB_MAKEMASK(40, S_DMA_CURDSCR_ADDR) |
164 | #define S_DMA_CURDSCR_COUNT _SB_MAKE64(40) | 164 | #define S_DMA_CURDSCR_COUNT _SB_MAKE64(40) |
165 | #define M_DMA_CURDSCR_COUNT _SB_MAKEMASK(16, S_DMA_CURDSCR_COUNT) | 165 | #define M_DMA_CURDSCR_COUNT _SB_MAKEMASK(16, S_DMA_CURDSCR_COUNT) |
166 | 166 | ||
167 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 167 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
168 | #define M_DMA_TX_CH_PAUSE_ON _SB_MAKEMASK1(56) | 168 | #define M_DMA_TX_CH_PAUSE_ON _SB_MAKEMASK1(56) |
@@ -172,13 +172,13 @@ | |||
172 | * Receive Packet Drop Registers | 172 | * Receive Packet Drop Registers |
173 | */ | 173 | */ |
174 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 174 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
175 | #define S_DMA_OODLOST_RX _SB_MAKE64(0) | 175 | #define S_DMA_OODLOST_RX _SB_MAKE64(0) |
176 | #define M_DMA_OODLOST_RX _SB_MAKEMASK(16, S_DMA_OODLOST_RX) | 176 | #define M_DMA_OODLOST_RX _SB_MAKEMASK(16, S_DMA_OODLOST_RX) |
177 | #define G_DMA_OODLOST_RX(x) _SB_GETVALUE(x, S_DMA_OODLOST_RX, M_DMA_OODLOST_RX) | 177 | #define G_DMA_OODLOST_RX(x) _SB_GETVALUE(x, S_DMA_OODLOST_RX, M_DMA_OODLOST_RX) |
178 | 178 | ||
179 | #define S_DMA_EOP_COUNT_RX _SB_MAKE64(16) | 179 | #define S_DMA_EOP_COUNT_RX _SB_MAKE64(16) |
180 | #define M_DMA_EOP_COUNT_RX _SB_MAKEMASK(8, S_DMA_EOP_COUNT_RX) | 180 | #define M_DMA_EOP_COUNT_RX _SB_MAKEMASK(8, S_DMA_EOP_COUNT_RX) |
181 | #define G_DMA_EOP_COUNT_RX(x) _SB_GETVALUE(x, S_DMA_EOP_COUNT_RX, M_DMA_EOP_COUNT_RX) | 181 | #define G_DMA_EOP_COUNT_RX(x) _SB_GETVALUE(x, S_DMA_EOP_COUNT_RX, M_DMA_EOP_COUNT_RX) |
182 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 182 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
183 | 183 | ||
184 | /* ********************************************************************* | 184 | /* ********************************************************************* |
@@ -189,26 +189,26 @@ | |||
189 | * Descriptor doubleword "A" (Table 7-12) | 189 | * Descriptor doubleword "A" (Table 7-12) |
190 | */ | 190 | */ |
191 | 191 | ||
192 | #define S_DMA_DSCRA_OFFSET _SB_MAKE64(0) | 192 | #define S_DMA_DSCRA_OFFSET _SB_MAKE64(0) |
193 | #define M_DMA_DSCRA_OFFSET _SB_MAKEMASK(5, S_DMA_DSCRA_OFFSET) | 193 | #define M_DMA_DSCRA_OFFSET _SB_MAKEMASK(5, S_DMA_DSCRA_OFFSET) |
194 | #define V_DMA_DSCRA_OFFSET(x) _SB_MAKEVALUE(x, S_DMA_DSCRA_OFFSET) | 194 | #define V_DMA_DSCRA_OFFSET(x) _SB_MAKEVALUE(x, S_DMA_DSCRA_OFFSET) |
195 | #define G_DMA_DSCRA_OFFSET(x) _SB_GETVALUE(x, S_DMA_DSCRA_OFFSET, M_DMA_DSCRA_OFFSET) | 195 | #define G_DMA_DSCRA_OFFSET(x) _SB_GETVALUE(x, S_DMA_DSCRA_OFFSET, M_DMA_DSCRA_OFFSET) |
196 | 196 | ||
197 | /* Note: Don't shift the address over, just mask it with the mask below */ | 197 | /* Note: Don't shift the address over, just mask it with the mask below */ |
198 | #define S_DMA_DSCRA_A_ADDR _SB_MAKE64(5) | 198 | #define S_DMA_DSCRA_A_ADDR _SB_MAKE64(5) |
199 | #define M_DMA_DSCRA_A_ADDR _SB_MAKEMASK(35, S_DMA_DSCRA_A_ADDR) | 199 | #define M_DMA_DSCRA_A_ADDR _SB_MAKEMASK(35, S_DMA_DSCRA_A_ADDR) |
200 | 200 | ||
201 | #define M_DMA_DSCRA_A_ADDR_OFFSET (M_DMA_DSCRA_OFFSET | M_DMA_DSCRA_A_ADDR) | 201 | #define M_DMA_DSCRA_A_ADDR_OFFSET (M_DMA_DSCRA_OFFSET | M_DMA_DSCRA_A_ADDR) |
202 | 202 | ||
203 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 203 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
204 | #define S_DMA_DSCRA_A_ADDR_UA _SB_MAKE64(0) | 204 | #define S_DMA_DSCRA_A_ADDR_UA _SB_MAKE64(0) |
205 | #define M_DMA_DSCRA_A_ADDR_UA _SB_MAKEMASK(40, S_DMA_DSCRA_A_ADDR_UA) | 205 | #define M_DMA_DSCRA_A_ADDR_UA _SB_MAKEMASK(40, S_DMA_DSCRA_A_ADDR_UA) |
206 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 206 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
207 | 207 | ||
208 | #define S_DMA_DSCRA_A_SIZE _SB_MAKE64(40) | 208 | #define S_DMA_DSCRA_A_SIZE _SB_MAKE64(40) |
209 | #define M_DMA_DSCRA_A_SIZE _SB_MAKEMASK(9, S_DMA_DSCRA_A_SIZE) | 209 | #define M_DMA_DSCRA_A_SIZE _SB_MAKEMASK(9, S_DMA_DSCRA_A_SIZE) |
210 | #define V_DMA_DSCRA_A_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRA_A_SIZE) | 210 | #define V_DMA_DSCRA_A_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRA_A_SIZE) |
211 | #define G_DMA_DSCRA_A_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRA_A_SIZE, M_DMA_DSCRA_A_SIZE) | 211 | #define G_DMA_DSCRA_A_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRA_A_SIZE, M_DMA_DSCRA_A_SIZE) |
212 | 212 | ||
213 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 213 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
214 | #define S_DMA_DSCRA_DSCR_CNT _SB_MAKE64(40) | 214 | #define S_DMA_DSCRA_DSCR_CNT _SB_MAKE64(40) |
@@ -216,43 +216,43 @@ | |||
216 | #define G_DMA_DSCRA_DSCR_CNT(x) _SB_GETVALUE(x, S_DMA_DSCRA_DSCR_CNT, M_DMA_DSCRA_DSCR_CNT) | 216 | #define G_DMA_DSCRA_DSCR_CNT(x) _SB_GETVALUE(x, S_DMA_DSCRA_DSCR_CNT, M_DMA_DSCRA_DSCR_CNT) |
217 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 217 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
218 | 218 | ||
219 | #define M_DMA_DSCRA_INTERRUPT _SB_MAKEMASK1(49) | 219 | #define M_DMA_DSCRA_INTERRUPT _SB_MAKEMASK1(49) |
220 | #define M_DMA_DSCRA_OFFSETB _SB_MAKEMASK1(50) | 220 | #define M_DMA_DSCRA_OFFSETB _SB_MAKEMASK1(50) |
221 | 221 | ||
222 | #define S_DMA_DSCRA_STATUS _SB_MAKE64(51) | 222 | #define S_DMA_DSCRA_STATUS _SB_MAKE64(51) |
223 | #define M_DMA_DSCRA_STATUS _SB_MAKEMASK(13, S_DMA_DSCRA_STATUS) | 223 | #define M_DMA_DSCRA_STATUS _SB_MAKEMASK(13, S_DMA_DSCRA_STATUS) |
224 | #define V_DMA_DSCRA_STATUS(x) _SB_MAKEVALUE(x, S_DMA_DSCRA_STATUS) | 224 | #define V_DMA_DSCRA_STATUS(x) _SB_MAKEVALUE(x, S_DMA_DSCRA_STATUS) |
225 | #define G_DMA_DSCRA_STATUS(x) _SB_GETVALUE(x, S_DMA_DSCRA_STATUS, M_DMA_DSCRA_STATUS) | 225 | #define G_DMA_DSCRA_STATUS(x) _SB_GETVALUE(x, S_DMA_DSCRA_STATUS, M_DMA_DSCRA_STATUS) |
226 | 226 | ||
227 | /* | 227 | /* |
228 | * Descriptor doubleword "B" (Table 7-13) | 228 | * Descriptor doubleword "B" (Table 7-13) |
229 | */ | 229 | */ |
230 | 230 | ||
231 | 231 | ||
232 | #define S_DMA_DSCRB_OPTIONS _SB_MAKE64(0) | 232 | #define S_DMA_DSCRB_OPTIONS _SB_MAKE64(0) |
233 | #define M_DMA_DSCRB_OPTIONS _SB_MAKEMASK(4, S_DMA_DSCRB_OPTIONS) | 233 | #define M_DMA_DSCRB_OPTIONS _SB_MAKEMASK(4, S_DMA_DSCRB_OPTIONS) |
234 | #define V_DMA_DSCRB_OPTIONS(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_OPTIONS) | 234 | #define V_DMA_DSCRB_OPTIONS(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_OPTIONS) |
235 | #define G_DMA_DSCRB_OPTIONS(x) _SB_GETVALUE(x, S_DMA_DSCRB_OPTIONS, M_DMA_DSCRB_OPTIONS) | 235 | #define G_DMA_DSCRB_OPTIONS(x) _SB_GETVALUE(x, S_DMA_DSCRB_OPTIONS, M_DMA_DSCRB_OPTIONS) |
236 | 236 | ||
237 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 237 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
238 | #define S_DMA_DSCRB_A_SIZE _SB_MAKE64(8) | 238 | #define S_DMA_DSCRB_A_SIZE _SB_MAKE64(8) |
239 | #define M_DMA_DSCRB_A_SIZE _SB_MAKEMASK(14, S_DMA_DSCRB_A_SIZE) | 239 | #define M_DMA_DSCRB_A_SIZE _SB_MAKEMASK(14, S_DMA_DSCRB_A_SIZE) |
240 | #define V_DMA_DSCRB_A_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_A_SIZE) | 240 | #define V_DMA_DSCRB_A_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_A_SIZE) |
241 | #define G_DMA_DSCRB_A_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRB_A_SIZE, M_DMA_DSCRB_A_SIZE) | 241 | #define G_DMA_DSCRB_A_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRB_A_SIZE, M_DMA_DSCRB_A_SIZE) |
242 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 242 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
243 | 243 | ||
244 | #define R_DMA_DSCRB_ADDR _SB_MAKE64(0x10) | 244 | #define R_DMA_DSCRB_ADDR _SB_MAKE64(0x10) |
245 | 245 | ||
246 | /* Note: Don't shift the address over, just mask it with the mask below */ | 246 | /* Note: Don't shift the address over, just mask it with the mask below */ |
247 | #define S_DMA_DSCRB_B_ADDR _SB_MAKE64(5) | 247 | #define S_DMA_DSCRB_B_ADDR _SB_MAKE64(5) |
248 | #define M_DMA_DSCRB_B_ADDR _SB_MAKEMASK(35, S_DMA_DSCRB_B_ADDR) | 248 | #define M_DMA_DSCRB_B_ADDR _SB_MAKEMASK(35, S_DMA_DSCRB_B_ADDR) |
249 | 249 | ||
250 | #define S_DMA_DSCRB_B_SIZE _SB_MAKE64(40) | 250 | #define S_DMA_DSCRB_B_SIZE _SB_MAKE64(40) |
251 | #define M_DMA_DSCRB_B_SIZE _SB_MAKEMASK(9, S_DMA_DSCRB_B_SIZE) | 251 | #define M_DMA_DSCRB_B_SIZE _SB_MAKEMASK(9, S_DMA_DSCRB_B_SIZE) |
252 | #define V_DMA_DSCRB_B_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_B_SIZE) | 252 | #define V_DMA_DSCRB_B_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_B_SIZE) |
253 | #define G_DMA_DSCRB_B_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRB_B_SIZE, M_DMA_DSCRB_B_SIZE) | 253 | #define G_DMA_DSCRB_B_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRB_B_SIZE, M_DMA_DSCRB_B_SIZE) |
254 | 254 | ||
255 | #define M_DMA_DSCRB_B_VALID _SB_MAKEMASK1(49) | 255 | #define M_DMA_DSCRB_B_VALID _SB_MAKEMASK1(49) |
256 | 256 | ||
257 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 257 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
258 | #define S_DMA_DSCRB_PKT_SIZE_MSB _SB_MAKE64(48) | 258 | #define S_DMA_DSCRB_PKT_SIZE_MSB _SB_MAKE64(48) |
@@ -261,24 +261,24 @@ | |||
261 | #define G_DMA_DSCRB_PKT_SIZE_MSB(x) _SB_GETVALUE(x, S_DMA_DSCRB_PKT_SIZE_MSB, M_DMA_DSCRB_PKT_SIZE_MSB) | 261 | #define G_DMA_DSCRB_PKT_SIZE_MSB(x) _SB_GETVALUE(x, S_DMA_DSCRB_PKT_SIZE_MSB, M_DMA_DSCRB_PKT_SIZE_MSB) |
262 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 262 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
263 | 263 | ||
264 | #define S_DMA_DSCRB_PKT_SIZE _SB_MAKE64(50) | 264 | #define S_DMA_DSCRB_PKT_SIZE _SB_MAKE64(50) |
265 | #define M_DMA_DSCRB_PKT_SIZE _SB_MAKEMASK(14, S_DMA_DSCRB_PKT_SIZE) | 265 | #define M_DMA_DSCRB_PKT_SIZE _SB_MAKEMASK(14, S_DMA_DSCRB_PKT_SIZE) |
266 | #define V_DMA_DSCRB_PKT_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_PKT_SIZE) | 266 | #define V_DMA_DSCRB_PKT_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_PKT_SIZE) |
267 | #define G_DMA_DSCRB_PKT_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRB_PKT_SIZE, M_DMA_DSCRB_PKT_SIZE) | 267 | #define G_DMA_DSCRB_PKT_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRB_PKT_SIZE, M_DMA_DSCRB_PKT_SIZE) |
268 | 268 | ||
269 | /* | 269 | /* |
270 | * from pass2 some bits in dscr_b are also used for rx status | 270 | * from pass2 some bits in dscr_b are also used for rx status |
271 | */ | 271 | */ |
272 | #define S_DMA_DSCRB_STATUS _SB_MAKE64(0) | 272 | #define S_DMA_DSCRB_STATUS _SB_MAKE64(0) |
273 | #define M_DMA_DSCRB_STATUS _SB_MAKEMASK(1, S_DMA_DSCRB_STATUS) | 273 | #define M_DMA_DSCRB_STATUS _SB_MAKEMASK(1, S_DMA_DSCRB_STATUS) |
274 | #define V_DMA_DSCRB_STATUS(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_STATUS) | 274 | #define V_DMA_DSCRB_STATUS(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_STATUS) |
275 | #define G_DMA_DSCRB_STATUS(x) _SB_GETVALUE(x, S_DMA_DSCRB_STATUS, M_DMA_DSCRB_STATUS) | 275 | #define G_DMA_DSCRB_STATUS(x) _SB_GETVALUE(x, S_DMA_DSCRB_STATUS, M_DMA_DSCRB_STATUS) |
276 | 276 | ||
277 | /* | 277 | /* |
278 | * Ethernet Descriptor Status Bits (Table 7-15) | 278 | * Ethernet Descriptor Status Bits (Table 7-15) |
279 | */ | 279 | */ |
280 | 280 | ||
281 | #define M_DMA_ETHRX_BADIP4CS _SB_MAKEMASK1(51) | 281 | #define M_DMA_ETHRX_BADIP4CS _SB_MAKEMASK1(51) |
282 | #define M_DMA_ETHRX_DSCRERR _SB_MAKEMASK1(52) | 282 | #define M_DMA_ETHRX_DSCRERR _SB_MAKEMASK1(52) |
283 | 283 | ||
284 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 284 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
@@ -292,70 +292,70 @@ | |||
292 | #define M_DMA_ETH_CRC_FLAG _SB_MAKEMASK1(2) | 292 | #define M_DMA_ETH_CRC_FLAG _SB_MAKEMASK1(2) |
293 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 293 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
294 | 294 | ||
295 | #define S_DMA_ETHRX_RXCH 53 | 295 | #define S_DMA_ETHRX_RXCH 53 |
296 | #define M_DMA_ETHRX_RXCH _SB_MAKEMASK(2, S_DMA_ETHRX_RXCH) | 296 | #define M_DMA_ETHRX_RXCH _SB_MAKEMASK(2, S_DMA_ETHRX_RXCH) |
297 | #define V_DMA_ETHRX_RXCH(x) _SB_MAKEVALUE(x, S_DMA_ETHRX_RXCH) | 297 | #define V_DMA_ETHRX_RXCH(x) _SB_MAKEVALUE(x, S_DMA_ETHRX_RXCH) |
298 | #define G_DMA_ETHRX_RXCH(x) _SB_GETVALUE(x, S_DMA_ETHRX_RXCH, M_DMA_ETHRX_RXCH) | 298 | #define G_DMA_ETHRX_RXCH(x) _SB_GETVALUE(x, S_DMA_ETHRX_RXCH, M_DMA_ETHRX_RXCH) |
299 | 299 | ||
300 | #define S_DMA_ETHRX_PKTTYPE 55 | 300 | #define S_DMA_ETHRX_PKTTYPE 55 |
301 | #define M_DMA_ETHRX_PKTTYPE _SB_MAKEMASK(3, S_DMA_ETHRX_PKTTYPE) | 301 | #define M_DMA_ETHRX_PKTTYPE _SB_MAKEMASK(3, S_DMA_ETHRX_PKTTYPE) |
302 | #define V_DMA_ETHRX_PKTTYPE(x) _SB_MAKEVALUE(x, S_DMA_ETHRX_PKTTYPE) | 302 | #define V_DMA_ETHRX_PKTTYPE(x) _SB_MAKEVALUE(x, S_DMA_ETHRX_PKTTYPE) |
303 | #define G_DMA_ETHRX_PKTTYPE(x) _SB_GETVALUE(x, S_DMA_ETHRX_PKTTYPE, M_DMA_ETHRX_PKTTYPE) | 303 | #define G_DMA_ETHRX_PKTTYPE(x) _SB_GETVALUE(x, S_DMA_ETHRX_PKTTYPE, M_DMA_ETHRX_PKTTYPE) |
304 | 304 | ||
305 | #define K_DMA_ETHRX_PKTTYPE_IPV4 0 | 305 | #define K_DMA_ETHRX_PKTTYPE_IPV4 0 |
306 | #define K_DMA_ETHRX_PKTTYPE_ARPV4 1 | 306 | #define K_DMA_ETHRX_PKTTYPE_ARPV4 1 |
307 | #define K_DMA_ETHRX_PKTTYPE_802 2 | 307 | #define K_DMA_ETHRX_PKTTYPE_802 2 |
308 | #define K_DMA_ETHRX_PKTTYPE_OTHER 3 | 308 | #define K_DMA_ETHRX_PKTTYPE_OTHER 3 |
309 | #define K_DMA_ETHRX_PKTTYPE_USER0 4 | 309 | #define K_DMA_ETHRX_PKTTYPE_USER0 4 |
310 | #define K_DMA_ETHRX_PKTTYPE_USER1 5 | 310 | #define K_DMA_ETHRX_PKTTYPE_USER1 5 |
311 | #define K_DMA_ETHRX_PKTTYPE_USER2 6 | 311 | #define K_DMA_ETHRX_PKTTYPE_USER2 6 |
312 | #define K_DMA_ETHRX_PKTTYPE_USER3 7 | 312 | #define K_DMA_ETHRX_PKTTYPE_USER3 7 |
313 | 313 | ||
314 | #define M_DMA_ETHRX_MATCH_HASH _SB_MAKEMASK1(58) | 314 | #define M_DMA_ETHRX_MATCH_HASH _SB_MAKEMASK1(58) |
315 | #define M_DMA_ETHRX_MATCH_EXACT _SB_MAKEMASK1(59) | 315 | #define M_DMA_ETHRX_MATCH_EXACT _SB_MAKEMASK1(59) |
316 | #define M_DMA_ETHRX_BCAST _SB_MAKEMASK1(60) | 316 | #define M_DMA_ETHRX_BCAST _SB_MAKEMASK1(60) |
317 | #define M_DMA_ETHRX_MCAST _SB_MAKEMASK1(61) | 317 | #define M_DMA_ETHRX_MCAST _SB_MAKEMASK1(61) |
318 | #define M_DMA_ETHRX_BAD _SB_MAKEMASK1(62) | 318 | #define M_DMA_ETHRX_BAD _SB_MAKEMASK1(62) |
319 | #define M_DMA_ETHRX_SOP _SB_MAKEMASK1(63) | 319 | #define M_DMA_ETHRX_SOP _SB_MAKEMASK1(63) |
320 | 320 | ||
321 | /* | 321 | /* |
322 | * Ethernet Transmit Status Bits (Table 7-16) | 322 | * Ethernet Transmit Status Bits (Table 7-16) |
323 | */ | 323 | */ |
324 | 324 | ||
325 | #define M_DMA_ETHTX_SOP _SB_MAKEMASK1(63) | 325 | #define M_DMA_ETHTX_SOP _SB_MAKEMASK1(63) |
326 | 326 | ||
327 | /* | 327 | /* |
328 | * Ethernet Transmit Options (Table 7-17) | 328 | * Ethernet Transmit Options (Table 7-17) |
329 | */ | 329 | */ |
330 | 330 | ||
331 | #define K_DMA_ETHTX_NOTSOP _SB_MAKE64(0x00) | 331 | #define K_DMA_ETHTX_NOTSOP _SB_MAKE64(0x00) |
332 | #define K_DMA_ETHTX_APPENDCRC _SB_MAKE64(0x01) | 332 | #define K_DMA_ETHTX_APPENDCRC _SB_MAKE64(0x01) |
333 | #define K_DMA_ETHTX_REPLACECRC _SB_MAKE64(0x02) | 333 | #define K_DMA_ETHTX_REPLACECRC _SB_MAKE64(0x02) |
334 | #define K_DMA_ETHTX_APPENDCRC_APPENDPAD _SB_MAKE64(0x03) | 334 | #define K_DMA_ETHTX_APPENDCRC_APPENDPAD _SB_MAKE64(0x03) |
335 | #define K_DMA_ETHTX_APPENDVLAN_REPLACECRC _SB_MAKE64(0x04) | 335 | #define K_DMA_ETHTX_APPENDVLAN_REPLACECRC _SB_MAKE64(0x04) |
336 | #define K_DMA_ETHTX_REMOVEVLAN_REPLACECRC _SB_MAKE64(0x05) | 336 | #define K_DMA_ETHTX_REMOVEVLAN_REPLACECRC _SB_MAKE64(0x05) |
337 | #define K_DMA_ETHTX_REPLACEVLAN_REPLACECRC _SB_MAKE64(0x6) | 337 | #define K_DMA_ETHTX_REPLACEVLAN_REPLACECRC _SB_MAKE64(0x6) |
338 | #define K_DMA_ETHTX_NOMODS _SB_MAKE64(0x07) | 338 | #define K_DMA_ETHTX_NOMODS _SB_MAKE64(0x07) |
339 | #define K_DMA_ETHTX_RESERVED1 _SB_MAKE64(0x08) | 339 | #define K_DMA_ETHTX_RESERVED1 _SB_MAKE64(0x08) |
340 | #define K_DMA_ETHTX_REPLACESADDR_APPENDCRC _SB_MAKE64(0x09) | 340 | #define K_DMA_ETHTX_REPLACESADDR_APPENDCRC _SB_MAKE64(0x09) |
341 | #define K_DMA_ETHTX_REPLACESADDR_REPLACECRC _SB_MAKE64(0x0A) | 341 | #define K_DMA_ETHTX_REPLACESADDR_REPLACECRC _SB_MAKE64(0x0A) |
342 | #define K_DMA_ETHTX_REPLACESADDR_APPENDCRC_APPENDPAD _SB_MAKE64(0x0B) | 342 | #define K_DMA_ETHTX_REPLACESADDR_APPENDCRC_APPENDPAD _SB_MAKE64(0x0B) |
343 | #define K_DMA_ETHTX_REPLACESADDR_APPENDVLAN_REPLACECRC _SB_MAKE64(0x0C) | 343 | #define K_DMA_ETHTX_REPLACESADDR_APPENDVLAN_REPLACECRC _SB_MAKE64(0x0C) |
344 | #define K_DMA_ETHTX_REPLACESADDR_REMOVEVLAN_REPLACECRC _SB_MAKE64(0x0D) | 344 | #define K_DMA_ETHTX_REPLACESADDR_REMOVEVLAN_REPLACECRC _SB_MAKE64(0x0D) |
345 | #define K_DMA_ETHTX_REPLACESADDR_REPLACEVLAN_REPLACECRC _SB_MAKE64(0x0E) | 345 | #define K_DMA_ETHTX_REPLACESADDR_REPLACEVLAN_REPLACECRC _SB_MAKE64(0x0E) |
346 | #define K_DMA_ETHTX_RESERVED2 _SB_MAKE64(0x0F) | 346 | #define K_DMA_ETHTX_RESERVED2 _SB_MAKE64(0x0F) |
347 | 347 | ||
348 | /* | 348 | /* |
349 | * Serial Receive Options (Table 7-18) | 349 | * Serial Receive Options (Table 7-18) |
350 | */ | 350 | */ |
351 | #define M_DMA_SERRX_CRC_ERROR _SB_MAKEMASK1(56) | 351 | #define M_DMA_SERRX_CRC_ERROR _SB_MAKEMASK1(56) |
352 | #define M_DMA_SERRX_ABORT _SB_MAKEMASK1(57) | 352 | #define M_DMA_SERRX_ABORT _SB_MAKEMASK1(57) |
353 | #define M_DMA_SERRX_OCTET_ERROR _SB_MAKEMASK1(58) | 353 | #define M_DMA_SERRX_OCTET_ERROR _SB_MAKEMASK1(58) |
354 | #define M_DMA_SERRX_LONGFRAME_ERROR _SB_MAKEMASK1(59) | 354 | #define M_DMA_SERRX_LONGFRAME_ERROR _SB_MAKEMASK1(59) |
355 | #define M_DMA_SERRX_SHORTFRAME_ERROR _SB_MAKEMASK1(60) | 355 | #define M_DMA_SERRX_SHORTFRAME_ERROR _SB_MAKEMASK1(60) |
356 | #define M_DMA_SERRX_OVERRUN_ERROR _SB_MAKEMASK1(61) | 356 | #define M_DMA_SERRX_OVERRUN_ERROR _SB_MAKEMASK1(61) |
357 | #define M_DMA_SERRX_GOOD _SB_MAKEMASK1(62) | 357 | #define M_DMA_SERRX_GOOD _SB_MAKEMASK1(62) |
358 | #define M_DMA_SERRX_SOP _SB_MAKEMASK1(63) | 358 | #define M_DMA_SERRX_SOP _SB_MAKEMASK1(63) |
359 | 359 | ||
360 | /* | 360 | /* |
361 | * Serial Transmit Status Bits (Table 7-20) | 361 | * Serial Transmit Status Bits (Table 7-20) |
@@ -367,10 +367,10 @@ | |||
367 | * Serial Transmit Options (Table 7-21) | 367 | * Serial Transmit Options (Table 7-21) |
368 | */ | 368 | */ |
369 | 369 | ||
370 | #define K_DMA_SERTX_RESERVED _SB_MAKEMASK1(0) | 370 | #define K_DMA_SERTX_RESERVED _SB_MAKEMASK1(0) |
371 | #define K_DMA_SERTX_APPENDCRC _SB_MAKEMASK1(1) | 371 | #define K_DMA_SERTX_APPENDCRC _SB_MAKEMASK1(1) |
372 | #define K_DMA_SERTX_APPENDPAD _SB_MAKEMASK1(2) | 372 | #define K_DMA_SERTX_APPENDPAD _SB_MAKEMASK1(2) |
373 | #define K_DMA_SERTX_ABORT _SB_MAKEMASK1(3) | 373 | #define K_DMA_SERTX_ABORT _SB_MAKEMASK1(3) |
374 | 374 | ||
375 | 375 | ||
376 | /* ********************************************************************* | 376 | /* ********************************************************************* |
@@ -385,19 +385,19 @@ | |||
385 | * Register: DM_DSCR_BASE_3 | 385 | * Register: DM_DSCR_BASE_3 |
386 | */ | 386 | */ |
387 | 387 | ||
388 | #define M_DM_DSCR_BASE_MBZ _SB_MAKEMASK(4, 0) | 388 | #define M_DM_DSCR_BASE_MBZ _SB_MAKEMASK(4, 0) |
389 | 389 | ||
390 | /* Note: Just mask the base address and then OR it in. */ | 390 | /* Note: Just mask the base address and then OR it in. */ |
391 | #define S_DM_DSCR_BASE_ADDR _SB_MAKE64(4) | 391 | #define S_DM_DSCR_BASE_ADDR _SB_MAKE64(4) |
392 | #define M_DM_DSCR_BASE_ADDR _SB_MAKEMASK(36, S_DM_DSCR_BASE_ADDR) | 392 | #define M_DM_DSCR_BASE_ADDR _SB_MAKEMASK(36, S_DM_DSCR_BASE_ADDR) |
393 | 393 | ||
394 | #define S_DM_DSCR_BASE_RINGSZ _SB_MAKE64(40) | 394 | #define S_DM_DSCR_BASE_RINGSZ _SB_MAKE64(40) |
395 | #define M_DM_DSCR_BASE_RINGSZ _SB_MAKEMASK(16, S_DM_DSCR_BASE_RINGSZ) | 395 | #define M_DM_DSCR_BASE_RINGSZ _SB_MAKEMASK(16, S_DM_DSCR_BASE_RINGSZ) |
396 | #define V_DM_DSCR_BASE_RINGSZ(x) _SB_MAKEVALUE(x, S_DM_DSCR_BASE_RINGSZ) | 396 | #define V_DM_DSCR_BASE_RINGSZ(x) _SB_MAKEVALUE(x, S_DM_DSCR_BASE_RINGSZ) |
397 | #define G_DM_DSCR_BASE_RINGSZ(x) _SB_GETVALUE(x, S_DM_DSCR_BASE_RINGSZ, M_DM_DSCR_BASE_RINGSZ) | 397 | #define G_DM_DSCR_BASE_RINGSZ(x) _SB_GETVALUE(x, S_DM_DSCR_BASE_RINGSZ, M_DM_DSCR_BASE_RINGSZ) |
398 | 398 | ||
399 | #define S_DM_DSCR_BASE_PRIORITY _SB_MAKE64(56) | 399 | #define S_DM_DSCR_BASE_PRIORITY _SB_MAKE64(56) |
400 | #define M_DM_DSCR_BASE_PRIORITY _SB_MAKEMASK(3, S_DM_DSCR_BASE_PRIORITY) | 400 | #define M_DM_DSCR_BASE_PRIORITY _SB_MAKEMASK(3, S_DM_DSCR_BASE_PRIORITY) |
401 | #define V_DM_DSCR_BASE_PRIORITY(x) _SB_MAKEVALUE(x, S_DM_DSCR_BASE_PRIORITY) | 401 | #define V_DM_DSCR_BASE_PRIORITY(x) _SB_MAKEVALUE(x, S_DM_DSCR_BASE_PRIORITY) |
402 | #define G_DM_DSCR_BASE_PRIORITY(x) _SB_GETVALUE(x, S_DM_DSCR_BASE_PRIORITY, M_DM_DSCR_BASE_PRIORITY) | 402 | #define G_DM_DSCR_BASE_PRIORITY(x) _SB_GETVALUE(x, S_DM_DSCR_BASE_PRIORITY, M_DM_DSCR_BASE_PRIORITY) |
403 | 403 | ||
@@ -407,12 +407,12 @@ | |||
407 | #define K_DM_DSCR_BASE_PRIORITY_8 3 | 407 | #define K_DM_DSCR_BASE_PRIORITY_8 3 |
408 | #define K_DM_DSCR_BASE_PRIORITY_16 4 | 408 | #define K_DM_DSCR_BASE_PRIORITY_16 4 |
409 | 409 | ||
410 | #define M_DM_DSCR_BASE_ACTIVE _SB_MAKEMASK1(59) | 410 | #define M_DM_DSCR_BASE_ACTIVE _SB_MAKEMASK1(59) |
411 | #define M_DM_DSCR_BASE_INTERRUPT _SB_MAKEMASK1(60) | 411 | #define M_DM_DSCR_BASE_INTERRUPT _SB_MAKEMASK1(60) |
412 | #define M_DM_DSCR_BASE_RESET _SB_MAKEMASK1(61) /* write register */ | 412 | #define M_DM_DSCR_BASE_RESET _SB_MAKEMASK1(61) /* write register */ |
413 | #define M_DM_DSCR_BASE_ERROR _SB_MAKEMASK1(61) /* read register */ | 413 | #define M_DM_DSCR_BASE_ERROR _SB_MAKEMASK1(61) /* read register */ |
414 | #define M_DM_DSCR_BASE_ABORT _SB_MAKEMASK1(62) | 414 | #define M_DM_DSCR_BASE_ABORT _SB_MAKEMASK1(62) |
415 | #define M_DM_DSCR_BASE_ENABL _SB_MAKEMASK1(63) | 415 | #define M_DM_DSCR_BASE_ENABL _SB_MAKEMASK1(63) |
416 | 416 | ||
417 | /* | 417 | /* |
418 | * Data Mover Descriptor Count Register (Table 7-25) | 418 | * Data Mover Descriptor Count Register (Table 7-25) |
@@ -428,14 +428,14 @@ | |||
428 | * Register: DM_CUR_DSCR_ADDR_3 | 428 | * Register: DM_CUR_DSCR_ADDR_3 |
429 | */ | 429 | */ |
430 | 430 | ||
431 | #define S_DM_CUR_DSCR_DSCR_ADDR _SB_MAKE64(0) | 431 | #define S_DM_CUR_DSCR_DSCR_ADDR _SB_MAKE64(0) |
432 | #define M_DM_CUR_DSCR_DSCR_ADDR _SB_MAKEMASK(40, S_DM_CUR_DSCR_DSCR_ADDR) | 432 | #define M_DM_CUR_DSCR_DSCR_ADDR _SB_MAKEMASK(40, S_DM_CUR_DSCR_DSCR_ADDR) |
433 | 433 | ||
434 | #define S_DM_CUR_DSCR_DSCR_COUNT _SB_MAKE64(48) | 434 | #define S_DM_CUR_DSCR_DSCR_COUNT _SB_MAKE64(48) |
435 | #define M_DM_CUR_DSCR_DSCR_COUNT _SB_MAKEMASK(16, S_DM_CUR_DSCR_DSCR_COUNT) | 435 | #define M_DM_CUR_DSCR_DSCR_COUNT _SB_MAKEMASK(16, S_DM_CUR_DSCR_DSCR_COUNT) |
436 | #define V_DM_CUR_DSCR_DSCR_COUNT(r) _SB_MAKEVALUE(r, S_DM_CUR_DSCR_DSCR_COUNT) | 436 | #define V_DM_CUR_DSCR_DSCR_COUNT(r) _SB_MAKEVALUE(r, S_DM_CUR_DSCR_DSCR_COUNT) |
437 | #define G_DM_CUR_DSCR_DSCR_COUNT(r) _SB_GETVALUE(r, S_DM_CUR_DSCR_DSCR_COUNT,\ | 437 | #define G_DM_CUR_DSCR_DSCR_COUNT(r) _SB_GETVALUE(r, S_DM_CUR_DSCR_DSCR_COUNT,\ |
438 | M_DM_CUR_DSCR_DSCR_COUNT) | 438 | M_DM_CUR_DSCR_DSCR_COUNT) |
439 | 439 | ||
440 | 440 | ||
441 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 441 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
@@ -450,15 +450,15 @@ | |||
450 | #define M_DM_PARTIAL_CRC_PARTIAL _SB_MAKEMASK(32, S_DM_PARTIAL_CRC_PARTIAL) | 450 | #define M_DM_PARTIAL_CRC_PARTIAL _SB_MAKEMASK(32, S_DM_PARTIAL_CRC_PARTIAL) |
451 | #define V_DM_PARTIAL_CRC_PARTIAL(r) _SB_MAKEVALUE(r, S_DM_PARTIAL_CRC_PARTIAL) | 451 | #define V_DM_PARTIAL_CRC_PARTIAL(r) _SB_MAKEVALUE(r, S_DM_PARTIAL_CRC_PARTIAL) |
452 | #define G_DM_PARTIAL_CRC_PARTIAL(r) _SB_GETVALUE(r, S_DM_PARTIAL_CRC_PARTIAL,\ | 452 | #define G_DM_PARTIAL_CRC_PARTIAL(r) _SB_GETVALUE(r, S_DM_PARTIAL_CRC_PARTIAL,\ |
453 | M_DM_PARTIAL_CRC_PARTIAL) | 453 | M_DM_PARTIAL_CRC_PARTIAL) |
454 | 454 | ||
455 | #define S_DM_PARTIAL_TCPCS_PARTIAL _SB_MAKE64(32) | 455 | #define S_DM_PARTIAL_TCPCS_PARTIAL _SB_MAKE64(32) |
456 | #define M_DM_PARTIAL_TCPCS_PARTIAL _SB_MAKEMASK(16, S_DM_PARTIAL_TCPCS_PARTIAL) | 456 | #define M_DM_PARTIAL_TCPCS_PARTIAL _SB_MAKEMASK(16, S_DM_PARTIAL_TCPCS_PARTIAL) |
457 | #define V_DM_PARTIAL_TCPCS_PARTIAL(r) _SB_MAKEVALUE(r, S_DM_PARTIAL_TCPCS_PARTIAL) | 457 | #define V_DM_PARTIAL_TCPCS_PARTIAL(r) _SB_MAKEVALUE(r, S_DM_PARTIAL_TCPCS_PARTIAL) |
458 | #define G_DM_PARTIAL_TCPCS_PARTIAL(r) _SB_GETVALUE(r, S_DM_PARTIAL_TCPCS_PARTIAL,\ | 458 | #define G_DM_PARTIAL_TCPCS_PARTIAL(r) _SB_GETVALUE(r, S_DM_PARTIAL_TCPCS_PARTIAL,\ |
459 | M_DM_PARTIAL_TCPCS_PARTIAL) | 459 | M_DM_PARTIAL_TCPCS_PARTIAL) |
460 | 460 | ||
461 | #define M_DM_PARTIAL_ODD_BYTE _SB_MAKEMASK1(48) | 461 | #define M_DM_PARTIAL_ODD_BYTE _SB_MAKEMASK1(48) |
462 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 462 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
463 | 463 | ||
464 | 464 | ||
@@ -468,17 +468,17 @@ | |||
468 | * Register: CRC_DEF_0 | 468 | * Register: CRC_DEF_0 |
469 | * Register: CRC_DEF_1 | 469 | * Register: CRC_DEF_1 |
470 | */ | 470 | */ |
471 | #define S_CRC_DEF_CRC_INIT _SB_MAKE64(0) | 471 | #define S_CRC_DEF_CRC_INIT _SB_MAKE64(0) |
472 | #define M_CRC_DEF_CRC_INIT _SB_MAKEMASK(32, S_CRC_DEF_CRC_INIT) | 472 | #define M_CRC_DEF_CRC_INIT _SB_MAKEMASK(32, S_CRC_DEF_CRC_INIT) |
473 | #define V_CRC_DEF_CRC_INIT(r) _SB_MAKEVALUE(r, S_CRC_DEF_CRC_INIT) | 473 | #define V_CRC_DEF_CRC_INIT(r) _SB_MAKEVALUE(r, S_CRC_DEF_CRC_INIT) |
474 | #define G_CRC_DEF_CRC_INIT(r) _SB_GETVALUE(r, S_CRC_DEF_CRC_INIT,\ | 474 | #define G_CRC_DEF_CRC_INIT(r) _SB_GETVALUE(r, S_CRC_DEF_CRC_INIT,\ |
475 | M_CRC_DEF_CRC_INIT) | 475 | M_CRC_DEF_CRC_INIT) |
476 | 476 | ||
477 | #define S_CRC_DEF_CRC_POLY _SB_MAKE64(32) | 477 | #define S_CRC_DEF_CRC_POLY _SB_MAKE64(32) |
478 | #define M_CRC_DEF_CRC_POLY _SB_MAKEMASK(32, S_CRC_DEF_CRC_POLY) | 478 | #define M_CRC_DEF_CRC_POLY _SB_MAKEMASK(32, S_CRC_DEF_CRC_POLY) |
479 | #define V_CRC_DEF_CRC_POLY(r) _SB_MAKEVALUE(r, S_CRC_DEF_CRC_POLY) | 479 | #define V_CRC_DEF_CRC_POLY(r) _SB_MAKEVALUE(r, S_CRC_DEF_CRC_POLY) |
480 | #define G_CRC_DEF_CRC_POLY(r) _SB_GETVALUE(r, S_CRC_DEF_CRC_POLY,\ | 480 | #define G_CRC_DEF_CRC_POLY(r) _SB_GETVALUE(r, S_CRC_DEF_CRC_POLY,\ |
481 | M_CRC_DEF_CRC_POLY) | 481 | M_CRC_DEF_CRC_POLY) |
482 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 482 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
483 | 483 | ||
484 | 484 | ||
@@ -488,50 +488,50 @@ | |||
488 | * Register: CTCP_DEF_0 | 488 | * Register: CTCP_DEF_0 |
489 | * Register: CTCP_DEF_1 | 489 | * Register: CTCP_DEF_1 |
490 | */ | 490 | */ |
491 | #define S_CTCP_DEF_CRC_TXOR _SB_MAKE64(0) | 491 | #define S_CTCP_DEF_CRC_TXOR _SB_MAKE64(0) |
492 | #define M_CTCP_DEF_CRC_TXOR _SB_MAKEMASK(32, S_CTCP_DEF_CRC_TXOR) | 492 | #define M_CTCP_DEF_CRC_TXOR _SB_MAKEMASK(32, S_CTCP_DEF_CRC_TXOR) |
493 | #define V_CTCP_DEF_CRC_TXOR(r) _SB_MAKEVALUE(r, S_CTCP_DEF_CRC_TXOR) | 493 | #define V_CTCP_DEF_CRC_TXOR(r) _SB_MAKEVALUE(r, S_CTCP_DEF_CRC_TXOR) |
494 | #define G_CTCP_DEF_CRC_TXOR(r) _SB_GETVALUE(r, S_CTCP_DEF_CRC_TXOR,\ | 494 | #define G_CTCP_DEF_CRC_TXOR(r) _SB_GETVALUE(r, S_CTCP_DEF_CRC_TXOR,\ |
495 | M_CTCP_DEF_CRC_TXOR) | 495 | M_CTCP_DEF_CRC_TXOR) |
496 | 496 | ||
497 | #define S_CTCP_DEF_TCPCS_INIT _SB_MAKE64(32) | 497 | #define S_CTCP_DEF_TCPCS_INIT _SB_MAKE64(32) |
498 | #define M_CTCP_DEF_TCPCS_INIT _SB_MAKEMASK(16, S_CTCP_DEF_TCPCS_INIT) | 498 | #define M_CTCP_DEF_TCPCS_INIT _SB_MAKEMASK(16, S_CTCP_DEF_TCPCS_INIT) |
499 | #define V_CTCP_DEF_TCPCS_INIT(r) _SB_MAKEVALUE(r, S_CTCP_DEF_TCPCS_INIT) | 499 | #define V_CTCP_DEF_TCPCS_INIT(r) _SB_MAKEVALUE(r, S_CTCP_DEF_TCPCS_INIT) |
500 | #define G_CTCP_DEF_TCPCS_INIT(r) _SB_GETVALUE(r, S_CTCP_DEF_TCPCS_INIT,\ | 500 | #define G_CTCP_DEF_TCPCS_INIT(r) _SB_GETVALUE(r, S_CTCP_DEF_TCPCS_INIT,\ |
501 | M_CTCP_DEF_TCPCS_INIT) | 501 | M_CTCP_DEF_TCPCS_INIT) |
502 | 502 | ||
503 | #define S_CTCP_DEF_CRC_WIDTH _SB_MAKE64(48) | 503 | #define S_CTCP_DEF_CRC_WIDTH _SB_MAKE64(48) |
504 | #define M_CTCP_DEF_CRC_WIDTH _SB_MAKEMASK(2, S_CTCP_DEF_CRC_WIDTH) | 504 | #define M_CTCP_DEF_CRC_WIDTH _SB_MAKEMASK(2, S_CTCP_DEF_CRC_WIDTH) |
505 | #define V_CTCP_DEF_CRC_WIDTH(r) _SB_MAKEVALUE(r, S_CTCP_DEF_CRC_WIDTH) | 505 | #define V_CTCP_DEF_CRC_WIDTH(r) _SB_MAKEVALUE(r, S_CTCP_DEF_CRC_WIDTH) |
506 | #define G_CTCP_DEF_CRC_WIDTH(r) _SB_GETVALUE(r, S_CTCP_DEF_CRC_WIDTH,\ | 506 | #define G_CTCP_DEF_CRC_WIDTH(r) _SB_GETVALUE(r, S_CTCP_DEF_CRC_WIDTH,\ |
507 | M_CTCP_DEF_CRC_WIDTH) | 507 | M_CTCP_DEF_CRC_WIDTH) |
508 | 508 | ||
509 | #define K_CTCP_DEF_CRC_WIDTH_4 0 | 509 | #define K_CTCP_DEF_CRC_WIDTH_4 0 |
510 | #define K_CTCP_DEF_CRC_WIDTH_2 1 | 510 | #define K_CTCP_DEF_CRC_WIDTH_2 1 |
511 | #define K_CTCP_DEF_CRC_WIDTH_1 2 | 511 | #define K_CTCP_DEF_CRC_WIDTH_1 2 |
512 | 512 | ||
513 | #define M_CTCP_DEF_CRC_BIT_ORDER _SB_MAKEMASK1(50) | 513 | #define M_CTCP_DEF_CRC_BIT_ORDER _SB_MAKEMASK1(50) |
514 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 514 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
515 | 515 | ||
516 | 516 | ||
517 | /* | 517 | /* |
518 | * Data Mover Descriptor Doubleword "A" (Table 7-26) | 518 | * Data Mover Descriptor Doubleword "A" (Table 7-26) |
519 | */ | 519 | */ |
520 | 520 | ||
521 | #define S_DM_DSCRA_DST_ADDR _SB_MAKE64(0) | 521 | #define S_DM_DSCRA_DST_ADDR _SB_MAKE64(0) |
522 | #define M_DM_DSCRA_DST_ADDR _SB_MAKEMASK(40, S_DM_DSCRA_DST_ADDR) | 522 | #define M_DM_DSCRA_DST_ADDR _SB_MAKEMASK(40, S_DM_DSCRA_DST_ADDR) |
523 | 523 | ||
524 | #define M_DM_DSCRA_UN_DEST _SB_MAKEMASK1(40) | 524 | #define M_DM_DSCRA_UN_DEST _SB_MAKEMASK1(40) |
525 | #define M_DM_DSCRA_UN_SRC _SB_MAKEMASK1(41) | 525 | #define M_DM_DSCRA_UN_SRC _SB_MAKEMASK1(41) |
526 | #define M_DM_DSCRA_INTERRUPT _SB_MAKEMASK1(42) | 526 | #define M_DM_DSCRA_INTERRUPT _SB_MAKEMASK1(42) |
527 | #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1) | 527 | #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1) |
528 | #define M_DM_DSCRA_THROTTLE _SB_MAKEMASK1(43) | 528 | #define M_DM_DSCRA_THROTTLE _SB_MAKEMASK1(43) |
529 | #endif /* up to 1250 PASS1 */ | 529 | #endif /* up to 1250 PASS1 */ |
530 | 530 | ||
531 | #define S_DM_DSCRA_DIR_DEST _SB_MAKE64(44) | 531 | #define S_DM_DSCRA_DIR_DEST _SB_MAKE64(44) |
532 | #define M_DM_DSCRA_DIR_DEST _SB_MAKEMASK(2, S_DM_DSCRA_DIR_DEST) | 532 | #define M_DM_DSCRA_DIR_DEST _SB_MAKEMASK(2, S_DM_DSCRA_DIR_DEST) |
533 | #define V_DM_DSCRA_DIR_DEST(x) _SB_MAKEVALUE(x, S_DM_DSCRA_DIR_DEST) | 533 | #define V_DM_DSCRA_DIR_DEST(x) _SB_MAKEVALUE(x, S_DM_DSCRA_DIR_DEST) |
534 | #define G_DM_DSCRA_DIR_DEST(x) _SB_GETVALUE(x, S_DM_DSCRA_DIR_DEST, M_DM_DSCRA_DIR_DEST) | 534 | #define G_DM_DSCRA_DIR_DEST(x) _SB_GETVALUE(x, S_DM_DSCRA_DIR_DEST, M_DM_DSCRA_DIR_DEST) |
535 | 535 | ||
536 | #define K_DM_DSCRA_DIR_DEST_INCR 0 | 536 | #define K_DM_DSCRA_DIR_DEST_INCR 0 |
537 | #define K_DM_DSCRA_DIR_DEST_DECR 1 | 537 | #define K_DM_DSCRA_DIR_DEST_DECR 1 |
@@ -541,24 +541,24 @@ | |||
541 | #define V_DM_DSCRA_DIR_DEST_DECR _SB_MAKEVALUE(K_DM_DSCRA_DIR_DEST_DECR, S_DM_DSCRA_DIR_DEST) | 541 | #define V_DM_DSCRA_DIR_DEST_DECR _SB_MAKEVALUE(K_DM_DSCRA_DIR_DEST_DECR, S_DM_DSCRA_DIR_DEST) |
542 | #define V_DM_DSCRA_DIR_DEST_CONST _SB_MAKEVALUE(K_DM_DSCRA_DIR_DEST_CONST, S_DM_DSCRA_DIR_DEST) | 542 | #define V_DM_DSCRA_DIR_DEST_CONST _SB_MAKEVALUE(K_DM_DSCRA_DIR_DEST_CONST, S_DM_DSCRA_DIR_DEST) |
543 | 543 | ||
544 | #define S_DM_DSCRA_DIR_SRC _SB_MAKE64(46) | 544 | #define S_DM_DSCRA_DIR_SRC _SB_MAKE64(46) |
545 | #define M_DM_DSCRA_DIR_SRC _SB_MAKEMASK(2, S_DM_DSCRA_DIR_SRC) | 545 | #define M_DM_DSCRA_DIR_SRC _SB_MAKEMASK(2, S_DM_DSCRA_DIR_SRC) |
546 | #define V_DM_DSCRA_DIR_SRC(x) _SB_MAKEVALUE(x, S_DM_DSCRA_DIR_SRC) | 546 | #define V_DM_DSCRA_DIR_SRC(x) _SB_MAKEVALUE(x, S_DM_DSCRA_DIR_SRC) |
547 | #define G_DM_DSCRA_DIR_SRC(x) _SB_GETVALUE(x, S_DM_DSCRA_DIR_SRC, M_DM_DSCRA_DIR_SRC) | 547 | #define G_DM_DSCRA_DIR_SRC(x) _SB_GETVALUE(x, S_DM_DSCRA_DIR_SRC, M_DM_DSCRA_DIR_SRC) |
548 | 548 | ||
549 | #define K_DM_DSCRA_DIR_SRC_INCR 0 | 549 | #define K_DM_DSCRA_DIR_SRC_INCR 0 |
550 | #define K_DM_DSCRA_DIR_SRC_DECR 1 | 550 | #define K_DM_DSCRA_DIR_SRC_DECR 1 |
551 | #define K_DM_DSCRA_DIR_SRC_CONST 2 | 551 | #define K_DM_DSCRA_DIR_SRC_CONST 2 |
552 | 552 | ||
553 | #define V_DM_DSCRA_DIR_SRC_INCR _SB_MAKEVALUE(K_DM_DSCRA_DIR_SRC_INCR, S_DM_DSCRA_DIR_SRC) | 553 | #define V_DM_DSCRA_DIR_SRC_INCR _SB_MAKEVALUE(K_DM_DSCRA_DIR_SRC_INCR, S_DM_DSCRA_DIR_SRC) |
554 | #define V_DM_DSCRA_DIR_SRC_DECR _SB_MAKEVALUE(K_DM_DSCRA_DIR_SRC_DECR, S_DM_DSCRA_DIR_SRC) | 554 | #define V_DM_DSCRA_DIR_SRC_DECR _SB_MAKEVALUE(K_DM_DSCRA_DIR_SRC_DECR, S_DM_DSCRA_DIR_SRC) |
555 | #define V_DM_DSCRA_DIR_SRC_CONST _SB_MAKEVALUE(K_DM_DSCRA_DIR_SRC_CONST, S_DM_DSCRA_DIR_SRC) | 555 | #define V_DM_DSCRA_DIR_SRC_CONST _SB_MAKEVALUE(K_DM_DSCRA_DIR_SRC_CONST, S_DM_DSCRA_DIR_SRC) |
556 | 556 | ||
557 | 557 | ||
558 | #define M_DM_DSCRA_ZERO_MEM _SB_MAKEMASK1(48) | 558 | #define M_DM_DSCRA_ZERO_MEM _SB_MAKEMASK1(48) |
559 | #define M_DM_DSCRA_PREFETCH _SB_MAKEMASK1(49) | 559 | #define M_DM_DSCRA_PREFETCH _SB_MAKEMASK1(49) |
560 | #define M_DM_DSCRA_L2C_DEST _SB_MAKEMASK1(50) | 560 | #define M_DM_DSCRA_L2C_DEST _SB_MAKEMASK1(50) |
561 | #define M_DM_DSCRA_L2C_SRC _SB_MAKEMASK1(51) | 561 | #define M_DM_DSCRA_L2C_SRC _SB_MAKEMASK1(51) |
562 | 562 | ||
563 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 563 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
564 | #define M_DM_DSCRA_RD_BKOFF _SB_MAKEMASK1(52) | 564 | #define M_DM_DSCRA_RD_BKOFF _SB_MAKEMASK1(52) |
@@ -566,27 +566,27 @@ | |||
566 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 566 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
567 | 567 | ||
568 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 568 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
569 | #define M_DM_DSCRA_TCPCS_EN _SB_MAKEMASK1(54) | 569 | #define M_DM_DSCRA_TCPCS_EN _SB_MAKEMASK1(54) |
570 | #define M_DM_DSCRA_TCPCS_RES _SB_MAKEMASK1(55) | 570 | #define M_DM_DSCRA_TCPCS_RES _SB_MAKEMASK1(55) |
571 | #define M_DM_DSCRA_TCPCS_AP _SB_MAKEMASK1(56) | 571 | #define M_DM_DSCRA_TCPCS_AP _SB_MAKEMASK1(56) |
572 | #define M_DM_DSCRA_CRC_EN _SB_MAKEMASK1(57) | 572 | #define M_DM_DSCRA_CRC_EN _SB_MAKEMASK1(57) |
573 | #define M_DM_DSCRA_CRC_RES _SB_MAKEMASK1(58) | 573 | #define M_DM_DSCRA_CRC_RES _SB_MAKEMASK1(58) |
574 | #define M_DM_DSCRA_CRC_AP _SB_MAKEMASK1(59) | 574 | #define M_DM_DSCRA_CRC_AP _SB_MAKEMASK1(59) |
575 | #define M_DM_DSCRA_CRC_DFN _SB_MAKEMASK1(60) | 575 | #define M_DM_DSCRA_CRC_DFN _SB_MAKEMASK1(60) |
576 | #define M_DM_DSCRA_CRC_XBIT _SB_MAKEMASK1(61) | 576 | #define M_DM_DSCRA_CRC_XBIT _SB_MAKEMASK1(61) |
577 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 577 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
578 | 578 | ||
579 | #define M_DM_DSCRA_RESERVED2 _SB_MAKEMASK(3, 61) | 579 | #define M_DM_DSCRA_RESERVED2 _SB_MAKEMASK(3, 61) |
580 | 580 | ||
581 | /* | 581 | /* |
582 | * Data Mover Descriptor Doubleword "B" (Table 7-25) | 582 | * Data Mover Descriptor Doubleword "B" (Table 7-25) |
583 | */ | 583 | */ |
584 | 584 | ||
585 | #define S_DM_DSCRB_SRC_ADDR _SB_MAKE64(0) | 585 | #define S_DM_DSCRB_SRC_ADDR _SB_MAKE64(0) |
586 | #define M_DM_DSCRB_SRC_ADDR _SB_MAKEMASK(40, S_DM_DSCRB_SRC_ADDR) | 586 | #define M_DM_DSCRB_SRC_ADDR _SB_MAKEMASK(40, S_DM_DSCRB_SRC_ADDR) |
587 | 587 | ||
588 | #define S_DM_DSCRB_SRC_LENGTH _SB_MAKE64(40) | 588 | #define S_DM_DSCRB_SRC_LENGTH _SB_MAKE64(40) |
589 | #define M_DM_DSCRB_SRC_LENGTH _SB_MAKEMASK(20, S_DM_DSCRB_SRC_LENGTH) | 589 | #define M_DM_DSCRB_SRC_LENGTH _SB_MAKEMASK(20, S_DM_DSCRB_SRC_LENGTH) |
590 | #define V_DM_DSCRB_SRC_LENGTH(x) _SB_MAKEVALUE(x, S_DM_DSCRB_SRC_LENGTH) | 590 | #define V_DM_DSCRB_SRC_LENGTH(x) _SB_MAKEVALUE(x, S_DM_DSCRB_SRC_LENGTH) |
591 | #define G_DM_DSCRB_SRC_LENGTH(x) _SB_GETVALUE(x, S_DM_DSCRB_SRC_LENGTH, M_DM_DSCRB_SRC_LENGTH) | 591 | #define G_DM_DSCRB_SRC_LENGTH(x) _SB_GETVALUE(x, S_DM_DSCRB_SRC_LENGTH, M_DM_DSCRB_SRC_LENGTH) |
592 | 592 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250_genbus.h b/arch/mips/include/asm/sibyte/sb1250_genbus.h index a96ded17bdc9..04c009c36937 100644 --- a/arch/mips/include/asm/sibyte/sb1250_genbus.h +++ b/arch/mips/include/asm/sibyte/sb1250_genbus.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Generic Bus Constants File: sb1250_genbus.h | 4 | * Generic Bus Constants File: sb1250_genbus.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the SB1250's Generic Bus interface | 7 | * manipulating the SB1250's Generic Bus interface |
@@ -40,10 +40,10 @@ | |||
40 | * Generic Bus Region Configuration Registers (Table 11-4) | 40 | * Generic Bus Region Configuration Registers (Table 11-4) |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #define S_IO_RDY_ACTIVE 0 | 43 | #define S_IO_RDY_ACTIVE 0 |
44 | #define M_IO_RDY_ACTIVE _SB_MAKEMASK1(S_IO_RDY_ACTIVE) | 44 | #define M_IO_RDY_ACTIVE _SB_MAKEMASK1(S_IO_RDY_ACTIVE) |
45 | 45 | ||
46 | #define S_IO_ENA_RDY 1 | 46 | #define S_IO_ENA_RDY 1 |
47 | #define M_IO_ENA_RDY _SB_MAKEMASK1(S_IO_ENA_RDY) | 47 | #define M_IO_ENA_RDY _SB_MAKEMASK1(S_IO_ENA_RDY) |
48 | 48 | ||
49 | #define S_IO_WIDTH_SEL 2 | 49 | #define S_IO_WIDTH_SEL 2 |
@@ -52,7 +52,7 @@ | |||
52 | #define K_IO_WIDTH_SEL_2 1 | 52 | #define K_IO_WIDTH_SEL_2 1 |
53 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ | 53 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ |
54 | || SIBYTE_HDR_FEATURE_CHIP(1480) | 54 | || SIBYTE_HDR_FEATURE_CHIP(1480) |
55 | #define K_IO_WIDTH_SEL_1L 2 | 55 | #define K_IO_WIDTH_SEL_1L 2 |
56 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 56 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
57 | #define K_IO_WIDTH_SEL_4 3 | 57 | #define K_IO_WIDTH_SEL_4 3 |
58 | #define V_IO_WIDTH_SEL(x) _SB_MAKEVALUE(x, S_IO_WIDTH_SEL) | 58 | #define V_IO_WIDTH_SEL(x) _SB_MAKEVALUE(x, S_IO_WIDTH_SEL) |
@@ -111,7 +111,7 @@ | |||
111 | 111 | ||
112 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ | 112 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ |
113 | || SIBYTE_HDR_FEATURE_CHIP(1480) | 113 | || SIBYTE_HDR_FEATURE_CHIP(1480) |
114 | #define M_IO_EARLY_CS _SB_MAKEMASK1(3) | 114 | #define M_IO_EARLY_CS _SB_MAKEMASK1(3) |
115 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 115 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
116 | 116 | ||
117 | #define S_IO_ALE_TO_CS 4 | 117 | #define S_IO_ALE_TO_CS 4 |
@@ -121,10 +121,10 @@ | |||
121 | 121 | ||
122 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ | 122 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ |
123 | || SIBYTE_HDR_FEATURE_CHIP(1480) | 123 | || SIBYTE_HDR_FEATURE_CHIP(1480) |
124 | #define S_IO_BURST_WIDTH _SB_MAKE64(6) | 124 | #define S_IO_BURST_WIDTH _SB_MAKE64(6) |
125 | #define M_IO_BURST_WIDTH _SB_MAKEMASK(2, S_IO_BURST_WIDTH) | 125 | #define M_IO_BURST_WIDTH _SB_MAKEMASK(2, S_IO_BURST_WIDTH) |
126 | #define V_IO_BURST_WIDTH(x) _SB_MAKEVALUE(x, S_IO_BURST_WIDTH) | 126 | #define V_IO_BURST_WIDTH(x) _SB_MAKEVALUE(x, S_IO_BURST_WIDTH) |
127 | #define G_IO_BURST_WIDTH(x) _SB_GETVALUE(x, S_IO_BURST_WIDTH, M_IO_BURST_WIDTH) | 127 | #define G_IO_BURST_WIDTH(x) _SB_GETVALUE(x, S_IO_BURST_WIDTH, M_IO_BURST_WIDTH) |
128 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 128 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
129 | 129 | ||
130 | #define S_IO_CS_WIDTH 8 | 130 | #define S_IO_CS_WIDTH 8 |
@@ -149,7 +149,7 @@ | |||
149 | 149 | ||
150 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ | 150 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ |
151 | || SIBYTE_HDR_FEATURE_CHIP(1480) | 151 | || SIBYTE_HDR_FEATURE_CHIP(1480) |
152 | #define M_IO_RDY_SYNC _SB_MAKEMASK1(3) | 152 | #define M_IO_RDY_SYNC _SB_MAKEMASK1(3) |
153 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 153 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
154 | 154 | ||
155 | #define S_IO_WRITE_WIDTH 4 | 155 | #define S_IO_WRITE_WIDTH 4 |
@@ -191,7 +191,7 @@ | |||
191 | #define M_IO_ILL_ADDR_INT _SB_MAKEMASK1(11) | 191 | #define M_IO_ILL_ADDR_INT _SB_MAKEMASK1(11) |
192 | #define M_IO_MULT_CS_INT _SB_MAKEMASK1(12) | 192 | #define M_IO_MULT_CS_INT _SB_MAKEMASK1(12) |
193 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 193 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
194 | #define M_IO_COH_ERR _SB_MAKEMASK1(14) | 194 | #define M_IO_COH_ERR _SB_MAKEMASK1(14) |
195 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 195 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
196 | 196 | ||
197 | 197 | ||
@@ -370,8 +370,8 @@ | |||
370 | 370 | ||
371 | #define S_GPIO_INTR_TYPEX(n) (((n)/2)*2) | 371 | #define S_GPIO_INTR_TYPEX(n) (((n)/2)*2) |
372 | #define M_GPIO_INTR_TYPEX(n) _SB_MAKEMASK(2, S_GPIO_INTR_TYPEX(n)) | 372 | #define M_GPIO_INTR_TYPEX(n) _SB_MAKEMASK(2, S_GPIO_INTR_TYPEX(n)) |
373 | #define V_GPIO_INTR_TYPEX(n, x) _SB_MAKEVALUE(x, S_GPIO_INTR_TYPEX(n)) | 373 | #define V_GPIO_INTR_TYPEX(n, x) _SB_MAKEVALUE(x, S_GPIO_INTR_TYPEX(n)) |
374 | #define G_GPIO_INTR_TYPEX(n, x) _SB_GETVALUE(x, S_GPIO_INTR_TYPEX(n), M_GPIO_INTR_TYPEX(n)) | 374 | #define G_GPIO_INTR_TYPEX(n, x) _SB_GETVALUE(x, S_GPIO_INTR_TYPEX(n), M_GPIO_INTR_TYPEX(n)) |
375 | 375 | ||
376 | #define S_GPIO_INTR_TYPE0 0 | 376 | #define S_GPIO_INTR_TYPE0 0 |
377 | #define M_GPIO_INTR_TYPE0 _SB_MAKEMASK(2, S_GPIO_INTR_TYPE0) | 377 | #define M_GPIO_INTR_TYPE0 _SB_MAKEMASK(2, S_GPIO_INTR_TYPE0) |
diff --git a/arch/mips/include/asm/sibyte/sb1250_int.h b/arch/mips/include/asm/sibyte/sb1250_int.h index dbea73ddd2fe..36afcb2766c6 100644 --- a/arch/mips/include/asm/sibyte/sb1250_int.h +++ b/arch/mips/include/asm/sibyte/sb1250_int.h | |||
@@ -45,71 +45,71 @@ | |||
45 | * First, the interrupt numbers. | 45 | * First, the interrupt numbers. |
46 | */ | 46 | */ |
47 | 47 | ||
48 | #define K_INT_SOURCES 64 | 48 | #define K_INT_SOURCES 64 |
49 | 49 | ||
50 | #define K_INT_WATCHDOG_TIMER_0 0 | 50 | #define K_INT_WATCHDOG_TIMER_0 0 |
51 | #define K_INT_WATCHDOG_TIMER_1 1 | 51 | #define K_INT_WATCHDOG_TIMER_1 1 |
52 | #define K_INT_TIMER_0 2 | 52 | #define K_INT_TIMER_0 2 |
53 | #define K_INT_TIMER_1 3 | 53 | #define K_INT_TIMER_1 3 |
54 | #define K_INT_TIMER_2 4 | 54 | #define K_INT_TIMER_2 4 |
55 | #define K_INT_TIMER_3 5 | 55 | #define K_INT_TIMER_3 5 |
56 | #define K_INT_SMB_0 6 | 56 | #define K_INT_SMB_0 6 |
57 | #define K_INT_SMB_1 7 | 57 | #define K_INT_SMB_1 7 |
58 | #define K_INT_UART_0 8 | 58 | #define K_INT_UART_0 8 |
59 | #define K_INT_UART_1 9 | 59 | #define K_INT_UART_1 9 |
60 | #define K_INT_SER_0 10 | 60 | #define K_INT_SER_0 10 |
61 | #define K_INT_SER_1 11 | 61 | #define K_INT_SER_1 11 |
62 | #define K_INT_PCMCIA 12 | 62 | #define K_INT_PCMCIA 12 |
63 | #define K_INT_ADDR_TRAP 13 | 63 | #define K_INT_ADDR_TRAP 13 |
64 | #define K_INT_PERF_CNT 14 | 64 | #define K_INT_PERF_CNT 14 |
65 | #define K_INT_TRACE_FREEZE 15 | 65 | #define K_INT_TRACE_FREEZE 15 |
66 | #define K_INT_BAD_ECC 16 | 66 | #define K_INT_BAD_ECC 16 |
67 | #define K_INT_COR_ECC 17 | 67 | #define K_INT_COR_ECC 17 |
68 | #define K_INT_IO_BUS 18 | 68 | #define K_INT_IO_BUS 18 |
69 | #define K_INT_MAC_0 19 | 69 | #define K_INT_MAC_0 19 |
70 | #define K_INT_MAC_1 20 | 70 | #define K_INT_MAC_1 20 |
71 | #define K_INT_MAC_2 21 | 71 | #define K_INT_MAC_2 21 |
72 | #define K_INT_DM_CH_0 22 | 72 | #define K_INT_DM_CH_0 22 |
73 | #define K_INT_DM_CH_1 23 | 73 | #define K_INT_DM_CH_1 23 |
74 | #define K_INT_DM_CH_2 24 | 74 | #define K_INT_DM_CH_2 24 |
75 | #define K_INT_DM_CH_3 25 | 75 | #define K_INT_DM_CH_3 25 |
76 | #define K_INT_MBOX_0 26 | 76 | #define K_INT_MBOX_0 26 |
77 | #define K_INT_MBOX_1 27 | 77 | #define K_INT_MBOX_1 27 |
78 | #define K_INT_MBOX_2 28 | 78 | #define K_INT_MBOX_2 28 |
79 | #define K_INT_MBOX_3 29 | 79 | #define K_INT_MBOX_3 29 |
80 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 80 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
81 | #define K_INT_CYCLE_CP0_INT 30 | 81 | #define K_INT_CYCLE_CP0_INT 30 |
82 | #define K_INT_CYCLE_CP1_INT 31 | 82 | #define K_INT_CYCLE_CP1_INT 31 |
83 | #endif /* 1250 PASS2 || 112x PASS1 */ | 83 | #endif /* 1250 PASS2 || 112x PASS1 */ |
84 | #define K_INT_GPIO_0 32 | 84 | #define K_INT_GPIO_0 32 |
85 | #define K_INT_GPIO_1 33 | 85 | #define K_INT_GPIO_1 33 |
86 | #define K_INT_GPIO_2 34 | 86 | #define K_INT_GPIO_2 34 |
87 | #define K_INT_GPIO_3 35 | 87 | #define K_INT_GPIO_3 35 |
88 | #define K_INT_GPIO_4 36 | 88 | #define K_INT_GPIO_4 36 |
89 | #define K_INT_GPIO_5 37 | 89 | #define K_INT_GPIO_5 37 |
90 | #define K_INT_GPIO_6 38 | 90 | #define K_INT_GPIO_6 38 |
91 | #define K_INT_GPIO_7 39 | 91 | #define K_INT_GPIO_7 39 |
92 | #define K_INT_GPIO_8 40 | 92 | #define K_INT_GPIO_8 40 |
93 | #define K_INT_GPIO_9 41 | 93 | #define K_INT_GPIO_9 41 |
94 | #define K_INT_GPIO_10 42 | 94 | #define K_INT_GPIO_10 42 |
95 | #define K_INT_GPIO_11 43 | 95 | #define K_INT_GPIO_11 43 |
96 | #define K_INT_GPIO_12 44 | 96 | #define K_INT_GPIO_12 44 |
97 | #define K_INT_GPIO_13 45 | 97 | #define K_INT_GPIO_13 45 |
98 | #define K_INT_GPIO_14 46 | 98 | #define K_INT_GPIO_14 46 |
99 | #define K_INT_GPIO_15 47 | 99 | #define K_INT_GPIO_15 47 |
100 | #define K_INT_LDT_FATAL 48 | 100 | #define K_INT_LDT_FATAL 48 |
101 | #define K_INT_LDT_NONFATAL 49 | 101 | #define K_INT_LDT_NONFATAL 49 |
102 | #define K_INT_LDT_SMI 50 | 102 | #define K_INT_LDT_SMI 50 |
103 | #define K_INT_LDT_NMI 51 | 103 | #define K_INT_LDT_NMI 51 |
104 | #define K_INT_LDT_INIT 52 | 104 | #define K_INT_LDT_INIT 52 |
105 | #define K_INT_LDT_STARTUP 53 | 105 | #define K_INT_LDT_STARTUP 53 |
106 | #define K_INT_LDT_EXT 54 | 106 | #define K_INT_LDT_EXT 54 |
107 | #define K_INT_PCI_ERROR 55 | 107 | #define K_INT_PCI_ERROR 55 |
108 | #define K_INT_PCI_INTA 56 | 108 | #define K_INT_PCI_INTA 56 |
109 | #define K_INT_PCI_INTB 57 | 109 | #define K_INT_PCI_INTB 57 |
110 | #define K_INT_PCI_INTC 58 | 110 | #define K_INT_PCI_INTC 58 |
111 | #define K_INT_PCI_INTD 59 | 111 | #define K_INT_PCI_INTD 59 |
112 | #define K_INT_SPARE_2 60 | 112 | #define K_INT_SPARE_2 60 |
113 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 113 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
114 | #define K_INT_MAC_0_CH1 61 | 114 | #define K_INT_MAC_0_CH1 61 |
115 | #define K_INT_MAC_1_CH1 62 | 115 | #define K_INT_MAC_1_CH1 62 |
@@ -120,70 +120,70 @@ | |||
120 | * Mask values for each interrupt | 120 | * Mask values for each interrupt |
121 | */ | 121 | */ |
122 | 122 | ||
123 | #define M_INT_WATCHDOG_TIMER_0 _SB_MAKEMASK1(K_INT_WATCHDOG_TIMER_0) | 123 | #define M_INT_WATCHDOG_TIMER_0 _SB_MAKEMASK1(K_INT_WATCHDOG_TIMER_0) |
124 | #define M_INT_WATCHDOG_TIMER_1 _SB_MAKEMASK1(K_INT_WATCHDOG_TIMER_1) | 124 | #define M_INT_WATCHDOG_TIMER_1 _SB_MAKEMASK1(K_INT_WATCHDOG_TIMER_1) |
125 | #define M_INT_TIMER_0 _SB_MAKEMASK1(K_INT_TIMER_0) | 125 | #define M_INT_TIMER_0 _SB_MAKEMASK1(K_INT_TIMER_0) |
126 | #define M_INT_TIMER_1 _SB_MAKEMASK1(K_INT_TIMER_1) | 126 | #define M_INT_TIMER_1 _SB_MAKEMASK1(K_INT_TIMER_1) |
127 | #define M_INT_TIMER_2 _SB_MAKEMASK1(K_INT_TIMER_2) | 127 | #define M_INT_TIMER_2 _SB_MAKEMASK1(K_INT_TIMER_2) |
128 | #define M_INT_TIMER_3 _SB_MAKEMASK1(K_INT_TIMER_3) | 128 | #define M_INT_TIMER_3 _SB_MAKEMASK1(K_INT_TIMER_3) |
129 | #define M_INT_SMB_0 _SB_MAKEMASK1(K_INT_SMB_0) | 129 | #define M_INT_SMB_0 _SB_MAKEMASK1(K_INT_SMB_0) |
130 | #define M_INT_SMB_1 _SB_MAKEMASK1(K_INT_SMB_1) | 130 | #define M_INT_SMB_1 _SB_MAKEMASK1(K_INT_SMB_1) |
131 | #define M_INT_UART_0 _SB_MAKEMASK1(K_INT_UART_0) | 131 | #define M_INT_UART_0 _SB_MAKEMASK1(K_INT_UART_0) |
132 | #define M_INT_UART_1 _SB_MAKEMASK1(K_INT_UART_1) | 132 | #define M_INT_UART_1 _SB_MAKEMASK1(K_INT_UART_1) |
133 | #define M_INT_SER_0 _SB_MAKEMASK1(K_INT_SER_0) | 133 | #define M_INT_SER_0 _SB_MAKEMASK1(K_INT_SER_0) |
134 | #define M_INT_SER_1 _SB_MAKEMASK1(K_INT_SER_1) | 134 | #define M_INT_SER_1 _SB_MAKEMASK1(K_INT_SER_1) |
135 | #define M_INT_PCMCIA _SB_MAKEMASK1(K_INT_PCMCIA) | 135 | #define M_INT_PCMCIA _SB_MAKEMASK1(K_INT_PCMCIA) |
136 | #define M_INT_ADDR_TRAP _SB_MAKEMASK1(K_INT_ADDR_TRAP) | 136 | #define M_INT_ADDR_TRAP _SB_MAKEMASK1(K_INT_ADDR_TRAP) |
137 | #define M_INT_PERF_CNT _SB_MAKEMASK1(K_INT_PERF_CNT) | 137 | #define M_INT_PERF_CNT _SB_MAKEMASK1(K_INT_PERF_CNT) |
138 | #define M_INT_TRACE_FREEZE _SB_MAKEMASK1(K_INT_TRACE_FREEZE) | 138 | #define M_INT_TRACE_FREEZE _SB_MAKEMASK1(K_INT_TRACE_FREEZE) |
139 | #define M_INT_BAD_ECC _SB_MAKEMASK1(K_INT_BAD_ECC) | 139 | #define M_INT_BAD_ECC _SB_MAKEMASK1(K_INT_BAD_ECC) |
140 | #define M_INT_COR_ECC _SB_MAKEMASK1(K_INT_COR_ECC) | 140 | #define M_INT_COR_ECC _SB_MAKEMASK1(K_INT_COR_ECC) |
141 | #define M_INT_IO_BUS _SB_MAKEMASK1(K_INT_IO_BUS) | 141 | #define M_INT_IO_BUS _SB_MAKEMASK1(K_INT_IO_BUS) |
142 | #define M_INT_MAC_0 _SB_MAKEMASK1(K_INT_MAC_0) | 142 | #define M_INT_MAC_0 _SB_MAKEMASK1(K_INT_MAC_0) |
143 | #define M_INT_MAC_1 _SB_MAKEMASK1(K_INT_MAC_1) | 143 | #define M_INT_MAC_1 _SB_MAKEMASK1(K_INT_MAC_1) |
144 | #define M_INT_MAC_2 _SB_MAKEMASK1(K_INT_MAC_2) | 144 | #define M_INT_MAC_2 _SB_MAKEMASK1(K_INT_MAC_2) |
145 | #define M_INT_DM_CH_0 _SB_MAKEMASK1(K_INT_DM_CH_0) | 145 | #define M_INT_DM_CH_0 _SB_MAKEMASK1(K_INT_DM_CH_0) |
146 | #define M_INT_DM_CH_1 _SB_MAKEMASK1(K_INT_DM_CH_1) | 146 | #define M_INT_DM_CH_1 _SB_MAKEMASK1(K_INT_DM_CH_1) |
147 | #define M_INT_DM_CH_2 _SB_MAKEMASK1(K_INT_DM_CH_2) | 147 | #define M_INT_DM_CH_2 _SB_MAKEMASK1(K_INT_DM_CH_2) |
148 | #define M_INT_DM_CH_3 _SB_MAKEMASK1(K_INT_DM_CH_3) | 148 | #define M_INT_DM_CH_3 _SB_MAKEMASK1(K_INT_DM_CH_3) |
149 | #define M_INT_MBOX_0 _SB_MAKEMASK1(K_INT_MBOX_0) | 149 | #define M_INT_MBOX_0 _SB_MAKEMASK1(K_INT_MBOX_0) |
150 | #define M_INT_MBOX_1 _SB_MAKEMASK1(K_INT_MBOX_1) | 150 | #define M_INT_MBOX_1 _SB_MAKEMASK1(K_INT_MBOX_1) |
151 | #define M_INT_MBOX_2 _SB_MAKEMASK1(K_INT_MBOX_2) | 151 | #define M_INT_MBOX_2 _SB_MAKEMASK1(K_INT_MBOX_2) |
152 | #define M_INT_MBOX_3 _SB_MAKEMASK1(K_INT_MBOX_3) | 152 | #define M_INT_MBOX_3 _SB_MAKEMASK1(K_INT_MBOX_3) |
153 | #define M_INT_MBOX_ALL _SB_MAKEMASK(4, K_INT_MBOX_0) | 153 | #define M_INT_MBOX_ALL _SB_MAKEMASK(4, K_INT_MBOX_0) |
154 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 154 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
155 | #define M_INT_CYCLE_CP0_INT _SB_MAKEMASK1(K_INT_CYCLE_CP0_INT) | 155 | #define M_INT_CYCLE_CP0_INT _SB_MAKEMASK1(K_INT_CYCLE_CP0_INT) |
156 | #define M_INT_CYCLE_CP1_INT _SB_MAKEMASK1(K_INT_CYCLE_CP1_INT) | 156 | #define M_INT_CYCLE_CP1_INT _SB_MAKEMASK1(K_INT_CYCLE_CP1_INT) |
157 | #endif /* 1250 PASS2 || 112x PASS1 */ | 157 | #endif /* 1250 PASS2 || 112x PASS1 */ |
158 | #define M_INT_GPIO_0 _SB_MAKEMASK1(K_INT_GPIO_0) | 158 | #define M_INT_GPIO_0 _SB_MAKEMASK1(K_INT_GPIO_0) |
159 | #define M_INT_GPIO_1 _SB_MAKEMASK1(K_INT_GPIO_1) | 159 | #define M_INT_GPIO_1 _SB_MAKEMASK1(K_INT_GPIO_1) |
160 | #define M_INT_GPIO_2 _SB_MAKEMASK1(K_INT_GPIO_2) | 160 | #define M_INT_GPIO_2 _SB_MAKEMASK1(K_INT_GPIO_2) |
161 | #define M_INT_GPIO_3 _SB_MAKEMASK1(K_INT_GPIO_3) | 161 | #define M_INT_GPIO_3 _SB_MAKEMASK1(K_INT_GPIO_3) |
162 | #define M_INT_GPIO_4 _SB_MAKEMASK1(K_INT_GPIO_4) | 162 | #define M_INT_GPIO_4 _SB_MAKEMASK1(K_INT_GPIO_4) |
163 | #define M_INT_GPIO_5 _SB_MAKEMASK1(K_INT_GPIO_5) | 163 | #define M_INT_GPIO_5 _SB_MAKEMASK1(K_INT_GPIO_5) |
164 | #define M_INT_GPIO_6 _SB_MAKEMASK1(K_INT_GPIO_6) | 164 | #define M_INT_GPIO_6 _SB_MAKEMASK1(K_INT_GPIO_6) |
165 | #define M_INT_GPIO_7 _SB_MAKEMASK1(K_INT_GPIO_7) | 165 | #define M_INT_GPIO_7 _SB_MAKEMASK1(K_INT_GPIO_7) |
166 | #define M_INT_GPIO_8 _SB_MAKEMASK1(K_INT_GPIO_8) | 166 | #define M_INT_GPIO_8 _SB_MAKEMASK1(K_INT_GPIO_8) |
167 | #define M_INT_GPIO_9 _SB_MAKEMASK1(K_INT_GPIO_9) | 167 | #define M_INT_GPIO_9 _SB_MAKEMASK1(K_INT_GPIO_9) |
168 | #define M_INT_GPIO_10 _SB_MAKEMASK1(K_INT_GPIO_10) | 168 | #define M_INT_GPIO_10 _SB_MAKEMASK1(K_INT_GPIO_10) |
169 | #define M_INT_GPIO_11 _SB_MAKEMASK1(K_INT_GPIO_11) | 169 | #define M_INT_GPIO_11 _SB_MAKEMASK1(K_INT_GPIO_11) |
170 | #define M_INT_GPIO_12 _SB_MAKEMASK1(K_INT_GPIO_12) | 170 | #define M_INT_GPIO_12 _SB_MAKEMASK1(K_INT_GPIO_12) |
171 | #define M_INT_GPIO_13 _SB_MAKEMASK1(K_INT_GPIO_13) | 171 | #define M_INT_GPIO_13 _SB_MAKEMASK1(K_INT_GPIO_13) |
172 | #define M_INT_GPIO_14 _SB_MAKEMASK1(K_INT_GPIO_14) | 172 | #define M_INT_GPIO_14 _SB_MAKEMASK1(K_INT_GPIO_14) |
173 | #define M_INT_GPIO_15 _SB_MAKEMASK1(K_INT_GPIO_15) | 173 | #define M_INT_GPIO_15 _SB_MAKEMASK1(K_INT_GPIO_15) |
174 | #define M_INT_LDT_FATAL _SB_MAKEMASK1(K_INT_LDT_FATAL) | 174 | #define M_INT_LDT_FATAL _SB_MAKEMASK1(K_INT_LDT_FATAL) |
175 | #define M_INT_LDT_NONFATAL _SB_MAKEMASK1(K_INT_LDT_NONFATAL) | 175 | #define M_INT_LDT_NONFATAL _SB_MAKEMASK1(K_INT_LDT_NONFATAL) |
176 | #define M_INT_LDT_SMI _SB_MAKEMASK1(K_INT_LDT_SMI) | 176 | #define M_INT_LDT_SMI _SB_MAKEMASK1(K_INT_LDT_SMI) |
177 | #define M_INT_LDT_NMI _SB_MAKEMASK1(K_INT_LDT_NMI) | 177 | #define M_INT_LDT_NMI _SB_MAKEMASK1(K_INT_LDT_NMI) |
178 | #define M_INT_LDT_INIT _SB_MAKEMASK1(K_INT_LDT_INIT) | 178 | #define M_INT_LDT_INIT _SB_MAKEMASK1(K_INT_LDT_INIT) |
179 | #define M_INT_LDT_STARTUP _SB_MAKEMASK1(K_INT_LDT_STARTUP) | 179 | #define M_INT_LDT_STARTUP _SB_MAKEMASK1(K_INT_LDT_STARTUP) |
180 | #define M_INT_LDT_EXT _SB_MAKEMASK1(K_INT_LDT_EXT) | 180 | #define M_INT_LDT_EXT _SB_MAKEMASK1(K_INT_LDT_EXT) |
181 | #define M_INT_PCI_ERROR _SB_MAKEMASK1(K_INT_PCI_ERROR) | 181 | #define M_INT_PCI_ERROR _SB_MAKEMASK1(K_INT_PCI_ERROR) |
182 | #define M_INT_PCI_INTA _SB_MAKEMASK1(K_INT_PCI_INTA) | 182 | #define M_INT_PCI_INTA _SB_MAKEMASK1(K_INT_PCI_INTA) |
183 | #define M_INT_PCI_INTB _SB_MAKEMASK1(K_INT_PCI_INTB) | 183 | #define M_INT_PCI_INTB _SB_MAKEMASK1(K_INT_PCI_INTB) |
184 | #define M_INT_PCI_INTC _SB_MAKEMASK1(K_INT_PCI_INTC) | 184 | #define M_INT_PCI_INTC _SB_MAKEMASK1(K_INT_PCI_INTC) |
185 | #define M_INT_PCI_INTD _SB_MAKEMASK1(K_INT_PCI_INTD) | 185 | #define M_INT_PCI_INTD _SB_MAKEMASK1(K_INT_PCI_INTD) |
186 | #define M_INT_SPARE_2 _SB_MAKEMASK1(K_INT_SPARE_2) | 186 | #define M_INT_SPARE_2 _SB_MAKEMASK1(K_INT_SPARE_2) |
187 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 187 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
188 | #define M_INT_MAC_0_CH1 _SB_MAKEMASK1(K_INT_MAC_0_CH1) | 188 | #define M_INT_MAC_0_CH1 _SB_MAKEMASK1(K_INT_MAC_0_CH1) |
189 | #define M_INT_MAC_1_CH1 _SB_MAKEMASK1(K_INT_MAC_1_CH1) | 189 | #define M_INT_MAC_1_CH1 _SB_MAKEMASK1(K_INT_MAC_1_CH1) |
@@ -208,9 +208,9 @@ | |||
208 | */ | 208 | */ |
209 | 209 | ||
210 | #define S_INT_LDT_INTMSG 0 | 210 | #define S_INT_LDT_INTMSG 0 |
211 | #define M_INT_LDT_INTMSG _SB_MAKEMASK(3, S_INT_LDT_INTMSG) | 211 | #define M_INT_LDT_INTMSG _SB_MAKEMASK(3, S_INT_LDT_INTMSG) |
212 | #define V_INT_LDT_INTMSG(x) _SB_MAKEVALUE(x, S_INT_LDT_INTMSG) | 212 | #define V_INT_LDT_INTMSG(x) _SB_MAKEVALUE(x, S_INT_LDT_INTMSG) |
213 | #define G_INT_LDT_INTMSG(x) _SB_GETVALUE(x, S_INT_LDT_INTMSG, M_INT_LDT_INTMSG) | 213 | #define G_INT_LDT_INTMSG(x) _SB_GETVALUE(x, S_INT_LDT_INTMSG, M_INT_LDT_INTMSG) |
214 | 214 | ||
215 | #define K_INT_LDT_INTMSG_FIXED 0 | 215 | #define K_INT_LDT_INTMSG_FIXED 0 |
216 | #define K_INT_LDT_INTMSG_ARBITRATED 1 | 216 | #define K_INT_LDT_INTMSG_ARBITRATED 1 |
@@ -221,28 +221,28 @@ | |||
221 | #define K_INT_LDT_INTMSG_EXTINT 6 | 221 | #define K_INT_LDT_INTMSG_EXTINT 6 |
222 | #define K_INT_LDT_INTMSG_RESERVED 7 | 222 | #define K_INT_LDT_INTMSG_RESERVED 7 |
223 | 223 | ||
224 | #define M_INT_LDT_EDGETRIGGER 0 | 224 | #define M_INT_LDT_EDGETRIGGER 0 |
225 | #define M_INT_LDT_LEVELTRIGGER _SB_MAKEMASK1(3) | 225 | #define M_INT_LDT_LEVELTRIGGER _SB_MAKEMASK1(3) |
226 | 226 | ||
227 | #define M_INT_LDT_PHYSICALDEST 0 | 227 | #define M_INT_LDT_PHYSICALDEST 0 |
228 | #define M_INT_LDT_LOGICALDEST _SB_MAKEMASK1(4) | 228 | #define M_INT_LDT_LOGICALDEST _SB_MAKEMASK1(4) |
229 | 229 | ||
230 | #define S_INT_LDT_INTDEST 5 | 230 | #define S_INT_LDT_INTDEST 5 |
231 | #define M_INT_LDT_INTDEST _SB_MAKEMASK(10, S_INT_LDT_INTDEST) | 231 | #define M_INT_LDT_INTDEST _SB_MAKEMASK(10, S_INT_LDT_INTDEST) |
232 | #define V_INT_LDT_INTDEST(x) _SB_MAKEVALUE(x, S_INT_LDT_INTDEST) | 232 | #define V_INT_LDT_INTDEST(x) _SB_MAKEVALUE(x, S_INT_LDT_INTDEST) |
233 | #define G_INT_LDT_INTDEST(x) _SB_GETVALUE(x, S_INT_LDT_INTDEST, M_INT_LDT_INTDEST) | 233 | #define G_INT_LDT_INTDEST(x) _SB_GETVALUE(x, S_INT_LDT_INTDEST, M_INT_LDT_INTDEST) |
234 | 234 | ||
235 | #define S_INT_LDT_VECTOR 13 | 235 | #define S_INT_LDT_VECTOR 13 |
236 | #define M_INT_LDT_VECTOR _SB_MAKEMASK(8, S_INT_LDT_VECTOR) | 236 | #define M_INT_LDT_VECTOR _SB_MAKEMASK(8, S_INT_LDT_VECTOR) |
237 | #define V_INT_LDT_VECTOR(x) _SB_MAKEVALUE(x, S_INT_LDT_VECTOR) | 237 | #define V_INT_LDT_VECTOR(x) _SB_MAKEVALUE(x, S_INT_LDT_VECTOR) |
238 | #define G_INT_LDT_VECTOR(x) _SB_GETVALUE(x, S_INT_LDT_VECTOR, M_INT_LDT_VECTOR) | 238 | #define G_INT_LDT_VECTOR(x) _SB_GETVALUE(x, S_INT_LDT_VECTOR, M_INT_LDT_VECTOR) |
239 | 239 | ||
240 | /* | 240 | /* |
241 | * Vector format (Table 4-6) | 241 | * Vector format (Table 4-6) |
242 | */ | 242 | */ |
243 | 243 | ||
244 | #define M_LDTVECT_RAISEINT 0x00 | 244 | #define M_LDTVECT_RAISEINT 0x00 |
245 | #define M_LDTVECT_RAISEMBOX 0x40 | 245 | #define M_LDTVECT_RAISEMBOX 0x40 |
246 | 246 | ||
247 | 247 | ||
248 | #endif /* 1250/112x */ | 248 | #endif /* 1250/112x */ |
diff --git a/arch/mips/include/asm/sibyte/sb1250_l2c.h b/arch/mips/include/asm/sibyte/sb1250_l2c.h index b61a7491607d..30092d7cfdc2 100644 --- a/arch/mips/include/asm/sibyte/sb1250_l2c.h +++ b/arch/mips/include/asm/sibyte/sb1250_l2c.h | |||
@@ -39,71 +39,71 @@ | |||
39 | * Level 2 Cache Tag register (Table 5-3) | 39 | * Level 2 Cache Tag register (Table 5-3) |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #define S_L2C_TAG_MBZ 0 | 42 | #define S_L2C_TAG_MBZ 0 |
43 | #define M_L2C_TAG_MBZ _SB_MAKEMASK(5, S_L2C_TAG_MBZ) | 43 | #define M_L2C_TAG_MBZ _SB_MAKEMASK(5, S_L2C_TAG_MBZ) |
44 | 44 | ||
45 | #define S_L2C_TAG_INDEX 5 | 45 | #define S_L2C_TAG_INDEX 5 |
46 | #define M_L2C_TAG_INDEX _SB_MAKEMASK(12, S_L2C_TAG_INDEX) | 46 | #define M_L2C_TAG_INDEX _SB_MAKEMASK(12, S_L2C_TAG_INDEX) |
47 | #define V_L2C_TAG_INDEX(x) _SB_MAKEVALUE(x, S_L2C_TAG_INDEX) | 47 | #define V_L2C_TAG_INDEX(x) _SB_MAKEVALUE(x, S_L2C_TAG_INDEX) |
48 | #define G_L2C_TAG_INDEX(x) _SB_GETVALUE(x, S_L2C_TAG_INDEX, M_L2C_TAG_INDEX) | 48 | #define G_L2C_TAG_INDEX(x) _SB_GETVALUE(x, S_L2C_TAG_INDEX, M_L2C_TAG_INDEX) |
49 | 49 | ||
50 | #define S_L2C_TAG_TAG 17 | 50 | #define S_L2C_TAG_TAG 17 |
51 | #define M_L2C_TAG_TAG _SB_MAKEMASK(23, S_L2C_TAG_TAG) | 51 | #define M_L2C_TAG_TAG _SB_MAKEMASK(23, S_L2C_TAG_TAG) |
52 | #define V_L2C_TAG_TAG(x) _SB_MAKEVALUE(x, S_L2C_TAG_TAG) | 52 | #define V_L2C_TAG_TAG(x) _SB_MAKEVALUE(x, S_L2C_TAG_TAG) |
53 | #define G_L2C_TAG_TAG(x) _SB_GETVALUE(x, S_L2C_TAG_TAG, M_L2C_TAG_TAG) | 53 | #define G_L2C_TAG_TAG(x) _SB_GETVALUE(x, S_L2C_TAG_TAG, M_L2C_TAG_TAG) |
54 | 54 | ||
55 | #define S_L2C_TAG_ECC 40 | 55 | #define S_L2C_TAG_ECC 40 |
56 | #define M_L2C_TAG_ECC _SB_MAKEMASK(6, S_L2C_TAG_ECC) | 56 | #define M_L2C_TAG_ECC _SB_MAKEMASK(6, S_L2C_TAG_ECC) |
57 | #define V_L2C_TAG_ECC(x) _SB_MAKEVALUE(x, S_L2C_TAG_ECC) | 57 | #define V_L2C_TAG_ECC(x) _SB_MAKEVALUE(x, S_L2C_TAG_ECC) |
58 | #define G_L2C_TAG_ECC(x) _SB_GETVALUE(x, S_L2C_TAG_ECC, M_L2C_TAG_ECC) | 58 | #define G_L2C_TAG_ECC(x) _SB_GETVALUE(x, S_L2C_TAG_ECC, M_L2C_TAG_ECC) |
59 | 59 | ||
60 | #define S_L2C_TAG_WAY 46 | 60 | #define S_L2C_TAG_WAY 46 |
61 | #define M_L2C_TAG_WAY _SB_MAKEMASK(2, S_L2C_TAG_WAY) | 61 | #define M_L2C_TAG_WAY _SB_MAKEMASK(2, S_L2C_TAG_WAY) |
62 | #define V_L2C_TAG_WAY(x) _SB_MAKEVALUE(x, S_L2C_TAG_WAY) | 62 | #define V_L2C_TAG_WAY(x) _SB_MAKEVALUE(x, S_L2C_TAG_WAY) |
63 | #define G_L2C_TAG_WAY(x) _SB_GETVALUE(x, S_L2C_TAG_WAY, M_L2C_TAG_WAY) | 63 | #define G_L2C_TAG_WAY(x) _SB_GETVALUE(x, S_L2C_TAG_WAY, M_L2C_TAG_WAY) |
64 | 64 | ||
65 | #define M_L2C_TAG_DIRTY _SB_MAKEMASK1(48) | 65 | #define M_L2C_TAG_DIRTY _SB_MAKEMASK1(48) |
66 | #define M_L2C_TAG_VALID _SB_MAKEMASK1(49) | 66 | #define M_L2C_TAG_VALID _SB_MAKEMASK1(49) |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * Format of level 2 cache management address (table 5-2) | 69 | * Format of level 2 cache management address (table 5-2) |
70 | */ | 70 | */ |
71 | 71 | ||
72 | #define S_L2C_MGMT_INDEX 5 | 72 | #define S_L2C_MGMT_INDEX 5 |
73 | #define M_L2C_MGMT_INDEX _SB_MAKEMASK(12, S_L2C_MGMT_INDEX) | 73 | #define M_L2C_MGMT_INDEX _SB_MAKEMASK(12, S_L2C_MGMT_INDEX) |
74 | #define V_L2C_MGMT_INDEX(x) _SB_MAKEVALUE(x, S_L2C_MGMT_INDEX) | 74 | #define V_L2C_MGMT_INDEX(x) _SB_MAKEVALUE(x, S_L2C_MGMT_INDEX) |
75 | #define G_L2C_MGMT_INDEX(x) _SB_GETVALUE(x, S_L2C_MGMT_INDEX, M_L2C_MGMT_INDEX) | 75 | #define G_L2C_MGMT_INDEX(x) _SB_GETVALUE(x, S_L2C_MGMT_INDEX, M_L2C_MGMT_INDEX) |
76 | 76 | ||
77 | #define S_L2C_MGMT_QUADRANT 15 | 77 | #define S_L2C_MGMT_QUADRANT 15 |
78 | #define M_L2C_MGMT_QUADRANT _SB_MAKEMASK(2, S_L2C_MGMT_QUADRANT) | 78 | #define M_L2C_MGMT_QUADRANT _SB_MAKEMASK(2, S_L2C_MGMT_QUADRANT) |
79 | #define V_L2C_MGMT_QUADRANT(x) _SB_MAKEVALUE(x, S_L2C_MGMT_QUADRANT) | 79 | #define V_L2C_MGMT_QUADRANT(x) _SB_MAKEVALUE(x, S_L2C_MGMT_QUADRANT) |
80 | #define G_L2C_MGMT_QUADRANT(x) _SB_GETVALUE(x, S_L2C_MGMT_QUADRANT, M_L2C_MGMT_QUADRANT) | 80 | #define G_L2C_MGMT_QUADRANT(x) _SB_GETVALUE(x, S_L2C_MGMT_QUADRANT, M_L2C_MGMT_QUADRANT) |
81 | 81 | ||
82 | #define S_L2C_MGMT_HALF 16 | 82 | #define S_L2C_MGMT_HALF 16 |
83 | #define M_L2C_MGMT_HALF _SB_MAKEMASK(1, S_L2C_MGMT_HALF) | 83 | #define M_L2C_MGMT_HALF _SB_MAKEMASK(1, S_L2C_MGMT_HALF) |
84 | 84 | ||
85 | #define S_L2C_MGMT_WAY 17 | 85 | #define S_L2C_MGMT_WAY 17 |
86 | #define M_L2C_MGMT_WAY _SB_MAKEMASK(2, S_L2C_MGMT_WAY) | 86 | #define M_L2C_MGMT_WAY _SB_MAKEMASK(2, S_L2C_MGMT_WAY) |
87 | #define V_L2C_MGMT_WAY(x) _SB_MAKEVALUE(x, S_L2C_MGMT_WAY) | 87 | #define V_L2C_MGMT_WAY(x) _SB_MAKEVALUE(x, S_L2C_MGMT_WAY) |
88 | #define G_L2C_MGMT_WAY(x) _SB_GETVALUE(x, S_L2C_MGMT_WAY, M_L2C_MGMT_WAY) | 88 | #define G_L2C_MGMT_WAY(x) _SB_GETVALUE(x, S_L2C_MGMT_WAY, M_L2C_MGMT_WAY) |
89 | 89 | ||
90 | #define S_L2C_MGMT_ECC_DIAG 21 | 90 | #define S_L2C_MGMT_ECC_DIAG 21 |
91 | #define M_L2C_MGMT_ECC_DIAG _SB_MAKEMASK(2, S_L2C_MGMT_ECC_DIAG) | 91 | #define M_L2C_MGMT_ECC_DIAG _SB_MAKEMASK(2, S_L2C_MGMT_ECC_DIAG) |
92 | #define V_L2C_MGMT_ECC_DIAG(x) _SB_MAKEVALUE(x, S_L2C_MGMT_ECC_DIAG) | 92 | #define V_L2C_MGMT_ECC_DIAG(x) _SB_MAKEVALUE(x, S_L2C_MGMT_ECC_DIAG) |
93 | #define G_L2C_MGMT_ECC_DIAG(x) _SB_GETVALUE(x, S_L2C_MGMT_ECC_DIAG, M_L2C_MGMT_ECC_DIAG) | 93 | #define G_L2C_MGMT_ECC_DIAG(x) _SB_GETVALUE(x, S_L2C_MGMT_ECC_DIAG, M_L2C_MGMT_ECC_DIAG) |
94 | 94 | ||
95 | #define S_L2C_MGMT_TAG 23 | 95 | #define S_L2C_MGMT_TAG 23 |
96 | #define M_L2C_MGMT_TAG _SB_MAKEMASK(4, S_L2C_MGMT_TAG) | 96 | #define M_L2C_MGMT_TAG _SB_MAKEMASK(4, S_L2C_MGMT_TAG) |
97 | #define V_L2C_MGMT_TAG(x) _SB_MAKEVALUE(x, S_L2C_MGMT_TAG) | 97 | #define V_L2C_MGMT_TAG(x) _SB_MAKEVALUE(x, S_L2C_MGMT_TAG) |
98 | #define G_L2C_MGMT_TAG(x) _SB_GETVALUE(x, S_L2C_MGMT_TAG, M_L2C_MGMT_TAG) | 98 | #define G_L2C_MGMT_TAG(x) _SB_GETVALUE(x, S_L2C_MGMT_TAG, M_L2C_MGMT_TAG) |
99 | 99 | ||
100 | #define M_L2C_MGMT_DIRTY _SB_MAKEMASK1(19) | 100 | #define M_L2C_MGMT_DIRTY _SB_MAKEMASK1(19) |
101 | #define M_L2C_MGMT_VALID _SB_MAKEMASK1(20) | 101 | #define M_L2C_MGMT_VALID _SB_MAKEMASK1(20) |
102 | 102 | ||
103 | #define A_L2C_MGMT_TAG_BASE 0x00D0000000 | 103 | #define A_L2C_MGMT_TAG_BASE 0x00D0000000 |
104 | 104 | ||
105 | #define L2C_ENTRIES_PER_WAY 4096 | 105 | #define L2C_ENTRIES_PER_WAY 4096 |
106 | #define L2C_NUM_WAYS 4 | 106 | #define L2C_NUM_WAYS 4 |
107 | 107 | ||
108 | 108 | ||
109 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) | 109 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
diff --git a/arch/mips/include/asm/sibyte/sb1250_ldt.h b/arch/mips/include/asm/sibyte/sb1250_ldt.h index bf7f320d1a87..2340c29dc0c7 100644 --- a/arch/mips/include/asm/sibyte/sb1250_ldt.h +++ b/arch/mips/include/asm/sibyte/sb1250_ldt.h | |||
@@ -66,7 +66,7 @@ | |||
66 | #define R_LDT_TYPE1_SRICMD 0x0050 | 66 | #define R_LDT_TYPE1_SRICMD 0x0050 |
67 | #define R_LDT_TYPE1_SRITXNUM 0x0054 | 67 | #define R_LDT_TYPE1_SRITXNUM 0x0054 |
68 | #define R_LDT_TYPE1_SRIRXNUM 0x0058 | 68 | #define R_LDT_TYPE1_SRIRXNUM 0x0058 |
69 | #define R_LDT_TYPE1_ERRSTATUS 0x0068 | 69 | #define R_LDT_TYPE1_ERRSTATUS 0x0068 |
70 | #define R_LDT_TYPE1_SRICTRL 0x006C | 70 | #define R_LDT_TYPE1_SRICTRL 0x006C |
71 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 71 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
72 | #define R_LDT_TYPE1_ADDSTATUS 0x0070 | 72 | #define R_LDT_TYPE1_ADDSTATUS 0x0070 |
@@ -258,7 +258,7 @@ | |||
258 | #define M_LDT_LINKCTRL_DWFCOUT_EN _SB_MAKEMASK1_32(31) | 258 | #define M_LDT_LINKCTRL_DWFCOUT_EN _SB_MAKEMASK1_32(31) |
259 | 259 | ||
260 | /* | 260 | /* |
261 | * LDT Link frequency register (Table 8-20) offset 0x48 | 261 | * LDT Link frequency register (Table 8-20) offset 0x48 |
262 | */ | 262 | */ |
263 | 263 | ||
264 | #define S_LDT_LINKFREQ_FREQ 8 | 264 | #define S_LDT_LINKFREQ_FREQ 8 |
@@ -301,8 +301,8 @@ | |||
301 | 301 | ||
302 | #define S_LDT_SRICMD_TXINITIALOFFSET 28 | 302 | #define S_LDT_SRICMD_TXINITIALOFFSET 28 |
303 | #define M_LDT_SRICMD_TXINITIALOFFSET _SB_MAKEMASK_32(3, S_LDT_SRICMD_TXINITIALOFFSET) | 303 | #define M_LDT_SRICMD_TXINITIALOFFSET _SB_MAKEMASK_32(3, S_LDT_SRICMD_TXINITIALOFFSET) |
304 | #define V_LDT_SRICMD_TXINITIALOFFSET(x) _SB_MAKEVALUE_32(x, S_LDT_SRICMD_TXINITIALOFFSET) | 304 | #define V_LDT_SRICMD_TXINITIALOFFSET(x) _SB_MAKEVALUE_32(x, S_LDT_SRICMD_TXINITIALOFFSET) |
305 | #define G_LDT_SRICMD_TXINITIALOFFSET(x) _SB_GETVALUE_32(x, S_LDT_SRICMD_TXINITIALOFFSET, M_LDT_SRICMD_TXINITIALOFFSET) | 305 | #define G_LDT_SRICMD_TXINITIALOFFSET(x) _SB_GETVALUE_32(x, S_LDT_SRICMD_TXINITIALOFFSET, M_LDT_SRICMD_TXINITIALOFFSET) |
306 | 306 | ||
307 | #define M_LDT_SRICMD_LINKFREQDIRECT _SB_MAKEMASK1_32(31) | 307 | #define M_LDT_SRICMD_LINKFREQDIRECT _SB_MAKEMASK1_32(31) |
308 | 308 | ||
@@ -318,16 +318,16 @@ | |||
318 | #define M_LDT_ERRCTL_OVFSYNCFLOOD_EN _SB_MAKEMASK1_32(5) | 318 | #define M_LDT_ERRCTL_OVFSYNCFLOOD_EN _SB_MAKEMASK1_32(5) |
319 | #define M_LDT_ERRCTL_EOCNXAFATAL_EN _SB_MAKEMASK1_32(6) | 319 | #define M_LDT_ERRCTL_EOCNXAFATAL_EN _SB_MAKEMASK1_32(6) |
320 | #define M_LDT_ERRCTL_EOCNXANONFATAL_EN _SB_MAKEMASK1_32(7) | 320 | #define M_LDT_ERRCTL_EOCNXANONFATAL_EN _SB_MAKEMASK1_32(7) |
321 | #define M_LDT_ERRCTL_EOCNXASYNCFLOOD_EN _SB_MAKEMASK1_32(8) | 321 | #define M_LDT_ERRCTL_EOCNXASYNCFLOOD_EN _SB_MAKEMASK1_32(8) |
322 | #define M_LDT_ERRCTL_CRCFATAL_EN _SB_MAKEMASK1_32(9) | 322 | #define M_LDT_ERRCTL_CRCFATAL_EN _SB_MAKEMASK1_32(9) |
323 | #define M_LDT_ERRCTL_CRCNONFATAL_EN _SB_MAKEMASK1_32(10) | 323 | #define M_LDT_ERRCTL_CRCNONFATAL_EN _SB_MAKEMASK1_32(10) |
324 | #define M_LDT_ERRCTL_SERRFATAL_EN _SB_MAKEMASK1_32(11) | 324 | #define M_LDT_ERRCTL_SERRFATAL_EN _SB_MAKEMASK1_32(11) |
325 | #define M_LDT_ERRCTL_SRCTAGFATAL_EN _SB_MAKEMASK1_32(12) | 325 | #define M_LDT_ERRCTL_SRCTAGFATAL_EN _SB_MAKEMASK1_32(12) |
326 | #define M_LDT_ERRCTL_SRCTAGNONFATAL_EN _SB_MAKEMASK1_32(13) | 326 | #define M_LDT_ERRCTL_SRCTAGNONFATAL_EN _SB_MAKEMASK1_32(13) |
327 | #define M_LDT_ERRCTL_SRCTAGSYNCFLOOD_EN _SB_MAKEMASK1_32(14) | 327 | #define M_LDT_ERRCTL_SRCTAGSYNCFLOOD_EN _SB_MAKEMASK1_32(14) |
328 | #define M_LDT_ERRCTL_MAPNXAFATAL_EN _SB_MAKEMASK1_32(15) | 328 | #define M_LDT_ERRCTL_MAPNXAFATAL_EN _SB_MAKEMASK1_32(15) |
329 | #define M_LDT_ERRCTL_MAPNXANONFATAL_EN _SB_MAKEMASK1_32(16) | 329 | #define M_LDT_ERRCTL_MAPNXANONFATAL_EN _SB_MAKEMASK1_32(16) |
330 | #define M_LDT_ERRCTL_MAPNXASYNCFLOOD_EN _SB_MAKEMASK1_32(17) | 330 | #define M_LDT_ERRCTL_MAPNXASYNCFLOOD_EN _SB_MAKEMASK1_32(17) |
331 | 331 | ||
332 | #define M_LDT_ERRCTL_PROTOERR _SB_MAKEMASK1_32(24) | 332 | #define M_LDT_ERRCTL_PROTOERR _SB_MAKEMASK1_32(24) |
333 | #define M_LDT_ERRCTL_OVFERR _SB_MAKEMASK1_32(25) | 333 | #define M_LDT_ERRCTL_OVFERR _SB_MAKEMASK1_32(25) |
diff --git a/arch/mips/include/asm/sibyte/sb1250_mac.h b/arch/mips/include/asm/sibyte/sb1250_mac.h index cfc4d7870882..3fa94fc74042 100644 --- a/arch/mips/include/asm/sibyte/sb1250_mac.h +++ b/arch/mips/include/asm/sibyte/sb1250_mac.h | |||
@@ -47,86 +47,86 @@ | |||
47 | */ | 47 | */ |
48 | 48 | ||
49 | 49 | ||
50 | #define M_MAC_RESERVED0 _SB_MAKEMASK1(0) | 50 | #define M_MAC_RESERVED0 _SB_MAKEMASK1(0) |
51 | #define M_MAC_TX_HOLD_SOP_EN _SB_MAKEMASK1(1) | 51 | #define M_MAC_TX_HOLD_SOP_EN _SB_MAKEMASK1(1) |
52 | #define M_MAC_RETRY_EN _SB_MAKEMASK1(2) | 52 | #define M_MAC_RETRY_EN _SB_MAKEMASK1(2) |
53 | #define M_MAC_RET_DRPREQ_EN _SB_MAKEMASK1(3) | 53 | #define M_MAC_RET_DRPREQ_EN _SB_MAKEMASK1(3) |
54 | #define M_MAC_RET_UFL_EN _SB_MAKEMASK1(4) | 54 | #define M_MAC_RET_UFL_EN _SB_MAKEMASK1(4) |
55 | #define M_MAC_BURST_EN _SB_MAKEMASK1(5) | 55 | #define M_MAC_BURST_EN _SB_MAKEMASK1(5) |
56 | 56 | ||
57 | #define S_MAC_TX_PAUSE _SB_MAKE64(6) | 57 | #define S_MAC_TX_PAUSE _SB_MAKE64(6) |
58 | #define M_MAC_TX_PAUSE_CNT _SB_MAKEMASK(3, S_MAC_TX_PAUSE) | 58 | #define M_MAC_TX_PAUSE_CNT _SB_MAKEMASK(3, S_MAC_TX_PAUSE) |
59 | #define V_MAC_TX_PAUSE_CNT(x) _SB_MAKEVALUE(x, S_MAC_TX_PAUSE) | 59 | #define V_MAC_TX_PAUSE_CNT(x) _SB_MAKEVALUE(x, S_MAC_TX_PAUSE) |
60 | 60 | ||
61 | #define K_MAC_TX_PAUSE_CNT_512 0 | 61 | #define K_MAC_TX_PAUSE_CNT_512 0 |
62 | #define K_MAC_TX_PAUSE_CNT_1K 1 | 62 | #define K_MAC_TX_PAUSE_CNT_1K 1 |
63 | #define K_MAC_TX_PAUSE_CNT_2K 2 | 63 | #define K_MAC_TX_PAUSE_CNT_2K 2 |
64 | #define K_MAC_TX_PAUSE_CNT_4K 3 | 64 | #define K_MAC_TX_PAUSE_CNT_4K 3 |
65 | #define K_MAC_TX_PAUSE_CNT_8K 4 | 65 | #define K_MAC_TX_PAUSE_CNT_8K 4 |
66 | #define K_MAC_TX_PAUSE_CNT_16K 5 | 66 | #define K_MAC_TX_PAUSE_CNT_16K 5 |
67 | #define K_MAC_TX_PAUSE_CNT_32K 6 | 67 | #define K_MAC_TX_PAUSE_CNT_32K 6 |
68 | #define K_MAC_TX_PAUSE_CNT_64K 7 | 68 | #define K_MAC_TX_PAUSE_CNT_64K 7 |
69 | 69 | ||
70 | #define V_MAC_TX_PAUSE_CNT_512 V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_512) | 70 | #define V_MAC_TX_PAUSE_CNT_512 V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_512) |
71 | #define V_MAC_TX_PAUSE_CNT_1K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_1K) | 71 | #define V_MAC_TX_PAUSE_CNT_1K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_1K) |
72 | #define V_MAC_TX_PAUSE_CNT_2K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_2K) | 72 | #define V_MAC_TX_PAUSE_CNT_2K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_2K) |
73 | #define V_MAC_TX_PAUSE_CNT_4K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_4K) | 73 | #define V_MAC_TX_PAUSE_CNT_4K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_4K) |
74 | #define V_MAC_TX_PAUSE_CNT_8K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_8K) | 74 | #define V_MAC_TX_PAUSE_CNT_8K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_8K) |
75 | #define V_MAC_TX_PAUSE_CNT_16K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_16K) | 75 | #define V_MAC_TX_PAUSE_CNT_16K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_16K) |
76 | #define V_MAC_TX_PAUSE_CNT_32K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_32K) | 76 | #define V_MAC_TX_PAUSE_CNT_32K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_32K) |
77 | #define V_MAC_TX_PAUSE_CNT_64K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_64K) | 77 | #define V_MAC_TX_PAUSE_CNT_64K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_64K) |
78 | 78 | ||
79 | #define M_MAC_RESERVED1 _SB_MAKEMASK(8, 9) | 79 | #define M_MAC_RESERVED1 _SB_MAKEMASK(8, 9) |
80 | 80 | ||
81 | #define M_MAC_AP_STAT_EN _SB_MAKEMASK1(17) | 81 | #define M_MAC_AP_STAT_EN _SB_MAKEMASK1(17) |
82 | 82 | ||
83 | #if SIBYTE_HDR_FEATURE_CHIP(1480) | 83 | #if SIBYTE_HDR_FEATURE_CHIP(1480) |
84 | #define M_MAC_TIMESTAMP _SB_MAKEMASK1(18) | 84 | #define M_MAC_TIMESTAMP _SB_MAKEMASK1(18) |
85 | #endif | 85 | #endif |
86 | #define M_MAC_DRP_ERRPKT_EN _SB_MAKEMASK1(19) | 86 | #define M_MAC_DRP_ERRPKT_EN _SB_MAKEMASK1(19) |
87 | #define M_MAC_DRP_FCSERRPKT_EN _SB_MAKEMASK1(20) | 87 | #define M_MAC_DRP_FCSERRPKT_EN _SB_MAKEMASK1(20) |
88 | #define M_MAC_DRP_CODEERRPKT_EN _SB_MAKEMASK1(21) | 88 | #define M_MAC_DRP_CODEERRPKT_EN _SB_MAKEMASK1(21) |
89 | #define M_MAC_DRP_DRBLERRPKT_EN _SB_MAKEMASK1(22) | 89 | #define M_MAC_DRP_DRBLERRPKT_EN _SB_MAKEMASK1(22) |
90 | #define M_MAC_DRP_RNTPKT_EN _SB_MAKEMASK1(23) | 90 | #define M_MAC_DRP_RNTPKT_EN _SB_MAKEMASK1(23) |
91 | #define M_MAC_DRP_OSZPKT_EN _SB_MAKEMASK1(24) | 91 | #define M_MAC_DRP_OSZPKT_EN _SB_MAKEMASK1(24) |
92 | #define M_MAC_DRP_LENERRPKT_EN _SB_MAKEMASK1(25) | 92 | #define M_MAC_DRP_LENERRPKT_EN _SB_MAKEMASK1(25) |
93 | 93 | ||
94 | #define M_MAC_RESERVED3 _SB_MAKEMASK(6, 26) | 94 | #define M_MAC_RESERVED3 _SB_MAKEMASK(6, 26) |
95 | 95 | ||
96 | #define M_MAC_BYPASS_SEL _SB_MAKEMASK1(32) | 96 | #define M_MAC_BYPASS_SEL _SB_MAKEMASK1(32) |
97 | #define M_MAC_HDX_EN _SB_MAKEMASK1(33) | 97 | #define M_MAC_HDX_EN _SB_MAKEMASK1(33) |
98 | 98 | ||
99 | #define S_MAC_SPEED_SEL _SB_MAKE64(34) | 99 | #define S_MAC_SPEED_SEL _SB_MAKE64(34) |
100 | #define M_MAC_SPEED_SEL _SB_MAKEMASK(2, S_MAC_SPEED_SEL) | 100 | #define M_MAC_SPEED_SEL _SB_MAKEMASK(2, S_MAC_SPEED_SEL) |
101 | #define V_MAC_SPEED_SEL(x) _SB_MAKEVALUE(x, S_MAC_SPEED_SEL) | 101 | #define V_MAC_SPEED_SEL(x) _SB_MAKEVALUE(x, S_MAC_SPEED_SEL) |
102 | #define G_MAC_SPEED_SEL(x) _SB_GETVALUE(x, S_MAC_SPEED_SEL, M_MAC_SPEED_SEL) | 102 | #define G_MAC_SPEED_SEL(x) _SB_GETVALUE(x, S_MAC_SPEED_SEL, M_MAC_SPEED_SEL) |
103 | 103 | ||
104 | #define K_MAC_SPEED_SEL_10MBPS 0 | 104 | #define K_MAC_SPEED_SEL_10MBPS 0 |
105 | #define K_MAC_SPEED_SEL_100MBPS 1 | 105 | #define K_MAC_SPEED_SEL_100MBPS 1 |
106 | #define K_MAC_SPEED_SEL_1000MBPS 2 | 106 | #define K_MAC_SPEED_SEL_1000MBPS 2 |
107 | #define K_MAC_SPEED_SEL_RESERVED 3 | 107 | #define K_MAC_SPEED_SEL_RESERVED 3 |
108 | 108 | ||
109 | #define V_MAC_SPEED_SEL_10MBPS V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_10MBPS) | 109 | #define V_MAC_SPEED_SEL_10MBPS V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_10MBPS) |
110 | #define V_MAC_SPEED_SEL_100MBPS V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_100MBPS) | 110 | #define V_MAC_SPEED_SEL_100MBPS V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_100MBPS) |
111 | #define V_MAC_SPEED_SEL_1000MBPS V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_1000MBPS) | 111 | #define V_MAC_SPEED_SEL_1000MBPS V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_1000MBPS) |
112 | #define V_MAC_SPEED_SEL_RESERVED V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_RESERVED) | 112 | #define V_MAC_SPEED_SEL_RESERVED V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_RESERVED) |
113 | 113 | ||
114 | #define M_MAC_TX_CLK_EDGE_SEL _SB_MAKEMASK1(36) | 114 | #define M_MAC_TX_CLK_EDGE_SEL _SB_MAKEMASK1(36) |
115 | #define M_MAC_LOOPBACK_SEL _SB_MAKEMASK1(37) | 115 | #define M_MAC_LOOPBACK_SEL _SB_MAKEMASK1(37) |
116 | #define M_MAC_FAST_SYNC _SB_MAKEMASK1(38) | 116 | #define M_MAC_FAST_SYNC _SB_MAKEMASK1(38) |
117 | #define M_MAC_SS_EN _SB_MAKEMASK1(39) | 117 | #define M_MAC_SS_EN _SB_MAKEMASK1(39) |
118 | 118 | ||
119 | #define S_MAC_BYPASS_CFG _SB_MAKE64(40) | 119 | #define S_MAC_BYPASS_CFG _SB_MAKE64(40) |
120 | #define M_MAC_BYPASS_CFG _SB_MAKEMASK(2, S_MAC_BYPASS_CFG) | 120 | #define M_MAC_BYPASS_CFG _SB_MAKEMASK(2, S_MAC_BYPASS_CFG) |
121 | #define V_MAC_BYPASS_CFG(x) _SB_MAKEVALUE(x, S_MAC_BYPASS_CFG) | 121 | #define V_MAC_BYPASS_CFG(x) _SB_MAKEVALUE(x, S_MAC_BYPASS_CFG) |
122 | #define G_MAC_BYPASS_CFG(x) _SB_GETVALUE(x, S_MAC_BYPASS_CFG, M_MAC_BYPASS_CFG) | 122 | #define G_MAC_BYPASS_CFG(x) _SB_GETVALUE(x, S_MAC_BYPASS_CFG, M_MAC_BYPASS_CFG) |
123 | 123 | ||
124 | #define K_MAC_BYPASS_GMII 0 | 124 | #define K_MAC_BYPASS_GMII 0 |
125 | #define K_MAC_BYPASS_ENCODED 1 | 125 | #define K_MAC_BYPASS_ENCODED 1 |
126 | #define K_MAC_BYPASS_SOP 2 | 126 | #define K_MAC_BYPASS_SOP 2 |
127 | #define K_MAC_BYPASS_EOP 3 | 127 | #define K_MAC_BYPASS_EOP 3 |
128 | 128 | ||
129 | #define M_MAC_BYPASS_16 _SB_MAKEMASK1(42) | 129 | #define M_MAC_BYPASS_16 _SB_MAKEMASK1(42) |
130 | #define M_MAC_BYPASS_FCS_CHK _SB_MAKEMASK1(43) | 130 | #define M_MAC_BYPASS_FCS_CHK _SB_MAKEMASK1(43) |
131 | 131 | ||
132 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 132 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
@@ -137,30 +137,30 @@ | |||
137 | #define M_MAC_SPLIT_CH_SEL _SB_MAKEMASK1(45) | 137 | #define M_MAC_SPLIT_CH_SEL _SB_MAKEMASK1(45) |
138 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 138 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
139 | 139 | ||
140 | #define S_MAC_BYPASS_IFG _SB_MAKE64(46) | 140 | #define S_MAC_BYPASS_IFG _SB_MAKE64(46) |
141 | #define M_MAC_BYPASS_IFG _SB_MAKEMASK(8, S_MAC_BYPASS_IFG) | 141 | #define M_MAC_BYPASS_IFG _SB_MAKEMASK(8, S_MAC_BYPASS_IFG) |
142 | #define V_MAC_BYPASS_IFG(x) _SB_MAKEVALUE(x, S_MAC_BYPASS_IFG) | 142 | #define V_MAC_BYPASS_IFG(x) _SB_MAKEVALUE(x, S_MAC_BYPASS_IFG) |
143 | #define G_MAC_BYPASS_IFG(x) _SB_GETVALUE(x, S_MAC_BYPASS_IFG, M_MAC_BYPASS_IFG) | 143 | #define G_MAC_BYPASS_IFG(x) _SB_GETVALUE(x, S_MAC_BYPASS_IFG, M_MAC_BYPASS_IFG) |
144 | 144 | ||
145 | #define K_MAC_FC_CMD_DISABLED 0 | 145 | #define K_MAC_FC_CMD_DISABLED 0 |
146 | #define K_MAC_FC_CMD_ENABLED 1 | 146 | #define K_MAC_FC_CMD_ENABLED 1 |
147 | #define K_MAC_FC_CMD_ENAB_FALSECARR 2 | 147 | #define K_MAC_FC_CMD_ENAB_FALSECARR 2 |
148 | 148 | ||
149 | #define V_MAC_FC_CMD_DISABLED V_MAC_FC_CMD(K_MAC_FC_CMD_DISABLED) | 149 | #define V_MAC_FC_CMD_DISABLED V_MAC_FC_CMD(K_MAC_FC_CMD_DISABLED) |
150 | #define V_MAC_FC_CMD_ENABLED V_MAC_FC_CMD(K_MAC_FC_CMD_ENABLED) | 150 | #define V_MAC_FC_CMD_ENABLED V_MAC_FC_CMD(K_MAC_FC_CMD_ENABLED) |
151 | #define V_MAC_FC_CMD_ENAB_FALSECARR V_MAC_FC_CMD(K_MAC_FC_CMD_ENAB_FALSECARR) | 151 | #define V_MAC_FC_CMD_ENAB_FALSECARR V_MAC_FC_CMD(K_MAC_FC_CMD_ENAB_FALSECARR) |
152 | 152 | ||
153 | #define M_MAC_FC_SEL _SB_MAKEMASK1(54) | 153 | #define M_MAC_FC_SEL _SB_MAKEMASK1(54) |
154 | 154 | ||
155 | #define S_MAC_FC_CMD _SB_MAKE64(55) | 155 | #define S_MAC_FC_CMD _SB_MAKE64(55) |
156 | #define M_MAC_FC_CMD _SB_MAKEMASK(2, S_MAC_FC_CMD) | 156 | #define M_MAC_FC_CMD _SB_MAKEMASK(2, S_MAC_FC_CMD) |
157 | #define V_MAC_FC_CMD(x) _SB_MAKEVALUE(x, S_MAC_FC_CMD) | 157 | #define V_MAC_FC_CMD(x) _SB_MAKEVALUE(x, S_MAC_FC_CMD) |
158 | #define G_MAC_FC_CMD(x) _SB_GETVALUE(x, S_MAC_FC_CMD, M_MAC_FC_CMD) | 158 | #define G_MAC_FC_CMD(x) _SB_GETVALUE(x, S_MAC_FC_CMD, M_MAC_FC_CMD) |
159 | 159 | ||
160 | #define S_MAC_RX_CH_SEL _SB_MAKE64(57) | 160 | #define S_MAC_RX_CH_SEL _SB_MAKE64(57) |
161 | #define M_MAC_RX_CH_SEL _SB_MAKEMASK(7, S_MAC_RX_CH_SEL) | 161 | #define M_MAC_RX_CH_SEL _SB_MAKEMASK(7, S_MAC_RX_CH_SEL) |
162 | #define V_MAC_RX_CH_SEL(x) _SB_MAKEVALUE(x, S_MAC_RX_CH_SEL) | 162 | #define V_MAC_RX_CH_SEL(x) _SB_MAKEVALUE(x, S_MAC_RX_CH_SEL) |
163 | #define G_MAC_RX_CH_SEL(x) _SB_GETVALUE(x, S_MAC_RX_CH_SEL, M_MAC_RX_CH_SEL) | 163 | #define G_MAC_RX_CH_SEL(x) _SB_GETVALUE(x, S_MAC_RX_CH_SEL, M_MAC_RX_CH_SEL) |
164 | 164 | ||
165 | 165 | ||
166 | /* | 166 | /* |
@@ -170,18 +170,18 @@ | |||
170 | * Register: MAC_ENABLE_2 | 170 | * Register: MAC_ENABLE_2 |
171 | */ | 171 | */ |
172 | 172 | ||
173 | #define M_MAC_RXDMA_EN0 _SB_MAKEMASK1(0) | 173 | #define M_MAC_RXDMA_EN0 _SB_MAKEMASK1(0) |
174 | #define M_MAC_RXDMA_EN1 _SB_MAKEMASK1(1) | 174 | #define M_MAC_RXDMA_EN1 _SB_MAKEMASK1(1) |
175 | #define M_MAC_TXDMA_EN0 _SB_MAKEMASK1(4) | 175 | #define M_MAC_TXDMA_EN0 _SB_MAKEMASK1(4) |
176 | #define M_MAC_TXDMA_EN1 _SB_MAKEMASK1(5) | 176 | #define M_MAC_TXDMA_EN1 _SB_MAKEMASK1(5) |
177 | 177 | ||
178 | #define M_MAC_PORT_RESET _SB_MAKEMASK1(8) | 178 | #define M_MAC_PORT_RESET _SB_MAKEMASK1(8) |
179 | 179 | ||
180 | #if (SIBYTE_HDR_FEATURE_CHIP(1250) || SIBYTE_HDR_FEATURE_CHIP(112x)) | 180 | #if (SIBYTE_HDR_FEATURE_CHIP(1250) || SIBYTE_HDR_FEATURE_CHIP(112x)) |
181 | #define M_MAC_RX_ENABLE _SB_MAKEMASK1(10) | 181 | #define M_MAC_RX_ENABLE _SB_MAKEMASK1(10) |
182 | #define M_MAC_TX_ENABLE _SB_MAKEMASK1(11) | 182 | #define M_MAC_TX_ENABLE _SB_MAKEMASK1(11) |
183 | #define M_MAC_BYP_RX_ENABLE _SB_MAKEMASK1(12) | 183 | #define M_MAC_BYP_RX_ENABLE _SB_MAKEMASK1(12) |
184 | #define M_MAC_BYP_TX_ENABLE _SB_MAKEMASK1(13) | 184 | #define M_MAC_BYP_TX_ENABLE _SB_MAKEMASK1(13) |
185 | #endif | 185 | #endif |
186 | 186 | ||
187 | /* | 187 | /* |
@@ -203,13 +203,13 @@ | |||
203 | 203 | ||
204 | #define S_MAC_TXD_WEIGHT0 _SB_MAKE64(0) | 204 | #define S_MAC_TXD_WEIGHT0 _SB_MAKE64(0) |
205 | #define M_MAC_TXD_WEIGHT0 _SB_MAKEMASK(4, S_MAC_TXD_WEIGHT0) | 205 | #define M_MAC_TXD_WEIGHT0 _SB_MAKEMASK(4, S_MAC_TXD_WEIGHT0) |
206 | #define V_MAC_TXD_WEIGHT0(x) _SB_MAKEVALUE(x, S_MAC_TXD_WEIGHT0) | 206 | #define V_MAC_TXD_WEIGHT0(x) _SB_MAKEVALUE(x, S_MAC_TXD_WEIGHT0) |
207 | #define G_MAC_TXD_WEIGHT0(x) _SB_GETVALUE(x, S_MAC_TXD_WEIGHT0, M_MAC_TXD_WEIGHT0) | 207 | #define G_MAC_TXD_WEIGHT0(x) _SB_GETVALUE(x, S_MAC_TXD_WEIGHT0, M_MAC_TXD_WEIGHT0) |
208 | 208 | ||
209 | #define S_MAC_TXD_WEIGHT1 _SB_MAKE64(4) | 209 | #define S_MAC_TXD_WEIGHT1 _SB_MAKE64(4) |
210 | #define M_MAC_TXD_WEIGHT1 _SB_MAKEMASK(4, S_MAC_TXD_WEIGHT1) | 210 | #define M_MAC_TXD_WEIGHT1 _SB_MAKEMASK(4, S_MAC_TXD_WEIGHT1) |
211 | #define V_MAC_TXD_WEIGHT1(x) _SB_MAKEVALUE(x, S_MAC_TXD_WEIGHT1) | 211 | #define V_MAC_TXD_WEIGHT1(x) _SB_MAKEVALUE(x, S_MAC_TXD_WEIGHT1) |
212 | #define G_MAC_TXD_WEIGHT1(x) _SB_GETVALUE(x, S_MAC_TXD_WEIGHT1, M_MAC_TXD_WEIGHT1) | 212 | #define G_MAC_TXD_WEIGHT1(x) _SB_GETVALUE(x, S_MAC_TXD_WEIGHT1, M_MAC_TXD_WEIGHT1) |
213 | 213 | ||
214 | /* | 214 | /* |
215 | * MAC Fifo Threshold registers (Table 9-14) | 215 | * MAC Fifo Threshold registers (Table 9-14) |
@@ -218,53 +218,53 @@ | |||
218 | * Register: MAC_THRSH_CFG_2 | 218 | * Register: MAC_THRSH_CFG_2 |
219 | */ | 219 | */ |
220 | 220 | ||
221 | #define S_MAC_TX_WR_THRSH _SB_MAKE64(0) | 221 | #define S_MAC_TX_WR_THRSH _SB_MAKE64(0) |
222 | #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1) | 222 | #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1) |
223 | /* XXX: Can't enable, as it has the same name as a pass2+ define below. */ | 223 | /* XXX: Can't enable, as it has the same name as a pass2+ define below. */ |
224 | /* #define M_MAC_TX_WR_THRSH _SB_MAKEMASK(6, S_MAC_TX_WR_THRSH) */ | 224 | /* #define M_MAC_TX_WR_THRSH _SB_MAKEMASK(6, S_MAC_TX_WR_THRSH) */ |
225 | #endif /* up to 1250 PASS1 */ | 225 | #endif /* up to 1250 PASS1 */ |
226 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 226 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
227 | #define M_MAC_TX_WR_THRSH _SB_MAKEMASK(7, S_MAC_TX_WR_THRSH) | 227 | #define M_MAC_TX_WR_THRSH _SB_MAKEMASK(7, S_MAC_TX_WR_THRSH) |
228 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 228 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
229 | #define V_MAC_TX_WR_THRSH(x) _SB_MAKEVALUE(x, S_MAC_TX_WR_THRSH) | 229 | #define V_MAC_TX_WR_THRSH(x) _SB_MAKEVALUE(x, S_MAC_TX_WR_THRSH) |
230 | #define G_MAC_TX_WR_THRSH(x) _SB_GETVALUE(x, S_MAC_TX_WR_THRSH, M_MAC_TX_WR_THRSH) | 230 | #define G_MAC_TX_WR_THRSH(x) _SB_GETVALUE(x, S_MAC_TX_WR_THRSH, M_MAC_TX_WR_THRSH) |
231 | 231 | ||
232 | #define S_MAC_TX_RD_THRSH _SB_MAKE64(8) | 232 | #define S_MAC_TX_RD_THRSH _SB_MAKE64(8) |
233 | #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1) | 233 | #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1) |
234 | /* XXX: Can't enable, as it has the same name as a pass2+ define below. */ | 234 | /* XXX: Can't enable, as it has the same name as a pass2+ define below. */ |
235 | /* #define M_MAC_TX_RD_THRSH _SB_MAKEMASK(6, S_MAC_TX_RD_THRSH) */ | 235 | /* #define M_MAC_TX_RD_THRSH _SB_MAKEMASK(6, S_MAC_TX_RD_THRSH) */ |
236 | #endif /* up to 1250 PASS1 */ | 236 | #endif /* up to 1250 PASS1 */ |
237 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 237 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
238 | #define M_MAC_TX_RD_THRSH _SB_MAKEMASK(7, S_MAC_TX_RD_THRSH) | 238 | #define M_MAC_TX_RD_THRSH _SB_MAKEMASK(7, S_MAC_TX_RD_THRSH) |
239 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 239 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
240 | #define V_MAC_TX_RD_THRSH(x) _SB_MAKEVALUE(x, S_MAC_TX_RD_THRSH) | 240 | #define V_MAC_TX_RD_THRSH(x) _SB_MAKEVALUE(x, S_MAC_TX_RD_THRSH) |
241 | #define G_MAC_TX_RD_THRSH(x) _SB_GETVALUE(x, S_MAC_TX_RD_THRSH, M_MAC_TX_RD_THRSH) | 241 | #define G_MAC_TX_RD_THRSH(x) _SB_GETVALUE(x, S_MAC_TX_RD_THRSH, M_MAC_TX_RD_THRSH) |
242 | 242 | ||
243 | #define S_MAC_TX_RL_THRSH _SB_MAKE64(16) | 243 | #define S_MAC_TX_RL_THRSH _SB_MAKE64(16) |
244 | #define M_MAC_TX_RL_THRSH _SB_MAKEMASK(4, S_MAC_TX_RL_THRSH) | 244 | #define M_MAC_TX_RL_THRSH _SB_MAKEMASK(4, S_MAC_TX_RL_THRSH) |
245 | #define V_MAC_TX_RL_THRSH(x) _SB_MAKEVALUE(x, S_MAC_TX_RL_THRSH) | 245 | #define V_MAC_TX_RL_THRSH(x) _SB_MAKEVALUE(x, S_MAC_TX_RL_THRSH) |
246 | #define G_MAC_TX_RL_THRSH(x) _SB_GETVALUE(x, S_MAC_TX_RL_THRSH, M_MAC_TX_RL_THRSH) | 246 | #define G_MAC_TX_RL_THRSH(x) _SB_GETVALUE(x, S_MAC_TX_RL_THRSH, M_MAC_TX_RL_THRSH) |
247 | 247 | ||
248 | #define S_MAC_RX_PL_THRSH _SB_MAKE64(24) | 248 | #define S_MAC_RX_PL_THRSH _SB_MAKE64(24) |
249 | #define M_MAC_RX_PL_THRSH _SB_MAKEMASK(6, S_MAC_RX_PL_THRSH) | 249 | #define M_MAC_RX_PL_THRSH _SB_MAKEMASK(6, S_MAC_RX_PL_THRSH) |
250 | #define V_MAC_RX_PL_THRSH(x) _SB_MAKEVALUE(x, S_MAC_RX_PL_THRSH) | 250 | #define V_MAC_RX_PL_THRSH(x) _SB_MAKEVALUE(x, S_MAC_RX_PL_THRSH) |
251 | #define G_MAC_RX_PL_THRSH(x) _SB_GETVALUE(x, S_MAC_RX_PL_THRSH, M_MAC_RX_PL_THRSH) | 251 | #define G_MAC_RX_PL_THRSH(x) _SB_GETVALUE(x, S_MAC_RX_PL_THRSH, M_MAC_RX_PL_THRSH) |
252 | 252 | ||
253 | #define S_MAC_RX_RD_THRSH _SB_MAKE64(32) | 253 | #define S_MAC_RX_RD_THRSH _SB_MAKE64(32) |
254 | #define M_MAC_RX_RD_THRSH _SB_MAKEMASK(6, S_MAC_RX_RD_THRSH) | 254 | #define M_MAC_RX_RD_THRSH _SB_MAKEMASK(6, S_MAC_RX_RD_THRSH) |
255 | #define V_MAC_RX_RD_THRSH(x) _SB_MAKEVALUE(x, S_MAC_RX_RD_THRSH) | 255 | #define V_MAC_RX_RD_THRSH(x) _SB_MAKEVALUE(x, S_MAC_RX_RD_THRSH) |
256 | #define G_MAC_RX_RD_THRSH(x) _SB_GETVALUE(x, S_MAC_RX_RD_THRSH, M_MAC_RX_RD_THRSH) | 256 | #define G_MAC_RX_RD_THRSH(x) _SB_GETVALUE(x, S_MAC_RX_RD_THRSH, M_MAC_RX_RD_THRSH) |
257 | 257 | ||
258 | #define S_MAC_RX_RL_THRSH _SB_MAKE64(40) | 258 | #define S_MAC_RX_RL_THRSH _SB_MAKE64(40) |
259 | #define M_MAC_RX_RL_THRSH _SB_MAKEMASK(6, S_MAC_RX_RL_THRSH) | 259 | #define M_MAC_RX_RL_THRSH _SB_MAKEMASK(6, S_MAC_RX_RL_THRSH) |
260 | #define V_MAC_RX_RL_THRSH(x) _SB_MAKEVALUE(x, S_MAC_RX_RL_THRSH) | 260 | #define V_MAC_RX_RL_THRSH(x) _SB_MAKEVALUE(x, S_MAC_RX_RL_THRSH) |
261 | #define G_MAC_RX_RL_THRSH(x) _SB_GETVALUE(x, S_MAC_RX_RL_THRSH, M_MAC_RX_RL_THRSH) | 261 | #define G_MAC_RX_RL_THRSH(x) _SB_GETVALUE(x, S_MAC_RX_RL_THRSH, M_MAC_RX_RL_THRSH) |
262 | 262 | ||
263 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 263 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
264 | #define S_MAC_ENC_FC_THRSH _SB_MAKE64(56) | 264 | #define S_MAC_ENC_FC_THRSH _SB_MAKE64(56) |
265 | #define M_MAC_ENC_FC_THRSH _SB_MAKEMASK(6, S_MAC_ENC_FC_THRSH) | 265 | #define M_MAC_ENC_FC_THRSH _SB_MAKEMASK(6, S_MAC_ENC_FC_THRSH) |
266 | #define V_MAC_ENC_FC_THRSH(x) _SB_MAKEVALUE(x, S_MAC_ENC_FC_THRSH) | 266 | #define V_MAC_ENC_FC_THRSH(x) _SB_MAKEVALUE(x, S_MAC_ENC_FC_THRSH) |
267 | #define G_MAC_ENC_FC_THRSH(x) _SB_GETVALUE(x, S_MAC_ENC_FC_THRSH, M_MAC_ENC_FC_THRSH) | 267 | #define G_MAC_ENC_FC_THRSH(x) _SB_GETVALUE(x, S_MAC_ENC_FC_THRSH, M_MAC_ENC_FC_THRSH) |
268 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 268 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
269 | 269 | ||
270 | /* | 270 | /* |
@@ -275,79 +275,79 @@ | |||
275 | */ | 275 | */ |
276 | 276 | ||
277 | /* XXXCGD: ??? Unused in pass2? */ | 277 | /* XXXCGD: ??? Unused in pass2? */ |
278 | #define S_MAC_IFG_RX _SB_MAKE64(0) | 278 | #define S_MAC_IFG_RX _SB_MAKE64(0) |
279 | #define M_MAC_IFG_RX _SB_MAKEMASK(6, S_MAC_IFG_RX) | 279 | #define M_MAC_IFG_RX _SB_MAKEMASK(6, S_MAC_IFG_RX) |
280 | #define V_MAC_IFG_RX(x) _SB_MAKEVALUE(x, S_MAC_IFG_RX) | 280 | #define V_MAC_IFG_RX(x) _SB_MAKEVALUE(x, S_MAC_IFG_RX) |
281 | #define G_MAC_IFG_RX(x) _SB_GETVALUE(x, S_MAC_IFG_RX, M_MAC_IFG_RX) | 281 | #define G_MAC_IFG_RX(x) _SB_GETVALUE(x, S_MAC_IFG_RX, M_MAC_IFG_RX) |
282 | 282 | ||
283 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 283 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
284 | #define S_MAC_PRE_LEN _SB_MAKE64(0) | 284 | #define S_MAC_PRE_LEN _SB_MAKE64(0) |
285 | #define M_MAC_PRE_LEN _SB_MAKEMASK(6, S_MAC_PRE_LEN) | 285 | #define M_MAC_PRE_LEN _SB_MAKEMASK(6, S_MAC_PRE_LEN) |
286 | #define V_MAC_PRE_LEN(x) _SB_MAKEVALUE(x, S_MAC_PRE_LEN) | 286 | #define V_MAC_PRE_LEN(x) _SB_MAKEVALUE(x, S_MAC_PRE_LEN) |
287 | #define G_MAC_PRE_LEN(x) _SB_GETVALUE(x, S_MAC_PRE_LEN, M_MAC_PRE_LEN) | 287 | #define G_MAC_PRE_LEN(x) _SB_GETVALUE(x, S_MAC_PRE_LEN, M_MAC_PRE_LEN) |
288 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 288 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
289 | 289 | ||
290 | #define S_MAC_IFG_TX _SB_MAKE64(6) | 290 | #define S_MAC_IFG_TX _SB_MAKE64(6) |
291 | #define M_MAC_IFG_TX _SB_MAKEMASK(6, S_MAC_IFG_TX) | 291 | #define M_MAC_IFG_TX _SB_MAKEMASK(6, S_MAC_IFG_TX) |
292 | #define V_MAC_IFG_TX(x) _SB_MAKEVALUE(x, S_MAC_IFG_TX) | 292 | #define V_MAC_IFG_TX(x) _SB_MAKEVALUE(x, S_MAC_IFG_TX) |
293 | #define G_MAC_IFG_TX(x) _SB_GETVALUE(x, S_MAC_IFG_TX, M_MAC_IFG_TX) | 293 | #define G_MAC_IFG_TX(x) _SB_GETVALUE(x, S_MAC_IFG_TX, M_MAC_IFG_TX) |
294 | 294 | ||
295 | #define S_MAC_IFG_THRSH _SB_MAKE64(12) | 295 | #define S_MAC_IFG_THRSH _SB_MAKE64(12) |
296 | #define M_MAC_IFG_THRSH _SB_MAKEMASK(6, S_MAC_IFG_THRSH) | 296 | #define M_MAC_IFG_THRSH _SB_MAKEMASK(6, S_MAC_IFG_THRSH) |
297 | #define V_MAC_IFG_THRSH(x) _SB_MAKEVALUE(x, S_MAC_IFG_THRSH) | 297 | #define V_MAC_IFG_THRSH(x) _SB_MAKEVALUE(x, S_MAC_IFG_THRSH) |
298 | #define G_MAC_IFG_THRSH(x) _SB_GETVALUE(x, S_MAC_IFG_THRSH, M_MAC_IFG_THRSH) | 298 | #define G_MAC_IFG_THRSH(x) _SB_GETVALUE(x, S_MAC_IFG_THRSH, M_MAC_IFG_THRSH) |
299 | 299 | ||
300 | #define S_MAC_BACKOFF_SEL _SB_MAKE64(18) | 300 | #define S_MAC_BACKOFF_SEL _SB_MAKE64(18) |
301 | #define M_MAC_BACKOFF_SEL _SB_MAKEMASK(4, S_MAC_BACKOFF_SEL) | 301 | #define M_MAC_BACKOFF_SEL _SB_MAKEMASK(4, S_MAC_BACKOFF_SEL) |
302 | #define V_MAC_BACKOFF_SEL(x) _SB_MAKEVALUE(x, S_MAC_BACKOFF_SEL) | 302 | #define V_MAC_BACKOFF_SEL(x) _SB_MAKEVALUE(x, S_MAC_BACKOFF_SEL) |
303 | #define G_MAC_BACKOFF_SEL(x) _SB_GETVALUE(x, S_MAC_BACKOFF_SEL, M_MAC_BACKOFF_SEL) | 303 | #define G_MAC_BACKOFF_SEL(x) _SB_GETVALUE(x, S_MAC_BACKOFF_SEL, M_MAC_BACKOFF_SEL) |
304 | 304 | ||
305 | #define S_MAC_LFSR_SEED _SB_MAKE64(22) | 305 | #define S_MAC_LFSR_SEED _SB_MAKE64(22) |
306 | #define M_MAC_LFSR_SEED _SB_MAKEMASK(8, S_MAC_LFSR_SEED) | 306 | #define M_MAC_LFSR_SEED _SB_MAKEMASK(8, S_MAC_LFSR_SEED) |
307 | #define V_MAC_LFSR_SEED(x) _SB_MAKEVALUE(x, S_MAC_LFSR_SEED) | 307 | #define V_MAC_LFSR_SEED(x) _SB_MAKEVALUE(x, S_MAC_LFSR_SEED) |
308 | #define G_MAC_LFSR_SEED(x) _SB_GETVALUE(x, S_MAC_LFSR_SEED, M_MAC_LFSR_SEED) | 308 | #define G_MAC_LFSR_SEED(x) _SB_GETVALUE(x, S_MAC_LFSR_SEED, M_MAC_LFSR_SEED) |
309 | 309 | ||
310 | #define S_MAC_SLOT_SIZE _SB_MAKE64(30) | 310 | #define S_MAC_SLOT_SIZE _SB_MAKE64(30) |
311 | #define M_MAC_SLOT_SIZE _SB_MAKEMASK(10, S_MAC_SLOT_SIZE) | 311 | #define M_MAC_SLOT_SIZE _SB_MAKEMASK(10, S_MAC_SLOT_SIZE) |
312 | #define V_MAC_SLOT_SIZE(x) _SB_MAKEVALUE(x, S_MAC_SLOT_SIZE) | 312 | #define V_MAC_SLOT_SIZE(x) _SB_MAKEVALUE(x, S_MAC_SLOT_SIZE) |
313 | #define G_MAC_SLOT_SIZE(x) _SB_GETVALUE(x, S_MAC_SLOT_SIZE, M_MAC_SLOT_SIZE) | 313 | #define G_MAC_SLOT_SIZE(x) _SB_GETVALUE(x, S_MAC_SLOT_SIZE, M_MAC_SLOT_SIZE) |
314 | 314 | ||
315 | #define S_MAC_MIN_FRAMESZ _SB_MAKE64(40) | 315 | #define S_MAC_MIN_FRAMESZ _SB_MAKE64(40) |
316 | #define M_MAC_MIN_FRAMESZ _SB_MAKEMASK(8, S_MAC_MIN_FRAMESZ) | 316 | #define M_MAC_MIN_FRAMESZ _SB_MAKEMASK(8, S_MAC_MIN_FRAMESZ) |
317 | #define V_MAC_MIN_FRAMESZ(x) _SB_MAKEVALUE(x, S_MAC_MIN_FRAMESZ) | 317 | #define V_MAC_MIN_FRAMESZ(x) _SB_MAKEVALUE(x, S_MAC_MIN_FRAMESZ) |
318 | #define G_MAC_MIN_FRAMESZ(x) _SB_GETVALUE(x, S_MAC_MIN_FRAMESZ, M_MAC_MIN_FRAMESZ) | 318 | #define G_MAC_MIN_FRAMESZ(x) _SB_GETVALUE(x, S_MAC_MIN_FRAMESZ, M_MAC_MIN_FRAMESZ) |
319 | 319 | ||
320 | #define S_MAC_MAX_FRAMESZ _SB_MAKE64(48) | 320 | #define S_MAC_MAX_FRAMESZ _SB_MAKE64(48) |
321 | #define M_MAC_MAX_FRAMESZ _SB_MAKEMASK(16, S_MAC_MAX_FRAMESZ) | 321 | #define M_MAC_MAX_FRAMESZ _SB_MAKEMASK(16, S_MAC_MAX_FRAMESZ) |
322 | #define V_MAC_MAX_FRAMESZ(x) _SB_MAKEVALUE(x, S_MAC_MAX_FRAMESZ) | 322 | #define V_MAC_MAX_FRAMESZ(x) _SB_MAKEVALUE(x, S_MAC_MAX_FRAMESZ) |
323 | #define G_MAC_MAX_FRAMESZ(x) _SB_GETVALUE(x, S_MAC_MAX_FRAMESZ, M_MAC_MAX_FRAMESZ) | 323 | #define G_MAC_MAX_FRAMESZ(x) _SB_GETVALUE(x, S_MAC_MAX_FRAMESZ, M_MAC_MAX_FRAMESZ) |
324 | 324 | ||
325 | /* | 325 | /* |
326 | * These constants are used to configure the fields within the Frame | 326 | * These constants are used to configure the fields within the Frame |
327 | * Configuration Register. | 327 | * Configuration Register. |
328 | */ | 328 | */ |
329 | 329 | ||
330 | #define K_MAC_IFG_RX_10 _SB_MAKE64(0) /* See table 176, not used */ | 330 | #define K_MAC_IFG_RX_10 _SB_MAKE64(0) /* See table 176, not used */ |
331 | #define K_MAC_IFG_RX_100 _SB_MAKE64(0) | 331 | #define K_MAC_IFG_RX_100 _SB_MAKE64(0) |
332 | #define K_MAC_IFG_RX_1000 _SB_MAKE64(0) | 332 | #define K_MAC_IFG_RX_1000 _SB_MAKE64(0) |
333 | 333 | ||
334 | #define K_MAC_IFG_TX_10 _SB_MAKE64(20) | 334 | #define K_MAC_IFG_TX_10 _SB_MAKE64(20) |
335 | #define K_MAC_IFG_TX_100 _SB_MAKE64(20) | 335 | #define K_MAC_IFG_TX_100 _SB_MAKE64(20) |
336 | #define K_MAC_IFG_TX_1000 _SB_MAKE64(8) | 336 | #define K_MAC_IFG_TX_1000 _SB_MAKE64(8) |
337 | 337 | ||
338 | #define K_MAC_IFG_THRSH_10 _SB_MAKE64(4) | 338 | #define K_MAC_IFG_THRSH_10 _SB_MAKE64(4) |
339 | #define K_MAC_IFG_THRSH_100 _SB_MAKE64(4) | 339 | #define K_MAC_IFG_THRSH_100 _SB_MAKE64(4) |
340 | #define K_MAC_IFG_THRSH_1000 _SB_MAKE64(0) | 340 | #define K_MAC_IFG_THRSH_1000 _SB_MAKE64(0) |
341 | 341 | ||
342 | #define K_MAC_SLOT_SIZE_10 _SB_MAKE64(0) | 342 | #define K_MAC_SLOT_SIZE_10 _SB_MAKE64(0) |
343 | #define K_MAC_SLOT_SIZE_100 _SB_MAKE64(0) | 343 | #define K_MAC_SLOT_SIZE_100 _SB_MAKE64(0) |
344 | #define K_MAC_SLOT_SIZE_1000 _SB_MAKE64(0) | 344 | #define K_MAC_SLOT_SIZE_1000 _SB_MAKE64(0) |
345 | 345 | ||
346 | #define V_MAC_IFG_RX_10 V_MAC_IFG_RX(K_MAC_IFG_RX_10) | 346 | #define V_MAC_IFG_RX_10 V_MAC_IFG_RX(K_MAC_IFG_RX_10) |
347 | #define V_MAC_IFG_RX_100 V_MAC_IFG_RX(K_MAC_IFG_RX_100) | 347 | #define V_MAC_IFG_RX_100 V_MAC_IFG_RX(K_MAC_IFG_RX_100) |
348 | #define V_MAC_IFG_RX_1000 V_MAC_IFG_RX(K_MAC_IFG_RX_1000) | 348 | #define V_MAC_IFG_RX_1000 V_MAC_IFG_RX(K_MAC_IFG_RX_1000) |
349 | 349 | ||
350 | #define V_MAC_IFG_TX_10 V_MAC_IFG_TX(K_MAC_IFG_TX_10) | 350 | #define V_MAC_IFG_TX_10 V_MAC_IFG_TX(K_MAC_IFG_TX_10) |
351 | #define V_MAC_IFG_TX_100 V_MAC_IFG_TX(K_MAC_IFG_TX_100) | 351 | #define V_MAC_IFG_TX_100 V_MAC_IFG_TX(K_MAC_IFG_TX_100) |
352 | #define V_MAC_IFG_TX_1000 V_MAC_IFG_TX(K_MAC_IFG_TX_1000) | 352 | #define V_MAC_IFG_TX_1000 V_MAC_IFG_TX(K_MAC_IFG_TX_1000) |
353 | 353 | ||
@@ -359,15 +359,15 @@ | |||
359 | #define V_MAC_SLOT_SIZE_100 V_MAC_SLOT_SIZE(K_MAC_SLOT_SIZE_100) | 359 | #define V_MAC_SLOT_SIZE_100 V_MAC_SLOT_SIZE(K_MAC_SLOT_SIZE_100) |
360 | #define V_MAC_SLOT_SIZE_1000 V_MAC_SLOT_SIZE(K_MAC_SLOT_SIZE_1000) | 360 | #define V_MAC_SLOT_SIZE_1000 V_MAC_SLOT_SIZE(K_MAC_SLOT_SIZE_1000) |
361 | 361 | ||
362 | #define K_MAC_MIN_FRAMESZ_FIFO _SB_MAKE64(9) | 362 | #define K_MAC_MIN_FRAMESZ_FIFO _SB_MAKE64(9) |
363 | #define K_MAC_MIN_FRAMESZ_DEFAULT _SB_MAKE64(64) | 363 | #define K_MAC_MIN_FRAMESZ_DEFAULT _SB_MAKE64(64) |
364 | #define K_MAC_MAX_FRAMESZ_DEFAULT _SB_MAKE64(1518) | 364 | #define K_MAC_MAX_FRAMESZ_DEFAULT _SB_MAKE64(1518) |
365 | #define K_MAC_MAX_FRAMESZ_JUMBO _SB_MAKE64(9216) | 365 | #define K_MAC_MAX_FRAMESZ_JUMBO _SB_MAKE64(9216) |
366 | 366 | ||
367 | #define V_MAC_MIN_FRAMESZ_FIFO V_MAC_MIN_FRAMESZ(K_MAC_MIN_FRAMESZ_FIFO) | 367 | #define V_MAC_MIN_FRAMESZ_FIFO V_MAC_MIN_FRAMESZ(K_MAC_MIN_FRAMESZ_FIFO) |
368 | #define V_MAC_MIN_FRAMESZ_DEFAULT V_MAC_MIN_FRAMESZ(K_MAC_MIN_FRAMESZ_DEFAULT) | 368 | #define V_MAC_MIN_FRAMESZ_DEFAULT V_MAC_MIN_FRAMESZ(K_MAC_MIN_FRAMESZ_DEFAULT) |
369 | #define V_MAC_MAX_FRAMESZ_DEFAULT V_MAC_MAX_FRAMESZ(K_MAC_MAX_FRAMESZ_DEFAULT) | 369 | #define V_MAC_MAX_FRAMESZ_DEFAULT V_MAC_MAX_FRAMESZ(K_MAC_MAX_FRAMESZ_DEFAULT) |
370 | #define V_MAC_MAX_FRAMESZ_JUMBO V_MAC_MAX_FRAMESZ(K_MAC_MAX_FRAMESZ_JUMBO) | 370 | #define V_MAC_MAX_FRAMESZ_JUMBO V_MAC_MAX_FRAMESZ(K_MAC_MAX_FRAMESZ_JUMBO) |
371 | 371 | ||
372 | /* | 372 | /* |
373 | * MAC VLAN Tag Registers (Table 9-16) | 373 | * MAC VLAN Tag Registers (Table 9-16) |
@@ -376,23 +376,23 @@ | |||
376 | * Register: MAC_VLANTAG_2 | 376 | * Register: MAC_VLANTAG_2 |
377 | */ | 377 | */ |
378 | 378 | ||
379 | #define S_MAC_VLAN_TAG _SB_MAKE64(0) | 379 | #define S_MAC_VLAN_TAG _SB_MAKE64(0) |
380 | #define M_MAC_VLAN_TAG _SB_MAKEMASK(32, S_MAC_VLAN_TAG) | 380 | #define M_MAC_VLAN_TAG _SB_MAKEMASK(32, S_MAC_VLAN_TAG) |
381 | #define V_MAC_VLAN_TAG(x) _SB_MAKEVALUE(x, S_MAC_VLAN_TAG) | 381 | #define V_MAC_VLAN_TAG(x) _SB_MAKEVALUE(x, S_MAC_VLAN_TAG) |
382 | #define G_MAC_VLAN_TAG(x) _SB_GETVALUE(x, S_MAC_VLAN_TAG, M_MAC_VLAN_TAG) | 382 | #define G_MAC_VLAN_TAG(x) _SB_GETVALUE(x, S_MAC_VLAN_TAG, M_MAC_VLAN_TAG) |
383 | 383 | ||
384 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) | 384 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
385 | #define S_MAC_TX_PKT_OFFSET _SB_MAKE64(32) | 385 | #define S_MAC_TX_PKT_OFFSET _SB_MAKE64(32) |
386 | #define M_MAC_TX_PKT_OFFSET _SB_MAKEMASK(8, S_MAC_TX_PKT_OFFSET) | 386 | #define M_MAC_TX_PKT_OFFSET _SB_MAKEMASK(8, S_MAC_TX_PKT_OFFSET) |
387 | #define V_MAC_TX_PKT_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_TX_PKT_OFFSET) | 387 | #define V_MAC_TX_PKT_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_TX_PKT_OFFSET) |
388 | #define G_MAC_TX_PKT_OFFSET(x) _SB_GETVALUE(x, S_MAC_TX_PKT_OFFSET, M_MAC_TX_PKT_OFFSET) | 388 | #define G_MAC_TX_PKT_OFFSET(x) _SB_GETVALUE(x, S_MAC_TX_PKT_OFFSET, M_MAC_TX_PKT_OFFSET) |
389 | 389 | ||
390 | #define S_MAC_TX_CRC_OFFSET _SB_MAKE64(40) | 390 | #define S_MAC_TX_CRC_OFFSET _SB_MAKE64(40) |
391 | #define M_MAC_TX_CRC_OFFSET _SB_MAKEMASK(8, S_MAC_TX_CRC_OFFSET) | 391 | #define M_MAC_TX_CRC_OFFSET _SB_MAKEMASK(8, S_MAC_TX_CRC_OFFSET) |
392 | #define V_MAC_TX_CRC_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_TX_CRC_OFFSET) | 392 | #define V_MAC_TX_CRC_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_TX_CRC_OFFSET) |
393 | #define G_MAC_TX_CRC_OFFSET(x) _SB_GETVALUE(x, S_MAC_TX_CRC_OFFSET, M_MAC_TX_CRC_OFFSET) | 393 | #define G_MAC_TX_CRC_OFFSET(x) _SB_GETVALUE(x, S_MAC_TX_CRC_OFFSET, M_MAC_TX_CRC_OFFSET) |
394 | 394 | ||
395 | #define M_MAC_CH_BASE_FC_EN _SB_MAKEMASK1(48) | 395 | #define M_MAC_CH_BASE_FC_EN _SB_MAKEMASK1(48) |
396 | #endif /* 1250 PASS3 || 112x PASS1 */ | 396 | #endif /* 1250 PASS3 || 112x PASS1 */ |
397 | 397 | ||
398 | /* | 398 | /* |
@@ -412,29 +412,29 @@ | |||
412 | * on each channel. | 412 | * on each channel. |
413 | */ | 413 | */ |
414 | 414 | ||
415 | #define S_MAC_RX_CH0 _SB_MAKE64(0) | 415 | #define S_MAC_RX_CH0 _SB_MAKE64(0) |
416 | #define S_MAC_RX_CH1 _SB_MAKE64(8) | 416 | #define S_MAC_RX_CH1 _SB_MAKE64(8) |
417 | #define S_MAC_TX_CH0 _SB_MAKE64(16) | 417 | #define S_MAC_TX_CH0 _SB_MAKE64(16) |
418 | #define S_MAC_TX_CH1 _SB_MAKE64(24) | 418 | #define S_MAC_TX_CH1 _SB_MAKE64(24) |
419 | 419 | ||
420 | #define S_MAC_TXCHANNELS _SB_MAKE64(16) /* this is 1st TX chan */ | 420 | #define S_MAC_TXCHANNELS _SB_MAKE64(16) /* this is 1st TX chan */ |
421 | #define S_MAC_CHANWIDTH _SB_MAKE64(8) /* bits between channels */ | 421 | #define S_MAC_CHANWIDTH _SB_MAKE64(8) /* bits between channels */ |
422 | 422 | ||
423 | /* | 423 | /* |
424 | * These are the same as RX channel 0. The idea here | 424 | * These are the same as RX channel 0. The idea here |
425 | * is that you'll use one of the "S_" things above | 425 | * is that you'll use one of the "S_" things above |
426 | * and pass just the six bits to a DMA-channel-specific ISR | 426 | * and pass just the six bits to a DMA-channel-specific ISR |
427 | */ | 427 | */ |
428 | #define M_MAC_INT_CHANNEL _SB_MAKEMASK(8, 0) | 428 | #define M_MAC_INT_CHANNEL _SB_MAKEMASK(8, 0) |
429 | #define M_MAC_INT_EOP_COUNT _SB_MAKEMASK1(0) | 429 | #define M_MAC_INT_EOP_COUNT _SB_MAKEMASK1(0) |
430 | #define M_MAC_INT_EOP_TIMER _SB_MAKEMASK1(1) | 430 | #define M_MAC_INT_EOP_TIMER _SB_MAKEMASK1(1) |
431 | #define M_MAC_INT_EOP_SEEN _SB_MAKEMASK1(2) | 431 | #define M_MAC_INT_EOP_SEEN _SB_MAKEMASK1(2) |
432 | #define M_MAC_INT_HWM _SB_MAKEMASK1(3) | 432 | #define M_MAC_INT_HWM _SB_MAKEMASK1(3) |
433 | #define M_MAC_INT_LWM _SB_MAKEMASK1(4) | 433 | #define M_MAC_INT_LWM _SB_MAKEMASK1(4) |
434 | #define M_MAC_INT_DSCR _SB_MAKEMASK1(5) | 434 | #define M_MAC_INT_DSCR _SB_MAKEMASK1(5) |
435 | #define M_MAC_INT_ERR _SB_MAKEMASK1(6) | 435 | #define M_MAC_INT_ERR _SB_MAKEMASK1(6) |
436 | #define M_MAC_INT_DZERO _SB_MAKEMASK1(7) /* only for TX channels */ | 436 | #define M_MAC_INT_DZERO _SB_MAKEMASK1(7) /* only for TX channels */ |
437 | #define M_MAC_INT_DROP _SB_MAKEMASK1(7) /* only for RX channels */ | 437 | #define M_MAC_INT_DROP _SB_MAKEMASK1(7) /* only for RX channels */ |
438 | 438 | ||
439 | /* | 439 | /* |
440 | * In the following definitions we use ch (0/1) and txrx (TX=1, RX=0, see | 440 | * In the following definitions we use ch (0/1) and txrx (TX=1, RX=0, see |
@@ -442,34 +442,34 @@ | |||
442 | */ | 442 | */ |
443 | #define S_MAC_STATUS_CH_OFFSET(ch, txrx) _SB_MAKE64(((ch) + 2 * (txrx)) * S_MAC_CHANWIDTH) | 443 | #define S_MAC_STATUS_CH_OFFSET(ch, txrx) _SB_MAKE64(((ch) + 2 * (txrx)) * S_MAC_CHANWIDTH) |
444 | 444 | ||
445 | #define M_MAC_STATUS_CHANNEL(ch, txrx) _SB_MAKEVALUE(_SB_MAKEMASK(8, 0), S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 445 | #define M_MAC_STATUS_CHANNEL(ch, txrx) _SB_MAKEVALUE(_SB_MAKEMASK(8, 0), S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
446 | #define M_MAC_STATUS_EOP_COUNT(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_EOP_COUNT, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 446 | #define M_MAC_STATUS_EOP_COUNT(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_EOP_COUNT, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
447 | #define M_MAC_STATUS_EOP_TIMER(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_EOP_TIMER, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 447 | #define M_MAC_STATUS_EOP_TIMER(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_EOP_TIMER, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
448 | #define M_MAC_STATUS_EOP_SEEN(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_EOP_SEEN, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 448 | #define M_MAC_STATUS_EOP_SEEN(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_EOP_SEEN, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
449 | #define M_MAC_STATUS_HWM(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_HWM, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 449 | #define M_MAC_STATUS_HWM(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_HWM, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
450 | #define M_MAC_STATUS_LWM(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_LWM, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 450 | #define M_MAC_STATUS_LWM(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_LWM, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
451 | #define M_MAC_STATUS_DSCR(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_DSCR, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 451 | #define M_MAC_STATUS_DSCR(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_DSCR, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
452 | #define M_MAC_STATUS_ERR(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_ERR, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 452 | #define M_MAC_STATUS_ERR(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_ERR, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
453 | #define M_MAC_STATUS_DZERO(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_DZERO, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 453 | #define M_MAC_STATUS_DZERO(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_DZERO, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
454 | #define M_MAC_STATUS_DROP(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_DROP, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 454 | #define M_MAC_STATUS_DROP(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_DROP, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
455 | #define M_MAC_STATUS_OTHER_ERR _SB_MAKEVALUE(_SB_MAKEMASK(7, 0), 40) | 455 | #define M_MAC_STATUS_OTHER_ERR _SB_MAKEVALUE(_SB_MAKEMASK(7, 0), 40) |
456 | 456 | ||
457 | 457 | ||
458 | #define M_MAC_RX_UNDRFL _SB_MAKEMASK1(40) | 458 | #define M_MAC_RX_UNDRFL _SB_MAKEMASK1(40) |
459 | #define M_MAC_RX_OVRFL _SB_MAKEMASK1(41) | 459 | #define M_MAC_RX_OVRFL _SB_MAKEMASK1(41) |
460 | #define M_MAC_TX_UNDRFL _SB_MAKEMASK1(42) | 460 | #define M_MAC_TX_UNDRFL _SB_MAKEMASK1(42) |
461 | #define M_MAC_TX_OVRFL _SB_MAKEMASK1(43) | 461 | #define M_MAC_TX_OVRFL _SB_MAKEMASK1(43) |
462 | #define M_MAC_LTCOL_ERR _SB_MAKEMASK1(44) | 462 | #define M_MAC_LTCOL_ERR _SB_MAKEMASK1(44) |
463 | #define M_MAC_EXCOL_ERR _SB_MAKEMASK1(45) | 463 | #define M_MAC_EXCOL_ERR _SB_MAKEMASK1(45) |
464 | #define M_MAC_CNTR_OVRFL_ERR _SB_MAKEMASK1(46) | 464 | #define M_MAC_CNTR_OVRFL_ERR _SB_MAKEMASK1(46) |
465 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 465 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
466 | #define M_MAC_SPLIT_EN _SB_MAKEMASK1(47) /* interrupt mask only */ | 466 | #define M_MAC_SPLIT_EN _SB_MAKEMASK1(47) /* interrupt mask only */ |
467 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 467 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
468 | 468 | ||
469 | #define S_MAC_COUNTER_ADDR _SB_MAKE64(47) | 469 | #define S_MAC_COUNTER_ADDR _SB_MAKE64(47) |
470 | #define M_MAC_COUNTER_ADDR _SB_MAKEMASK(5, S_MAC_COUNTER_ADDR) | 470 | #define M_MAC_COUNTER_ADDR _SB_MAKEMASK(5, S_MAC_COUNTER_ADDR) |
471 | #define V_MAC_COUNTER_ADDR(x) _SB_MAKEVALUE(x, S_MAC_COUNTER_ADDR) | 471 | #define V_MAC_COUNTER_ADDR(x) _SB_MAKEVALUE(x, S_MAC_COUNTER_ADDR) |
472 | #define G_MAC_COUNTER_ADDR(x) _SB_GETVALUE(x, S_MAC_COUNTER_ADDR, M_MAC_COUNTER_ADDR) | 472 | #define G_MAC_COUNTER_ADDR(x) _SB_GETVALUE(x, S_MAC_COUNTER_ADDR, M_MAC_COUNTER_ADDR) |
473 | 473 | ||
474 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 474 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
475 | #define M_MAC_TX_PAUSE_ON _SB_MAKEMASK1(52) | 475 | #define M_MAC_TX_PAUSE_ON _SB_MAKEMASK1(52) |
@@ -482,42 +482,42 @@ | |||
482 | * Register: MAC_FIFO_PTRS_2 | 482 | * Register: MAC_FIFO_PTRS_2 |
483 | */ | 483 | */ |
484 | 484 | ||
485 | #define S_MAC_TX_WRPTR _SB_MAKE64(0) | 485 | #define S_MAC_TX_WRPTR _SB_MAKE64(0) |
486 | #define M_MAC_TX_WRPTR _SB_MAKEMASK(6, S_MAC_TX_WRPTR) | 486 | #define M_MAC_TX_WRPTR _SB_MAKEMASK(6, S_MAC_TX_WRPTR) |
487 | #define V_MAC_TX_WRPTR(x) _SB_MAKEVALUE(x, S_MAC_TX_WRPTR) | 487 | #define V_MAC_TX_WRPTR(x) _SB_MAKEVALUE(x, S_MAC_TX_WRPTR) |
488 | #define G_MAC_TX_WRPTR(x) _SB_GETVALUE(x, S_MAC_TX_WRPTR, M_MAC_TX_WRPTR) | 488 | #define G_MAC_TX_WRPTR(x) _SB_GETVALUE(x, S_MAC_TX_WRPTR, M_MAC_TX_WRPTR) |
489 | 489 | ||
490 | #define S_MAC_TX_RDPTR _SB_MAKE64(8) | 490 | #define S_MAC_TX_RDPTR _SB_MAKE64(8) |
491 | #define M_MAC_TX_RDPTR _SB_MAKEMASK(6, S_MAC_TX_RDPTR) | 491 | #define M_MAC_TX_RDPTR _SB_MAKEMASK(6, S_MAC_TX_RDPTR) |
492 | #define V_MAC_TX_RDPTR(x) _SB_MAKEVALUE(x, S_MAC_TX_RDPTR) | 492 | #define V_MAC_TX_RDPTR(x) _SB_MAKEVALUE(x, S_MAC_TX_RDPTR) |
493 | #define G_MAC_TX_RDPTR(x) _SB_GETVALUE(x, S_MAC_TX_RDPTR, M_MAC_TX_RDPTR) | 493 | #define G_MAC_TX_RDPTR(x) _SB_GETVALUE(x, S_MAC_TX_RDPTR, M_MAC_TX_RDPTR) |
494 | 494 | ||
495 | #define S_MAC_RX_WRPTR _SB_MAKE64(16) | 495 | #define S_MAC_RX_WRPTR _SB_MAKE64(16) |
496 | #define M_MAC_RX_WRPTR _SB_MAKEMASK(6, S_MAC_RX_WRPTR) | 496 | #define M_MAC_RX_WRPTR _SB_MAKEMASK(6, S_MAC_RX_WRPTR) |
497 | #define V_MAC_RX_WRPTR(x) _SB_MAKEVALUE(x, S_MAC_RX_WRPTR) | 497 | #define V_MAC_RX_WRPTR(x) _SB_MAKEVALUE(x, S_MAC_RX_WRPTR) |
498 | #define G_MAC_RX_WRPTR(x) _SB_GETVALUE(x, S_MAC_RX_WRPTR, M_MAC_TX_WRPTR) | 498 | #define G_MAC_RX_WRPTR(x) _SB_GETVALUE(x, S_MAC_RX_WRPTR, M_MAC_TX_WRPTR) |
499 | 499 | ||
500 | #define S_MAC_RX_RDPTR _SB_MAKE64(24) | 500 | #define S_MAC_RX_RDPTR _SB_MAKE64(24) |
501 | #define M_MAC_RX_RDPTR _SB_MAKEMASK(6, S_MAC_RX_RDPTR) | 501 | #define M_MAC_RX_RDPTR _SB_MAKEMASK(6, S_MAC_RX_RDPTR) |
502 | #define V_MAC_RX_RDPTR(x) _SB_MAKEVALUE(x, S_MAC_RX_RDPTR) | 502 | #define V_MAC_RX_RDPTR(x) _SB_MAKEVALUE(x, S_MAC_RX_RDPTR) |
503 | #define G_MAC_RX_RDPTR(x) _SB_GETVALUE(x, S_MAC_RX_RDPTR, M_MAC_TX_RDPTR) | 503 | #define G_MAC_RX_RDPTR(x) _SB_GETVALUE(x, S_MAC_RX_RDPTR, M_MAC_TX_RDPTR) |
504 | 504 | ||
505 | /* | 505 | /* |
506 | * MAC Fifo End Of Packet Count Registers (Table 9-20) [Debug register] | 506 | * MAC Fifo End Of Packet Count Registers (Table 9-20) [Debug register] |
507 | * Register: MAC_EOPCNT_0 | 507 | * Register: MAC_EOPCNT_0 |
508 | * Register: MAC_EOPCNT_1 | 508 | * Register: MAC_EOPCNT_1 |
509 | * Register: MAC_EOPCNT_2 | 509 | * Register: MAC_EOPCNT_2 |
510 | */ | 510 | */ |
511 | 511 | ||
512 | #define S_MAC_TX_EOP_COUNTER _SB_MAKE64(0) | 512 | #define S_MAC_TX_EOP_COUNTER _SB_MAKE64(0) |
513 | #define M_MAC_TX_EOP_COUNTER _SB_MAKEMASK(6, S_MAC_TX_EOP_COUNTER) | 513 | #define M_MAC_TX_EOP_COUNTER _SB_MAKEMASK(6, S_MAC_TX_EOP_COUNTER) |
514 | #define V_MAC_TX_EOP_COUNTER(x) _SB_MAKEVALUE(x, S_MAC_TX_EOP_COUNTER) | 514 | #define V_MAC_TX_EOP_COUNTER(x) _SB_MAKEVALUE(x, S_MAC_TX_EOP_COUNTER) |
515 | #define G_MAC_TX_EOP_COUNTER(x) _SB_GETVALUE(x, S_MAC_TX_EOP_COUNTER, M_MAC_TX_EOP_COUNTER) | 515 | #define G_MAC_TX_EOP_COUNTER(x) _SB_GETVALUE(x, S_MAC_TX_EOP_COUNTER, M_MAC_TX_EOP_COUNTER) |
516 | 516 | ||
517 | #define S_MAC_RX_EOP_COUNTER _SB_MAKE64(8) | 517 | #define S_MAC_RX_EOP_COUNTER _SB_MAKE64(8) |
518 | #define M_MAC_RX_EOP_COUNTER _SB_MAKEMASK(6, S_MAC_RX_EOP_COUNTER) | 518 | #define M_MAC_RX_EOP_COUNTER _SB_MAKEMASK(6, S_MAC_RX_EOP_COUNTER) |
519 | #define V_MAC_RX_EOP_COUNTER(x) _SB_MAKEVALUE(x, S_MAC_RX_EOP_COUNTER) | 519 | #define V_MAC_RX_EOP_COUNTER(x) _SB_MAKEVALUE(x, S_MAC_RX_EOP_COUNTER) |
520 | #define G_MAC_RX_EOP_COUNTER(x) _SB_GETVALUE(x, S_MAC_RX_EOP_COUNTER, M_MAC_RX_EOP_COUNTER) | 520 | #define G_MAC_RX_EOP_COUNTER(x) _SB_GETVALUE(x, S_MAC_RX_EOP_COUNTER, M_MAC_RX_EOP_COUNTER) |
521 | 521 | ||
522 | /* | 522 | /* |
523 | * MAC Receive Address Filter Exact Match Registers (Table 9-21) | 523 | * MAC Receive Address Filter Exact Match Registers (Table 9-21) |
@@ -562,27 +562,27 @@ | |||
562 | * Register: MAC_TYPE_CFG_2 | 562 | * Register: MAC_TYPE_CFG_2 |
563 | */ | 563 | */ |
564 | 564 | ||
565 | #define S_TYPECFG_TYPESIZE _SB_MAKE64(16) | 565 | #define S_TYPECFG_TYPESIZE _SB_MAKE64(16) |
566 | 566 | ||
567 | #define S_TYPECFG_TYPE0 _SB_MAKE64(0) | 567 | #define S_TYPECFG_TYPE0 _SB_MAKE64(0) |
568 | #define M_TYPECFG_TYPE0 _SB_MAKEMASK(16, S_TYPECFG_TYPE0) | 568 | #define M_TYPECFG_TYPE0 _SB_MAKEMASK(16, S_TYPECFG_TYPE0) |
569 | #define V_TYPECFG_TYPE0(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE0) | 569 | #define V_TYPECFG_TYPE0(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE0) |
570 | #define G_TYPECFG_TYPE0(x) _SB_GETVALUE(x, S_TYPECFG_TYPE0, M_TYPECFG_TYPE0) | 570 | #define G_TYPECFG_TYPE0(x) _SB_GETVALUE(x, S_TYPECFG_TYPE0, M_TYPECFG_TYPE0) |
571 | 571 | ||
572 | #define S_TYPECFG_TYPE1 _SB_MAKE64(0) | 572 | #define S_TYPECFG_TYPE1 _SB_MAKE64(0) |
573 | #define M_TYPECFG_TYPE1 _SB_MAKEMASK(16, S_TYPECFG_TYPE1) | 573 | #define M_TYPECFG_TYPE1 _SB_MAKEMASK(16, S_TYPECFG_TYPE1) |
574 | #define V_TYPECFG_TYPE1(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE1) | 574 | #define V_TYPECFG_TYPE1(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE1) |
575 | #define G_TYPECFG_TYPE1(x) _SB_GETVALUE(x, S_TYPECFG_TYPE1, M_TYPECFG_TYPE1) | 575 | #define G_TYPECFG_TYPE1(x) _SB_GETVALUE(x, S_TYPECFG_TYPE1, M_TYPECFG_TYPE1) |
576 | 576 | ||
577 | #define S_TYPECFG_TYPE2 _SB_MAKE64(0) | 577 | #define S_TYPECFG_TYPE2 _SB_MAKE64(0) |
578 | #define M_TYPECFG_TYPE2 _SB_MAKEMASK(16, S_TYPECFG_TYPE2) | 578 | #define M_TYPECFG_TYPE2 _SB_MAKEMASK(16, S_TYPECFG_TYPE2) |
579 | #define V_TYPECFG_TYPE2(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE2) | 579 | #define V_TYPECFG_TYPE2(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE2) |
580 | #define G_TYPECFG_TYPE2(x) _SB_GETVALUE(x, S_TYPECFG_TYPE2, M_TYPECFG_TYPE2) | 580 | #define G_TYPECFG_TYPE2(x) _SB_GETVALUE(x, S_TYPECFG_TYPE2, M_TYPECFG_TYPE2) |
581 | 581 | ||
582 | #define S_TYPECFG_TYPE3 _SB_MAKE64(0) | 582 | #define S_TYPECFG_TYPE3 _SB_MAKE64(0) |
583 | #define M_TYPECFG_TYPE3 _SB_MAKEMASK(16, S_TYPECFG_TYPE3) | 583 | #define M_TYPECFG_TYPE3 _SB_MAKEMASK(16, S_TYPECFG_TYPE3) |
584 | #define V_TYPECFG_TYPE3(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE3) | 584 | #define V_TYPECFG_TYPE3(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE3) |
585 | #define G_TYPECFG_TYPE3(x) _SB_GETVALUE(x, S_TYPECFG_TYPE3, M_TYPECFG_TYPE3) | 585 | #define G_TYPECFG_TYPE3(x) _SB_GETVALUE(x, S_TYPECFG_TYPE3, M_TYPECFG_TYPE3) |
586 | 586 | ||
587 | /* | 587 | /* |
588 | * MAC Receive Address Filter Control Registers (Table 9-24) | 588 | * MAC Receive Address Filter Control Registers (Table 9-24) |
@@ -591,38 +591,38 @@ | |||
591 | * Register: MAC_ADFILTER_CFG_2 | 591 | * Register: MAC_ADFILTER_CFG_2 |
592 | */ | 592 | */ |
593 | 593 | ||
594 | #define M_MAC_ALLPKT_EN _SB_MAKEMASK1(0) | 594 | #define M_MAC_ALLPKT_EN _SB_MAKEMASK1(0) |
595 | #define M_MAC_UCAST_EN _SB_MAKEMASK1(1) | 595 | #define M_MAC_UCAST_EN _SB_MAKEMASK1(1) |
596 | #define M_MAC_UCAST_INV _SB_MAKEMASK1(2) | 596 | #define M_MAC_UCAST_INV _SB_MAKEMASK1(2) |
597 | #define M_MAC_MCAST_EN _SB_MAKEMASK1(3) | 597 | #define M_MAC_MCAST_EN _SB_MAKEMASK1(3) |
598 | #define M_MAC_MCAST_INV _SB_MAKEMASK1(4) | 598 | #define M_MAC_MCAST_INV _SB_MAKEMASK1(4) |
599 | #define M_MAC_BCAST_EN _SB_MAKEMASK1(5) | 599 | #define M_MAC_BCAST_EN _SB_MAKEMASK1(5) |
600 | #define M_MAC_DIRECT_INV _SB_MAKEMASK1(6) | 600 | #define M_MAC_DIRECT_INV _SB_MAKEMASK1(6) |
601 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 601 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
602 | #define M_MAC_ALLMCAST_EN _SB_MAKEMASK1(7) | 602 | #define M_MAC_ALLMCAST_EN _SB_MAKEMASK1(7) |
603 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 603 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
604 | 604 | ||
605 | #define S_MAC_IPHDR_OFFSET _SB_MAKE64(8) | 605 | #define S_MAC_IPHDR_OFFSET _SB_MAKE64(8) |
606 | #define M_MAC_IPHDR_OFFSET _SB_MAKEMASK(8, S_MAC_IPHDR_OFFSET) | 606 | #define M_MAC_IPHDR_OFFSET _SB_MAKEMASK(8, S_MAC_IPHDR_OFFSET) |
607 | #define V_MAC_IPHDR_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_IPHDR_OFFSET) | 607 | #define V_MAC_IPHDR_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_IPHDR_OFFSET) |
608 | #define G_MAC_IPHDR_OFFSET(x) _SB_GETVALUE(x, S_MAC_IPHDR_OFFSET, M_MAC_IPHDR_OFFSET) | 608 | #define G_MAC_IPHDR_OFFSET(x) _SB_GETVALUE(x, S_MAC_IPHDR_OFFSET, M_MAC_IPHDR_OFFSET) |
609 | 609 | ||
610 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 610 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
611 | #define S_MAC_RX_CRC_OFFSET _SB_MAKE64(16) | 611 | #define S_MAC_RX_CRC_OFFSET _SB_MAKE64(16) |
612 | #define M_MAC_RX_CRC_OFFSET _SB_MAKEMASK(8, S_MAC_RX_CRC_OFFSET) | 612 | #define M_MAC_RX_CRC_OFFSET _SB_MAKEMASK(8, S_MAC_RX_CRC_OFFSET) |
613 | #define V_MAC_RX_CRC_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_RX_CRC_OFFSET) | 613 | #define V_MAC_RX_CRC_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_RX_CRC_OFFSET) |
614 | #define G_MAC_RX_CRC_OFFSET(x) _SB_GETVALUE(x, S_MAC_RX_CRC_OFFSET, M_MAC_RX_CRC_OFFSET) | 614 | #define G_MAC_RX_CRC_OFFSET(x) _SB_GETVALUE(x, S_MAC_RX_CRC_OFFSET, M_MAC_RX_CRC_OFFSET) |
615 | 615 | ||
616 | #define S_MAC_RX_PKT_OFFSET _SB_MAKE64(24) | 616 | #define S_MAC_RX_PKT_OFFSET _SB_MAKE64(24) |
617 | #define M_MAC_RX_PKT_OFFSET _SB_MAKEMASK(8, S_MAC_RX_PKT_OFFSET) | 617 | #define M_MAC_RX_PKT_OFFSET _SB_MAKEMASK(8, S_MAC_RX_PKT_OFFSET) |
618 | #define V_MAC_RX_PKT_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_RX_PKT_OFFSET) | 618 | #define V_MAC_RX_PKT_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_RX_PKT_OFFSET) |
619 | #define G_MAC_RX_PKT_OFFSET(x) _SB_GETVALUE(x, S_MAC_RX_PKT_OFFSET, M_MAC_RX_PKT_OFFSET) | 619 | #define G_MAC_RX_PKT_OFFSET(x) _SB_GETVALUE(x, S_MAC_RX_PKT_OFFSET, M_MAC_RX_PKT_OFFSET) |
620 | 620 | ||
621 | #define M_MAC_FWDPAUSE_EN _SB_MAKEMASK1(32) | 621 | #define M_MAC_FWDPAUSE_EN _SB_MAKEMASK1(32) |
622 | #define M_MAC_VLAN_DET_EN _SB_MAKEMASK1(33) | 622 | #define M_MAC_VLAN_DET_EN _SB_MAKEMASK1(33) |
623 | 623 | ||
624 | #define S_MAC_RX_CH_MSN_SEL _SB_MAKE64(34) | 624 | #define S_MAC_RX_CH_MSN_SEL _SB_MAKE64(34) |
625 | #define M_MAC_RX_CH_MSN_SEL _SB_MAKEMASK(8, S_MAC_RX_CH_MSN_SEL) | 625 | #define M_MAC_RX_CH_MSN_SEL _SB_MAKEMASK(8, S_MAC_RX_CH_MSN_SEL) |
626 | #define V_MAC_RX_CH_MSN_SEL(x) _SB_MAKEVALUE(x, S_MAC_RX_CH_MSN_SEL) | 626 | #define V_MAC_RX_CH_MSN_SEL(x) _SB_MAKEVALUE(x, S_MAC_RX_CH_MSN_SEL) |
627 | #define G_MAC_RX_CH_MSN_SEL(x) _SB_GETVALUE(x, S_MAC_RX_CH_MSN_SEL, M_MAC_RX_CH_MSN_SEL) | 627 | #define G_MAC_RX_CH_MSN_SEL(x) _SB_GETVALUE(x, S_MAC_RX_CH_MSN_SEL, M_MAC_RX_CH_MSN_SEL) |
628 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 628 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
diff --git a/arch/mips/include/asm/sibyte/sb1250_mc.h b/arch/mips/include/asm/sibyte/sb1250_mc.h index 15048dcaf22f..8368e411131f 100644 --- a/arch/mips/include/asm/sibyte/sb1250_mc.h +++ b/arch/mips/include/asm/sibyte/sb1250_mc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Memory Controller constants File: sb1250_mc.h | 4 | * Memory Controller constants File: sb1250_mc.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * programming the memory controller. | 7 | * programming the memory controller. |
@@ -39,96 +39,96 @@ | |||
39 | * Memory Channel Config Register (table 6-14) | 39 | * Memory Channel Config Register (table 6-14) |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #define S_MC_RESERVED0 0 | 42 | #define S_MC_RESERVED0 0 |
43 | #define M_MC_RESERVED0 _SB_MAKEMASK(8, S_MC_RESERVED0) | 43 | #define M_MC_RESERVED0 _SB_MAKEMASK(8, S_MC_RESERVED0) |
44 | 44 | ||
45 | #define S_MC_CHANNEL_SEL 8 | 45 | #define S_MC_CHANNEL_SEL 8 |
46 | #define M_MC_CHANNEL_SEL _SB_MAKEMASK(8, S_MC_CHANNEL_SEL) | 46 | #define M_MC_CHANNEL_SEL _SB_MAKEMASK(8, S_MC_CHANNEL_SEL) |
47 | #define V_MC_CHANNEL_SEL(x) _SB_MAKEVALUE(x, S_MC_CHANNEL_SEL) | 47 | #define V_MC_CHANNEL_SEL(x) _SB_MAKEVALUE(x, S_MC_CHANNEL_SEL) |
48 | #define G_MC_CHANNEL_SEL(x) _SB_GETVALUE(x, S_MC_CHANNEL_SEL, M_MC_CHANNEL_SEL) | 48 | #define G_MC_CHANNEL_SEL(x) _SB_GETVALUE(x, S_MC_CHANNEL_SEL, M_MC_CHANNEL_SEL) |
49 | 49 | ||
50 | #define S_MC_BANK0_MAP 16 | 50 | #define S_MC_BANK0_MAP 16 |
51 | #define M_MC_BANK0_MAP _SB_MAKEMASK(4, S_MC_BANK0_MAP) | 51 | #define M_MC_BANK0_MAP _SB_MAKEMASK(4, S_MC_BANK0_MAP) |
52 | #define V_MC_BANK0_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK0_MAP) | 52 | #define V_MC_BANK0_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK0_MAP) |
53 | #define G_MC_BANK0_MAP(x) _SB_GETVALUE(x, S_MC_BANK0_MAP, M_MC_BANK0_MAP) | 53 | #define G_MC_BANK0_MAP(x) _SB_GETVALUE(x, S_MC_BANK0_MAP, M_MC_BANK0_MAP) |
54 | 54 | ||
55 | #define K_MC_BANK0_MAP_DEFAULT 0x00 | 55 | #define K_MC_BANK0_MAP_DEFAULT 0x00 |
56 | #define V_MC_BANK0_MAP_DEFAULT V_MC_BANK0_MAP(K_MC_BANK0_MAP_DEFAULT) | 56 | #define V_MC_BANK0_MAP_DEFAULT V_MC_BANK0_MAP(K_MC_BANK0_MAP_DEFAULT) |
57 | 57 | ||
58 | #define S_MC_BANK1_MAP 20 | 58 | #define S_MC_BANK1_MAP 20 |
59 | #define M_MC_BANK1_MAP _SB_MAKEMASK(4, S_MC_BANK1_MAP) | 59 | #define M_MC_BANK1_MAP _SB_MAKEMASK(4, S_MC_BANK1_MAP) |
60 | #define V_MC_BANK1_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK1_MAP) | 60 | #define V_MC_BANK1_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK1_MAP) |
61 | #define G_MC_BANK1_MAP(x) _SB_GETVALUE(x, S_MC_BANK1_MAP, M_MC_BANK1_MAP) | 61 | #define G_MC_BANK1_MAP(x) _SB_GETVALUE(x, S_MC_BANK1_MAP, M_MC_BANK1_MAP) |
62 | 62 | ||
63 | #define K_MC_BANK1_MAP_DEFAULT 0x08 | 63 | #define K_MC_BANK1_MAP_DEFAULT 0x08 |
64 | #define V_MC_BANK1_MAP_DEFAULT V_MC_BANK1_MAP(K_MC_BANK1_MAP_DEFAULT) | 64 | #define V_MC_BANK1_MAP_DEFAULT V_MC_BANK1_MAP(K_MC_BANK1_MAP_DEFAULT) |
65 | 65 | ||
66 | #define S_MC_BANK2_MAP 24 | 66 | #define S_MC_BANK2_MAP 24 |
67 | #define M_MC_BANK2_MAP _SB_MAKEMASK(4, S_MC_BANK2_MAP) | 67 | #define M_MC_BANK2_MAP _SB_MAKEMASK(4, S_MC_BANK2_MAP) |
68 | #define V_MC_BANK2_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK2_MAP) | 68 | #define V_MC_BANK2_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK2_MAP) |
69 | #define G_MC_BANK2_MAP(x) _SB_GETVALUE(x, S_MC_BANK2_MAP, M_MC_BANK2_MAP) | 69 | #define G_MC_BANK2_MAP(x) _SB_GETVALUE(x, S_MC_BANK2_MAP, M_MC_BANK2_MAP) |
70 | 70 | ||
71 | #define K_MC_BANK2_MAP_DEFAULT 0x09 | 71 | #define K_MC_BANK2_MAP_DEFAULT 0x09 |
72 | #define V_MC_BANK2_MAP_DEFAULT V_MC_BANK2_MAP(K_MC_BANK2_MAP_DEFAULT) | 72 | #define V_MC_BANK2_MAP_DEFAULT V_MC_BANK2_MAP(K_MC_BANK2_MAP_DEFAULT) |
73 | 73 | ||
74 | #define S_MC_BANK3_MAP 28 | 74 | #define S_MC_BANK3_MAP 28 |
75 | #define M_MC_BANK3_MAP _SB_MAKEMASK(4, S_MC_BANK3_MAP) | 75 | #define M_MC_BANK3_MAP _SB_MAKEMASK(4, S_MC_BANK3_MAP) |
76 | #define V_MC_BANK3_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK3_MAP) | 76 | #define V_MC_BANK3_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK3_MAP) |
77 | #define G_MC_BANK3_MAP(x) _SB_GETVALUE(x, S_MC_BANK3_MAP, M_MC_BANK3_MAP) | 77 | #define G_MC_BANK3_MAP(x) _SB_GETVALUE(x, S_MC_BANK3_MAP, M_MC_BANK3_MAP) |
78 | 78 | ||
79 | #define K_MC_BANK3_MAP_DEFAULT 0x0C | 79 | #define K_MC_BANK3_MAP_DEFAULT 0x0C |
80 | #define V_MC_BANK3_MAP_DEFAULT V_MC_BANK3_MAP(K_MC_BANK3_MAP_DEFAULT) | 80 | #define V_MC_BANK3_MAP_DEFAULT V_MC_BANK3_MAP(K_MC_BANK3_MAP_DEFAULT) |
81 | 81 | ||
82 | #define M_MC_RESERVED1 _SB_MAKEMASK(8, 32) | 82 | #define M_MC_RESERVED1 _SB_MAKEMASK(8, 32) |
83 | 83 | ||
84 | #define S_MC_QUEUE_SIZE 40 | 84 | #define S_MC_QUEUE_SIZE 40 |
85 | #define M_MC_QUEUE_SIZE _SB_MAKEMASK(4, S_MC_QUEUE_SIZE) | 85 | #define M_MC_QUEUE_SIZE _SB_MAKEMASK(4, S_MC_QUEUE_SIZE) |
86 | #define V_MC_QUEUE_SIZE(x) _SB_MAKEVALUE(x, S_MC_QUEUE_SIZE) | 86 | #define V_MC_QUEUE_SIZE(x) _SB_MAKEVALUE(x, S_MC_QUEUE_SIZE) |
87 | #define G_MC_QUEUE_SIZE(x) _SB_GETVALUE(x, S_MC_QUEUE_SIZE, M_MC_QUEUE_SIZE) | 87 | #define G_MC_QUEUE_SIZE(x) _SB_GETVALUE(x, S_MC_QUEUE_SIZE, M_MC_QUEUE_SIZE) |
88 | #define V_MC_QUEUE_SIZE_DEFAULT V_MC_QUEUE_SIZE(0x0A) | 88 | #define V_MC_QUEUE_SIZE_DEFAULT V_MC_QUEUE_SIZE(0x0A) |
89 | 89 | ||
90 | #define S_MC_AGE_LIMIT 44 | 90 | #define S_MC_AGE_LIMIT 44 |
91 | #define M_MC_AGE_LIMIT _SB_MAKEMASK(4, S_MC_AGE_LIMIT) | 91 | #define M_MC_AGE_LIMIT _SB_MAKEMASK(4, S_MC_AGE_LIMIT) |
92 | #define V_MC_AGE_LIMIT(x) _SB_MAKEVALUE(x, S_MC_AGE_LIMIT) | 92 | #define V_MC_AGE_LIMIT(x) _SB_MAKEVALUE(x, S_MC_AGE_LIMIT) |
93 | #define G_MC_AGE_LIMIT(x) _SB_GETVALUE(x, S_MC_AGE_LIMIT, M_MC_AGE_LIMIT) | 93 | #define G_MC_AGE_LIMIT(x) _SB_GETVALUE(x, S_MC_AGE_LIMIT, M_MC_AGE_LIMIT) |
94 | #define V_MC_AGE_LIMIT_DEFAULT V_MC_AGE_LIMIT(8) | 94 | #define V_MC_AGE_LIMIT_DEFAULT V_MC_AGE_LIMIT(8) |
95 | 95 | ||
96 | #define S_MC_WR_LIMIT 48 | 96 | #define S_MC_WR_LIMIT 48 |
97 | #define M_MC_WR_LIMIT _SB_MAKEMASK(4, S_MC_WR_LIMIT) | 97 | #define M_MC_WR_LIMIT _SB_MAKEMASK(4, S_MC_WR_LIMIT) |
98 | #define V_MC_WR_LIMIT(x) _SB_MAKEVALUE(x, S_MC_WR_LIMIT) | 98 | #define V_MC_WR_LIMIT(x) _SB_MAKEVALUE(x, S_MC_WR_LIMIT) |
99 | #define G_MC_WR_LIMIT(x) _SB_GETVALUE(x, S_MC_WR_LIMIT, M_MC_WR_LIMIT) | 99 | #define G_MC_WR_LIMIT(x) _SB_GETVALUE(x, S_MC_WR_LIMIT, M_MC_WR_LIMIT) |
100 | #define V_MC_WR_LIMIT_DEFAULT V_MC_WR_LIMIT(5) | 100 | #define V_MC_WR_LIMIT_DEFAULT V_MC_WR_LIMIT(5) |
101 | 101 | ||
102 | #define M_MC_IOB1HIGHPRIORITY _SB_MAKEMASK1(52) | 102 | #define M_MC_IOB1HIGHPRIORITY _SB_MAKEMASK1(52) |
103 | 103 | ||
104 | #define M_MC_RESERVED2 _SB_MAKEMASK(3, 53) | 104 | #define M_MC_RESERVED2 _SB_MAKEMASK(3, 53) |
105 | 105 | ||
106 | #define S_MC_CS_MODE 56 | 106 | #define S_MC_CS_MODE 56 |
107 | #define M_MC_CS_MODE _SB_MAKEMASK(4, S_MC_CS_MODE) | 107 | #define M_MC_CS_MODE _SB_MAKEMASK(4, S_MC_CS_MODE) |
108 | #define V_MC_CS_MODE(x) _SB_MAKEVALUE(x, S_MC_CS_MODE) | 108 | #define V_MC_CS_MODE(x) _SB_MAKEVALUE(x, S_MC_CS_MODE) |
109 | #define G_MC_CS_MODE(x) _SB_GETVALUE(x, S_MC_CS_MODE, M_MC_CS_MODE) | 109 | #define G_MC_CS_MODE(x) _SB_GETVALUE(x, S_MC_CS_MODE, M_MC_CS_MODE) |
110 | 110 | ||
111 | #define K_MC_CS_MODE_MSB_CS 0 | 111 | #define K_MC_CS_MODE_MSB_CS 0 |
112 | #define K_MC_CS_MODE_INTLV_CS 15 | 112 | #define K_MC_CS_MODE_INTLV_CS 15 |
113 | #define K_MC_CS_MODE_MIXED_CS_10 12 | 113 | #define K_MC_CS_MODE_MIXED_CS_10 12 |
114 | #define K_MC_CS_MODE_MIXED_CS_30 6 | 114 | #define K_MC_CS_MODE_MIXED_CS_30 6 |
115 | #define K_MC_CS_MODE_MIXED_CS_32 3 | 115 | #define K_MC_CS_MODE_MIXED_CS_32 3 |
116 | 116 | ||
117 | #define V_MC_CS_MODE_MSB_CS V_MC_CS_MODE(K_MC_CS_MODE_MSB_CS) | 117 | #define V_MC_CS_MODE_MSB_CS V_MC_CS_MODE(K_MC_CS_MODE_MSB_CS) |
118 | #define V_MC_CS_MODE_INTLV_CS V_MC_CS_MODE(K_MC_CS_MODE_INTLV_CS) | 118 | #define V_MC_CS_MODE_INTLV_CS V_MC_CS_MODE(K_MC_CS_MODE_INTLV_CS) |
119 | #define V_MC_CS_MODE_MIXED_CS_10 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_10) | 119 | #define V_MC_CS_MODE_MIXED_CS_10 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_10) |
120 | #define V_MC_CS_MODE_MIXED_CS_30 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_30) | 120 | #define V_MC_CS_MODE_MIXED_CS_30 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_30) |
121 | #define V_MC_CS_MODE_MIXED_CS_32 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_32) | 121 | #define V_MC_CS_MODE_MIXED_CS_32 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_32) |
122 | 122 | ||
123 | #define M_MC_ECC_DISABLE _SB_MAKEMASK1(60) | 123 | #define M_MC_ECC_DISABLE _SB_MAKEMASK1(60) |
124 | #define M_MC_BERR_DISABLE _SB_MAKEMASK1(61) | 124 | #define M_MC_BERR_DISABLE _SB_MAKEMASK1(61) |
125 | #define M_MC_FORCE_SEQ _SB_MAKEMASK1(62) | 125 | #define M_MC_FORCE_SEQ _SB_MAKEMASK1(62) |
126 | #define M_MC_DEBUG _SB_MAKEMASK1(63) | 126 | #define M_MC_DEBUG _SB_MAKEMASK1(63) |
127 | 127 | ||
128 | #define V_MC_CONFIG_DEFAULT V_MC_WR_LIMIT_DEFAULT | V_MC_AGE_LIMIT_DEFAULT | \ | 128 | #define V_MC_CONFIG_DEFAULT V_MC_WR_LIMIT_DEFAULT | V_MC_AGE_LIMIT_DEFAULT | \ |
129 | V_MC_BANK0_MAP_DEFAULT | V_MC_BANK1_MAP_DEFAULT | \ | 129 | V_MC_BANK0_MAP_DEFAULT | V_MC_BANK1_MAP_DEFAULT | \ |
130 | V_MC_BANK2_MAP_DEFAULT | V_MC_BANK3_MAP_DEFAULT | V_MC_CHANNEL_SEL(0) | \ | 130 | V_MC_BANK2_MAP_DEFAULT | V_MC_BANK3_MAP_DEFAULT | V_MC_CHANNEL_SEL(0) | \ |
131 | M_MC_IOB1HIGHPRIORITY | V_MC_QUEUE_SIZE_DEFAULT | 131 | M_MC_IOB1HIGHPRIORITY | V_MC_QUEUE_SIZE_DEFAULT |
132 | 132 | ||
133 | 133 | ||
134 | /* | 134 | /* |
@@ -137,96 +137,96 @@ | |||
137 | * Note: this field has been updated to be consistent with the errata to 0.2 | 137 | * Note: this field has been updated to be consistent with the errata to 0.2 |
138 | */ | 138 | */ |
139 | 139 | ||
140 | #define S_MC_CLK_RATIO 0 | 140 | #define S_MC_CLK_RATIO 0 |
141 | #define M_MC_CLK_RATIO _SB_MAKEMASK(4, S_MC_CLK_RATIO) | 141 | #define M_MC_CLK_RATIO _SB_MAKEMASK(4, S_MC_CLK_RATIO) |
142 | #define V_MC_CLK_RATIO(x) _SB_MAKEVALUE(x, S_MC_CLK_RATIO) | 142 | #define V_MC_CLK_RATIO(x) _SB_MAKEVALUE(x, S_MC_CLK_RATIO) |
143 | #define G_MC_CLK_RATIO(x) _SB_GETVALUE(x, S_MC_CLK_RATIO, M_MC_CLK_RATIO) | 143 | #define G_MC_CLK_RATIO(x) _SB_GETVALUE(x, S_MC_CLK_RATIO, M_MC_CLK_RATIO) |
144 | 144 | ||
145 | #define K_MC_CLK_RATIO_2X 4 | 145 | #define K_MC_CLK_RATIO_2X 4 |
146 | #define K_MC_CLK_RATIO_25X 5 | 146 | #define K_MC_CLK_RATIO_25X 5 |
147 | #define K_MC_CLK_RATIO_3X 6 | 147 | #define K_MC_CLK_RATIO_3X 6 |
148 | #define K_MC_CLK_RATIO_35X 7 | 148 | #define K_MC_CLK_RATIO_35X 7 |
149 | #define K_MC_CLK_RATIO_4X 8 | 149 | #define K_MC_CLK_RATIO_4X 8 |
150 | #define K_MC_CLK_RATIO_45X 9 | 150 | #define K_MC_CLK_RATIO_45X 9 |
151 | 151 | ||
152 | #define V_MC_CLK_RATIO_2X V_MC_CLK_RATIO(K_MC_CLK_RATIO_2X) | 152 | #define V_MC_CLK_RATIO_2X V_MC_CLK_RATIO(K_MC_CLK_RATIO_2X) |
153 | #define V_MC_CLK_RATIO_25X V_MC_CLK_RATIO(K_MC_CLK_RATIO_25X) | 153 | #define V_MC_CLK_RATIO_25X V_MC_CLK_RATIO(K_MC_CLK_RATIO_25X) |
154 | #define V_MC_CLK_RATIO_3X V_MC_CLK_RATIO(K_MC_CLK_RATIO_3X) | 154 | #define V_MC_CLK_RATIO_3X V_MC_CLK_RATIO(K_MC_CLK_RATIO_3X) |
155 | #define V_MC_CLK_RATIO_35X V_MC_CLK_RATIO(K_MC_CLK_RATIO_35X) | 155 | #define V_MC_CLK_RATIO_35X V_MC_CLK_RATIO(K_MC_CLK_RATIO_35X) |
156 | #define V_MC_CLK_RATIO_4X V_MC_CLK_RATIO(K_MC_CLK_RATIO_4X) | 156 | #define V_MC_CLK_RATIO_4X V_MC_CLK_RATIO(K_MC_CLK_RATIO_4X) |
157 | #define V_MC_CLK_RATIO_45X V_MC_CLK_RATIO(K_MC_CLK_RATIO_45X) | 157 | #define V_MC_CLK_RATIO_45X V_MC_CLK_RATIO(K_MC_CLK_RATIO_45X) |
158 | #define V_MC_CLK_RATIO_DEFAULT V_MC_CLK_RATIO_25X | 158 | #define V_MC_CLK_RATIO_DEFAULT V_MC_CLK_RATIO_25X |
159 | 159 | ||
160 | #define S_MC_REF_RATE 8 | 160 | #define S_MC_REF_RATE 8 |
161 | #define M_MC_REF_RATE _SB_MAKEMASK(8, S_MC_REF_RATE) | 161 | #define M_MC_REF_RATE _SB_MAKEMASK(8, S_MC_REF_RATE) |
162 | #define V_MC_REF_RATE(x) _SB_MAKEVALUE(x, S_MC_REF_RATE) | 162 | #define V_MC_REF_RATE(x) _SB_MAKEVALUE(x, S_MC_REF_RATE) |
163 | #define G_MC_REF_RATE(x) _SB_GETVALUE(x, S_MC_REF_RATE, M_MC_REF_RATE) | 163 | #define G_MC_REF_RATE(x) _SB_GETVALUE(x, S_MC_REF_RATE, M_MC_REF_RATE) |
164 | 164 | ||
165 | #define K_MC_REF_RATE_100MHz 0x62 | 165 | #define K_MC_REF_RATE_100MHz 0x62 |
166 | #define K_MC_REF_RATE_133MHz 0x81 | 166 | #define K_MC_REF_RATE_133MHz 0x81 |
167 | #define K_MC_REF_RATE_200MHz 0xC4 | 167 | #define K_MC_REF_RATE_200MHz 0xC4 |
168 | 168 | ||
169 | #define V_MC_REF_RATE_100MHz V_MC_REF_RATE(K_MC_REF_RATE_100MHz) | 169 | #define V_MC_REF_RATE_100MHz V_MC_REF_RATE(K_MC_REF_RATE_100MHz) |
170 | #define V_MC_REF_RATE_133MHz V_MC_REF_RATE(K_MC_REF_RATE_133MHz) | 170 | #define V_MC_REF_RATE_133MHz V_MC_REF_RATE(K_MC_REF_RATE_133MHz) |
171 | #define V_MC_REF_RATE_200MHz V_MC_REF_RATE(K_MC_REF_RATE_200MHz) | 171 | #define V_MC_REF_RATE_200MHz V_MC_REF_RATE(K_MC_REF_RATE_200MHz) |
172 | #define V_MC_REF_RATE_DEFAULT V_MC_REF_RATE_100MHz | 172 | #define V_MC_REF_RATE_DEFAULT V_MC_REF_RATE_100MHz |
173 | 173 | ||
174 | #define S_MC_CLOCK_DRIVE 16 | 174 | #define S_MC_CLOCK_DRIVE 16 |
175 | #define M_MC_CLOCK_DRIVE _SB_MAKEMASK(4, S_MC_CLOCK_DRIVE) | 175 | #define M_MC_CLOCK_DRIVE _SB_MAKEMASK(4, S_MC_CLOCK_DRIVE) |
176 | #define V_MC_CLOCK_DRIVE(x) _SB_MAKEVALUE(x, S_MC_CLOCK_DRIVE) | 176 | #define V_MC_CLOCK_DRIVE(x) _SB_MAKEVALUE(x, S_MC_CLOCK_DRIVE) |
177 | #define G_MC_CLOCK_DRIVE(x) _SB_GETVALUE(x, S_MC_CLOCK_DRIVE, M_MC_CLOCK_DRIVE) | 177 | #define G_MC_CLOCK_DRIVE(x) _SB_GETVALUE(x, S_MC_CLOCK_DRIVE, M_MC_CLOCK_DRIVE) |
178 | #define V_MC_CLOCK_DRIVE_DEFAULT V_MC_CLOCK_DRIVE(0xF) | 178 | #define V_MC_CLOCK_DRIVE_DEFAULT V_MC_CLOCK_DRIVE(0xF) |
179 | 179 | ||
180 | #define S_MC_DATA_DRIVE 20 | 180 | #define S_MC_DATA_DRIVE 20 |
181 | #define M_MC_DATA_DRIVE _SB_MAKEMASK(4, S_MC_DATA_DRIVE) | 181 | #define M_MC_DATA_DRIVE _SB_MAKEMASK(4, S_MC_DATA_DRIVE) |
182 | #define V_MC_DATA_DRIVE(x) _SB_MAKEVALUE(x, S_MC_DATA_DRIVE) | 182 | #define V_MC_DATA_DRIVE(x) _SB_MAKEVALUE(x, S_MC_DATA_DRIVE) |
183 | #define G_MC_DATA_DRIVE(x) _SB_GETVALUE(x, S_MC_DATA_DRIVE, M_MC_DATA_DRIVE) | 183 | #define G_MC_DATA_DRIVE(x) _SB_GETVALUE(x, S_MC_DATA_DRIVE, M_MC_DATA_DRIVE) |
184 | #define V_MC_DATA_DRIVE_DEFAULT V_MC_DATA_DRIVE(0x0) | 184 | #define V_MC_DATA_DRIVE_DEFAULT V_MC_DATA_DRIVE(0x0) |
185 | 185 | ||
186 | #define S_MC_ADDR_DRIVE 24 | 186 | #define S_MC_ADDR_DRIVE 24 |
187 | #define M_MC_ADDR_DRIVE _SB_MAKEMASK(4, S_MC_ADDR_DRIVE) | 187 | #define M_MC_ADDR_DRIVE _SB_MAKEMASK(4, S_MC_ADDR_DRIVE) |
188 | #define V_MC_ADDR_DRIVE(x) _SB_MAKEVALUE(x, S_MC_ADDR_DRIVE) | 188 | #define V_MC_ADDR_DRIVE(x) _SB_MAKEVALUE(x, S_MC_ADDR_DRIVE) |
189 | #define G_MC_ADDR_DRIVE(x) _SB_GETVALUE(x, S_MC_ADDR_DRIVE, M_MC_ADDR_DRIVE) | 189 | #define G_MC_ADDR_DRIVE(x) _SB_GETVALUE(x, S_MC_ADDR_DRIVE, M_MC_ADDR_DRIVE) |
190 | #define V_MC_ADDR_DRIVE_DEFAULT V_MC_ADDR_DRIVE(0x0) | 190 | #define V_MC_ADDR_DRIVE_DEFAULT V_MC_ADDR_DRIVE(0x0) |
191 | 191 | ||
192 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) | 192 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
193 | #define M_MC_REF_DISABLE _SB_MAKEMASK1(30) | 193 | #define M_MC_REF_DISABLE _SB_MAKEMASK1(30) |
194 | #endif /* 1250 PASS3 || 112x PASS1 */ | 194 | #endif /* 1250 PASS3 || 112x PASS1 */ |
195 | 195 | ||
196 | #define M_MC_DLL_BYPASS _SB_MAKEMASK1(31) | 196 | #define M_MC_DLL_BYPASS _SB_MAKEMASK1(31) |
197 | 197 | ||
198 | #define S_MC_DQI_SKEW 32 | 198 | #define S_MC_DQI_SKEW 32 |
199 | #define M_MC_DQI_SKEW _SB_MAKEMASK(8, S_MC_DQI_SKEW) | 199 | #define M_MC_DQI_SKEW _SB_MAKEMASK(8, S_MC_DQI_SKEW) |
200 | #define V_MC_DQI_SKEW(x) _SB_MAKEVALUE(x, S_MC_DQI_SKEW) | 200 | #define V_MC_DQI_SKEW(x) _SB_MAKEVALUE(x, S_MC_DQI_SKEW) |
201 | #define G_MC_DQI_SKEW(x) _SB_GETVALUE(x, S_MC_DQI_SKEW, M_MC_DQI_SKEW) | 201 | #define G_MC_DQI_SKEW(x) _SB_GETVALUE(x, S_MC_DQI_SKEW, M_MC_DQI_SKEW) |
202 | #define V_MC_DQI_SKEW_DEFAULT V_MC_DQI_SKEW(0) | 202 | #define V_MC_DQI_SKEW_DEFAULT V_MC_DQI_SKEW(0) |
203 | 203 | ||
204 | #define S_MC_DQO_SKEW 40 | 204 | #define S_MC_DQO_SKEW 40 |
205 | #define M_MC_DQO_SKEW _SB_MAKEMASK(8, S_MC_DQO_SKEW) | 205 | #define M_MC_DQO_SKEW _SB_MAKEMASK(8, S_MC_DQO_SKEW) |
206 | #define V_MC_DQO_SKEW(x) _SB_MAKEVALUE(x, S_MC_DQO_SKEW) | 206 | #define V_MC_DQO_SKEW(x) _SB_MAKEVALUE(x, S_MC_DQO_SKEW) |
207 | #define G_MC_DQO_SKEW(x) _SB_GETVALUE(x, S_MC_DQO_SKEW, M_MC_DQO_SKEW) | 207 | #define G_MC_DQO_SKEW(x) _SB_GETVALUE(x, S_MC_DQO_SKEW, M_MC_DQO_SKEW) |
208 | #define V_MC_DQO_SKEW_DEFAULT V_MC_DQO_SKEW(0) | 208 | #define V_MC_DQO_SKEW_DEFAULT V_MC_DQO_SKEW(0) |
209 | 209 | ||
210 | #define S_MC_ADDR_SKEW 48 | 210 | #define S_MC_ADDR_SKEW 48 |
211 | #define M_MC_ADDR_SKEW _SB_MAKEMASK(8, S_MC_ADDR_SKEW) | 211 | #define M_MC_ADDR_SKEW _SB_MAKEMASK(8, S_MC_ADDR_SKEW) |
212 | #define V_MC_ADDR_SKEW(x) _SB_MAKEVALUE(x, S_MC_ADDR_SKEW) | 212 | #define V_MC_ADDR_SKEW(x) _SB_MAKEVALUE(x, S_MC_ADDR_SKEW) |
213 | #define G_MC_ADDR_SKEW(x) _SB_GETVALUE(x, S_MC_ADDR_SKEW, M_MC_ADDR_SKEW) | 213 | #define G_MC_ADDR_SKEW(x) _SB_GETVALUE(x, S_MC_ADDR_SKEW, M_MC_ADDR_SKEW) |
214 | #define V_MC_ADDR_SKEW_DEFAULT V_MC_ADDR_SKEW(0x0F) | 214 | #define V_MC_ADDR_SKEW_DEFAULT V_MC_ADDR_SKEW(0x0F) |
215 | 215 | ||
216 | #define S_MC_DLL_DEFAULT 56 | 216 | #define S_MC_DLL_DEFAULT 56 |
217 | #define M_MC_DLL_DEFAULT _SB_MAKEMASK(8, S_MC_DLL_DEFAULT) | 217 | #define M_MC_DLL_DEFAULT _SB_MAKEMASK(8, S_MC_DLL_DEFAULT) |
218 | #define V_MC_DLL_DEFAULT(x) _SB_MAKEVALUE(x, S_MC_DLL_DEFAULT) | 218 | #define V_MC_DLL_DEFAULT(x) _SB_MAKEVALUE(x, S_MC_DLL_DEFAULT) |
219 | #define G_MC_DLL_DEFAULT(x) _SB_GETVALUE(x, S_MC_DLL_DEFAULT, M_MC_DLL_DEFAULT) | 219 | #define G_MC_DLL_DEFAULT(x) _SB_GETVALUE(x, S_MC_DLL_DEFAULT, M_MC_DLL_DEFAULT) |
220 | #define V_MC_DLL_DEFAULT_DEFAULT V_MC_DLL_DEFAULT(0x10) | 220 | #define V_MC_DLL_DEFAULT_DEFAULT V_MC_DLL_DEFAULT(0x10) |
221 | 221 | ||
222 | #define V_MC_CLKCONFIG_DEFAULT V_MC_DLL_DEFAULT_DEFAULT | \ | 222 | #define V_MC_CLKCONFIG_DEFAULT V_MC_DLL_DEFAULT_DEFAULT | \ |
223 | V_MC_ADDR_SKEW_DEFAULT | \ | 223 | V_MC_ADDR_SKEW_DEFAULT | \ |
224 | V_MC_DQO_SKEW_DEFAULT | \ | 224 | V_MC_DQO_SKEW_DEFAULT | \ |
225 | V_MC_DQI_SKEW_DEFAULT | \ | 225 | V_MC_DQI_SKEW_DEFAULT | \ |
226 | V_MC_ADDR_DRIVE_DEFAULT | \ | 226 | V_MC_ADDR_DRIVE_DEFAULT | \ |
227 | V_MC_DATA_DRIVE_DEFAULT | \ | 227 | V_MC_DATA_DRIVE_DEFAULT | \ |
228 | V_MC_CLOCK_DRIVE_DEFAULT | \ | 228 | V_MC_CLOCK_DRIVE_DEFAULT | \ |
229 | V_MC_REF_RATE_DEFAULT | 229 | V_MC_REF_RATE_DEFAULT |
230 | 230 | ||
231 | 231 | ||
232 | 232 | ||
@@ -234,68 +234,68 @@ | |||
234 | * DRAM Command Register (Table 6-13) | 234 | * DRAM Command Register (Table 6-13) |
235 | */ | 235 | */ |
236 | 236 | ||
237 | #define S_MC_COMMAND 0 | 237 | #define S_MC_COMMAND 0 |
238 | #define M_MC_COMMAND _SB_MAKEMASK(4, S_MC_COMMAND) | 238 | #define M_MC_COMMAND _SB_MAKEMASK(4, S_MC_COMMAND) |
239 | #define V_MC_COMMAND(x) _SB_MAKEVALUE(x, S_MC_COMMAND) | 239 | #define V_MC_COMMAND(x) _SB_MAKEVALUE(x, S_MC_COMMAND) |
240 | #define G_MC_COMMAND(x) _SB_GETVALUE(x, S_MC_COMMAND, M_MC_COMMAND) | 240 | #define G_MC_COMMAND(x) _SB_GETVALUE(x, S_MC_COMMAND, M_MC_COMMAND) |
241 | 241 | ||
242 | #define K_MC_COMMAND_EMRS 0 | 242 | #define K_MC_COMMAND_EMRS 0 |
243 | #define K_MC_COMMAND_MRS 1 | 243 | #define K_MC_COMMAND_MRS 1 |
244 | #define K_MC_COMMAND_PRE 2 | 244 | #define K_MC_COMMAND_PRE 2 |
245 | #define K_MC_COMMAND_AR 3 | 245 | #define K_MC_COMMAND_AR 3 |
246 | #define K_MC_COMMAND_SETRFSH 4 | 246 | #define K_MC_COMMAND_SETRFSH 4 |
247 | #define K_MC_COMMAND_CLRRFSH 5 | 247 | #define K_MC_COMMAND_CLRRFSH 5 |
248 | #define K_MC_COMMAND_SETPWRDN 6 | 248 | #define K_MC_COMMAND_SETPWRDN 6 |
249 | #define K_MC_COMMAND_CLRPWRDN 7 | 249 | #define K_MC_COMMAND_CLRPWRDN 7 |
250 | 250 | ||
251 | #define V_MC_COMMAND_EMRS V_MC_COMMAND(K_MC_COMMAND_EMRS) | 251 | #define V_MC_COMMAND_EMRS V_MC_COMMAND(K_MC_COMMAND_EMRS) |
252 | #define V_MC_COMMAND_MRS V_MC_COMMAND(K_MC_COMMAND_MRS) | 252 | #define V_MC_COMMAND_MRS V_MC_COMMAND(K_MC_COMMAND_MRS) |
253 | #define V_MC_COMMAND_PRE V_MC_COMMAND(K_MC_COMMAND_PRE) | 253 | #define V_MC_COMMAND_PRE V_MC_COMMAND(K_MC_COMMAND_PRE) |
254 | #define V_MC_COMMAND_AR V_MC_COMMAND(K_MC_COMMAND_AR) | 254 | #define V_MC_COMMAND_AR V_MC_COMMAND(K_MC_COMMAND_AR) |
255 | #define V_MC_COMMAND_SETRFSH V_MC_COMMAND(K_MC_COMMAND_SETRFSH) | 255 | #define V_MC_COMMAND_SETRFSH V_MC_COMMAND(K_MC_COMMAND_SETRFSH) |
256 | #define V_MC_COMMAND_CLRRFSH V_MC_COMMAND(K_MC_COMMAND_CLRRFSH) | 256 | #define V_MC_COMMAND_CLRRFSH V_MC_COMMAND(K_MC_COMMAND_CLRRFSH) |
257 | #define V_MC_COMMAND_SETPWRDN V_MC_COMMAND(K_MC_COMMAND_SETPWRDN) | 257 | #define V_MC_COMMAND_SETPWRDN V_MC_COMMAND(K_MC_COMMAND_SETPWRDN) |
258 | #define V_MC_COMMAND_CLRPWRDN V_MC_COMMAND(K_MC_COMMAND_CLRPWRDN) | 258 | #define V_MC_COMMAND_CLRPWRDN V_MC_COMMAND(K_MC_COMMAND_CLRPWRDN) |
259 | 259 | ||
260 | #define M_MC_CS0 _SB_MAKEMASK1(4) | 260 | #define M_MC_CS0 _SB_MAKEMASK1(4) |
261 | #define M_MC_CS1 _SB_MAKEMASK1(5) | 261 | #define M_MC_CS1 _SB_MAKEMASK1(5) |
262 | #define M_MC_CS2 _SB_MAKEMASK1(6) | 262 | #define M_MC_CS2 _SB_MAKEMASK1(6) |
263 | #define M_MC_CS3 _SB_MAKEMASK1(7) | 263 | #define M_MC_CS3 _SB_MAKEMASK1(7) |
264 | 264 | ||
265 | /* | 265 | /* |
266 | * DRAM Mode Register (Table 6-14) | 266 | * DRAM Mode Register (Table 6-14) |
267 | */ | 267 | */ |
268 | 268 | ||
269 | #define S_MC_EMODE 0 | 269 | #define S_MC_EMODE 0 |
270 | #define M_MC_EMODE _SB_MAKEMASK(15, S_MC_EMODE) | 270 | #define M_MC_EMODE _SB_MAKEMASK(15, S_MC_EMODE) |
271 | #define V_MC_EMODE(x) _SB_MAKEVALUE(x, S_MC_EMODE) | 271 | #define V_MC_EMODE(x) _SB_MAKEVALUE(x, S_MC_EMODE) |
272 | #define G_MC_EMODE(x) _SB_GETVALUE(x, S_MC_EMODE, M_MC_EMODE) | 272 | #define G_MC_EMODE(x) _SB_GETVALUE(x, S_MC_EMODE, M_MC_EMODE) |
273 | #define V_MC_EMODE_DEFAULT V_MC_EMODE(0) | 273 | #define V_MC_EMODE_DEFAULT V_MC_EMODE(0) |
274 | 274 | ||
275 | #define S_MC_MODE 16 | 275 | #define S_MC_MODE 16 |
276 | #define M_MC_MODE _SB_MAKEMASK(15, S_MC_MODE) | 276 | #define M_MC_MODE _SB_MAKEMASK(15, S_MC_MODE) |
277 | #define V_MC_MODE(x) _SB_MAKEVALUE(x, S_MC_MODE) | 277 | #define V_MC_MODE(x) _SB_MAKEVALUE(x, S_MC_MODE) |
278 | #define G_MC_MODE(x) _SB_GETVALUE(x, S_MC_MODE, M_MC_MODE) | 278 | #define G_MC_MODE(x) _SB_GETVALUE(x, S_MC_MODE, M_MC_MODE) |
279 | #define V_MC_MODE_DEFAULT V_MC_MODE(0x22) | 279 | #define V_MC_MODE_DEFAULT V_MC_MODE(0x22) |
280 | 280 | ||
281 | #define S_MC_DRAM_TYPE 32 | 281 | #define S_MC_DRAM_TYPE 32 |
282 | #define M_MC_DRAM_TYPE _SB_MAKEMASK(3, S_MC_DRAM_TYPE) | 282 | #define M_MC_DRAM_TYPE _SB_MAKEMASK(3, S_MC_DRAM_TYPE) |
283 | #define V_MC_DRAM_TYPE(x) _SB_MAKEVALUE(x, S_MC_DRAM_TYPE) | 283 | #define V_MC_DRAM_TYPE(x) _SB_MAKEVALUE(x, S_MC_DRAM_TYPE) |
284 | #define G_MC_DRAM_TYPE(x) _SB_GETVALUE(x, S_MC_DRAM_TYPE, M_MC_DRAM_TYPE) | 284 | #define G_MC_DRAM_TYPE(x) _SB_GETVALUE(x, S_MC_DRAM_TYPE, M_MC_DRAM_TYPE) |
285 | 285 | ||
286 | #define K_MC_DRAM_TYPE_JEDEC 0 | 286 | #define K_MC_DRAM_TYPE_JEDEC 0 |
287 | #define K_MC_DRAM_TYPE_FCRAM 1 | 287 | #define K_MC_DRAM_TYPE_FCRAM 1 |
288 | #define K_MC_DRAM_TYPE_SGRAM 2 | 288 | #define K_MC_DRAM_TYPE_SGRAM 2 |
289 | 289 | ||
290 | #define V_MC_DRAM_TYPE_JEDEC V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_JEDEC) | 290 | #define V_MC_DRAM_TYPE_JEDEC V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_JEDEC) |
291 | #define V_MC_DRAM_TYPE_FCRAM V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_FCRAM) | 291 | #define V_MC_DRAM_TYPE_FCRAM V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_FCRAM) |
292 | #define V_MC_DRAM_TYPE_SGRAM V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_SGRAM) | 292 | #define V_MC_DRAM_TYPE_SGRAM V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_SGRAM) |
293 | 293 | ||
294 | #define M_MC_EXTERNALDECODE _SB_MAKEMASK1(35) | 294 | #define M_MC_EXTERNALDECODE _SB_MAKEMASK1(35) |
295 | 295 | ||
296 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) | 296 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
297 | #define M_MC_PRE_ON_A8 _SB_MAKEMASK1(36) | 297 | #define M_MC_PRE_ON_A8 _SB_MAKEMASK1(36) |
298 | #define M_MC_RAM_WITH_A13 _SB_MAKEMASK1(37) | 298 | #define M_MC_RAM_WITH_A13 _SB_MAKEMASK1(37) |
299 | #endif /* 1250 PASS3 || 112x PASS1 */ | 299 | #endif /* 1250 PASS3 || 112x PASS1 */ |
300 | 300 | ||
301 | 301 | ||
@@ -308,99 +308,99 @@ | |||
308 | #define M_MC_r2wIDLE_TWOCYCLES _SB_MAKEMASK1(61) | 308 | #define M_MC_r2wIDLE_TWOCYCLES _SB_MAKEMASK1(61) |
309 | #define M_MC_r2rIDLE_TWOCYCLES _SB_MAKEMASK1(62) | 309 | #define M_MC_r2rIDLE_TWOCYCLES _SB_MAKEMASK1(62) |
310 | 310 | ||
311 | #define S_MC_tFIFO 56 | 311 | #define S_MC_tFIFO 56 |
312 | #define M_MC_tFIFO _SB_MAKEMASK(4, S_MC_tFIFO) | 312 | #define M_MC_tFIFO _SB_MAKEMASK(4, S_MC_tFIFO) |
313 | #define V_MC_tFIFO(x) _SB_MAKEVALUE(x, S_MC_tFIFO) | 313 | #define V_MC_tFIFO(x) _SB_MAKEVALUE(x, S_MC_tFIFO) |
314 | #define G_MC_tFIFO(x) _SB_GETVALUE(x, S_MC_tFIFO, M_MC_tFIFO) | 314 | #define G_MC_tFIFO(x) _SB_GETVALUE(x, S_MC_tFIFO, M_MC_tFIFO) |
315 | #define K_MC_tFIFO_DEFAULT 1 | 315 | #define K_MC_tFIFO_DEFAULT 1 |
316 | #define V_MC_tFIFO_DEFAULT V_MC_tFIFO(K_MC_tFIFO_DEFAULT) | 316 | #define V_MC_tFIFO_DEFAULT V_MC_tFIFO(K_MC_tFIFO_DEFAULT) |
317 | 317 | ||
318 | #define S_MC_tRFC 52 | 318 | #define S_MC_tRFC 52 |
319 | #define M_MC_tRFC _SB_MAKEMASK(4, S_MC_tRFC) | 319 | #define M_MC_tRFC _SB_MAKEMASK(4, S_MC_tRFC) |
320 | #define V_MC_tRFC(x) _SB_MAKEVALUE(x, S_MC_tRFC) | 320 | #define V_MC_tRFC(x) _SB_MAKEVALUE(x, S_MC_tRFC) |
321 | #define G_MC_tRFC(x) _SB_GETVALUE(x, S_MC_tRFC, M_MC_tRFC) | 321 | #define G_MC_tRFC(x) _SB_GETVALUE(x, S_MC_tRFC, M_MC_tRFC) |
322 | #define K_MC_tRFC_DEFAULT 12 | 322 | #define K_MC_tRFC_DEFAULT 12 |
323 | #define V_MC_tRFC_DEFAULT V_MC_tRFC(K_MC_tRFC_DEFAULT) | 323 | #define V_MC_tRFC_DEFAULT V_MC_tRFC(K_MC_tRFC_DEFAULT) |
324 | 324 | ||
325 | #if SIBYTE_HDR_FEATURE(1250, PASS3) | 325 | #if SIBYTE_HDR_FEATURE(1250, PASS3) |
326 | #define M_MC_tRFC_PLUS16 _SB_MAKEMASK1(51) /* 1250C3 and later. */ | 326 | #define M_MC_tRFC_PLUS16 _SB_MAKEMASK1(51) /* 1250C3 and later. */ |
327 | #endif | 327 | #endif |
328 | 328 | ||
329 | #define S_MC_tCwCr 40 | 329 | #define S_MC_tCwCr 40 |
330 | #define M_MC_tCwCr _SB_MAKEMASK(4, S_MC_tCwCr) | 330 | #define M_MC_tCwCr _SB_MAKEMASK(4, S_MC_tCwCr) |
331 | #define V_MC_tCwCr(x) _SB_MAKEVALUE(x, S_MC_tCwCr) | 331 | #define V_MC_tCwCr(x) _SB_MAKEVALUE(x, S_MC_tCwCr) |
332 | #define G_MC_tCwCr(x) _SB_GETVALUE(x, S_MC_tCwCr, M_MC_tCwCr) | 332 | #define G_MC_tCwCr(x) _SB_GETVALUE(x, S_MC_tCwCr, M_MC_tCwCr) |
333 | #define K_MC_tCwCr_DEFAULT 4 | 333 | #define K_MC_tCwCr_DEFAULT 4 |
334 | #define V_MC_tCwCr_DEFAULT V_MC_tCwCr(K_MC_tCwCr_DEFAULT) | 334 | #define V_MC_tCwCr_DEFAULT V_MC_tCwCr(K_MC_tCwCr_DEFAULT) |
335 | 335 | ||
336 | #define S_MC_tRCr 28 | 336 | #define S_MC_tRCr 28 |
337 | #define M_MC_tRCr _SB_MAKEMASK(4, S_MC_tRCr) | 337 | #define M_MC_tRCr _SB_MAKEMASK(4, S_MC_tRCr) |
338 | #define V_MC_tRCr(x) _SB_MAKEVALUE(x, S_MC_tRCr) | 338 | #define V_MC_tRCr(x) _SB_MAKEVALUE(x, S_MC_tRCr) |
339 | #define G_MC_tRCr(x) _SB_GETVALUE(x, S_MC_tRCr, M_MC_tRCr) | 339 | #define G_MC_tRCr(x) _SB_GETVALUE(x, S_MC_tRCr, M_MC_tRCr) |
340 | #define K_MC_tRCr_DEFAULT 9 | 340 | #define K_MC_tRCr_DEFAULT 9 |
341 | #define V_MC_tRCr_DEFAULT V_MC_tRCr(K_MC_tRCr_DEFAULT) | 341 | #define V_MC_tRCr_DEFAULT V_MC_tRCr(K_MC_tRCr_DEFAULT) |
342 | 342 | ||
343 | #define S_MC_tRCw 24 | 343 | #define S_MC_tRCw 24 |
344 | #define M_MC_tRCw _SB_MAKEMASK(4, S_MC_tRCw) | 344 | #define M_MC_tRCw _SB_MAKEMASK(4, S_MC_tRCw) |
345 | #define V_MC_tRCw(x) _SB_MAKEVALUE(x, S_MC_tRCw) | 345 | #define V_MC_tRCw(x) _SB_MAKEVALUE(x, S_MC_tRCw) |
346 | #define G_MC_tRCw(x) _SB_GETVALUE(x, S_MC_tRCw, M_MC_tRCw) | 346 | #define G_MC_tRCw(x) _SB_GETVALUE(x, S_MC_tRCw, M_MC_tRCw) |
347 | #define K_MC_tRCw_DEFAULT 10 | 347 | #define K_MC_tRCw_DEFAULT 10 |
348 | #define V_MC_tRCw_DEFAULT V_MC_tRCw(K_MC_tRCw_DEFAULT) | 348 | #define V_MC_tRCw_DEFAULT V_MC_tRCw(K_MC_tRCw_DEFAULT) |
349 | 349 | ||
350 | #define S_MC_tRRD 20 | 350 | #define S_MC_tRRD 20 |
351 | #define M_MC_tRRD _SB_MAKEMASK(4, S_MC_tRRD) | 351 | #define M_MC_tRRD _SB_MAKEMASK(4, S_MC_tRRD) |
352 | #define V_MC_tRRD(x) _SB_MAKEVALUE(x, S_MC_tRRD) | 352 | #define V_MC_tRRD(x) _SB_MAKEVALUE(x, S_MC_tRRD) |
353 | #define G_MC_tRRD(x) _SB_GETVALUE(x, S_MC_tRRD, M_MC_tRRD) | 353 | #define G_MC_tRRD(x) _SB_GETVALUE(x, S_MC_tRRD, M_MC_tRRD) |
354 | #define K_MC_tRRD_DEFAULT 2 | 354 | #define K_MC_tRRD_DEFAULT 2 |
355 | #define V_MC_tRRD_DEFAULT V_MC_tRRD(K_MC_tRRD_DEFAULT) | 355 | #define V_MC_tRRD_DEFAULT V_MC_tRRD(K_MC_tRRD_DEFAULT) |
356 | 356 | ||
357 | #define S_MC_tRP 16 | 357 | #define S_MC_tRP 16 |
358 | #define M_MC_tRP _SB_MAKEMASK(4, S_MC_tRP) | 358 | #define M_MC_tRP _SB_MAKEMASK(4, S_MC_tRP) |
359 | #define V_MC_tRP(x) _SB_MAKEVALUE(x, S_MC_tRP) | 359 | #define V_MC_tRP(x) _SB_MAKEVALUE(x, S_MC_tRP) |
360 | #define G_MC_tRP(x) _SB_GETVALUE(x, S_MC_tRP, M_MC_tRP) | 360 | #define G_MC_tRP(x) _SB_GETVALUE(x, S_MC_tRP, M_MC_tRP) |
361 | #define K_MC_tRP_DEFAULT 4 | 361 | #define K_MC_tRP_DEFAULT 4 |
362 | #define V_MC_tRP_DEFAULT V_MC_tRP(K_MC_tRP_DEFAULT) | 362 | #define V_MC_tRP_DEFAULT V_MC_tRP(K_MC_tRP_DEFAULT) |
363 | 363 | ||
364 | #define S_MC_tCwD 8 | 364 | #define S_MC_tCwD 8 |
365 | #define M_MC_tCwD _SB_MAKEMASK(4, S_MC_tCwD) | 365 | #define M_MC_tCwD _SB_MAKEMASK(4, S_MC_tCwD) |
366 | #define V_MC_tCwD(x) _SB_MAKEVALUE(x, S_MC_tCwD) | 366 | #define V_MC_tCwD(x) _SB_MAKEVALUE(x, S_MC_tCwD) |
367 | #define G_MC_tCwD(x) _SB_GETVALUE(x, S_MC_tCwD, M_MC_tCwD) | 367 | #define G_MC_tCwD(x) _SB_GETVALUE(x, S_MC_tCwD, M_MC_tCwD) |
368 | #define K_MC_tCwD_DEFAULT 1 | 368 | #define K_MC_tCwD_DEFAULT 1 |
369 | #define V_MC_tCwD_DEFAULT V_MC_tCwD(K_MC_tCwD_DEFAULT) | 369 | #define V_MC_tCwD_DEFAULT V_MC_tCwD(K_MC_tCwD_DEFAULT) |
370 | 370 | ||
371 | #define M_tCrDh _SB_MAKEMASK1(7) | 371 | #define M_tCrDh _SB_MAKEMASK1(7) |
372 | #define M_MC_tCrDh M_tCrDh | 372 | #define M_MC_tCrDh M_tCrDh |
373 | 373 | ||
374 | #define S_MC_tCrD 4 | 374 | #define S_MC_tCrD 4 |
375 | #define M_MC_tCrD _SB_MAKEMASK(3, S_MC_tCrD) | 375 | #define M_MC_tCrD _SB_MAKEMASK(3, S_MC_tCrD) |
376 | #define V_MC_tCrD(x) _SB_MAKEVALUE(x, S_MC_tCrD) | 376 | #define V_MC_tCrD(x) _SB_MAKEVALUE(x, S_MC_tCrD) |
377 | #define G_MC_tCrD(x) _SB_GETVALUE(x, S_MC_tCrD, M_MC_tCrD) | 377 | #define G_MC_tCrD(x) _SB_GETVALUE(x, S_MC_tCrD, M_MC_tCrD) |
378 | #define K_MC_tCrD_DEFAULT 2 | 378 | #define K_MC_tCrD_DEFAULT 2 |
379 | #define V_MC_tCrD_DEFAULT V_MC_tCrD(K_MC_tCrD_DEFAULT) | 379 | #define V_MC_tCrD_DEFAULT V_MC_tCrD(K_MC_tCrD_DEFAULT) |
380 | 380 | ||
381 | #define S_MC_tRCD 0 | 381 | #define S_MC_tRCD 0 |
382 | #define M_MC_tRCD _SB_MAKEMASK(4, S_MC_tRCD) | 382 | #define M_MC_tRCD _SB_MAKEMASK(4, S_MC_tRCD) |
383 | #define V_MC_tRCD(x) _SB_MAKEVALUE(x, S_MC_tRCD) | 383 | #define V_MC_tRCD(x) _SB_MAKEVALUE(x, S_MC_tRCD) |
384 | #define G_MC_tRCD(x) _SB_GETVALUE(x, S_MC_tRCD, M_MC_tRCD) | 384 | #define G_MC_tRCD(x) _SB_GETVALUE(x, S_MC_tRCD, M_MC_tRCD) |
385 | #define K_MC_tRCD_DEFAULT 3 | 385 | #define K_MC_tRCD_DEFAULT 3 |
386 | #define V_MC_tRCD_DEFAULT V_MC_tRCD(K_MC_tRCD_DEFAULT) | 386 | #define V_MC_tRCD_DEFAULT V_MC_tRCD(K_MC_tRCD_DEFAULT) |
387 | 387 | ||
388 | #define V_MC_TIMING_DEFAULT V_MC_tFIFO(K_MC_tFIFO_DEFAULT) | \ | 388 | #define V_MC_TIMING_DEFAULT V_MC_tFIFO(K_MC_tFIFO_DEFAULT) | \ |
389 | V_MC_tRFC(K_MC_tRFC_DEFAULT) | \ | 389 | V_MC_tRFC(K_MC_tRFC_DEFAULT) | \ |
390 | V_MC_tCwCr(K_MC_tCwCr_DEFAULT) | \ | 390 | V_MC_tCwCr(K_MC_tCwCr_DEFAULT) | \ |
391 | V_MC_tRCr(K_MC_tRCr_DEFAULT) | \ | 391 | V_MC_tRCr(K_MC_tRCr_DEFAULT) | \ |
392 | V_MC_tRCw(K_MC_tRCw_DEFAULT) | \ | 392 | V_MC_tRCw(K_MC_tRCw_DEFAULT) | \ |
393 | V_MC_tRRD(K_MC_tRRD_DEFAULT) | \ | 393 | V_MC_tRRD(K_MC_tRRD_DEFAULT) | \ |
394 | V_MC_tRP(K_MC_tRP_DEFAULT) | \ | 394 | V_MC_tRP(K_MC_tRP_DEFAULT) | \ |
395 | V_MC_tCwD(K_MC_tCwD_DEFAULT) | \ | 395 | V_MC_tCwD(K_MC_tCwD_DEFAULT) | \ |
396 | V_MC_tCrD(K_MC_tCrD_DEFAULT) | \ | 396 | V_MC_tCrD(K_MC_tCrD_DEFAULT) | \ |
397 | V_MC_tRCD(K_MC_tRCD_DEFAULT) | \ | 397 | V_MC_tRCD(K_MC_tRCD_DEFAULT) | \ |
398 | M_MC_r2rIDLE_TWOCYCLES | 398 | M_MC_r2rIDLE_TWOCYCLES |
399 | 399 | ||
400 | /* | 400 | /* |
401 | * Errata says these are not the default | 401 | * Errata says these are not the default |
402 | * M_MC_w2rIDLE_TWOCYCLES | \ | 402 | * M_MC_w2rIDLE_TWOCYCLES | \ |
403 | * M_MC_r2wIDLE_TWOCYCLES | \ | 403 | * M_MC_r2wIDLE_TWOCYCLES | \ |
404 | */ | 404 | */ |
405 | 405 | ||
406 | 406 | ||
@@ -408,143 +408,143 @@ | |||
408 | * Chip Select Start Address Register (Table 6-17) | 408 | * Chip Select Start Address Register (Table 6-17) |
409 | */ | 409 | */ |
410 | 410 | ||
411 | #define S_MC_CS0_START 0 | 411 | #define S_MC_CS0_START 0 |
412 | #define M_MC_CS0_START _SB_MAKEMASK(16, S_MC_CS0_START) | 412 | #define M_MC_CS0_START _SB_MAKEMASK(16, S_MC_CS0_START) |
413 | #define V_MC_CS0_START(x) _SB_MAKEVALUE(x, S_MC_CS0_START) | 413 | #define V_MC_CS0_START(x) _SB_MAKEVALUE(x, S_MC_CS0_START) |
414 | #define G_MC_CS0_START(x) _SB_GETVALUE(x, S_MC_CS0_START, M_MC_CS0_START) | 414 | #define G_MC_CS0_START(x) _SB_GETVALUE(x, S_MC_CS0_START, M_MC_CS0_START) |
415 | 415 | ||
416 | #define S_MC_CS1_START 16 | 416 | #define S_MC_CS1_START 16 |
417 | #define M_MC_CS1_START _SB_MAKEMASK(16, S_MC_CS1_START) | 417 | #define M_MC_CS1_START _SB_MAKEMASK(16, S_MC_CS1_START) |
418 | #define V_MC_CS1_START(x) _SB_MAKEVALUE(x, S_MC_CS1_START) | 418 | #define V_MC_CS1_START(x) _SB_MAKEVALUE(x, S_MC_CS1_START) |
419 | #define G_MC_CS1_START(x) _SB_GETVALUE(x, S_MC_CS1_START, M_MC_CS1_START) | 419 | #define G_MC_CS1_START(x) _SB_GETVALUE(x, S_MC_CS1_START, M_MC_CS1_START) |
420 | 420 | ||
421 | #define S_MC_CS2_START 32 | 421 | #define S_MC_CS2_START 32 |
422 | #define M_MC_CS2_START _SB_MAKEMASK(16, S_MC_CS2_START) | 422 | #define M_MC_CS2_START _SB_MAKEMASK(16, S_MC_CS2_START) |
423 | #define V_MC_CS2_START(x) _SB_MAKEVALUE(x, S_MC_CS2_START) | 423 | #define V_MC_CS2_START(x) _SB_MAKEVALUE(x, S_MC_CS2_START) |
424 | #define G_MC_CS2_START(x) _SB_GETVALUE(x, S_MC_CS2_START, M_MC_CS2_START) | 424 | #define G_MC_CS2_START(x) _SB_GETVALUE(x, S_MC_CS2_START, M_MC_CS2_START) |
425 | 425 | ||
426 | #define S_MC_CS3_START 48 | 426 | #define S_MC_CS3_START 48 |
427 | #define M_MC_CS3_START _SB_MAKEMASK(16, S_MC_CS3_START) | 427 | #define M_MC_CS3_START _SB_MAKEMASK(16, S_MC_CS3_START) |
428 | #define V_MC_CS3_START(x) _SB_MAKEVALUE(x, S_MC_CS3_START) | 428 | #define V_MC_CS3_START(x) _SB_MAKEVALUE(x, S_MC_CS3_START) |
429 | #define G_MC_CS3_START(x) _SB_GETVALUE(x, S_MC_CS3_START, M_MC_CS3_START) | 429 | #define G_MC_CS3_START(x) _SB_GETVALUE(x, S_MC_CS3_START, M_MC_CS3_START) |
430 | 430 | ||
431 | /* | 431 | /* |
432 | * Chip Select End Address Register (Table 6-18) | 432 | * Chip Select End Address Register (Table 6-18) |
433 | */ | 433 | */ |
434 | 434 | ||
435 | #define S_MC_CS0_END 0 | 435 | #define S_MC_CS0_END 0 |
436 | #define M_MC_CS0_END _SB_MAKEMASK(16, S_MC_CS0_END) | 436 | #define M_MC_CS0_END _SB_MAKEMASK(16, S_MC_CS0_END) |
437 | #define V_MC_CS0_END(x) _SB_MAKEVALUE(x, S_MC_CS0_END) | 437 | #define V_MC_CS0_END(x) _SB_MAKEVALUE(x, S_MC_CS0_END) |
438 | #define G_MC_CS0_END(x) _SB_GETVALUE(x, S_MC_CS0_END, M_MC_CS0_END) | 438 | #define G_MC_CS0_END(x) _SB_GETVALUE(x, S_MC_CS0_END, M_MC_CS0_END) |
439 | 439 | ||
440 | #define S_MC_CS1_END 16 | 440 | #define S_MC_CS1_END 16 |
441 | #define M_MC_CS1_END _SB_MAKEMASK(16, S_MC_CS1_END) | 441 | #define M_MC_CS1_END _SB_MAKEMASK(16, S_MC_CS1_END) |
442 | #define V_MC_CS1_END(x) _SB_MAKEVALUE(x, S_MC_CS1_END) | 442 | #define V_MC_CS1_END(x) _SB_MAKEVALUE(x, S_MC_CS1_END) |
443 | #define G_MC_CS1_END(x) _SB_GETVALUE(x, S_MC_CS1_END, M_MC_CS1_END) | 443 | #define G_MC_CS1_END(x) _SB_GETVALUE(x, S_MC_CS1_END, M_MC_CS1_END) |
444 | 444 | ||
445 | #define S_MC_CS2_END 32 | 445 | #define S_MC_CS2_END 32 |
446 | #define M_MC_CS2_END _SB_MAKEMASK(16, S_MC_CS2_END) | 446 | #define M_MC_CS2_END _SB_MAKEMASK(16, S_MC_CS2_END) |
447 | #define V_MC_CS2_END(x) _SB_MAKEVALUE(x, S_MC_CS2_END) | 447 | #define V_MC_CS2_END(x) _SB_MAKEVALUE(x, S_MC_CS2_END) |
448 | #define G_MC_CS2_END(x) _SB_GETVALUE(x, S_MC_CS2_END, M_MC_CS2_END) | 448 | #define G_MC_CS2_END(x) _SB_GETVALUE(x, S_MC_CS2_END, M_MC_CS2_END) |
449 | 449 | ||
450 | #define S_MC_CS3_END 48 | 450 | #define S_MC_CS3_END 48 |
451 | #define M_MC_CS3_END _SB_MAKEMASK(16, S_MC_CS3_END) | 451 | #define M_MC_CS3_END _SB_MAKEMASK(16, S_MC_CS3_END) |
452 | #define V_MC_CS3_END(x) _SB_MAKEVALUE(x, S_MC_CS3_END) | 452 | #define V_MC_CS3_END(x) _SB_MAKEVALUE(x, S_MC_CS3_END) |
453 | #define G_MC_CS3_END(x) _SB_GETVALUE(x, S_MC_CS3_END, M_MC_CS3_END) | 453 | #define G_MC_CS3_END(x) _SB_GETVALUE(x, S_MC_CS3_END, M_MC_CS3_END) |
454 | 454 | ||
455 | /* | 455 | /* |
456 | * Chip Select Interleave Register (Table 6-19) | 456 | * Chip Select Interleave Register (Table 6-19) |
457 | */ | 457 | */ |
458 | 458 | ||
459 | #define S_MC_INTLV_RESERVED 0 | 459 | #define S_MC_INTLV_RESERVED 0 |
460 | #define M_MC_INTLV_RESERVED _SB_MAKEMASK(5, S_MC_INTLV_RESERVED) | 460 | #define M_MC_INTLV_RESERVED _SB_MAKEMASK(5, S_MC_INTLV_RESERVED) |
461 | 461 | ||
462 | #define S_MC_INTERLEAVE 7 | 462 | #define S_MC_INTERLEAVE 7 |
463 | #define M_MC_INTERLEAVE _SB_MAKEMASK(18, S_MC_INTERLEAVE) | 463 | #define M_MC_INTERLEAVE _SB_MAKEMASK(18, S_MC_INTERLEAVE) |
464 | #define V_MC_INTERLEAVE(x) _SB_MAKEVALUE(x, S_MC_INTERLEAVE) | 464 | #define V_MC_INTERLEAVE(x) _SB_MAKEVALUE(x, S_MC_INTERLEAVE) |
465 | 465 | ||
466 | #define S_MC_INTLV_MBZ 25 | 466 | #define S_MC_INTLV_MBZ 25 |
467 | #define M_MC_INTLV_MBZ _SB_MAKEMASK(39, S_MC_INTLV_MBZ) | 467 | #define M_MC_INTLV_MBZ _SB_MAKEMASK(39, S_MC_INTLV_MBZ) |
468 | 468 | ||
469 | /* | 469 | /* |
470 | * Row Address Bits Register (Table 6-20) | 470 | * Row Address Bits Register (Table 6-20) |
471 | */ | 471 | */ |
472 | 472 | ||
473 | #define S_MC_RAS_RESERVED 0 | 473 | #define S_MC_RAS_RESERVED 0 |
474 | #define M_MC_RAS_RESERVED _SB_MAKEMASK(5, S_MC_RAS_RESERVED) | 474 | #define M_MC_RAS_RESERVED _SB_MAKEMASK(5, S_MC_RAS_RESERVED) |
475 | 475 | ||
476 | #define S_MC_RAS_SELECT 12 | 476 | #define S_MC_RAS_SELECT 12 |
477 | #define M_MC_RAS_SELECT _SB_MAKEMASK(25, S_MC_RAS_SELECT) | 477 | #define M_MC_RAS_SELECT _SB_MAKEMASK(25, S_MC_RAS_SELECT) |
478 | #define V_MC_RAS_SELECT(x) _SB_MAKEVALUE(x, S_MC_RAS_SELECT) | 478 | #define V_MC_RAS_SELECT(x) _SB_MAKEVALUE(x, S_MC_RAS_SELECT) |
479 | 479 | ||
480 | #define S_MC_RAS_MBZ 37 | 480 | #define S_MC_RAS_MBZ 37 |
481 | #define M_MC_RAS_MBZ _SB_MAKEMASK(27, S_MC_RAS_MBZ) | 481 | #define M_MC_RAS_MBZ _SB_MAKEMASK(27, S_MC_RAS_MBZ) |
482 | 482 | ||
483 | 483 | ||
484 | /* | 484 | /* |
485 | * Column Address Bits Register (Table 6-21) | 485 | * Column Address Bits Register (Table 6-21) |
486 | */ | 486 | */ |
487 | 487 | ||
488 | #define S_MC_CAS_RESERVED 0 | 488 | #define S_MC_CAS_RESERVED 0 |
489 | #define M_MC_CAS_RESERVED _SB_MAKEMASK(5, S_MC_CAS_RESERVED) | 489 | #define M_MC_CAS_RESERVED _SB_MAKEMASK(5, S_MC_CAS_RESERVED) |
490 | 490 | ||
491 | #define S_MC_CAS_SELECT 5 | 491 | #define S_MC_CAS_SELECT 5 |
492 | #define M_MC_CAS_SELECT _SB_MAKEMASK(18, S_MC_CAS_SELECT) | 492 | #define M_MC_CAS_SELECT _SB_MAKEMASK(18, S_MC_CAS_SELECT) |
493 | #define V_MC_CAS_SELECT(x) _SB_MAKEVALUE(x, S_MC_CAS_SELECT) | 493 | #define V_MC_CAS_SELECT(x) _SB_MAKEVALUE(x, S_MC_CAS_SELECT) |
494 | 494 | ||
495 | #define S_MC_CAS_MBZ 23 | 495 | #define S_MC_CAS_MBZ 23 |
496 | #define M_MC_CAS_MBZ _SB_MAKEMASK(41, S_MC_CAS_MBZ) | 496 | #define M_MC_CAS_MBZ _SB_MAKEMASK(41, S_MC_CAS_MBZ) |
497 | 497 | ||
498 | 498 | ||
499 | /* | 499 | /* |
500 | * Bank Address Address Bits Register (Table 6-22) | 500 | * Bank Address Address Bits Register (Table 6-22) |
501 | */ | 501 | */ |
502 | 502 | ||
503 | #define S_MC_BA_RESERVED 0 | 503 | #define S_MC_BA_RESERVED 0 |
504 | #define M_MC_BA_RESERVED _SB_MAKEMASK(5, S_MC_BA_RESERVED) | 504 | #define M_MC_BA_RESERVED _SB_MAKEMASK(5, S_MC_BA_RESERVED) |
505 | 505 | ||
506 | #define S_MC_BA_SELECT 5 | 506 | #define S_MC_BA_SELECT 5 |
507 | #define M_MC_BA_SELECT _SB_MAKEMASK(20, S_MC_BA_SELECT) | 507 | #define M_MC_BA_SELECT _SB_MAKEMASK(20, S_MC_BA_SELECT) |
508 | #define V_MC_BA_SELECT(x) _SB_MAKEVALUE(x, S_MC_BA_SELECT) | 508 | #define V_MC_BA_SELECT(x) _SB_MAKEVALUE(x, S_MC_BA_SELECT) |
509 | 509 | ||
510 | #define S_MC_BA_MBZ 25 | 510 | #define S_MC_BA_MBZ 25 |
511 | #define M_MC_BA_MBZ _SB_MAKEMASK(39, S_MC_BA_MBZ) | 511 | #define M_MC_BA_MBZ _SB_MAKEMASK(39, S_MC_BA_MBZ) |
512 | 512 | ||
513 | /* | 513 | /* |
514 | * Chip Select Attribute Register (Table 6-23) | 514 | * Chip Select Attribute Register (Table 6-23) |
515 | */ | 515 | */ |
516 | 516 | ||
517 | #define K_MC_CS_ATTR_CLOSED 0 | 517 | #define K_MC_CS_ATTR_CLOSED 0 |
518 | #define K_MC_CS_ATTR_CASCHECK 1 | 518 | #define K_MC_CS_ATTR_CASCHECK 1 |
519 | #define K_MC_CS_ATTR_HINT 2 | 519 | #define K_MC_CS_ATTR_HINT 2 |
520 | #define K_MC_CS_ATTR_OPEN 3 | 520 | #define K_MC_CS_ATTR_OPEN 3 |
521 | 521 | ||
522 | #define S_MC_CS0_PAGE 0 | 522 | #define S_MC_CS0_PAGE 0 |
523 | #define M_MC_CS0_PAGE _SB_MAKEMASK(2, S_MC_CS0_PAGE) | 523 | #define M_MC_CS0_PAGE _SB_MAKEMASK(2, S_MC_CS0_PAGE) |
524 | #define V_MC_CS0_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS0_PAGE) | 524 | #define V_MC_CS0_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS0_PAGE) |
525 | #define G_MC_CS0_PAGE(x) _SB_GETVALUE(x, S_MC_CS0_PAGE, M_MC_CS0_PAGE) | 525 | #define G_MC_CS0_PAGE(x) _SB_GETVALUE(x, S_MC_CS0_PAGE, M_MC_CS0_PAGE) |
526 | 526 | ||
527 | #define S_MC_CS1_PAGE 16 | 527 | #define S_MC_CS1_PAGE 16 |
528 | #define M_MC_CS1_PAGE _SB_MAKEMASK(2, S_MC_CS1_PAGE) | 528 | #define M_MC_CS1_PAGE _SB_MAKEMASK(2, S_MC_CS1_PAGE) |
529 | #define V_MC_CS1_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS1_PAGE) | 529 | #define V_MC_CS1_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS1_PAGE) |
530 | #define G_MC_CS1_PAGE(x) _SB_GETVALUE(x, S_MC_CS1_PAGE, M_MC_CS1_PAGE) | 530 | #define G_MC_CS1_PAGE(x) _SB_GETVALUE(x, S_MC_CS1_PAGE, M_MC_CS1_PAGE) |
531 | 531 | ||
532 | #define S_MC_CS2_PAGE 32 | 532 | #define S_MC_CS2_PAGE 32 |
533 | #define M_MC_CS2_PAGE _SB_MAKEMASK(2, S_MC_CS2_PAGE) | 533 | #define M_MC_CS2_PAGE _SB_MAKEMASK(2, S_MC_CS2_PAGE) |
534 | #define V_MC_CS2_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS2_PAGE) | 534 | #define V_MC_CS2_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS2_PAGE) |
535 | #define G_MC_CS2_PAGE(x) _SB_GETVALUE(x, S_MC_CS2_PAGE, M_MC_CS2_PAGE) | 535 | #define G_MC_CS2_PAGE(x) _SB_GETVALUE(x, S_MC_CS2_PAGE, M_MC_CS2_PAGE) |
536 | 536 | ||
537 | #define S_MC_CS3_PAGE 48 | 537 | #define S_MC_CS3_PAGE 48 |
538 | #define M_MC_CS3_PAGE _SB_MAKEMASK(2, S_MC_CS3_PAGE) | 538 | #define M_MC_CS3_PAGE _SB_MAKEMASK(2, S_MC_CS3_PAGE) |
539 | #define V_MC_CS3_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS3_PAGE) | 539 | #define V_MC_CS3_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS3_PAGE) |
540 | #define G_MC_CS3_PAGE(x) _SB_GETVALUE(x, S_MC_CS3_PAGE, M_MC_CS3_PAGE) | 540 | #define G_MC_CS3_PAGE(x) _SB_GETVALUE(x, S_MC_CS3_PAGE, M_MC_CS3_PAGE) |
541 | 541 | ||
542 | /* | 542 | /* |
543 | * ECC Test ECC Register (Table 6-25) | 543 | * ECC Test ECC Register (Table 6-25) |
544 | */ | 544 | */ |
545 | 545 | ||
546 | #define S_MC_ECC_INVERT 0 | 546 | #define S_MC_ECC_INVERT 0 |
547 | #define M_MC_ECC_INVERT _SB_MAKEMASK(8, S_MC_ECC_INVERT) | 547 | #define M_MC_ECC_INVERT _SB_MAKEMASK(8, S_MC_ECC_INVERT) |
548 | 548 | ||
549 | 549 | ||
550 | #endif | 550 | #endif |
diff --git a/arch/mips/include/asm/sibyte/sb1250_regs.h b/arch/mips/include/asm/sibyte/sb1250_regs.h index 29b9f0b26b3a..ee86ca0fad32 100644 --- a/arch/mips/include/asm/sibyte/sb1250_regs.h +++ b/arch/mips/include/asm/sibyte/sb1250_regs.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Register Definitions File: sb1250_regs.h | 4 | * Register Definitions File: sb1250_regs.h |
5 | * | 5 | * |
6 | * This module contains the addresses of the on-chip peripherals | 6 | * This module contains the addresses of the on-chip peripherals |
7 | * on the SB1250. | 7 | * on the SB1250. |
@@ -61,45 +61,45 @@ | |||
61 | */ | 61 | */ |
62 | 62 | ||
63 | #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ | 63 | #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ |
64 | #define A_MC_BASE_0 0x0010051000 | 64 | #define A_MC_BASE_0 0x0010051000 |
65 | #define A_MC_BASE_1 0x0010052000 | 65 | #define A_MC_BASE_1 0x0010052000 |
66 | #define MC_REGISTER_SPACING 0x1000 | 66 | #define MC_REGISTER_SPACING 0x1000 |
67 | 67 | ||
68 | #define A_MC_BASE(ctlid) ((ctlid)*MC_REGISTER_SPACING+A_MC_BASE_0) | 68 | #define A_MC_BASE(ctlid) ((ctlid)*MC_REGISTER_SPACING+A_MC_BASE_0) |
69 | #define A_MC_REGISTER(ctlid, reg) (A_MC_BASE(ctlid)+(reg)) | 69 | #define A_MC_REGISTER(ctlid, reg) (A_MC_BASE(ctlid)+(reg)) |
70 | 70 | ||
71 | #define R_MC_CONFIG 0x0000000100 | 71 | #define R_MC_CONFIG 0x0000000100 |
72 | #define R_MC_DRAMCMD 0x0000000120 | 72 | #define R_MC_DRAMCMD 0x0000000120 |
73 | #define R_MC_DRAMMODE 0x0000000140 | 73 | #define R_MC_DRAMMODE 0x0000000140 |
74 | #define R_MC_TIMING1 0x0000000160 | 74 | #define R_MC_TIMING1 0x0000000160 |
75 | #define R_MC_TIMING2 0x0000000180 | 75 | #define R_MC_TIMING2 0x0000000180 |
76 | #define R_MC_CS_START 0x00000001A0 | 76 | #define R_MC_CS_START 0x00000001A0 |
77 | #define R_MC_CS_END 0x00000001C0 | 77 | #define R_MC_CS_END 0x00000001C0 |
78 | #define R_MC_CS_INTERLEAVE 0x00000001E0 | 78 | #define R_MC_CS_INTERLEAVE 0x00000001E0 |
79 | #define S_MC_CS_STARTEND 16 | 79 | #define S_MC_CS_STARTEND 16 |
80 | 80 | ||
81 | #define R_MC_CSX_BASE 0x0000000200 | 81 | #define R_MC_CSX_BASE 0x0000000200 |
82 | #define R_MC_CSX_ROW 0x0000000000 /* relative to CSX_BASE, above */ | 82 | #define R_MC_CSX_ROW 0x0000000000 /* relative to CSX_BASE, above */ |
83 | #define R_MC_CSX_COL 0x0000000020 /* relative to CSX_BASE, above */ | 83 | #define R_MC_CSX_COL 0x0000000020 /* relative to CSX_BASE, above */ |
84 | #define R_MC_CSX_BA 0x0000000040 /* relative to CSX_BASE, above */ | 84 | #define R_MC_CSX_BA 0x0000000040 /* relative to CSX_BASE, above */ |
85 | #define MC_CSX_SPACING 0x0000000060 /* relative to CSX_BASE, above */ | 85 | #define MC_CSX_SPACING 0x0000000060 /* relative to CSX_BASE, above */ |
86 | 86 | ||
87 | #define R_MC_CS0_ROW 0x0000000200 | 87 | #define R_MC_CS0_ROW 0x0000000200 |
88 | #define R_MC_CS0_COL 0x0000000220 | 88 | #define R_MC_CS0_COL 0x0000000220 |
89 | #define R_MC_CS0_BA 0x0000000240 | 89 | #define R_MC_CS0_BA 0x0000000240 |
90 | #define R_MC_CS1_ROW 0x0000000260 | 90 | #define R_MC_CS1_ROW 0x0000000260 |
91 | #define R_MC_CS1_COL 0x0000000280 | 91 | #define R_MC_CS1_COL 0x0000000280 |
92 | #define R_MC_CS1_BA 0x00000002A0 | 92 | #define R_MC_CS1_BA 0x00000002A0 |
93 | #define R_MC_CS2_ROW 0x00000002C0 | 93 | #define R_MC_CS2_ROW 0x00000002C0 |
94 | #define R_MC_CS2_COL 0x00000002E0 | 94 | #define R_MC_CS2_COL 0x00000002E0 |
95 | #define R_MC_CS2_BA 0x0000000300 | 95 | #define R_MC_CS2_BA 0x0000000300 |
96 | #define R_MC_CS3_ROW 0x0000000320 | 96 | #define R_MC_CS3_ROW 0x0000000320 |
97 | #define R_MC_CS3_COL 0x0000000340 | 97 | #define R_MC_CS3_COL 0x0000000340 |
98 | #define R_MC_CS3_BA 0x0000000360 | 98 | #define R_MC_CS3_BA 0x0000000360 |
99 | #define R_MC_CS_ATTR 0x0000000380 | 99 | #define R_MC_CS_ATTR 0x0000000380 |
100 | #define R_MC_TEST_DATA 0x0000000400 | 100 | #define R_MC_TEST_DATA 0x0000000400 |
101 | #define R_MC_TEST_ECC 0x0000000420 | 101 | #define R_MC_TEST_ECC 0x0000000420 |
102 | #define R_MC_MCLK_CFG 0x0000000500 | 102 | #define R_MC_MCLK_CFG 0x0000000500 |
103 | 103 | ||
104 | #endif /* 1250 & 112x */ | 104 | #endif /* 1250 & 112x */ |
105 | 105 | ||
@@ -109,14 +109,14 @@ | |||
109 | 109 | ||
110 | #if SIBYTE_HDR_FEATURE_1250_112x /* This L2C only on 1250/112x */ | 110 | #if SIBYTE_HDR_FEATURE_1250_112x /* This L2C only on 1250/112x */ |
111 | 111 | ||
112 | #define A_L2_READ_TAG 0x0010040018 | 112 | #define A_L2_READ_TAG 0x0010040018 |
113 | #define A_L2_ECC_TAG 0x0010040038 | 113 | #define A_L2_ECC_TAG 0x0010040038 |
114 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) | 114 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
115 | #define A_L2_READ_MISC 0x0010040058 | 115 | #define A_L2_READ_MISC 0x0010040058 |
116 | #endif /* 1250 PASS3 || 112x PASS1 */ | 116 | #endif /* 1250 PASS3 || 112x PASS1 */ |
117 | #define A_L2_WAY_DISABLE 0x0010041000 | 117 | #define A_L2_WAY_DISABLE 0x0010041000 |
118 | #define A_L2_MAKEDISABLE(x) (A_L2_WAY_DISABLE | (((~(x))&0x0F) << 8)) | 118 | #define A_L2_MAKEDISABLE(x) (A_L2_WAY_DISABLE | (((~(x))&0x0F) << 8)) |
119 | #define A_L2_MGMT_TAG_BASE 0x00D0000000 | 119 | #define A_L2_MGMT_TAG_BASE 0x00D0000000 |
120 | 120 | ||
121 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 121 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
122 | #define A_L2_CACHE_DISABLE 0x0010042000 | 122 | #define A_L2_CACHE_DISABLE 0x0010042000 |
@@ -124,10 +124,10 @@ | |||
124 | #define A_L2_MISC_CONFIG 0x0010043000 | 124 | #define A_L2_MISC_CONFIG 0x0010043000 |
125 | #endif /* 1250 PASS2 || 112x PASS1 */ | 125 | #endif /* 1250 PASS2 || 112x PASS1 */ |
126 | 126 | ||
127 | /* Backward-compatibility definitions. */ | 127 | /* Backward-compatibility definitions. */ |
128 | /* XXX: discourage people from using these constants. */ | 128 | /* XXX: discourage people from using these constants. */ |
129 | #define A_L2_READ_ADDRESS A_L2_READ_TAG | 129 | #define A_L2_READ_ADDRESS A_L2_READ_TAG |
130 | #define A_L2_EEC_ADDRESS A_L2_ECC_TAG | 130 | #define A_L2_EEC_ADDRESS A_L2_ECC_TAG |
131 | 131 | ||
132 | #endif | 132 | #endif |
133 | 133 | ||
@@ -137,8 +137,8 @@ | |||
137 | ********************************************************************* */ | 137 | ********************************************************************* */ |
138 | 138 | ||
139 | #if SIBYTE_HDR_FEATURE_1250_112x /* This PCI/HT only on 1250/112x */ | 139 | #if SIBYTE_HDR_FEATURE_1250_112x /* This PCI/HT only on 1250/112x */ |
140 | #define A_PCI_TYPE00_HEADER 0x00DE000000 | 140 | #define A_PCI_TYPE00_HEADER 0x00DE000000 |
141 | #define A_PCI_TYPE01_HEADER 0x00DE000800 | 141 | #define A_PCI_TYPE01_HEADER 0x00DE000800 |
142 | #endif | 142 | #endif |
143 | 143 | ||
144 | 144 | ||
@@ -146,121 +146,121 @@ | |||
146 | * Ethernet DMA and MACs | 146 | * Ethernet DMA and MACs |
147 | ********************************************************************* */ | 147 | ********************************************************************* */ |
148 | 148 | ||
149 | #define A_MAC_BASE_0 0x0010064000 | 149 | #define A_MAC_BASE_0 0x0010064000 |
150 | #define A_MAC_BASE_1 0x0010065000 | 150 | #define A_MAC_BASE_1 0x0010065000 |
151 | #if SIBYTE_HDR_FEATURE_CHIP(1250) | 151 | #if SIBYTE_HDR_FEATURE_CHIP(1250) |
152 | #define A_MAC_BASE_2 0x0010066000 | 152 | #define A_MAC_BASE_2 0x0010066000 |
153 | #endif /* 1250 */ | 153 | #endif /* 1250 */ |
154 | 154 | ||
155 | #define MAC_SPACING 0x1000 | 155 | #define MAC_SPACING 0x1000 |
156 | #define MAC_DMA_TXRX_SPACING 0x0400 | 156 | #define MAC_DMA_TXRX_SPACING 0x0400 |
157 | #define MAC_DMA_CHANNEL_SPACING 0x0100 | 157 | #define MAC_DMA_CHANNEL_SPACING 0x0100 |
158 | #define DMA_RX 0 | 158 | #define DMA_RX 0 |
159 | #define DMA_TX 1 | 159 | #define DMA_TX 1 |
160 | #define MAC_NUM_DMACHAN 2 /* channels per direction */ | 160 | #define MAC_NUM_DMACHAN 2 /* channels per direction */ |
161 | 161 | ||
162 | /* XXX: not correct; depends on SOC type. */ | 162 | /* XXX: not correct; depends on SOC type. */ |
163 | #define MAC_NUM_PORTS 3 | 163 | #define MAC_NUM_PORTS 3 |
164 | 164 | ||
165 | #define A_MAC_CHANNEL_BASE(macnum) \ | 165 | #define A_MAC_CHANNEL_BASE(macnum) \ |
166 | (A_MAC_BASE_0 + \ | 166 | (A_MAC_BASE_0 + \ |
167 | MAC_SPACING*(macnum)) | 167 | MAC_SPACING*(macnum)) |
168 | 168 | ||
169 | #define A_MAC_REGISTER(macnum,reg) \ | 169 | #define A_MAC_REGISTER(macnum,reg) \ |
170 | (A_MAC_BASE_0 + \ | 170 | (A_MAC_BASE_0 + \ |
171 | MAC_SPACING*(macnum) + (reg)) | 171 | MAC_SPACING*(macnum) + (reg)) |
172 | 172 | ||
173 | 173 | ||
174 | #define R_MAC_DMA_CHANNELS 0x800 /* Relative to A_MAC_CHANNEL_BASE */ | 174 | #define R_MAC_DMA_CHANNELS 0x800 /* Relative to A_MAC_CHANNEL_BASE */ |
175 | 175 | ||
176 | #define A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan) \ | 176 | #define A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan) \ |
177 | ((A_MAC_CHANNEL_BASE(macnum)) + \ | 177 | ((A_MAC_CHANNEL_BASE(macnum)) + \ |
178 | R_MAC_DMA_CHANNELS + \ | 178 | R_MAC_DMA_CHANNELS + \ |
179 | (MAC_DMA_TXRX_SPACING*(txrx)) + \ | 179 | (MAC_DMA_TXRX_SPACING*(txrx)) + \ |
180 | (MAC_DMA_CHANNEL_SPACING*(chan))) | 180 | (MAC_DMA_CHANNEL_SPACING*(chan))) |
181 | 181 | ||
182 | #define R_MAC_DMA_CHANNEL_BASE(txrx, chan) \ | 182 | #define R_MAC_DMA_CHANNEL_BASE(txrx, chan) \ |
183 | (R_MAC_DMA_CHANNELS + \ | 183 | (R_MAC_DMA_CHANNELS + \ |
184 | (MAC_DMA_TXRX_SPACING*(txrx)) + \ | 184 | (MAC_DMA_TXRX_SPACING*(txrx)) + \ |
185 | (MAC_DMA_CHANNEL_SPACING*(chan))) | 185 | (MAC_DMA_CHANNEL_SPACING*(chan))) |
186 | 186 | ||
187 | #define A_MAC_DMA_REGISTER(macnum, txrx, chan, reg) \ | 187 | #define A_MAC_DMA_REGISTER(macnum, txrx, chan, reg) \ |
188 | (A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan) + \ | 188 | (A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan) + \ |
189 | (reg)) | 189 | (reg)) |
190 | 190 | ||
191 | #define R_MAC_DMA_REGISTER(txrx, chan, reg) \ | 191 | #define R_MAC_DMA_REGISTER(txrx, chan, reg) \ |
192 | (R_MAC_DMA_CHANNEL_BASE(txrx, chan) + \ | 192 | (R_MAC_DMA_CHANNEL_BASE(txrx, chan) + \ |
193 | (reg)) | 193 | (reg)) |
194 | 194 | ||
195 | /* | 195 | /* |
196 | * DMA channel registers, relative to A_MAC_DMA_CHANNEL_BASE | 196 | * DMA channel registers, relative to A_MAC_DMA_CHANNEL_BASE |
197 | */ | 197 | */ |
198 | 198 | ||
199 | #define R_MAC_DMA_CONFIG0 0x00000000 | 199 | #define R_MAC_DMA_CONFIG0 0x00000000 |
200 | #define R_MAC_DMA_CONFIG1 0x00000008 | 200 | #define R_MAC_DMA_CONFIG1 0x00000008 |
201 | #define R_MAC_DMA_DSCR_BASE 0x00000010 | 201 | #define R_MAC_DMA_DSCR_BASE 0x00000010 |
202 | #define R_MAC_DMA_DSCR_CNT 0x00000018 | 202 | #define R_MAC_DMA_DSCR_CNT 0x00000018 |
203 | #define R_MAC_DMA_CUR_DSCRA 0x00000020 | 203 | #define R_MAC_DMA_CUR_DSCRA 0x00000020 |
204 | #define R_MAC_DMA_CUR_DSCRB 0x00000028 | 204 | #define R_MAC_DMA_CUR_DSCRB 0x00000028 |
205 | #define R_MAC_DMA_CUR_DSCRADDR 0x00000030 | 205 | #define R_MAC_DMA_CUR_DSCRADDR 0x00000030 |
206 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) | 206 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
207 | #define R_MAC_DMA_OODPKTLOST_RX 0x00000038 /* rx only */ | 207 | #define R_MAC_DMA_OODPKTLOST_RX 0x00000038 /* rx only */ |
208 | #endif /* 1250 PASS3 || 112x PASS1 */ | 208 | #endif /* 1250 PASS3 || 112x PASS1 */ |
209 | 209 | ||
210 | /* | 210 | /* |
211 | * RMON Counters | 211 | * RMON Counters |
212 | */ | 212 | */ |
213 | 213 | ||
214 | #define R_MAC_RMON_TX_BYTES 0x00000000 | 214 | #define R_MAC_RMON_TX_BYTES 0x00000000 |
215 | #define R_MAC_RMON_COLLISIONS 0x00000008 | 215 | #define R_MAC_RMON_COLLISIONS 0x00000008 |
216 | #define R_MAC_RMON_LATE_COL 0x00000010 | 216 | #define R_MAC_RMON_LATE_COL 0x00000010 |
217 | #define R_MAC_RMON_EX_COL 0x00000018 | 217 | #define R_MAC_RMON_EX_COL 0x00000018 |
218 | #define R_MAC_RMON_FCS_ERROR 0x00000020 | 218 | #define R_MAC_RMON_FCS_ERROR 0x00000020 |
219 | #define R_MAC_RMON_TX_ABORT 0x00000028 | 219 | #define R_MAC_RMON_TX_ABORT 0x00000028 |
220 | /* Counter #6 (0x30) now reserved */ | 220 | /* Counter #6 (0x30) now reserved */ |
221 | #define R_MAC_RMON_TX_BAD 0x00000038 | 221 | #define R_MAC_RMON_TX_BAD 0x00000038 |
222 | #define R_MAC_RMON_TX_GOOD 0x00000040 | 222 | #define R_MAC_RMON_TX_GOOD 0x00000040 |
223 | #define R_MAC_RMON_TX_RUNT 0x00000048 | 223 | #define R_MAC_RMON_TX_RUNT 0x00000048 |
224 | #define R_MAC_RMON_TX_OVERSIZE 0x00000050 | 224 | #define R_MAC_RMON_TX_OVERSIZE 0x00000050 |
225 | #define R_MAC_RMON_RX_BYTES 0x00000080 | 225 | #define R_MAC_RMON_RX_BYTES 0x00000080 |
226 | #define R_MAC_RMON_RX_MCAST 0x00000088 | 226 | #define R_MAC_RMON_RX_MCAST 0x00000088 |
227 | #define R_MAC_RMON_RX_BCAST 0x00000090 | 227 | #define R_MAC_RMON_RX_BCAST 0x00000090 |
228 | #define R_MAC_RMON_RX_BAD 0x00000098 | 228 | #define R_MAC_RMON_RX_BAD 0x00000098 |
229 | #define R_MAC_RMON_RX_GOOD 0x000000A0 | 229 | #define R_MAC_RMON_RX_GOOD 0x000000A0 |
230 | #define R_MAC_RMON_RX_RUNT 0x000000A8 | 230 | #define R_MAC_RMON_RX_RUNT 0x000000A8 |
231 | #define R_MAC_RMON_RX_OVERSIZE 0x000000B0 | 231 | #define R_MAC_RMON_RX_OVERSIZE 0x000000B0 |
232 | #define R_MAC_RMON_RX_FCS_ERROR 0x000000B8 | 232 | #define R_MAC_RMON_RX_FCS_ERROR 0x000000B8 |
233 | #define R_MAC_RMON_RX_LENGTH_ERROR 0x000000C0 | 233 | #define R_MAC_RMON_RX_LENGTH_ERROR 0x000000C0 |
234 | #define R_MAC_RMON_RX_CODE_ERROR 0x000000C8 | 234 | #define R_MAC_RMON_RX_CODE_ERROR 0x000000C8 |
235 | #define R_MAC_RMON_RX_ALIGN_ERROR 0x000000D0 | 235 | #define R_MAC_RMON_RX_ALIGN_ERROR 0x000000D0 |
236 | 236 | ||
237 | /* Updated to spec 0.2 */ | 237 | /* Updated to spec 0.2 */ |
238 | #define R_MAC_CFG 0x00000100 | 238 | #define R_MAC_CFG 0x00000100 |
239 | #define R_MAC_THRSH_CFG 0x00000108 | 239 | #define R_MAC_THRSH_CFG 0x00000108 |
240 | #define R_MAC_VLANTAG 0x00000110 | 240 | #define R_MAC_VLANTAG 0x00000110 |
241 | #define R_MAC_FRAMECFG 0x00000118 | 241 | #define R_MAC_FRAMECFG 0x00000118 |
242 | #define R_MAC_EOPCNT 0x00000120 | 242 | #define R_MAC_EOPCNT 0x00000120 |
243 | #define R_MAC_FIFO_PTRS 0x00000128 | 243 | #define R_MAC_FIFO_PTRS 0x00000128 |
244 | #define R_MAC_ADFILTER_CFG 0x00000200 | 244 | #define R_MAC_ADFILTER_CFG 0x00000200 |
245 | #define R_MAC_ETHERNET_ADDR 0x00000208 | 245 | #define R_MAC_ETHERNET_ADDR 0x00000208 |
246 | #define R_MAC_PKT_TYPE 0x00000210 | 246 | #define R_MAC_PKT_TYPE 0x00000210 |
247 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 247 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
248 | #define R_MAC_ADMASK0 0x00000218 | 248 | #define R_MAC_ADMASK0 0x00000218 |
249 | #define R_MAC_ADMASK1 0x00000220 | 249 | #define R_MAC_ADMASK1 0x00000220 |
250 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 250 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
251 | #define R_MAC_HASH_BASE 0x00000240 | 251 | #define R_MAC_HASH_BASE 0x00000240 |
252 | #define R_MAC_ADDR_BASE 0x00000280 | 252 | #define R_MAC_ADDR_BASE 0x00000280 |
253 | #define R_MAC_CHLO0_BASE 0x00000300 | 253 | #define R_MAC_CHLO0_BASE 0x00000300 |
254 | #define R_MAC_CHUP0_BASE 0x00000320 | 254 | #define R_MAC_CHUP0_BASE 0x00000320 |
255 | #define R_MAC_ENABLE 0x00000400 | 255 | #define R_MAC_ENABLE 0x00000400 |
256 | #define R_MAC_STATUS 0x00000408 | 256 | #define R_MAC_STATUS 0x00000408 |
257 | #define R_MAC_INT_MASK 0x00000410 | 257 | #define R_MAC_INT_MASK 0x00000410 |
258 | #define R_MAC_TXD_CTL 0x00000420 | 258 | #define R_MAC_TXD_CTL 0x00000420 |
259 | #define R_MAC_MDIO 0x00000428 | 259 | #define R_MAC_MDIO 0x00000428 |
260 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 260 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
261 | #define R_MAC_STATUS1 0x00000430 | 261 | #define R_MAC_STATUS1 0x00000430 |
262 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 262 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
263 | #define R_MAC_DEBUG_STATUS 0x00000448 | 263 | #define R_MAC_DEBUG_STATUS 0x00000448 |
264 | 264 | ||
265 | #define MAC_HASH_COUNT 8 | 265 | #define MAC_HASH_COUNT 8 |
266 | #define MAC_ADDR_COUNT 8 | 266 | #define MAC_ADDR_COUNT 8 |
@@ -273,11 +273,11 @@ | |||
273 | 273 | ||
274 | 274 | ||
275 | #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ | 275 | #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ |
276 | #define R_DUART_NUM_PORTS 2 | 276 | #define R_DUART_NUM_PORTS 2 |
277 | 277 | ||
278 | #define A_DUART 0x0010060000 | 278 | #define A_DUART 0x0010060000 |
279 | 279 | ||
280 | #define DUART_CHANREG_SPACING 0x100 | 280 | #define DUART_CHANREG_SPACING 0x100 |
281 | 281 | ||
282 | #define A_DUART_CHANREG(chan, reg) \ | 282 | #define A_DUART_CHANREG(chan, reg) \ |
283 | (A_DUART + DUART_CHANREG_SPACING * ((chan) + 1) + (reg)) | 283 | (A_DUART + DUART_CHANREG_SPACING * ((chan) + 1) + (reg)) |
@@ -341,44 +341,44 @@ | |||
341 | * These constants are the absolute addresses. | 341 | * These constants are the absolute addresses. |
342 | */ | 342 | */ |
343 | 343 | ||
344 | #define A_DUART_MODE_REG_1_A 0x0010060100 | 344 | #define A_DUART_MODE_REG_1_A 0x0010060100 |
345 | #define A_DUART_MODE_REG_2_A 0x0010060110 | 345 | #define A_DUART_MODE_REG_2_A 0x0010060110 |
346 | #define A_DUART_STATUS_A 0x0010060120 | 346 | #define A_DUART_STATUS_A 0x0010060120 |
347 | #define A_DUART_CLK_SEL_A 0x0010060130 | 347 | #define A_DUART_CLK_SEL_A 0x0010060130 |
348 | #define A_DUART_CMD_A 0x0010060150 | 348 | #define A_DUART_CMD_A 0x0010060150 |
349 | #define A_DUART_RX_HOLD_A 0x0010060160 | 349 | #define A_DUART_RX_HOLD_A 0x0010060160 |
350 | #define A_DUART_TX_HOLD_A 0x0010060170 | 350 | #define A_DUART_TX_HOLD_A 0x0010060170 |
351 | 351 | ||
352 | #define A_DUART_MODE_REG_1_B 0x0010060200 | 352 | #define A_DUART_MODE_REG_1_B 0x0010060200 |
353 | #define A_DUART_MODE_REG_2_B 0x0010060210 | 353 | #define A_DUART_MODE_REG_2_B 0x0010060210 |
354 | #define A_DUART_STATUS_B 0x0010060220 | 354 | #define A_DUART_STATUS_B 0x0010060220 |
355 | #define A_DUART_CLK_SEL_B 0x0010060230 | 355 | #define A_DUART_CLK_SEL_B 0x0010060230 |
356 | #define A_DUART_CMD_B 0x0010060250 | 356 | #define A_DUART_CMD_B 0x0010060250 |
357 | #define A_DUART_RX_HOLD_B 0x0010060260 | 357 | #define A_DUART_RX_HOLD_B 0x0010060260 |
358 | #define A_DUART_TX_HOLD_B 0x0010060270 | 358 | #define A_DUART_TX_HOLD_B 0x0010060270 |
359 | 359 | ||
360 | #define A_DUART_INPORT_CHNG 0x0010060300 | 360 | #define A_DUART_INPORT_CHNG 0x0010060300 |
361 | #define A_DUART_AUX_CTRL 0x0010060310 | 361 | #define A_DUART_AUX_CTRL 0x0010060310 |
362 | #define A_DUART_ISR_A 0x0010060320 | 362 | #define A_DUART_ISR_A 0x0010060320 |
363 | #define A_DUART_IMR_A 0x0010060330 | 363 | #define A_DUART_IMR_A 0x0010060330 |
364 | #define A_DUART_ISR_B 0x0010060340 | 364 | #define A_DUART_ISR_B 0x0010060340 |
365 | #define A_DUART_IMR_B 0x0010060350 | 365 | #define A_DUART_IMR_B 0x0010060350 |
366 | #define A_DUART_OUT_PORT 0x0010060360 | 366 | #define A_DUART_OUT_PORT 0x0010060360 |
367 | #define A_DUART_OPCR 0x0010060370 | 367 | #define A_DUART_OPCR 0x0010060370 |
368 | #define A_DUART_IN_PORT 0x0010060380 | 368 | #define A_DUART_IN_PORT 0x0010060380 |
369 | #define A_DUART_ISR 0x0010060390 | 369 | #define A_DUART_ISR 0x0010060390 |
370 | #define A_DUART_IMR 0x00100603A0 | 370 | #define A_DUART_IMR 0x00100603A0 |
371 | #define A_DUART_SET_OPR 0x00100603B0 | 371 | #define A_DUART_SET_OPR 0x00100603B0 |
372 | #define A_DUART_CLEAR_OPR 0x00100603C0 | 372 | #define A_DUART_CLEAR_OPR 0x00100603C0 |
373 | #define A_DUART_INPORT_CHNG_A 0x00100603D0 | 373 | #define A_DUART_INPORT_CHNG_A 0x00100603D0 |
374 | #define A_DUART_INPORT_CHNG_B 0x00100603E0 | 374 | #define A_DUART_INPORT_CHNG_B 0x00100603E0 |
375 | 375 | ||
376 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 376 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
377 | #define A_DUART_FULL_CTL_A 0x0010060140 | 377 | #define A_DUART_FULL_CTL_A 0x0010060140 |
378 | #define A_DUART_FULL_CTL_B 0x0010060240 | 378 | #define A_DUART_FULL_CTL_B 0x0010060240 |
379 | 379 | ||
380 | #define A_DUART_OPCR_A 0x0010060180 | 380 | #define A_DUART_OPCR_A 0x0010060180 |
381 | #define A_DUART_OPCR_B 0x0010060280 | 381 | #define A_DUART_OPCR_B 0x0010060280 |
382 | 382 | ||
383 | #define A_DUART_INPORT_CHNG_DEBUG 0x00100603F0 | 383 | #define A_DUART_INPORT_CHNG_DEBUG 0x00100603F0 |
384 | #endif /* 1250 PASS2 || 112x PASS1 */ | 384 | #endif /* 1250 PASS2 || 112x PASS1 */ |
@@ -391,94 +391,94 @@ | |||
391 | 391 | ||
392 | #if SIBYTE_HDR_FEATURE_1250_112x /* sync serial only on 1250/112x */ | 392 | #if SIBYTE_HDR_FEATURE_1250_112x /* sync serial only on 1250/112x */ |
393 | 393 | ||
394 | #define A_SER_BASE_0 0x0010060400 | 394 | #define A_SER_BASE_0 0x0010060400 |
395 | #define A_SER_BASE_1 0x0010060800 | 395 | #define A_SER_BASE_1 0x0010060800 |
396 | #define SER_SPACING 0x400 | 396 | #define SER_SPACING 0x400 |
397 | 397 | ||
398 | #define SER_DMA_TXRX_SPACING 0x80 | 398 | #define SER_DMA_TXRX_SPACING 0x80 |
399 | 399 | ||
400 | #define SER_NUM_PORTS 2 | 400 | #define SER_NUM_PORTS 2 |
401 | 401 | ||
402 | #define A_SER_CHANNEL_BASE(sernum) \ | 402 | #define A_SER_CHANNEL_BASE(sernum) \ |
403 | (A_SER_BASE_0 + \ | 403 | (A_SER_BASE_0 + \ |
404 | SER_SPACING*(sernum)) | 404 | SER_SPACING*(sernum)) |
405 | 405 | ||
406 | #define A_SER_REGISTER(sernum,reg) \ | 406 | #define A_SER_REGISTER(sernum,reg) \ |
407 | (A_SER_BASE_0 + \ | 407 | (A_SER_BASE_0 + \ |
408 | SER_SPACING*(sernum) + (reg)) | 408 | SER_SPACING*(sernum) + (reg)) |
409 | 409 | ||
410 | 410 | ||
411 | #define R_SER_DMA_CHANNELS 0 /* Relative to A_SER_BASE_x */ | 411 | #define R_SER_DMA_CHANNELS 0 /* Relative to A_SER_BASE_x */ |
412 | 412 | ||
413 | #define A_SER_DMA_CHANNEL_BASE(sernum,txrx) \ | 413 | #define A_SER_DMA_CHANNEL_BASE(sernum,txrx) \ |
414 | ((A_SER_CHANNEL_BASE(sernum)) + \ | 414 | ((A_SER_CHANNEL_BASE(sernum)) + \ |
415 | R_SER_DMA_CHANNELS + \ | 415 | R_SER_DMA_CHANNELS + \ |
416 | (SER_DMA_TXRX_SPACING*(txrx))) | 416 | (SER_DMA_TXRX_SPACING*(txrx))) |
417 | 417 | ||
418 | #define A_SER_DMA_REGISTER(sernum, txrx, reg) \ | 418 | #define A_SER_DMA_REGISTER(sernum, txrx, reg) \ |
419 | (A_SER_DMA_CHANNEL_BASE(sernum, txrx) + \ | 419 | (A_SER_DMA_CHANNEL_BASE(sernum, txrx) + \ |
420 | (reg)) | 420 | (reg)) |
421 | 421 | ||
422 | 422 | ||
423 | /* | 423 | /* |
424 | * DMA channel registers, relative to A_SER_DMA_CHANNEL_BASE | 424 | * DMA channel registers, relative to A_SER_DMA_CHANNEL_BASE |
425 | */ | 425 | */ |
426 | 426 | ||
427 | #define R_SER_DMA_CONFIG0 0x00000000 | 427 | #define R_SER_DMA_CONFIG0 0x00000000 |
428 | #define R_SER_DMA_CONFIG1 0x00000008 | 428 | #define R_SER_DMA_CONFIG1 0x00000008 |
429 | #define R_SER_DMA_DSCR_BASE 0x00000010 | 429 | #define R_SER_DMA_DSCR_BASE 0x00000010 |
430 | #define R_SER_DMA_DSCR_CNT 0x00000018 | 430 | #define R_SER_DMA_DSCR_CNT 0x00000018 |
431 | #define R_SER_DMA_CUR_DSCRA 0x00000020 | 431 | #define R_SER_DMA_CUR_DSCRA 0x00000020 |
432 | #define R_SER_DMA_CUR_DSCRB 0x00000028 | 432 | #define R_SER_DMA_CUR_DSCRB 0x00000028 |
433 | #define R_SER_DMA_CUR_DSCRADDR 0x00000030 | 433 | #define R_SER_DMA_CUR_DSCRADDR 0x00000030 |
434 | 434 | ||
435 | #define R_SER_DMA_CONFIG0_RX 0x00000000 | 435 | #define R_SER_DMA_CONFIG0_RX 0x00000000 |
436 | #define R_SER_DMA_CONFIG1_RX 0x00000008 | 436 | #define R_SER_DMA_CONFIG1_RX 0x00000008 |
437 | #define R_SER_DMA_DSCR_BASE_RX 0x00000010 | 437 | #define R_SER_DMA_DSCR_BASE_RX 0x00000010 |
438 | #define R_SER_DMA_DSCR_COUNT_RX 0x00000018 | 438 | #define R_SER_DMA_DSCR_COUNT_RX 0x00000018 |
439 | #define R_SER_DMA_CUR_DSCR_A_RX 0x00000020 | 439 | #define R_SER_DMA_CUR_DSCR_A_RX 0x00000020 |
440 | #define R_SER_DMA_CUR_DSCR_B_RX 0x00000028 | 440 | #define R_SER_DMA_CUR_DSCR_B_RX 0x00000028 |
441 | #define R_SER_DMA_CUR_DSCR_ADDR_RX 0x00000030 | 441 | #define R_SER_DMA_CUR_DSCR_ADDR_RX 0x00000030 |
442 | 442 | ||
443 | #define R_SER_DMA_CONFIG0_TX 0x00000080 | 443 | #define R_SER_DMA_CONFIG0_TX 0x00000080 |
444 | #define R_SER_DMA_CONFIG1_TX 0x00000088 | 444 | #define R_SER_DMA_CONFIG1_TX 0x00000088 |
445 | #define R_SER_DMA_DSCR_BASE_TX 0x00000090 | 445 | #define R_SER_DMA_DSCR_BASE_TX 0x00000090 |
446 | #define R_SER_DMA_DSCR_COUNT_TX 0x00000098 | 446 | #define R_SER_DMA_DSCR_COUNT_TX 0x00000098 |
447 | #define R_SER_DMA_CUR_DSCR_A_TX 0x000000A0 | 447 | #define R_SER_DMA_CUR_DSCR_A_TX 0x000000A0 |
448 | #define R_SER_DMA_CUR_DSCR_B_TX 0x000000A8 | 448 | #define R_SER_DMA_CUR_DSCR_B_TX 0x000000A8 |
449 | #define R_SER_DMA_CUR_DSCR_ADDR_TX 0x000000B0 | 449 | #define R_SER_DMA_CUR_DSCR_ADDR_TX 0x000000B0 |
450 | 450 | ||
451 | #define R_SER_MODE 0x00000100 | 451 | #define R_SER_MODE 0x00000100 |
452 | #define R_SER_MINFRM_SZ 0x00000108 | 452 | #define R_SER_MINFRM_SZ 0x00000108 |
453 | #define R_SER_MAXFRM_SZ 0x00000110 | 453 | #define R_SER_MAXFRM_SZ 0x00000110 |
454 | #define R_SER_ADDR 0x00000118 | 454 | #define R_SER_ADDR 0x00000118 |
455 | #define R_SER_USR0_ADDR 0x00000120 | 455 | #define R_SER_USR0_ADDR 0x00000120 |
456 | #define R_SER_USR1_ADDR 0x00000128 | 456 | #define R_SER_USR1_ADDR 0x00000128 |
457 | #define R_SER_USR2_ADDR 0x00000130 | 457 | #define R_SER_USR2_ADDR 0x00000130 |
458 | #define R_SER_USR3_ADDR 0x00000138 | 458 | #define R_SER_USR3_ADDR 0x00000138 |
459 | #define R_SER_CMD 0x00000140 | 459 | #define R_SER_CMD 0x00000140 |
460 | #define R_SER_TX_RD_THRSH 0x00000160 | 460 | #define R_SER_TX_RD_THRSH 0x00000160 |
461 | #define R_SER_TX_WR_THRSH 0x00000168 | 461 | #define R_SER_TX_WR_THRSH 0x00000168 |
462 | #define R_SER_RX_RD_THRSH 0x00000170 | 462 | #define R_SER_RX_RD_THRSH 0x00000170 |
463 | #define R_SER_LINE_MODE 0x00000178 | 463 | #define R_SER_LINE_MODE 0x00000178 |
464 | #define R_SER_DMA_ENABLE 0x00000180 | 464 | #define R_SER_DMA_ENABLE 0x00000180 |
465 | #define R_SER_INT_MASK 0x00000190 | 465 | #define R_SER_INT_MASK 0x00000190 |
466 | #define R_SER_STATUS 0x00000188 | 466 | #define R_SER_STATUS 0x00000188 |
467 | #define R_SER_STATUS_DEBUG 0x000001A8 | 467 | #define R_SER_STATUS_DEBUG 0x000001A8 |
468 | #define R_SER_RX_TABLE_BASE 0x00000200 | 468 | #define R_SER_RX_TABLE_BASE 0x00000200 |
469 | #define SER_RX_TABLE_COUNT 16 | 469 | #define SER_RX_TABLE_COUNT 16 |
470 | #define R_SER_TX_TABLE_BASE 0x00000300 | 470 | #define R_SER_TX_TABLE_BASE 0x00000300 |
471 | #define SER_TX_TABLE_COUNT 16 | 471 | #define SER_TX_TABLE_COUNT 16 |
472 | 472 | ||
473 | /* RMON Counters */ | 473 | /* RMON Counters */ |
474 | #define R_SER_RMON_TX_BYTE_LO 0x000001C0 | 474 | #define R_SER_RMON_TX_BYTE_LO 0x000001C0 |
475 | #define R_SER_RMON_TX_BYTE_HI 0x000001C8 | 475 | #define R_SER_RMON_TX_BYTE_HI 0x000001C8 |
476 | #define R_SER_RMON_RX_BYTE_LO 0x000001D0 | 476 | #define R_SER_RMON_RX_BYTE_LO 0x000001D0 |
477 | #define R_SER_RMON_RX_BYTE_HI 0x000001D8 | 477 | #define R_SER_RMON_RX_BYTE_HI 0x000001D8 |
478 | #define R_SER_RMON_TX_UNDERRUN 0x000001E0 | 478 | #define R_SER_RMON_TX_UNDERRUN 0x000001E0 |
479 | #define R_SER_RMON_RX_OVERFLOW 0x000001E8 | 479 | #define R_SER_RMON_RX_OVERFLOW 0x000001E8 |
480 | #define R_SER_RMON_RX_ERRORS 0x000001F0 | 480 | #define R_SER_RMON_RX_ERRORS 0x000001F0 |
481 | #define R_SER_RMON_RX_BADADDR 0x000001F8 | 481 | #define R_SER_RMON_RX_BADADDR 0x000001F8 |
482 | 482 | ||
483 | #endif /* 1250/112x */ | 483 | #endif /* 1250/112x */ |
484 | 484 | ||
@@ -486,38 +486,38 @@ | |||
486 | * Generic Bus Registers | 486 | * Generic Bus Registers |
487 | ********************************************************************* */ | 487 | ********************************************************************* */ |
488 | 488 | ||
489 | #define IO_EXT_CFG_COUNT 8 | 489 | #define IO_EXT_CFG_COUNT 8 |
490 | 490 | ||
491 | #define A_IO_EXT_BASE 0x0010061000 | 491 | #define A_IO_EXT_BASE 0x0010061000 |
492 | #define A_IO_EXT_REG(r) (A_IO_EXT_BASE + (r)) | 492 | #define A_IO_EXT_REG(r) (A_IO_EXT_BASE + (r)) |
493 | 493 | ||
494 | #define A_IO_EXT_CFG_BASE 0x0010061000 | 494 | #define A_IO_EXT_CFG_BASE 0x0010061000 |
495 | #define A_IO_EXT_MULT_SIZE_BASE 0x0010061100 | 495 | #define A_IO_EXT_MULT_SIZE_BASE 0x0010061100 |
496 | #define A_IO_EXT_START_ADDR_BASE 0x0010061200 | 496 | #define A_IO_EXT_START_ADDR_BASE 0x0010061200 |
497 | #define A_IO_EXT_TIME_CFG0_BASE 0x0010061600 | 497 | #define A_IO_EXT_TIME_CFG0_BASE 0x0010061600 |
498 | #define A_IO_EXT_TIME_CFG1_BASE 0x0010061700 | 498 | #define A_IO_EXT_TIME_CFG1_BASE 0x0010061700 |
499 | 499 | ||
500 | #define IO_EXT_REGISTER_SPACING 8 | 500 | #define IO_EXT_REGISTER_SPACING 8 |
501 | #define A_IO_EXT_CS_BASE(cs) (A_IO_EXT_CFG_BASE+IO_EXT_REGISTER_SPACING*(cs)) | 501 | #define A_IO_EXT_CS_BASE(cs) (A_IO_EXT_CFG_BASE+IO_EXT_REGISTER_SPACING*(cs)) |
502 | #define R_IO_EXT_REG(reg, cs) ((cs)*IO_EXT_REGISTER_SPACING + (reg)) | 502 | #define R_IO_EXT_REG(reg, cs) ((cs)*IO_EXT_REGISTER_SPACING + (reg)) |
503 | 503 | ||
504 | #define R_IO_EXT_CFG 0x0000 | 504 | #define R_IO_EXT_CFG 0x0000 |
505 | #define R_IO_EXT_MULT_SIZE 0x0100 | 505 | #define R_IO_EXT_MULT_SIZE 0x0100 |
506 | #define R_IO_EXT_START_ADDR 0x0200 | 506 | #define R_IO_EXT_START_ADDR 0x0200 |
507 | #define R_IO_EXT_TIME_CFG0 0x0600 | 507 | #define R_IO_EXT_TIME_CFG0 0x0600 |
508 | #define R_IO_EXT_TIME_CFG1 0x0700 | 508 | #define R_IO_EXT_TIME_CFG1 0x0700 |
509 | 509 | ||
510 | 510 | ||
511 | #define A_IO_INTERRUPT_STATUS 0x0010061A00 | 511 | #define A_IO_INTERRUPT_STATUS 0x0010061A00 |
512 | #define A_IO_INTERRUPT_DATA0 0x0010061A10 | 512 | #define A_IO_INTERRUPT_DATA0 0x0010061A10 |
513 | #define A_IO_INTERRUPT_DATA1 0x0010061A18 | 513 | #define A_IO_INTERRUPT_DATA1 0x0010061A18 |
514 | #define A_IO_INTERRUPT_DATA2 0x0010061A20 | 514 | #define A_IO_INTERRUPT_DATA2 0x0010061A20 |
515 | #define A_IO_INTERRUPT_DATA3 0x0010061A28 | 515 | #define A_IO_INTERRUPT_DATA3 0x0010061A28 |
516 | #define A_IO_INTERRUPT_ADDR0 0x0010061A30 | 516 | #define A_IO_INTERRUPT_ADDR0 0x0010061A30 |
517 | #define A_IO_INTERRUPT_ADDR1 0x0010061A40 | 517 | #define A_IO_INTERRUPT_ADDR1 0x0010061A40 |
518 | #define A_IO_INTERRUPT_PARITY 0x0010061A50 | 518 | #define A_IO_INTERRUPT_PARITY 0x0010061A50 |
519 | #define A_IO_PCMCIA_CFG 0x0010061A60 | 519 | #define A_IO_PCMCIA_CFG 0x0010061A60 |
520 | #define A_IO_PCMCIA_STATUS 0x0010061A70 | 520 | #define A_IO_PCMCIA_STATUS 0x0010061A70 |
521 | #define A_IO_DRIVE_0 0x0010061300 | 521 | #define A_IO_DRIVE_0 0x0010061300 |
522 | #define A_IO_DRIVE_1 0x0010061308 | 522 | #define A_IO_DRIVE_1 0x0010061308 |
523 | #define A_IO_DRIVE_2 0x0010061310 | 523 | #define A_IO_DRIVE_2 0x0010061310 |
@@ -527,76 +527,76 @@ | |||
527 | #define R_IO_DRIVE(x) ((x)*IO_DRIVE_REGISTER_SPACING) | 527 | #define R_IO_DRIVE(x) ((x)*IO_DRIVE_REGISTER_SPACING) |
528 | #define A_IO_DRIVE(x) (A_IO_DRIVE_BASE + R_IO_DRIVE(x)) | 528 | #define A_IO_DRIVE(x) (A_IO_DRIVE_BASE + R_IO_DRIVE(x)) |
529 | 529 | ||
530 | #define R_IO_INTERRUPT_STATUS 0x0A00 | 530 | #define R_IO_INTERRUPT_STATUS 0x0A00 |
531 | #define R_IO_INTERRUPT_DATA0 0x0A10 | 531 | #define R_IO_INTERRUPT_DATA0 0x0A10 |
532 | #define R_IO_INTERRUPT_DATA1 0x0A18 | 532 | #define R_IO_INTERRUPT_DATA1 0x0A18 |
533 | #define R_IO_INTERRUPT_DATA2 0x0A20 | 533 | #define R_IO_INTERRUPT_DATA2 0x0A20 |
534 | #define R_IO_INTERRUPT_DATA3 0x0A28 | 534 | #define R_IO_INTERRUPT_DATA3 0x0A28 |
535 | #define R_IO_INTERRUPT_ADDR0 0x0A30 | 535 | #define R_IO_INTERRUPT_ADDR0 0x0A30 |
536 | #define R_IO_INTERRUPT_ADDR1 0x0A40 | 536 | #define R_IO_INTERRUPT_ADDR1 0x0A40 |
537 | #define R_IO_INTERRUPT_PARITY 0x0A50 | 537 | #define R_IO_INTERRUPT_PARITY 0x0A50 |
538 | #define R_IO_PCMCIA_CFG 0x0A60 | 538 | #define R_IO_PCMCIA_CFG 0x0A60 |
539 | #define R_IO_PCMCIA_STATUS 0x0A70 | 539 | #define R_IO_PCMCIA_STATUS 0x0A70 |
540 | 540 | ||
541 | /* ********************************************************************* | 541 | /* ********************************************************************* |
542 | * GPIO Registers | 542 | * GPIO Registers |
543 | ********************************************************************* */ | 543 | ********************************************************************* */ |
544 | 544 | ||
545 | #define A_GPIO_CLR_EDGE 0x0010061A80 | 545 | #define A_GPIO_CLR_EDGE 0x0010061A80 |
546 | #define A_GPIO_INT_TYPE 0x0010061A88 | 546 | #define A_GPIO_INT_TYPE 0x0010061A88 |
547 | #define A_GPIO_INPUT_INVERT 0x0010061A90 | 547 | #define A_GPIO_INPUT_INVERT 0x0010061A90 |
548 | #define A_GPIO_GLITCH 0x0010061A98 | 548 | #define A_GPIO_GLITCH 0x0010061A98 |
549 | #define A_GPIO_READ 0x0010061AA0 | 549 | #define A_GPIO_READ 0x0010061AA0 |
550 | #define A_GPIO_DIRECTION 0x0010061AA8 | 550 | #define A_GPIO_DIRECTION 0x0010061AA8 |
551 | #define A_GPIO_PIN_CLR 0x0010061AB0 | 551 | #define A_GPIO_PIN_CLR 0x0010061AB0 |
552 | #define A_GPIO_PIN_SET 0x0010061AB8 | 552 | #define A_GPIO_PIN_SET 0x0010061AB8 |
553 | 553 | ||
554 | #define A_GPIO_BASE 0x0010061A80 | 554 | #define A_GPIO_BASE 0x0010061A80 |
555 | 555 | ||
556 | #define R_GPIO_CLR_EDGE 0x00 | 556 | #define R_GPIO_CLR_EDGE 0x00 |
557 | #define R_GPIO_INT_TYPE 0x08 | 557 | #define R_GPIO_INT_TYPE 0x08 |
558 | #define R_GPIO_INPUT_INVERT 0x10 | 558 | #define R_GPIO_INPUT_INVERT 0x10 |
559 | #define R_GPIO_GLITCH 0x18 | 559 | #define R_GPIO_GLITCH 0x18 |
560 | #define R_GPIO_READ 0x20 | 560 | #define R_GPIO_READ 0x20 |
561 | #define R_GPIO_DIRECTION 0x28 | 561 | #define R_GPIO_DIRECTION 0x28 |
562 | #define R_GPIO_PIN_CLR 0x30 | 562 | #define R_GPIO_PIN_CLR 0x30 |
563 | #define R_GPIO_PIN_SET 0x38 | 563 | #define R_GPIO_PIN_SET 0x38 |
564 | 564 | ||
565 | /* ********************************************************************* | 565 | /* ********************************************************************* |
566 | * SMBus Registers | 566 | * SMBus Registers |
567 | ********************************************************************* */ | 567 | ********************************************************************* */ |
568 | 568 | ||
569 | #define A_SMB_XTRA_0 0x0010060000 | 569 | #define A_SMB_XTRA_0 0x0010060000 |
570 | #define A_SMB_XTRA_1 0x0010060008 | 570 | #define A_SMB_XTRA_1 0x0010060008 |
571 | #define A_SMB_FREQ_0 0x0010060010 | 571 | #define A_SMB_FREQ_0 0x0010060010 |
572 | #define A_SMB_FREQ_1 0x0010060018 | 572 | #define A_SMB_FREQ_1 0x0010060018 |
573 | #define A_SMB_STATUS_0 0x0010060020 | 573 | #define A_SMB_STATUS_0 0x0010060020 |
574 | #define A_SMB_STATUS_1 0x0010060028 | 574 | #define A_SMB_STATUS_1 0x0010060028 |
575 | #define A_SMB_CMD_0 0x0010060030 | 575 | #define A_SMB_CMD_0 0x0010060030 |
576 | #define A_SMB_CMD_1 0x0010060038 | 576 | #define A_SMB_CMD_1 0x0010060038 |
577 | #define A_SMB_START_0 0x0010060040 | 577 | #define A_SMB_START_0 0x0010060040 |
578 | #define A_SMB_START_1 0x0010060048 | 578 | #define A_SMB_START_1 0x0010060048 |
579 | #define A_SMB_DATA_0 0x0010060050 | 579 | #define A_SMB_DATA_0 0x0010060050 |
580 | #define A_SMB_DATA_1 0x0010060058 | 580 | #define A_SMB_DATA_1 0x0010060058 |
581 | #define A_SMB_CONTROL_0 0x0010060060 | 581 | #define A_SMB_CONTROL_0 0x0010060060 |
582 | #define A_SMB_CONTROL_1 0x0010060068 | 582 | #define A_SMB_CONTROL_1 0x0010060068 |
583 | #define A_SMB_PEC_0 0x0010060070 | 583 | #define A_SMB_PEC_0 0x0010060070 |
584 | #define A_SMB_PEC_1 0x0010060078 | 584 | #define A_SMB_PEC_1 0x0010060078 |
585 | 585 | ||
586 | #define A_SMB_0 0x0010060000 | 586 | #define A_SMB_0 0x0010060000 |
587 | #define A_SMB_1 0x0010060008 | 587 | #define A_SMB_1 0x0010060008 |
588 | #define SMB_REGISTER_SPACING 0x8 | 588 | #define SMB_REGISTER_SPACING 0x8 |
589 | #define A_SMB_BASE(idx) (A_SMB_0+(idx)*SMB_REGISTER_SPACING) | 589 | #define A_SMB_BASE(idx) (A_SMB_0+(idx)*SMB_REGISTER_SPACING) |
590 | #define A_SMB_REGISTER(idx, reg) (A_SMB_BASE(idx)+(reg)) | 590 | #define A_SMB_REGISTER(idx, reg) (A_SMB_BASE(idx)+(reg)) |
591 | 591 | ||
592 | #define R_SMB_XTRA 0x0000000000 | 592 | #define R_SMB_XTRA 0x0000000000 |
593 | #define R_SMB_FREQ 0x0000000010 | 593 | #define R_SMB_FREQ 0x0000000010 |
594 | #define R_SMB_STATUS 0x0000000020 | 594 | #define R_SMB_STATUS 0x0000000020 |
595 | #define R_SMB_CMD 0x0000000030 | 595 | #define R_SMB_CMD 0x0000000030 |
596 | #define R_SMB_START 0x0000000040 | 596 | #define R_SMB_START 0x0000000040 |
597 | #define R_SMB_DATA 0x0000000050 | 597 | #define R_SMB_DATA 0x0000000050 |
598 | #define R_SMB_CONTROL 0x0000000060 | 598 | #define R_SMB_CONTROL 0x0000000060 |
599 | #define R_SMB_PEC 0x0000000070 | 599 | #define R_SMB_PEC 0x0000000070 |
600 | 600 | ||
601 | /* ********************************************************************* | 601 | /* ********************************************************************* |
602 | * Timer Registers | 602 | * Timer Registers |
@@ -607,55 +607,55 @@ | |||
607 | */ | 607 | */ |
608 | 608 | ||
609 | #define A_SCD_WDOG_0 0x0010020050 | 609 | #define A_SCD_WDOG_0 0x0010020050 |
610 | #define A_SCD_WDOG_1 0x0010020150 | 610 | #define A_SCD_WDOG_1 0x0010020150 |
611 | #define SCD_WDOG_SPACING 0x100 | 611 | #define SCD_WDOG_SPACING 0x100 |
612 | #define SCD_NUM_WDOGS 2 | 612 | #define SCD_NUM_WDOGS 2 |
613 | #define A_SCD_WDOG_BASE(w) (A_SCD_WDOG_0+SCD_WDOG_SPACING*(w)) | 613 | #define A_SCD_WDOG_BASE(w) (A_SCD_WDOG_0+SCD_WDOG_SPACING*(w)) |
614 | #define A_SCD_WDOG_REGISTER(w, r) (A_SCD_WDOG_BASE(w) + (r)) | 614 | #define A_SCD_WDOG_REGISTER(w, r) (A_SCD_WDOG_BASE(w) + (r)) |
615 | 615 | ||
616 | #define R_SCD_WDOG_INIT 0x0000000000 | 616 | #define R_SCD_WDOG_INIT 0x0000000000 |
617 | #define R_SCD_WDOG_CNT 0x0000000008 | 617 | #define R_SCD_WDOG_CNT 0x0000000008 |
618 | #define R_SCD_WDOG_CFG 0x0000000010 | 618 | #define R_SCD_WDOG_CFG 0x0000000010 |
619 | 619 | ||
620 | #define A_SCD_WDOG_INIT_0 0x0010020050 | 620 | #define A_SCD_WDOG_INIT_0 0x0010020050 |
621 | #define A_SCD_WDOG_CNT_0 0x0010020058 | 621 | #define A_SCD_WDOG_CNT_0 0x0010020058 |
622 | #define A_SCD_WDOG_CFG_0 0x0010020060 | 622 | #define A_SCD_WDOG_CFG_0 0x0010020060 |
623 | 623 | ||
624 | #define A_SCD_WDOG_INIT_1 0x0010020150 | 624 | #define A_SCD_WDOG_INIT_1 0x0010020150 |
625 | #define A_SCD_WDOG_CNT_1 0x0010020158 | 625 | #define A_SCD_WDOG_CNT_1 0x0010020158 |
626 | #define A_SCD_WDOG_CFG_1 0x0010020160 | 626 | #define A_SCD_WDOG_CFG_1 0x0010020160 |
627 | 627 | ||
628 | /* | 628 | /* |
629 | * Generic timers | 629 | * Generic timers |
630 | */ | 630 | */ |
631 | 631 | ||
632 | #define A_SCD_TIMER_0 0x0010020070 | 632 | #define A_SCD_TIMER_0 0x0010020070 |
633 | #define A_SCD_TIMER_1 0x0010020078 | 633 | #define A_SCD_TIMER_1 0x0010020078 |
634 | #define A_SCD_TIMER_2 0x0010020170 | 634 | #define A_SCD_TIMER_2 0x0010020170 |
635 | #define A_SCD_TIMER_3 0x0010020178 | 635 | #define A_SCD_TIMER_3 0x0010020178 |
636 | #define SCD_NUM_TIMERS 4 | 636 | #define SCD_NUM_TIMERS 4 |
637 | #define A_SCD_TIMER_BASE(w) (A_SCD_TIMER_0+0x08*((w)&1)+0x100*(((w)&2)>>1)) | 637 | #define A_SCD_TIMER_BASE(w) (A_SCD_TIMER_0+0x08*((w)&1)+0x100*(((w)&2)>>1)) |
638 | #define A_SCD_TIMER_REGISTER(w, r) (A_SCD_TIMER_BASE(w) + (r)) | 638 | #define A_SCD_TIMER_REGISTER(w, r) (A_SCD_TIMER_BASE(w) + (r)) |
639 | 639 | ||
640 | #define R_SCD_TIMER_INIT 0x0000000000 | 640 | #define R_SCD_TIMER_INIT 0x0000000000 |
641 | #define R_SCD_TIMER_CNT 0x0000000010 | 641 | #define R_SCD_TIMER_CNT 0x0000000010 |
642 | #define R_SCD_TIMER_CFG 0x0000000020 | 642 | #define R_SCD_TIMER_CFG 0x0000000020 |
643 | 643 | ||
644 | #define A_SCD_TIMER_INIT_0 0x0010020070 | 644 | #define A_SCD_TIMER_INIT_0 0x0010020070 |
645 | #define A_SCD_TIMER_CNT_0 0x0010020080 | 645 | #define A_SCD_TIMER_CNT_0 0x0010020080 |
646 | #define A_SCD_TIMER_CFG_0 0x0010020090 | 646 | #define A_SCD_TIMER_CFG_0 0x0010020090 |
647 | 647 | ||
648 | #define A_SCD_TIMER_INIT_1 0x0010020078 | 648 | #define A_SCD_TIMER_INIT_1 0x0010020078 |
649 | #define A_SCD_TIMER_CNT_1 0x0010020088 | 649 | #define A_SCD_TIMER_CNT_1 0x0010020088 |
650 | #define A_SCD_TIMER_CFG_1 0x0010020098 | 650 | #define A_SCD_TIMER_CFG_1 0x0010020098 |
651 | 651 | ||
652 | #define A_SCD_TIMER_INIT_2 0x0010020170 | 652 | #define A_SCD_TIMER_INIT_2 0x0010020170 |
653 | #define A_SCD_TIMER_CNT_2 0x0010020180 | 653 | #define A_SCD_TIMER_CNT_2 0x0010020180 |
654 | #define A_SCD_TIMER_CFG_2 0x0010020190 | 654 | #define A_SCD_TIMER_CFG_2 0x0010020190 |
655 | 655 | ||
656 | #define A_SCD_TIMER_INIT_3 0x0010020178 | 656 | #define A_SCD_TIMER_INIT_3 0x0010020178 |
657 | #define A_SCD_TIMER_CNT_3 0x0010020188 | 657 | #define A_SCD_TIMER_CNT_3 0x0010020188 |
658 | #define A_SCD_TIMER_CFG_3 0x0010020198 | 658 | #define A_SCD_TIMER_CFG_3 0x0010020198 |
659 | 659 | ||
660 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 660 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
661 | #define A_SCD_SCRATCH 0x0010020C10 | 661 | #define A_SCD_SCRATCH 0x0010020C10 |
@@ -671,28 +671,28 @@ | |||
671 | * System Control Registers | 671 | * System Control Registers |
672 | ********************************************************************* */ | 672 | ********************************************************************* */ |
673 | 673 | ||
674 | #define A_SCD_SYSTEM_REVISION 0x0010020000 | 674 | #define A_SCD_SYSTEM_REVISION 0x0010020000 |
675 | #define A_SCD_SYSTEM_CFG 0x0010020008 | 675 | #define A_SCD_SYSTEM_CFG 0x0010020008 |
676 | #define A_SCD_SYSTEM_MANUF 0x0010038000 | 676 | #define A_SCD_SYSTEM_MANUF 0x0010038000 |
677 | 677 | ||
678 | /* ********************************************************************* | 678 | /* ********************************************************************* |
679 | * System Address Trap Registers | 679 | * System Address Trap Registers |
680 | ********************************************************************* */ | 680 | ********************************************************************* */ |
681 | 681 | ||
682 | #define A_ADDR_TRAP_INDEX 0x00100200B0 | 682 | #define A_ADDR_TRAP_INDEX 0x00100200B0 |
683 | #define A_ADDR_TRAP_REG 0x00100200B8 | 683 | #define A_ADDR_TRAP_REG 0x00100200B8 |
684 | #define A_ADDR_TRAP_UP_0 0x0010020400 | 684 | #define A_ADDR_TRAP_UP_0 0x0010020400 |
685 | #define A_ADDR_TRAP_UP_1 0x0010020408 | 685 | #define A_ADDR_TRAP_UP_1 0x0010020408 |
686 | #define A_ADDR_TRAP_UP_2 0x0010020410 | 686 | #define A_ADDR_TRAP_UP_2 0x0010020410 |
687 | #define A_ADDR_TRAP_UP_3 0x0010020418 | 687 | #define A_ADDR_TRAP_UP_3 0x0010020418 |
688 | #define A_ADDR_TRAP_DOWN_0 0x0010020420 | 688 | #define A_ADDR_TRAP_DOWN_0 0x0010020420 |
689 | #define A_ADDR_TRAP_DOWN_1 0x0010020428 | 689 | #define A_ADDR_TRAP_DOWN_1 0x0010020428 |
690 | #define A_ADDR_TRAP_DOWN_2 0x0010020430 | 690 | #define A_ADDR_TRAP_DOWN_2 0x0010020430 |
691 | #define A_ADDR_TRAP_DOWN_3 0x0010020438 | 691 | #define A_ADDR_TRAP_DOWN_3 0x0010020438 |
692 | #define A_ADDR_TRAP_CFG_0 0x0010020440 | 692 | #define A_ADDR_TRAP_CFG_0 0x0010020440 |
693 | #define A_ADDR_TRAP_CFG_1 0x0010020448 | 693 | #define A_ADDR_TRAP_CFG_1 0x0010020448 |
694 | #define A_ADDR_TRAP_CFG_2 0x0010020450 | 694 | #define A_ADDR_TRAP_CFG_2 0x0010020450 |
695 | #define A_ADDR_TRAP_CFG_3 0x0010020458 | 695 | #define A_ADDR_TRAP_CFG_3 0x0010020458 |
696 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 696 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
697 | #define A_ADDR_TRAP_REG_DEBUG 0x0010020460 | 697 | #define A_ADDR_TRAP_REG_DEBUG 0x0010020460 |
698 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 698 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
@@ -708,31 +708,31 @@ | |||
708 | * System Interrupt Mapper Registers | 708 | * System Interrupt Mapper Registers |
709 | ********************************************************************* */ | 709 | ********************************************************************* */ |
710 | 710 | ||
711 | #define A_IMR_CPU0_BASE 0x0010020000 | 711 | #define A_IMR_CPU0_BASE 0x0010020000 |
712 | #define A_IMR_CPU1_BASE 0x0010022000 | 712 | #define A_IMR_CPU1_BASE 0x0010022000 |
713 | #define IMR_REGISTER_SPACING 0x2000 | 713 | #define IMR_REGISTER_SPACING 0x2000 |
714 | #define IMR_REGISTER_SPACING_SHIFT 13 | 714 | #define IMR_REGISTER_SPACING_SHIFT 13 |
715 | 715 | ||
716 | #define A_IMR_MAPPER(cpu) (A_IMR_CPU0_BASE+(cpu)*IMR_REGISTER_SPACING) | 716 | #define A_IMR_MAPPER(cpu) (A_IMR_CPU0_BASE+(cpu)*IMR_REGISTER_SPACING) |
717 | #define A_IMR_REGISTER(cpu, reg) (A_IMR_MAPPER(cpu)+(reg)) | 717 | #define A_IMR_REGISTER(cpu, reg) (A_IMR_MAPPER(cpu)+(reg)) |
718 | 718 | ||
719 | #define R_IMR_INTERRUPT_DIAG 0x0010 | 719 | #define R_IMR_INTERRUPT_DIAG 0x0010 |
720 | #define R_IMR_INTERRUPT_LDT 0x0018 | 720 | #define R_IMR_INTERRUPT_LDT 0x0018 |
721 | #define R_IMR_INTERRUPT_MASK 0x0028 | 721 | #define R_IMR_INTERRUPT_MASK 0x0028 |
722 | #define R_IMR_INTERRUPT_TRACE 0x0038 | 722 | #define R_IMR_INTERRUPT_TRACE 0x0038 |
723 | #define R_IMR_INTERRUPT_SOURCE_STATUS 0x0040 | 723 | #define R_IMR_INTERRUPT_SOURCE_STATUS 0x0040 |
724 | #define R_IMR_LDT_INTERRUPT_SET 0x0048 | 724 | #define R_IMR_LDT_INTERRUPT_SET 0x0048 |
725 | #define R_IMR_LDT_INTERRUPT 0x0018 | 725 | #define R_IMR_LDT_INTERRUPT 0x0018 |
726 | #define R_IMR_LDT_INTERRUPT_CLR 0x0020 | 726 | #define R_IMR_LDT_INTERRUPT_CLR 0x0020 |
727 | #define R_IMR_MAILBOX_CPU 0x00c0 | 727 | #define R_IMR_MAILBOX_CPU 0x00c0 |
728 | #define R_IMR_ALIAS_MAILBOX_CPU 0x1000 | 728 | #define R_IMR_ALIAS_MAILBOX_CPU 0x1000 |
729 | #define R_IMR_MAILBOX_SET_CPU 0x00C8 | 729 | #define R_IMR_MAILBOX_SET_CPU 0x00C8 |
730 | #define R_IMR_ALIAS_MAILBOX_SET_CPU 0x1008 | 730 | #define R_IMR_ALIAS_MAILBOX_SET_CPU 0x1008 |
731 | #define R_IMR_MAILBOX_CLR_CPU 0x00D0 | 731 | #define R_IMR_MAILBOX_CLR_CPU 0x00D0 |
732 | #define R_IMR_INTERRUPT_STATUS_BASE 0x0100 | 732 | #define R_IMR_INTERRUPT_STATUS_BASE 0x0100 |
733 | #define R_IMR_INTERRUPT_STATUS_COUNT 7 | 733 | #define R_IMR_INTERRUPT_STATUS_COUNT 7 |
734 | #define R_IMR_INTERRUPT_MAP_BASE 0x0200 | 734 | #define R_IMR_INTERRUPT_MAP_BASE 0x0200 |
735 | #define R_IMR_INTERRUPT_MAP_COUNT 64 | 735 | #define R_IMR_INTERRUPT_MAP_COUNT 64 |
736 | 736 | ||
737 | /* | 737 | /* |
738 | * these macros work together to build the address of a mailbox | 738 | * these macros work together to build the address of a mailbox |
@@ -746,11 +746,11 @@ | |||
746 | * System Performance Counter Registers | 746 | * System Performance Counter Registers |
747 | ********************************************************************* */ | 747 | ********************************************************************* */ |
748 | 748 | ||
749 | #define A_SCD_PERF_CNT_CFG 0x00100204C0 | 749 | #define A_SCD_PERF_CNT_CFG 0x00100204C0 |
750 | #define A_SCD_PERF_CNT_0 0x00100204D0 | 750 | #define A_SCD_PERF_CNT_0 0x00100204D0 |
751 | #define A_SCD_PERF_CNT_1 0x00100204D8 | 751 | #define A_SCD_PERF_CNT_1 0x00100204D8 |
752 | #define A_SCD_PERF_CNT_2 0x00100204E0 | 752 | #define A_SCD_PERF_CNT_2 0x00100204E0 |
753 | #define A_SCD_PERF_CNT_3 0x00100204E8 | 753 | #define A_SCD_PERF_CNT_3 0x00100204E8 |
754 | 754 | ||
755 | #define SCD_NUM_PERF_CNT 4 | 755 | #define SCD_NUM_PERF_CNT 4 |
756 | #define SCD_PERF_CNT_SPACING 8 | 756 | #define SCD_PERF_CNT_SPACING 8 |
@@ -760,46 +760,46 @@ | |||
760 | * System Bus Watcher Registers | 760 | * System Bus Watcher Registers |
761 | ********************************************************************* */ | 761 | ********************************************************************* */ |
762 | 762 | ||
763 | #define A_SCD_BUS_ERR_STATUS 0x0010020880 | 763 | #define A_SCD_BUS_ERR_STATUS 0x0010020880 |
764 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 764 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
765 | #define A_SCD_BUS_ERR_STATUS_DEBUG 0x00100208D0 | 765 | #define A_SCD_BUS_ERR_STATUS_DEBUG 0x00100208D0 |
766 | #define A_BUS_ERR_STATUS_DEBUG 0x00100208D0 | 766 | #define A_BUS_ERR_STATUS_DEBUG 0x00100208D0 |
767 | #endif /* 1250 PASS2 || 112x PASS1 */ | 767 | #endif /* 1250 PASS2 || 112x PASS1 */ |
768 | #define A_BUS_ERR_DATA_0 0x00100208A0 | 768 | #define A_BUS_ERR_DATA_0 0x00100208A0 |
769 | #define A_BUS_ERR_DATA_1 0x00100208A8 | 769 | #define A_BUS_ERR_DATA_1 0x00100208A8 |
770 | #define A_BUS_ERR_DATA_2 0x00100208B0 | 770 | #define A_BUS_ERR_DATA_2 0x00100208B0 |
771 | #define A_BUS_ERR_DATA_3 0x00100208B8 | 771 | #define A_BUS_ERR_DATA_3 0x00100208B8 |
772 | #define A_BUS_L2_ERRORS 0x00100208C0 | 772 | #define A_BUS_L2_ERRORS 0x00100208C0 |
773 | #define A_BUS_MEM_IO_ERRORS 0x00100208C8 | 773 | #define A_BUS_MEM_IO_ERRORS 0x00100208C8 |
774 | 774 | ||
775 | /* ********************************************************************* | 775 | /* ********************************************************************* |
776 | * System Debug Controller Registers | 776 | * System Debug Controller Registers |
777 | ********************************************************************* */ | 777 | ********************************************************************* */ |
778 | 778 | ||
779 | #define A_SCD_JTAG_BASE 0x0010000000 | 779 | #define A_SCD_JTAG_BASE 0x0010000000 |
780 | 780 | ||
781 | /* ********************************************************************* | 781 | /* ********************************************************************* |
782 | * System Trace Buffer Registers | 782 | * System Trace Buffer Registers |
783 | ********************************************************************* */ | 783 | ********************************************************************* */ |
784 | 784 | ||
785 | #define A_SCD_TRACE_CFG 0x0010020A00 | 785 | #define A_SCD_TRACE_CFG 0x0010020A00 |
786 | #define A_SCD_TRACE_READ 0x0010020A08 | 786 | #define A_SCD_TRACE_READ 0x0010020A08 |
787 | #define A_SCD_TRACE_EVENT_0 0x0010020A20 | 787 | #define A_SCD_TRACE_EVENT_0 0x0010020A20 |
788 | #define A_SCD_TRACE_EVENT_1 0x0010020A28 | 788 | #define A_SCD_TRACE_EVENT_1 0x0010020A28 |
789 | #define A_SCD_TRACE_EVENT_2 0x0010020A30 | 789 | #define A_SCD_TRACE_EVENT_2 0x0010020A30 |
790 | #define A_SCD_TRACE_EVENT_3 0x0010020A38 | 790 | #define A_SCD_TRACE_EVENT_3 0x0010020A38 |
791 | #define A_SCD_TRACE_SEQUENCE_0 0x0010020A40 | 791 | #define A_SCD_TRACE_SEQUENCE_0 0x0010020A40 |
792 | #define A_SCD_TRACE_SEQUENCE_1 0x0010020A48 | 792 | #define A_SCD_TRACE_SEQUENCE_1 0x0010020A48 |
793 | #define A_SCD_TRACE_SEQUENCE_2 0x0010020A50 | 793 | #define A_SCD_TRACE_SEQUENCE_2 0x0010020A50 |
794 | #define A_SCD_TRACE_SEQUENCE_3 0x0010020A58 | 794 | #define A_SCD_TRACE_SEQUENCE_3 0x0010020A58 |
795 | #define A_SCD_TRACE_EVENT_4 0x0010020A60 | 795 | #define A_SCD_TRACE_EVENT_4 0x0010020A60 |
796 | #define A_SCD_TRACE_EVENT_5 0x0010020A68 | 796 | #define A_SCD_TRACE_EVENT_5 0x0010020A68 |
797 | #define A_SCD_TRACE_EVENT_6 0x0010020A70 | 797 | #define A_SCD_TRACE_EVENT_6 0x0010020A70 |
798 | #define A_SCD_TRACE_EVENT_7 0x0010020A78 | 798 | #define A_SCD_TRACE_EVENT_7 0x0010020A78 |
799 | #define A_SCD_TRACE_SEQUENCE_4 0x0010020A80 | 799 | #define A_SCD_TRACE_SEQUENCE_4 0x0010020A80 |
800 | #define A_SCD_TRACE_SEQUENCE_5 0x0010020A88 | 800 | #define A_SCD_TRACE_SEQUENCE_5 0x0010020A88 |
801 | #define A_SCD_TRACE_SEQUENCE_6 0x0010020A90 | 801 | #define A_SCD_TRACE_SEQUENCE_6 0x0010020A90 |
802 | #define A_SCD_TRACE_SEQUENCE_7 0x0010020A98 | 802 | #define A_SCD_TRACE_SEQUENCE_7 0x0010020A98 |
803 | 803 | ||
804 | #define TRACE_REGISTER_SPACING 8 | 804 | #define TRACE_REGISTER_SPACING 8 |
805 | #define TRACE_NUM_REGISTERS 8 | 805 | #define TRACE_NUM_REGISTERS 8 |
@@ -814,8 +814,8 @@ | |||
814 | * System Generic DMA Registers | 814 | * System Generic DMA Registers |
815 | ********************************************************************* */ | 815 | ********************************************************************* */ |
816 | 816 | ||
817 | #define A_DM_0 0x0010020B00 | 817 | #define A_DM_0 0x0010020B00 |
818 | #define A_DM_1 0x0010020B20 | 818 | #define A_DM_1 0x0010020B20 |
819 | #define A_DM_2 0x0010020B40 | 819 | #define A_DM_2 0x0010020B40 |
820 | #define A_DM_3 0x0010020B60 | 820 | #define A_DM_3 0x0010020B60 |
821 | #define DM_REGISTER_SPACING 0x20 | 821 | #define DM_REGISTER_SPACING 0x20 |
@@ -854,39 +854,39 @@ | |||
854 | ********************************************************************* */ | 854 | ********************************************************************* */ |
855 | 855 | ||
856 | #if SIBYTE_HDR_FEATURE_1250_112x | 856 | #if SIBYTE_HDR_FEATURE_1250_112x |
857 | #define A_PHYS_MEMORY_0 _SB_MAKE64(0x0000000000) | 857 | #define A_PHYS_MEMORY_0 _SB_MAKE64(0x0000000000) |
858 | #define A_PHYS_MEMORY_SIZE _SB_MAKE64((256*1024*1024)) | 858 | #define A_PHYS_MEMORY_SIZE _SB_MAKE64((256*1024*1024)) |
859 | #define A_PHYS_SYSTEM_CTL _SB_MAKE64(0x0010000000) | 859 | #define A_PHYS_SYSTEM_CTL _SB_MAKE64(0x0010000000) |
860 | #define A_PHYS_IO_SYSTEM _SB_MAKE64(0x0010060000) | 860 | #define A_PHYS_IO_SYSTEM _SB_MAKE64(0x0010060000) |
861 | #define A_PHYS_GENBUS _SB_MAKE64(0x0010090000) | 861 | #define A_PHYS_GENBUS _SB_MAKE64(0x0010090000) |
862 | #define A_PHYS_GENBUS_END _SB_MAKE64(0x0040000000) | 862 | #define A_PHYS_GENBUS_END _SB_MAKE64(0x0040000000) |
863 | #define A_PHYS_LDTPCI_IO_MATCH_BYTES_32 _SB_MAKE64(0x0040000000) | 863 | #define A_PHYS_LDTPCI_IO_MATCH_BYTES_32 _SB_MAKE64(0x0040000000) |
864 | #define A_PHYS_LDTPCI_IO_MATCH_BITS_32 _SB_MAKE64(0x0060000000) | 864 | #define A_PHYS_LDTPCI_IO_MATCH_BITS_32 _SB_MAKE64(0x0060000000) |
865 | #define A_PHYS_MEMORY_1 _SB_MAKE64(0x0080000000) | 865 | #define A_PHYS_MEMORY_1 _SB_MAKE64(0x0080000000) |
866 | #define A_PHYS_MEMORY_2 _SB_MAKE64(0x0090000000) | 866 | #define A_PHYS_MEMORY_2 _SB_MAKE64(0x0090000000) |
867 | #define A_PHYS_MEMORY_3 _SB_MAKE64(0x00C0000000) | 867 | #define A_PHYS_MEMORY_3 _SB_MAKE64(0x00C0000000) |
868 | #define A_PHYS_L2_CACHE_TEST _SB_MAKE64(0x00D0000000) | 868 | #define A_PHYS_L2_CACHE_TEST _SB_MAKE64(0x00D0000000) |
869 | #define A_PHYS_LDT_SPECIAL_MATCH_BYTES _SB_MAKE64(0x00D8000000) | 869 | #define A_PHYS_LDT_SPECIAL_MATCH_BYTES _SB_MAKE64(0x00D8000000) |
870 | #define A_PHYS_LDTPCI_IO_MATCH_BYTES _SB_MAKE64(0x00DC000000) | 870 | #define A_PHYS_LDTPCI_IO_MATCH_BYTES _SB_MAKE64(0x00DC000000) |
871 | #define A_PHYS_LDTPCI_CFG_MATCH_BYTES _SB_MAKE64(0x00DE000000) | 871 | #define A_PHYS_LDTPCI_CFG_MATCH_BYTES _SB_MAKE64(0x00DE000000) |
872 | #define A_PHYS_LDT_SPECIAL_MATCH_BITS _SB_MAKE64(0x00F8000000) | 872 | #define A_PHYS_LDT_SPECIAL_MATCH_BITS _SB_MAKE64(0x00F8000000) |
873 | #define A_PHYS_LDTPCI_IO_MATCH_BITS _SB_MAKE64(0x00FC000000) | 873 | #define A_PHYS_LDTPCI_IO_MATCH_BITS _SB_MAKE64(0x00FC000000) |
874 | #define A_PHYS_LDTPCI_CFG_MATCH_BITS _SB_MAKE64(0x00FE000000) | 874 | #define A_PHYS_LDTPCI_CFG_MATCH_BITS _SB_MAKE64(0x00FE000000) |
875 | #define A_PHYS_MEMORY_EXP _SB_MAKE64(0x0100000000) | 875 | #define A_PHYS_MEMORY_EXP _SB_MAKE64(0x0100000000) |
876 | #define A_PHYS_MEMORY_EXP_SIZE _SB_MAKE64((508*1024*1024*1024)) | 876 | #define A_PHYS_MEMORY_EXP_SIZE _SB_MAKE64((508*1024*1024*1024)) |
877 | #define A_PHYS_LDT_EXP _SB_MAKE64(0x8000000000) | 877 | #define A_PHYS_LDT_EXP _SB_MAKE64(0x8000000000) |
878 | #define A_PHYS_PCI_FULLACCESS_BYTES _SB_MAKE64(0xF000000000) | 878 | #define A_PHYS_PCI_FULLACCESS_BYTES _SB_MAKE64(0xF000000000) |
879 | #define A_PHYS_PCI_FULLACCESS_BITS _SB_MAKE64(0xF100000000) | 879 | #define A_PHYS_PCI_FULLACCESS_BITS _SB_MAKE64(0xF100000000) |
880 | #define A_PHYS_RESERVED _SB_MAKE64(0xF200000000) | 880 | #define A_PHYS_RESERVED _SB_MAKE64(0xF200000000) |
881 | #define A_PHYS_RESERVED_SPECIAL_LDT _SB_MAKE64(0xFD00000000) | 881 | #define A_PHYS_RESERVED_SPECIAL_LDT _SB_MAKE64(0xFD00000000) |
882 | 882 | ||
883 | #define A_PHYS_L2CACHE_WAY_SIZE _SB_MAKE64(0x0000020000) | 883 | #define A_PHYS_L2CACHE_WAY_SIZE _SB_MAKE64(0x0000020000) |
884 | #define PHYS_L2CACHE_NUM_WAYS 4 | 884 | #define PHYS_L2CACHE_NUM_WAYS 4 |
885 | #define A_PHYS_L2CACHE_TOTAL_SIZE _SB_MAKE64(0x0000080000) | 885 | #define A_PHYS_L2CACHE_TOTAL_SIZE _SB_MAKE64(0x0000080000) |
886 | #define A_PHYS_L2CACHE_WAY0 _SB_MAKE64(0x00D0180000) | 886 | #define A_PHYS_L2CACHE_WAY0 _SB_MAKE64(0x00D0180000) |
887 | #define A_PHYS_L2CACHE_WAY1 _SB_MAKE64(0x00D01A0000) | 887 | #define A_PHYS_L2CACHE_WAY1 _SB_MAKE64(0x00D01A0000) |
888 | #define A_PHYS_L2CACHE_WAY2 _SB_MAKE64(0x00D01C0000) | 888 | #define A_PHYS_L2CACHE_WAY2 _SB_MAKE64(0x00D01C0000) |
889 | #define A_PHYS_L2CACHE_WAY3 _SB_MAKE64(0x00D01E0000) | 889 | #define A_PHYS_L2CACHE_WAY3 _SB_MAKE64(0x00D01E0000) |
890 | #endif | 890 | #endif |
891 | 891 | ||
892 | 892 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250_scd.h b/arch/mips/include/asm/sibyte/sb1250_scd.h index 615e165dbd21..d725f2f41afa 100644 --- a/arch/mips/include/asm/sibyte/sb1250_scd.h +++ b/arch/mips/include/asm/sibyte/sb1250_scd.h | |||
@@ -44,10 +44,10 @@ | |||
44 | 44 | ||
45 | #define M_SYS_RESERVED _SB_MAKEMASK(8, 0) | 45 | #define M_SYS_RESERVED _SB_MAKEMASK(8, 0) |
46 | 46 | ||
47 | #define S_SYS_REVISION _SB_MAKE64(8) | 47 | #define S_SYS_REVISION _SB_MAKE64(8) |
48 | #define M_SYS_REVISION _SB_MAKEMASK(8, S_SYS_REVISION) | 48 | #define M_SYS_REVISION _SB_MAKEMASK(8, S_SYS_REVISION) |
49 | #define V_SYS_REVISION(x) _SB_MAKEVALUE(x, S_SYS_REVISION) | 49 | #define V_SYS_REVISION(x) _SB_MAKEVALUE(x, S_SYS_REVISION) |
50 | #define G_SYS_REVISION(x) _SB_GETVALUE(x, S_SYS_REVISION, M_SYS_REVISION) | 50 | #define G_SYS_REVISION(x) _SB_GETVALUE(x, S_SYS_REVISION, M_SYS_REVISION) |
51 | 51 | ||
52 | #define K_SYS_REVISION_BCM1250_PASS1 0x01 | 52 | #define K_SYS_REVISION_BCM1250_PASS1 0x01 |
53 | 53 | ||
@@ -93,10 +93,10 @@ | |||
93 | #define K_SYS_REVISION_BCM1480_B0 0x11 | 93 | #define K_SYS_REVISION_BCM1480_B0 0x11 |
94 | 94 | ||
95 | /*Cache size - 23:20 of revision register*/ | 95 | /*Cache size - 23:20 of revision register*/ |
96 | #define S_SYS_L2C_SIZE _SB_MAKE64(20) | 96 | #define S_SYS_L2C_SIZE _SB_MAKE64(20) |
97 | #define M_SYS_L2C_SIZE _SB_MAKEMASK(4, S_SYS_L2C_SIZE) | 97 | #define M_SYS_L2C_SIZE _SB_MAKEMASK(4, S_SYS_L2C_SIZE) |
98 | #define V_SYS_L2C_SIZE(x) _SB_MAKEVALUE(x, S_SYS_L2C_SIZE) | 98 | #define V_SYS_L2C_SIZE(x) _SB_MAKEVALUE(x, S_SYS_L2C_SIZE) |
99 | #define G_SYS_L2C_SIZE(x) _SB_GETVALUE(x, S_SYS_L2C_SIZE, M_SYS_L2C_SIZE) | 99 | #define G_SYS_L2C_SIZE(x) _SB_GETVALUE(x, S_SYS_L2C_SIZE, M_SYS_L2C_SIZE) |
100 | 100 | ||
101 | #define K_SYS_L2C_SIZE_1MB 0 | 101 | #define K_SYS_L2C_SIZE_1MB 0 |
102 | #define K_SYS_L2C_SIZE_512KB 5 | 102 | #define K_SYS_L2C_SIZE_512KB 5 |
@@ -109,40 +109,40 @@ | |||
109 | 109 | ||
110 | 110 | ||
111 | /* Number of CPU cores, bits 27:24 of revision register*/ | 111 | /* Number of CPU cores, bits 27:24 of revision register*/ |
112 | #define S_SYS_NUM_CPUS _SB_MAKE64(24) | 112 | #define S_SYS_NUM_CPUS _SB_MAKE64(24) |
113 | #define M_SYS_NUM_CPUS _SB_MAKEMASK(4, S_SYS_NUM_CPUS) | 113 | #define M_SYS_NUM_CPUS _SB_MAKEMASK(4, S_SYS_NUM_CPUS) |
114 | #define V_SYS_NUM_CPUS(x) _SB_MAKEVALUE(x, S_SYS_NUM_CPUS) | 114 | #define V_SYS_NUM_CPUS(x) _SB_MAKEVALUE(x, S_SYS_NUM_CPUS) |
115 | #define G_SYS_NUM_CPUS(x) _SB_GETVALUE(x, S_SYS_NUM_CPUS, M_SYS_NUM_CPUS) | 115 | #define G_SYS_NUM_CPUS(x) _SB_GETVALUE(x, S_SYS_NUM_CPUS, M_SYS_NUM_CPUS) |
116 | 116 | ||
117 | 117 | ||
118 | /* XXX: discourage people from using these constants. */ | 118 | /* XXX: discourage people from using these constants. */ |
119 | #define S_SYS_PART _SB_MAKE64(16) | 119 | #define S_SYS_PART _SB_MAKE64(16) |
120 | #define M_SYS_PART _SB_MAKEMASK(16, S_SYS_PART) | 120 | #define M_SYS_PART _SB_MAKEMASK(16, S_SYS_PART) |
121 | #define V_SYS_PART(x) _SB_MAKEVALUE(x, S_SYS_PART) | 121 | #define V_SYS_PART(x) _SB_MAKEVALUE(x, S_SYS_PART) |
122 | #define G_SYS_PART(x) _SB_GETVALUE(x, S_SYS_PART, M_SYS_PART) | 122 | #define G_SYS_PART(x) _SB_GETVALUE(x, S_SYS_PART, M_SYS_PART) |
123 | 123 | ||
124 | /* XXX: discourage people from using these constants. */ | 124 | /* XXX: discourage people from using these constants. */ |
125 | #define K_SYS_PART_SB1250 0x1250 | 125 | #define K_SYS_PART_SB1250 0x1250 |
126 | #define K_SYS_PART_BCM1120 0x1121 | 126 | #define K_SYS_PART_BCM1120 0x1121 |
127 | #define K_SYS_PART_BCM1125 0x1123 | 127 | #define K_SYS_PART_BCM1125 0x1123 |
128 | #define K_SYS_PART_BCM1125H 0x1124 | 128 | #define K_SYS_PART_BCM1125H 0x1124 |
129 | #define K_SYS_PART_BCM1122 0x1113 | 129 | #define K_SYS_PART_BCM1122 0x1113 |
130 | 130 | ||
131 | 131 | ||
132 | /* The "peripheral set" (SOC type) is the low 4 bits of the "part" field. */ | 132 | /* The "peripheral set" (SOC type) is the low 4 bits of the "part" field. */ |
133 | #define S_SYS_SOC_TYPE _SB_MAKE64(16) | 133 | #define S_SYS_SOC_TYPE _SB_MAKE64(16) |
134 | #define M_SYS_SOC_TYPE _SB_MAKEMASK(4, S_SYS_SOC_TYPE) | 134 | #define M_SYS_SOC_TYPE _SB_MAKEMASK(4, S_SYS_SOC_TYPE) |
135 | #define V_SYS_SOC_TYPE(x) _SB_MAKEVALUE(x, S_SYS_SOC_TYPE) | 135 | #define V_SYS_SOC_TYPE(x) _SB_MAKEVALUE(x, S_SYS_SOC_TYPE) |
136 | #define G_SYS_SOC_TYPE(x) _SB_GETVALUE(x, S_SYS_SOC_TYPE, M_SYS_SOC_TYPE) | 136 | #define G_SYS_SOC_TYPE(x) _SB_GETVALUE(x, S_SYS_SOC_TYPE, M_SYS_SOC_TYPE) |
137 | 137 | ||
138 | #define K_SYS_SOC_TYPE_BCM1250 0x0 | 138 | #define K_SYS_SOC_TYPE_BCM1250 0x0 |
139 | #define K_SYS_SOC_TYPE_BCM1120 0x1 | 139 | #define K_SYS_SOC_TYPE_BCM1120 0x1 |
140 | #define K_SYS_SOC_TYPE_BCM1250_ALT 0x2 /* 1250pass2 w/ 1/4 L2. */ | 140 | #define K_SYS_SOC_TYPE_BCM1250_ALT 0x2 /* 1250pass2 w/ 1/4 L2. */ |
141 | #define K_SYS_SOC_TYPE_BCM1125 0x3 | 141 | #define K_SYS_SOC_TYPE_BCM1125 0x3 |
142 | #define K_SYS_SOC_TYPE_BCM1125H 0x4 | 142 | #define K_SYS_SOC_TYPE_BCM1125H 0x4 |
143 | #define K_SYS_SOC_TYPE_BCM1250_ALT2 0x5 /* 1250pass2 w/ 1/2 L2. */ | 143 | #define K_SYS_SOC_TYPE_BCM1250_ALT2 0x5 /* 1250pass2 w/ 1/2 L2. */ |
144 | #define K_SYS_SOC_TYPE_BCM1x80 0x6 | 144 | #define K_SYS_SOC_TYPE_BCM1x80 0x6 |
145 | #define K_SYS_SOC_TYPE_BCM1x55 0x7 | 145 | #define K_SYS_SOC_TYPE_BCM1x55 0x7 |
146 | 146 | ||
147 | /* | 147 | /* |
148 | * Calculate correct SOC type given a copy of system revision register. | 148 | * Calculate correct SOC type given a copy of system revision register. |
@@ -169,10 +169,10 @@ | |||
169 | ? K_SYS_SOC_TYPE_BCM1250 : G_SYS_SOC_TYPE(sysrev)) | 169 | ? K_SYS_SOC_TYPE_BCM1250 : G_SYS_SOC_TYPE(sysrev)) |
170 | #endif | 170 | #endif |
171 | 171 | ||
172 | #define S_SYS_WID _SB_MAKE64(32) | 172 | #define S_SYS_WID _SB_MAKE64(32) |
173 | #define M_SYS_WID _SB_MAKEMASK(32, S_SYS_WID) | 173 | #define M_SYS_WID _SB_MAKEMASK(32, S_SYS_WID) |
174 | #define V_SYS_WID(x) _SB_MAKEVALUE(x, S_SYS_WID) | 174 | #define V_SYS_WID(x) _SB_MAKEVALUE(x, S_SYS_WID) |
175 | #define G_SYS_WID(x) _SB_GETVALUE(x, S_SYS_WID, M_SYS_WID) | 175 | #define G_SYS_WID(x) _SB_GETVALUE(x, S_SYS_WID, M_SYS_WID) |
176 | 176 | ||
177 | /* | 177 | /* |
178 | * System Manufacturing Register | 178 | * System Manufacturing Register |
@@ -181,37 +181,37 @@ | |||
181 | 181 | ||
182 | #if SIBYTE_HDR_FEATURE_1250_112x | 182 | #if SIBYTE_HDR_FEATURE_1250_112x |
183 | /* Wafer ID: bits 31:0 */ | 183 | /* Wafer ID: bits 31:0 */ |
184 | #define S_SYS_WAFERID1_200 _SB_MAKE64(0) | 184 | #define S_SYS_WAFERID1_200 _SB_MAKE64(0) |
185 | #define M_SYS_WAFERID1_200 _SB_MAKEMASK(32, S_SYS_WAFERID1_200) | 185 | #define M_SYS_WAFERID1_200 _SB_MAKEMASK(32, S_SYS_WAFERID1_200) |
186 | #define V_SYS_WAFERID1_200(x) _SB_MAKEVALUE(x, S_SYS_WAFERID1_200) | 186 | #define V_SYS_WAFERID1_200(x) _SB_MAKEVALUE(x, S_SYS_WAFERID1_200) |
187 | #define G_SYS_WAFERID1_200(x) _SB_GETVALUE(x, S_SYS_WAFERID1_200, M_SYS_WAFERID1_200) | 187 | #define G_SYS_WAFERID1_200(x) _SB_GETVALUE(x, S_SYS_WAFERID1_200, M_SYS_WAFERID1_200) |
188 | 188 | ||
189 | #define S_SYS_BIN _SB_MAKE64(32) | 189 | #define S_SYS_BIN _SB_MAKE64(32) |
190 | #define M_SYS_BIN _SB_MAKEMASK(4, S_SYS_BIN) | 190 | #define M_SYS_BIN _SB_MAKEMASK(4, S_SYS_BIN) |
191 | #define V_SYS_BIN(x) _SB_MAKEVALUE(x, S_SYS_BIN) | 191 | #define V_SYS_BIN(x) _SB_MAKEVALUE(x, S_SYS_BIN) |
192 | #define G_SYS_BIN(x) _SB_GETVALUE(x, S_SYS_BIN, M_SYS_BIN) | 192 | #define G_SYS_BIN(x) _SB_GETVALUE(x, S_SYS_BIN, M_SYS_BIN) |
193 | 193 | ||
194 | /* Wafer ID: bits 39:36 */ | 194 | /* Wafer ID: bits 39:36 */ |
195 | #define S_SYS_WAFERID2_200 _SB_MAKE64(36) | 195 | #define S_SYS_WAFERID2_200 _SB_MAKE64(36) |
196 | #define M_SYS_WAFERID2_200 _SB_MAKEMASK(4, S_SYS_WAFERID2_200) | 196 | #define M_SYS_WAFERID2_200 _SB_MAKEMASK(4, S_SYS_WAFERID2_200) |
197 | #define V_SYS_WAFERID2_200(x) _SB_MAKEVALUE(x, S_SYS_WAFERID2_200) | 197 | #define V_SYS_WAFERID2_200(x) _SB_MAKEVALUE(x, S_SYS_WAFERID2_200) |
198 | #define G_SYS_WAFERID2_200(x) _SB_GETVALUE(x, S_SYS_WAFERID2_200, M_SYS_WAFERID2_200) | 198 | #define G_SYS_WAFERID2_200(x) _SB_GETVALUE(x, S_SYS_WAFERID2_200, M_SYS_WAFERID2_200) |
199 | 199 | ||
200 | /* Wafer ID: bits 39:0 */ | 200 | /* Wafer ID: bits 39:0 */ |
201 | #define S_SYS_WAFERID_300 _SB_MAKE64(0) | 201 | #define S_SYS_WAFERID_300 _SB_MAKE64(0) |
202 | #define M_SYS_WAFERID_300 _SB_MAKEMASK(40, S_SYS_WAFERID_300) | 202 | #define M_SYS_WAFERID_300 _SB_MAKEMASK(40, S_SYS_WAFERID_300) |
203 | #define V_SYS_WAFERID_300(x) _SB_MAKEVALUE(x, S_SYS_WAFERID_300) | 203 | #define V_SYS_WAFERID_300(x) _SB_MAKEVALUE(x, S_SYS_WAFERID_300) |
204 | #define G_SYS_WAFERID_300(x) _SB_GETVALUE(x, S_SYS_WAFERID_300, M_SYS_WAFERID_300) | 204 | #define G_SYS_WAFERID_300(x) _SB_GETVALUE(x, S_SYS_WAFERID_300, M_SYS_WAFERID_300) |
205 | 205 | ||
206 | #define S_SYS_XPOS _SB_MAKE64(40) | 206 | #define S_SYS_XPOS _SB_MAKE64(40) |
207 | #define M_SYS_XPOS _SB_MAKEMASK(6, S_SYS_XPOS) | 207 | #define M_SYS_XPOS _SB_MAKEMASK(6, S_SYS_XPOS) |
208 | #define V_SYS_XPOS(x) _SB_MAKEVALUE(x, S_SYS_XPOS) | 208 | #define V_SYS_XPOS(x) _SB_MAKEVALUE(x, S_SYS_XPOS) |
209 | #define G_SYS_XPOS(x) _SB_GETVALUE(x, S_SYS_XPOS, M_SYS_XPOS) | 209 | #define G_SYS_XPOS(x) _SB_GETVALUE(x, S_SYS_XPOS, M_SYS_XPOS) |
210 | 210 | ||
211 | #define S_SYS_YPOS _SB_MAKE64(46) | 211 | #define S_SYS_YPOS _SB_MAKE64(46) |
212 | #define M_SYS_YPOS _SB_MAKEMASK(6, S_SYS_YPOS) | 212 | #define M_SYS_YPOS _SB_MAKEMASK(6, S_SYS_YPOS) |
213 | #define V_SYS_YPOS(x) _SB_MAKEVALUE(x, S_SYS_YPOS) | 213 | #define V_SYS_YPOS(x) _SB_MAKEVALUE(x, S_SYS_YPOS) |
214 | #define G_SYS_YPOS(x) _SB_GETVALUE(x, S_SYS_YPOS, M_SYS_YPOS) | 214 | #define G_SYS_YPOS(x) _SB_GETVALUE(x, S_SYS_YPOS, M_SYS_YPOS) |
215 | #endif | 215 | #endif |
216 | 216 | ||
217 | 217 | ||
@@ -221,55 +221,55 @@ | |||
221 | */ | 221 | */ |
222 | 222 | ||
223 | #if SIBYTE_HDR_FEATURE_1250_112x | 223 | #if SIBYTE_HDR_FEATURE_1250_112x |
224 | #define M_SYS_LDT_PLL_BYP _SB_MAKEMASK1(3) | 224 | #define M_SYS_LDT_PLL_BYP _SB_MAKEMASK1(3) |
225 | #define M_SYS_PCI_SYNC_TEST_MODE _SB_MAKEMASK1(4) | 225 | #define M_SYS_PCI_SYNC_TEST_MODE _SB_MAKEMASK1(4) |
226 | #define M_SYS_IOB0_DIV _SB_MAKEMASK1(5) | 226 | #define M_SYS_IOB0_DIV _SB_MAKEMASK1(5) |
227 | #define M_SYS_IOB1_DIV _SB_MAKEMASK1(6) | 227 | #define M_SYS_IOB1_DIV _SB_MAKEMASK1(6) |
228 | 228 | ||
229 | #define S_SYS_PLL_DIV _SB_MAKE64(7) | 229 | #define S_SYS_PLL_DIV _SB_MAKE64(7) |
230 | #define M_SYS_PLL_DIV _SB_MAKEMASK(5, S_SYS_PLL_DIV) | 230 | #define M_SYS_PLL_DIV _SB_MAKEMASK(5, S_SYS_PLL_DIV) |
231 | #define V_SYS_PLL_DIV(x) _SB_MAKEVALUE(x, S_SYS_PLL_DIV) | 231 | #define V_SYS_PLL_DIV(x) _SB_MAKEVALUE(x, S_SYS_PLL_DIV) |
232 | #define G_SYS_PLL_DIV(x) _SB_GETVALUE(x, S_SYS_PLL_DIV, M_SYS_PLL_DIV) | 232 | #define G_SYS_PLL_DIV(x) _SB_GETVALUE(x, S_SYS_PLL_DIV, M_SYS_PLL_DIV) |
233 | 233 | ||
234 | #define M_SYS_SER0_ENABLE _SB_MAKEMASK1(12) | 234 | #define M_SYS_SER0_ENABLE _SB_MAKEMASK1(12) |
235 | #define M_SYS_SER0_RSTB_EN _SB_MAKEMASK1(13) | 235 | #define M_SYS_SER0_RSTB_EN _SB_MAKEMASK1(13) |
236 | #define M_SYS_SER1_ENABLE _SB_MAKEMASK1(14) | 236 | #define M_SYS_SER1_ENABLE _SB_MAKEMASK1(14) |
237 | #define M_SYS_SER1_RSTB_EN _SB_MAKEMASK1(15) | 237 | #define M_SYS_SER1_RSTB_EN _SB_MAKEMASK1(15) |
238 | #define M_SYS_PCMCIA_ENABLE _SB_MAKEMASK1(16) | 238 | #define M_SYS_PCMCIA_ENABLE _SB_MAKEMASK1(16) |
239 | 239 | ||
240 | #define S_SYS_BOOT_MODE _SB_MAKE64(17) | 240 | #define S_SYS_BOOT_MODE _SB_MAKE64(17) |
241 | #define M_SYS_BOOT_MODE _SB_MAKEMASK(2, S_SYS_BOOT_MODE) | 241 | #define M_SYS_BOOT_MODE _SB_MAKEMASK(2, S_SYS_BOOT_MODE) |
242 | #define V_SYS_BOOT_MODE(x) _SB_MAKEVALUE(x, S_SYS_BOOT_MODE) | 242 | #define V_SYS_BOOT_MODE(x) _SB_MAKEVALUE(x, S_SYS_BOOT_MODE) |
243 | #define G_SYS_BOOT_MODE(x) _SB_GETVALUE(x, S_SYS_BOOT_MODE, M_SYS_BOOT_MODE) | 243 | #define G_SYS_BOOT_MODE(x) _SB_GETVALUE(x, S_SYS_BOOT_MODE, M_SYS_BOOT_MODE) |
244 | #define K_SYS_BOOT_MODE_ROM32 0 | 244 | #define K_SYS_BOOT_MODE_ROM32 0 |
245 | #define K_SYS_BOOT_MODE_ROM8 1 | 245 | #define K_SYS_BOOT_MODE_ROM8 1 |
246 | #define K_SYS_BOOT_MODE_SMBUS_SMALL 2 | 246 | #define K_SYS_BOOT_MODE_SMBUS_SMALL 2 |
247 | #define K_SYS_BOOT_MODE_SMBUS_BIG 3 | 247 | #define K_SYS_BOOT_MODE_SMBUS_BIG 3 |
248 | 248 | ||
249 | #define M_SYS_PCI_HOST _SB_MAKEMASK1(19) | 249 | #define M_SYS_PCI_HOST _SB_MAKEMASK1(19) |
250 | #define M_SYS_PCI_ARBITER _SB_MAKEMASK1(20) | 250 | #define M_SYS_PCI_ARBITER _SB_MAKEMASK1(20) |
251 | #define M_SYS_SOUTH_ON_LDT _SB_MAKEMASK1(21) | 251 | #define M_SYS_SOUTH_ON_LDT _SB_MAKEMASK1(21) |
252 | #define M_SYS_BIG_ENDIAN _SB_MAKEMASK1(22) | 252 | #define M_SYS_BIG_ENDIAN _SB_MAKEMASK1(22) |
253 | #define M_SYS_GENCLK_EN _SB_MAKEMASK1(23) | 253 | #define M_SYS_GENCLK_EN _SB_MAKEMASK1(23) |
254 | #define M_SYS_LDT_TEST_EN _SB_MAKEMASK1(24) | 254 | #define M_SYS_LDT_TEST_EN _SB_MAKEMASK1(24) |
255 | #define M_SYS_GEN_PARITY_EN _SB_MAKEMASK1(25) | 255 | #define M_SYS_GEN_PARITY_EN _SB_MAKEMASK1(25) |
256 | 256 | ||
257 | #define S_SYS_CONFIG 26 | 257 | #define S_SYS_CONFIG 26 |
258 | #define M_SYS_CONFIG _SB_MAKEMASK(6, S_SYS_CONFIG) | 258 | #define M_SYS_CONFIG _SB_MAKEMASK(6, S_SYS_CONFIG) |
259 | #define V_SYS_CONFIG(x) _SB_MAKEVALUE(x, S_SYS_CONFIG) | 259 | #define V_SYS_CONFIG(x) _SB_MAKEVALUE(x, S_SYS_CONFIG) |
260 | #define G_SYS_CONFIG(x) _SB_GETVALUE(x, S_SYS_CONFIG, M_SYS_CONFIG) | 260 | #define G_SYS_CONFIG(x) _SB_GETVALUE(x, S_SYS_CONFIG, M_SYS_CONFIG) |
261 | 261 | ||
262 | /* The following bits are writeable by JTAG only. */ | 262 | /* The following bits are writeable by JTAG only. */ |
263 | 263 | ||
264 | #define M_SYS_CLKSTOP _SB_MAKEMASK1(32) | 264 | #define M_SYS_CLKSTOP _SB_MAKEMASK1(32) |
265 | #define M_SYS_CLKSTEP _SB_MAKEMASK1(33) | 265 | #define M_SYS_CLKSTEP _SB_MAKEMASK1(33) |
266 | 266 | ||
267 | #define S_SYS_CLKCOUNT 34 | 267 | #define S_SYS_CLKCOUNT 34 |
268 | #define M_SYS_CLKCOUNT _SB_MAKEMASK(8, S_SYS_CLKCOUNT) | 268 | #define M_SYS_CLKCOUNT _SB_MAKEMASK(8, S_SYS_CLKCOUNT) |
269 | #define V_SYS_CLKCOUNT(x) _SB_MAKEVALUE(x, S_SYS_CLKCOUNT) | 269 | #define V_SYS_CLKCOUNT(x) _SB_MAKEVALUE(x, S_SYS_CLKCOUNT) |
270 | #define G_SYS_CLKCOUNT(x) _SB_GETVALUE(x, S_SYS_CLKCOUNT, M_SYS_CLKCOUNT) | 270 | #define G_SYS_CLKCOUNT(x) _SB_GETVALUE(x, S_SYS_CLKCOUNT, M_SYS_CLKCOUNT) |
271 | 271 | ||
272 | #define M_SYS_PLL_BYPASS _SB_MAKEMASK1(42) | 272 | #define M_SYS_PLL_BYPASS _SB_MAKEMASK1(42) |
273 | 273 | ||
274 | #define S_SYS_PLL_IREF 43 | 274 | #define S_SYS_PLL_IREF 43 |
275 | #define M_SYS_PLL_IREF _SB_MAKEMASK(2, S_SYS_PLL_IREF) | 275 | #define M_SYS_PLL_IREF _SB_MAKEMASK(2, S_SYS_PLL_IREF) |
@@ -280,26 +280,26 @@ | |||
280 | #define S_SYS_PLL_VREG 47 | 280 | #define S_SYS_PLL_VREG 47 |
281 | #define M_SYS_PLL_VREG _SB_MAKEMASK(2, S_SYS_PLL_VREG) | 281 | #define M_SYS_PLL_VREG _SB_MAKEMASK(2, S_SYS_PLL_VREG) |
282 | 282 | ||
283 | #define M_SYS_MEM_RESET _SB_MAKEMASK1(49) | 283 | #define M_SYS_MEM_RESET _SB_MAKEMASK1(49) |
284 | #define M_SYS_L2C_RESET _SB_MAKEMASK1(50) | 284 | #define M_SYS_L2C_RESET _SB_MAKEMASK1(50) |
285 | #define M_SYS_IO_RESET_0 _SB_MAKEMASK1(51) | 285 | #define M_SYS_IO_RESET_0 _SB_MAKEMASK1(51) |
286 | #define M_SYS_IO_RESET_1 _SB_MAKEMASK1(52) | 286 | #define M_SYS_IO_RESET_1 _SB_MAKEMASK1(52) |
287 | #define M_SYS_SCD_RESET _SB_MAKEMASK1(53) | 287 | #define M_SYS_SCD_RESET _SB_MAKEMASK1(53) |
288 | 288 | ||
289 | /* End of bits writable by JTAG only. */ | 289 | /* End of bits writable by JTAG only. */ |
290 | 290 | ||
291 | #define M_SYS_CPU_RESET_0 _SB_MAKEMASK1(54) | 291 | #define M_SYS_CPU_RESET_0 _SB_MAKEMASK1(54) |
292 | #define M_SYS_CPU_RESET_1 _SB_MAKEMASK1(55) | 292 | #define M_SYS_CPU_RESET_1 _SB_MAKEMASK1(55) |
293 | 293 | ||
294 | #define M_SYS_UNICPU0 _SB_MAKEMASK1(56) | 294 | #define M_SYS_UNICPU0 _SB_MAKEMASK1(56) |
295 | #define M_SYS_UNICPU1 _SB_MAKEMASK1(57) | 295 | #define M_SYS_UNICPU1 _SB_MAKEMASK1(57) |
296 | 296 | ||
297 | #define M_SYS_SB_SOFTRES _SB_MAKEMASK1(58) | 297 | #define M_SYS_SB_SOFTRES _SB_MAKEMASK1(58) |
298 | #define M_SYS_EXT_RESET _SB_MAKEMASK1(59) | 298 | #define M_SYS_EXT_RESET _SB_MAKEMASK1(59) |
299 | #define M_SYS_SYSTEM_RESET _SB_MAKEMASK1(60) | 299 | #define M_SYS_SYSTEM_RESET _SB_MAKEMASK1(60) |
300 | 300 | ||
301 | #define M_SYS_MISR_MODE _SB_MAKEMASK1(61) | 301 | #define M_SYS_MISR_MODE _SB_MAKEMASK1(61) |
302 | #define M_SYS_MISR_RESET _SB_MAKEMASK1(62) | 302 | #define M_SYS_MISR_RESET _SB_MAKEMASK1(62) |
303 | 303 | ||
304 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 304 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
305 | #define M_SYS_SW_FLAG _SB_MAKEMASK1(63) | 305 | #define M_SYS_SW_FLAG _SB_MAKEMASK1(63) |
@@ -313,46 +313,46 @@ | |||
313 | * Registers: SCD_MBOX_CPU_x | 313 | * Registers: SCD_MBOX_CPU_x |
314 | */ | 314 | */ |
315 | 315 | ||
316 | #define S_MBOX_INT_3 0 | 316 | #define S_MBOX_INT_3 0 |
317 | #define M_MBOX_INT_3 _SB_MAKEMASK(16, S_MBOX_INT_3) | 317 | #define M_MBOX_INT_3 _SB_MAKEMASK(16, S_MBOX_INT_3) |
318 | #define S_MBOX_INT_2 16 | 318 | #define S_MBOX_INT_2 16 |
319 | #define M_MBOX_INT_2 _SB_MAKEMASK(16, S_MBOX_INT_2) | 319 | #define M_MBOX_INT_2 _SB_MAKEMASK(16, S_MBOX_INT_2) |
320 | #define S_MBOX_INT_1 32 | 320 | #define S_MBOX_INT_1 32 |
321 | #define M_MBOX_INT_1 _SB_MAKEMASK(16, S_MBOX_INT_1) | 321 | #define M_MBOX_INT_1 _SB_MAKEMASK(16, S_MBOX_INT_1) |
322 | #define S_MBOX_INT_0 48 | 322 | #define S_MBOX_INT_0 48 |
323 | #define M_MBOX_INT_0 _SB_MAKEMASK(16, S_MBOX_INT_0) | 323 | #define M_MBOX_INT_0 _SB_MAKEMASK(16, S_MBOX_INT_0) |
324 | 324 | ||
325 | /* | 325 | /* |
326 | * Watchdog Registers (Table 4-8) (Table 4-9) (Table 4-10) | 326 | * Watchdog Registers (Table 4-8) (Table 4-9) (Table 4-10) |
327 | * Registers: SCD_WDOG_INIT_CNT_x | 327 | * Registers: SCD_WDOG_INIT_CNT_x |
328 | */ | 328 | */ |
329 | 329 | ||
330 | #define V_SCD_WDOG_FREQ 1000000 | 330 | #define V_SCD_WDOG_FREQ 1000000 |
331 | 331 | ||
332 | #define S_SCD_WDOG_INIT 0 | 332 | #define S_SCD_WDOG_INIT 0 |
333 | #define M_SCD_WDOG_INIT _SB_MAKEMASK(23, S_SCD_WDOG_INIT) | 333 | #define M_SCD_WDOG_INIT _SB_MAKEMASK(23, S_SCD_WDOG_INIT) |
334 | 334 | ||
335 | #define S_SCD_WDOG_CNT 0 | 335 | #define S_SCD_WDOG_CNT 0 |
336 | #define M_SCD_WDOG_CNT _SB_MAKEMASK(23, S_SCD_WDOG_CNT) | 336 | #define M_SCD_WDOG_CNT _SB_MAKEMASK(23, S_SCD_WDOG_CNT) |
337 | 337 | ||
338 | #define S_SCD_WDOG_ENABLE 0 | 338 | #define S_SCD_WDOG_ENABLE 0 |
339 | #define M_SCD_WDOG_ENABLE _SB_MAKEMASK1(S_SCD_WDOG_ENABLE) | 339 | #define M_SCD_WDOG_ENABLE _SB_MAKEMASK1(S_SCD_WDOG_ENABLE) |
340 | 340 | ||
341 | #define S_SCD_WDOG_RESET_TYPE 2 | 341 | #define S_SCD_WDOG_RESET_TYPE 2 |
342 | #define M_SCD_WDOG_RESET_TYPE _SB_MAKEMASK(3, S_SCD_WDOG_RESET_TYPE) | 342 | #define M_SCD_WDOG_RESET_TYPE _SB_MAKEMASK(3, S_SCD_WDOG_RESET_TYPE) |
343 | #define V_SCD_WDOG_RESET_TYPE(x) _SB_MAKEVALUE(x, S_SCD_WDOG_RESET_TYPE) | 343 | #define V_SCD_WDOG_RESET_TYPE(x) _SB_MAKEVALUE(x, S_SCD_WDOG_RESET_TYPE) |
344 | #define G_SCD_WDOG_RESET_TYPE(x) _SB_GETVALUE(x, S_SCD_WDOG_RESET_TYPE, M_SCD_WDOG_RESET_TYPE) | 344 | #define G_SCD_WDOG_RESET_TYPE(x) _SB_GETVALUE(x, S_SCD_WDOG_RESET_TYPE, M_SCD_WDOG_RESET_TYPE) |
345 | 345 | ||
346 | #define K_SCD_WDOG_RESET_FULL 0 /* actually, (x & 1) == 0 */ | 346 | #define K_SCD_WDOG_RESET_FULL 0 /* actually, (x & 1) == 0 */ |
347 | #define K_SCD_WDOG_RESET_SOFT 1 | 347 | #define K_SCD_WDOG_RESET_SOFT 1 |
348 | #define K_SCD_WDOG_RESET_CPU0 3 | 348 | #define K_SCD_WDOG_RESET_CPU0 3 |
349 | #define K_SCD_WDOG_RESET_CPU1 5 | 349 | #define K_SCD_WDOG_RESET_CPU1 5 |
350 | #define K_SCD_WDOG_RESET_BOTH_CPUS 7 | 350 | #define K_SCD_WDOG_RESET_BOTH_CPUS 7 |
351 | 351 | ||
352 | /* This feature is present in 1250 C0 and later, but *not* in 112x A revs. */ | 352 | /* This feature is present in 1250 C0 and later, but *not* in 112x A revs. */ |
353 | #if SIBYTE_HDR_FEATURE(1250, PASS3) | 353 | #if SIBYTE_HDR_FEATURE(1250, PASS3) |
354 | #define S_SCD_WDOG_HAS_RESET 8 | 354 | #define S_SCD_WDOG_HAS_RESET 8 |
355 | #define M_SCD_WDOG_HAS_RESET _SB_MAKEMASK1(S_SCD_WDOG_HAS_RESET) | 355 | #define M_SCD_WDOG_HAS_RESET _SB_MAKEMASK1(S_SCD_WDOG_HAS_RESET) |
356 | #endif | 356 | #endif |
357 | 357 | ||
358 | 358 | ||
@@ -360,46 +360,46 @@ | |||
360 | * Timer Registers (Table 4-11) (Table 4-12) (Table 4-13) | 360 | * Timer Registers (Table 4-11) (Table 4-12) (Table 4-13) |
361 | */ | 361 | */ |
362 | 362 | ||
363 | #define V_SCD_TIMER_FREQ 1000000 | 363 | #define V_SCD_TIMER_FREQ 1000000 |
364 | 364 | ||
365 | #define S_SCD_TIMER_INIT 0 | 365 | #define S_SCD_TIMER_INIT 0 |
366 | #define M_SCD_TIMER_INIT _SB_MAKEMASK(23, S_SCD_TIMER_INIT) | 366 | #define M_SCD_TIMER_INIT _SB_MAKEMASK(23, S_SCD_TIMER_INIT) |
367 | #define V_SCD_TIMER_INIT(x) _SB_MAKEVALUE(x, S_SCD_TIMER_INIT) | 367 | #define V_SCD_TIMER_INIT(x) _SB_MAKEVALUE(x, S_SCD_TIMER_INIT) |
368 | #define G_SCD_TIMER_INIT(x) _SB_GETVALUE(x, S_SCD_TIMER_INIT, M_SCD_TIMER_INIT) | 368 | #define G_SCD_TIMER_INIT(x) _SB_GETVALUE(x, S_SCD_TIMER_INIT, M_SCD_TIMER_INIT) |
369 | 369 | ||
370 | #define V_SCD_TIMER_WIDTH 23 | 370 | #define V_SCD_TIMER_WIDTH 23 |
371 | #define S_SCD_TIMER_CNT 0 | 371 | #define S_SCD_TIMER_CNT 0 |
372 | #define M_SCD_TIMER_CNT _SB_MAKEMASK(V_SCD_TIMER_WIDTH, S_SCD_TIMER_CNT) | 372 | #define M_SCD_TIMER_CNT _SB_MAKEMASK(V_SCD_TIMER_WIDTH, S_SCD_TIMER_CNT) |
373 | #define V_SCD_TIMER_CNT(x) _SB_MAKEVALUE(x, S_SCD_TIMER_CNT) | 373 | #define V_SCD_TIMER_CNT(x) _SB_MAKEVALUE(x, S_SCD_TIMER_CNT) |
374 | #define G_SCD_TIMER_CNT(x) _SB_GETVALUE(x, S_SCD_TIMER_CNT, M_SCD_TIMER_CNT) | 374 | #define G_SCD_TIMER_CNT(x) _SB_GETVALUE(x, S_SCD_TIMER_CNT, M_SCD_TIMER_CNT) |
375 | 375 | ||
376 | #define M_SCD_TIMER_ENABLE _SB_MAKEMASK1(0) | 376 | #define M_SCD_TIMER_ENABLE _SB_MAKEMASK1(0) |
377 | #define M_SCD_TIMER_MODE _SB_MAKEMASK1(1) | 377 | #define M_SCD_TIMER_MODE _SB_MAKEMASK1(1) |
378 | #define M_SCD_TIMER_MODE_CONTINUOUS M_SCD_TIMER_MODE | 378 | #define M_SCD_TIMER_MODE_CONTINUOUS M_SCD_TIMER_MODE |
379 | 379 | ||
380 | /* | 380 | /* |
381 | * System Performance Counters | 381 | * System Performance Counters |
382 | */ | 382 | */ |
383 | 383 | ||
384 | #define S_SPC_CFG_SRC0 0 | 384 | #define S_SPC_CFG_SRC0 0 |
385 | #define M_SPC_CFG_SRC0 _SB_MAKEMASK(8, S_SPC_CFG_SRC0) | 385 | #define M_SPC_CFG_SRC0 _SB_MAKEMASK(8, S_SPC_CFG_SRC0) |
386 | #define V_SPC_CFG_SRC0(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC0) | 386 | #define V_SPC_CFG_SRC0(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC0) |
387 | #define G_SPC_CFG_SRC0(x) _SB_GETVALUE(x, S_SPC_CFG_SRC0, M_SPC_CFG_SRC0) | 387 | #define G_SPC_CFG_SRC0(x) _SB_GETVALUE(x, S_SPC_CFG_SRC0, M_SPC_CFG_SRC0) |
388 | 388 | ||
389 | #define S_SPC_CFG_SRC1 8 | 389 | #define S_SPC_CFG_SRC1 8 |
390 | #define M_SPC_CFG_SRC1 _SB_MAKEMASK(8, S_SPC_CFG_SRC1) | 390 | #define M_SPC_CFG_SRC1 _SB_MAKEMASK(8, S_SPC_CFG_SRC1) |
391 | #define V_SPC_CFG_SRC1(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC1) | 391 | #define V_SPC_CFG_SRC1(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC1) |
392 | #define G_SPC_CFG_SRC1(x) _SB_GETVALUE(x, S_SPC_CFG_SRC1, M_SPC_CFG_SRC1) | 392 | #define G_SPC_CFG_SRC1(x) _SB_GETVALUE(x, S_SPC_CFG_SRC1, M_SPC_CFG_SRC1) |
393 | 393 | ||
394 | #define S_SPC_CFG_SRC2 16 | 394 | #define S_SPC_CFG_SRC2 16 |
395 | #define M_SPC_CFG_SRC2 _SB_MAKEMASK(8, S_SPC_CFG_SRC2) | 395 | #define M_SPC_CFG_SRC2 _SB_MAKEMASK(8, S_SPC_CFG_SRC2) |
396 | #define V_SPC_CFG_SRC2(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC2) | 396 | #define V_SPC_CFG_SRC2(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC2) |
397 | #define G_SPC_CFG_SRC2(x) _SB_GETVALUE(x, S_SPC_CFG_SRC2, M_SPC_CFG_SRC2) | 397 | #define G_SPC_CFG_SRC2(x) _SB_GETVALUE(x, S_SPC_CFG_SRC2, M_SPC_CFG_SRC2) |
398 | 398 | ||
399 | #define S_SPC_CFG_SRC3 24 | 399 | #define S_SPC_CFG_SRC3 24 |
400 | #define M_SPC_CFG_SRC3 _SB_MAKEMASK(8, S_SPC_CFG_SRC3) | 400 | #define M_SPC_CFG_SRC3 _SB_MAKEMASK(8, S_SPC_CFG_SRC3) |
401 | #define V_SPC_CFG_SRC3(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC3) | 401 | #define V_SPC_CFG_SRC3(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC3) |
402 | #define G_SPC_CFG_SRC3(x) _SB_GETVALUE(x, S_SPC_CFG_SRC3, M_SPC_CFG_SRC3) | 402 | #define G_SPC_CFG_SRC3(x) _SB_GETVALUE(x, S_SPC_CFG_SRC3, M_SPC_CFG_SRC3) |
403 | 403 | ||
404 | #if SIBYTE_HDR_FEATURE_1250_112x | 404 | #if SIBYTE_HDR_FEATURE_1250_112x |
405 | #define M_SPC_CFG_CLEAR _SB_MAKEMASK1(32) | 405 | #define M_SPC_CFG_CLEAR _SB_MAKEMASK1(32) |
@@ -411,58 +411,58 @@ | |||
411 | * Bus Watcher | 411 | * Bus Watcher |
412 | */ | 412 | */ |
413 | 413 | ||
414 | #define S_SCD_BERR_TID 8 | 414 | #define S_SCD_BERR_TID 8 |
415 | #define M_SCD_BERR_TID _SB_MAKEMASK(10, S_SCD_BERR_TID) | 415 | #define M_SCD_BERR_TID _SB_MAKEMASK(10, S_SCD_BERR_TID) |
416 | #define V_SCD_BERR_TID(x) _SB_MAKEVALUE(x, S_SCD_BERR_TID) | 416 | #define V_SCD_BERR_TID(x) _SB_MAKEVALUE(x, S_SCD_BERR_TID) |
417 | #define G_SCD_BERR_TID(x) _SB_GETVALUE(x, S_SCD_BERR_TID, M_SCD_BERR_TID) | 417 | #define G_SCD_BERR_TID(x) _SB_GETVALUE(x, S_SCD_BERR_TID, M_SCD_BERR_TID) |
418 | 418 | ||
419 | #define S_SCD_BERR_RID 18 | 419 | #define S_SCD_BERR_RID 18 |
420 | #define M_SCD_BERR_RID _SB_MAKEMASK(4, S_SCD_BERR_RID) | 420 | #define M_SCD_BERR_RID _SB_MAKEMASK(4, S_SCD_BERR_RID) |
421 | #define V_SCD_BERR_RID(x) _SB_MAKEVALUE(x, S_SCD_BERR_RID) | 421 | #define V_SCD_BERR_RID(x) _SB_MAKEVALUE(x, S_SCD_BERR_RID) |
422 | #define G_SCD_BERR_RID(x) _SB_GETVALUE(x, S_SCD_BERR_RID, M_SCD_BERR_RID) | 422 | #define G_SCD_BERR_RID(x) _SB_GETVALUE(x, S_SCD_BERR_RID, M_SCD_BERR_RID) |
423 | 423 | ||
424 | #define S_SCD_BERR_DCODE 22 | 424 | #define S_SCD_BERR_DCODE 22 |
425 | #define M_SCD_BERR_DCODE _SB_MAKEMASK(3, S_SCD_BERR_DCODE) | 425 | #define M_SCD_BERR_DCODE _SB_MAKEMASK(3, S_SCD_BERR_DCODE) |
426 | #define V_SCD_BERR_DCODE(x) _SB_MAKEVALUE(x, S_SCD_BERR_DCODE) | 426 | #define V_SCD_BERR_DCODE(x) _SB_MAKEVALUE(x, S_SCD_BERR_DCODE) |
427 | #define G_SCD_BERR_DCODE(x) _SB_GETVALUE(x, S_SCD_BERR_DCODE, M_SCD_BERR_DCODE) | 427 | #define G_SCD_BERR_DCODE(x) _SB_GETVALUE(x, S_SCD_BERR_DCODE, M_SCD_BERR_DCODE) |
428 | 428 | ||
429 | #define M_SCD_BERR_MULTERRS _SB_MAKEMASK1(30) | 429 | #define M_SCD_BERR_MULTERRS _SB_MAKEMASK1(30) |
430 | 430 | ||
431 | 431 | ||
432 | #define S_SCD_L2ECC_CORR_D 0 | 432 | #define S_SCD_L2ECC_CORR_D 0 |
433 | #define M_SCD_L2ECC_CORR_D _SB_MAKEMASK(8, S_SCD_L2ECC_CORR_D) | 433 | #define M_SCD_L2ECC_CORR_D _SB_MAKEMASK(8, S_SCD_L2ECC_CORR_D) |
434 | #define V_SCD_L2ECC_CORR_D(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_CORR_D) | 434 | #define V_SCD_L2ECC_CORR_D(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_CORR_D) |
435 | #define G_SCD_L2ECC_CORR_D(x) _SB_GETVALUE(x, S_SCD_L2ECC_CORR_D, M_SCD_L2ECC_CORR_D) | 435 | #define G_SCD_L2ECC_CORR_D(x) _SB_GETVALUE(x, S_SCD_L2ECC_CORR_D, M_SCD_L2ECC_CORR_D) |
436 | 436 | ||
437 | #define S_SCD_L2ECC_BAD_D 8 | 437 | #define S_SCD_L2ECC_BAD_D 8 |
438 | #define M_SCD_L2ECC_BAD_D _SB_MAKEMASK(8, S_SCD_L2ECC_BAD_D) | 438 | #define M_SCD_L2ECC_BAD_D _SB_MAKEMASK(8, S_SCD_L2ECC_BAD_D) |
439 | #define V_SCD_L2ECC_BAD_D(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_BAD_D) | 439 | #define V_SCD_L2ECC_BAD_D(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_BAD_D) |
440 | #define G_SCD_L2ECC_BAD_D(x) _SB_GETVALUE(x, S_SCD_L2ECC_BAD_D, M_SCD_L2ECC_BAD_D) | 440 | #define G_SCD_L2ECC_BAD_D(x) _SB_GETVALUE(x, S_SCD_L2ECC_BAD_D, M_SCD_L2ECC_BAD_D) |
441 | 441 | ||
442 | #define S_SCD_L2ECC_CORR_T 16 | 442 | #define S_SCD_L2ECC_CORR_T 16 |
443 | #define M_SCD_L2ECC_CORR_T _SB_MAKEMASK(8, S_SCD_L2ECC_CORR_T) | 443 | #define M_SCD_L2ECC_CORR_T _SB_MAKEMASK(8, S_SCD_L2ECC_CORR_T) |
444 | #define V_SCD_L2ECC_CORR_T(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_CORR_T) | 444 | #define V_SCD_L2ECC_CORR_T(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_CORR_T) |
445 | #define G_SCD_L2ECC_CORR_T(x) _SB_GETVALUE(x, S_SCD_L2ECC_CORR_T, M_SCD_L2ECC_CORR_T) | 445 | #define G_SCD_L2ECC_CORR_T(x) _SB_GETVALUE(x, S_SCD_L2ECC_CORR_T, M_SCD_L2ECC_CORR_T) |
446 | 446 | ||
447 | #define S_SCD_L2ECC_BAD_T 24 | 447 | #define S_SCD_L2ECC_BAD_T 24 |
448 | #define M_SCD_L2ECC_BAD_T _SB_MAKEMASK(8, S_SCD_L2ECC_BAD_T) | 448 | #define M_SCD_L2ECC_BAD_T _SB_MAKEMASK(8, S_SCD_L2ECC_BAD_T) |
449 | #define V_SCD_L2ECC_BAD_T(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_BAD_T) | 449 | #define V_SCD_L2ECC_BAD_T(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_BAD_T) |
450 | #define G_SCD_L2ECC_BAD_T(x) _SB_GETVALUE(x, S_SCD_L2ECC_BAD_T, M_SCD_L2ECC_BAD_T) | 450 | #define G_SCD_L2ECC_BAD_T(x) _SB_GETVALUE(x, S_SCD_L2ECC_BAD_T, M_SCD_L2ECC_BAD_T) |
451 | 451 | ||
452 | #define S_SCD_MEM_ECC_CORR 0 | 452 | #define S_SCD_MEM_ECC_CORR 0 |
453 | #define M_SCD_MEM_ECC_CORR _SB_MAKEMASK(8, S_SCD_MEM_ECC_CORR) | 453 | #define M_SCD_MEM_ECC_CORR _SB_MAKEMASK(8, S_SCD_MEM_ECC_CORR) |
454 | #define V_SCD_MEM_ECC_CORR(x) _SB_MAKEVALUE(x, S_SCD_MEM_ECC_CORR) | 454 | #define V_SCD_MEM_ECC_CORR(x) _SB_MAKEVALUE(x, S_SCD_MEM_ECC_CORR) |
455 | #define G_SCD_MEM_ECC_CORR(x) _SB_GETVALUE(x, S_SCD_MEM_ECC_CORR, M_SCD_MEM_ECC_CORR) | 455 | #define G_SCD_MEM_ECC_CORR(x) _SB_GETVALUE(x, S_SCD_MEM_ECC_CORR, M_SCD_MEM_ECC_CORR) |
456 | 456 | ||
457 | #define S_SCD_MEM_ECC_BAD 8 | 457 | #define S_SCD_MEM_ECC_BAD 8 |
458 | #define M_SCD_MEM_ECC_BAD _SB_MAKEMASK(8, S_SCD_MEM_ECC_BAD) | 458 | #define M_SCD_MEM_ECC_BAD _SB_MAKEMASK(8, S_SCD_MEM_ECC_BAD) |
459 | #define V_SCD_MEM_ECC_BAD(x) _SB_MAKEVALUE(x, S_SCD_MEM_ECC_BAD) | 459 | #define V_SCD_MEM_ECC_BAD(x) _SB_MAKEVALUE(x, S_SCD_MEM_ECC_BAD) |
460 | #define G_SCD_MEM_ECC_BAD(x) _SB_GETVALUE(x, S_SCD_MEM_ECC_BAD, M_SCD_MEM_ECC_BAD) | 460 | #define G_SCD_MEM_ECC_BAD(x) _SB_GETVALUE(x, S_SCD_MEM_ECC_BAD, M_SCD_MEM_ECC_BAD) |
461 | 461 | ||
462 | #define S_SCD_MEM_BUSERR 16 | 462 | #define S_SCD_MEM_BUSERR 16 |
463 | #define M_SCD_MEM_BUSERR _SB_MAKEMASK(8, S_SCD_MEM_BUSERR) | 463 | #define M_SCD_MEM_BUSERR _SB_MAKEMASK(8, S_SCD_MEM_BUSERR) |
464 | #define V_SCD_MEM_BUSERR(x) _SB_MAKEVALUE(x, S_SCD_MEM_BUSERR) | 464 | #define V_SCD_MEM_BUSERR(x) _SB_MAKEVALUE(x, S_SCD_MEM_BUSERR) |
465 | #define G_SCD_MEM_BUSERR(x) _SB_GETVALUE(x, S_SCD_MEM_BUSERR, M_SCD_MEM_BUSERR) | 465 | #define G_SCD_MEM_BUSERR(x) _SB_GETVALUE(x, S_SCD_MEM_BUSERR, M_SCD_MEM_BUSERR) |
466 | 466 | ||
467 | 467 | ||
468 | /* | 468 | /* |
@@ -473,28 +473,28 @@ | |||
473 | #define M_ATRAP_INDEX _SB_MAKEMASK(4, 0) | 473 | #define M_ATRAP_INDEX _SB_MAKEMASK(4, 0) |
474 | #define M_ATRAP_ADDRESS _SB_MAKEMASK(40, 0) | 474 | #define M_ATRAP_ADDRESS _SB_MAKEMASK(40, 0) |
475 | 475 | ||
476 | #define S_ATRAP_CFG_CNT 0 | 476 | #define S_ATRAP_CFG_CNT 0 |
477 | #define M_ATRAP_CFG_CNT _SB_MAKEMASK(3, S_ATRAP_CFG_CNT) | 477 | #define M_ATRAP_CFG_CNT _SB_MAKEMASK(3, S_ATRAP_CFG_CNT) |
478 | #define V_ATRAP_CFG_CNT(x) _SB_MAKEVALUE(x, S_ATRAP_CFG_CNT) | 478 | #define V_ATRAP_CFG_CNT(x) _SB_MAKEVALUE(x, S_ATRAP_CFG_CNT) |
479 | #define G_ATRAP_CFG_CNT(x) _SB_GETVALUE(x, S_ATRAP_CFG_CNT, M_ATRAP_CFG_CNT) | 479 | #define G_ATRAP_CFG_CNT(x) _SB_GETVALUE(x, S_ATRAP_CFG_CNT, M_ATRAP_CFG_CNT) |
480 | 480 | ||
481 | #define M_ATRAP_CFG_WRITE _SB_MAKEMASK1(3) | 481 | #define M_ATRAP_CFG_WRITE _SB_MAKEMASK1(3) |
482 | #define M_ATRAP_CFG_ALL _SB_MAKEMASK1(4) | 482 | #define M_ATRAP_CFG_ALL _SB_MAKEMASK1(4) |
483 | #define M_ATRAP_CFG_INV _SB_MAKEMASK1(5) | 483 | #define M_ATRAP_CFG_INV _SB_MAKEMASK1(5) |
484 | #define M_ATRAP_CFG_USESRC _SB_MAKEMASK1(6) | 484 | #define M_ATRAP_CFG_USESRC _SB_MAKEMASK1(6) |
485 | #define M_ATRAP_CFG_SRCINV _SB_MAKEMASK1(7) | 485 | #define M_ATRAP_CFG_SRCINV _SB_MAKEMASK1(7) |
486 | 486 | ||
487 | #define S_ATRAP_CFG_AGENTID 8 | 487 | #define S_ATRAP_CFG_AGENTID 8 |
488 | #define M_ATRAP_CFG_AGENTID _SB_MAKEMASK(4, S_ATRAP_CFG_AGENTID) | 488 | #define M_ATRAP_CFG_AGENTID _SB_MAKEMASK(4, S_ATRAP_CFG_AGENTID) |
489 | #define V_ATRAP_CFG_AGENTID(x) _SB_MAKEVALUE(x, S_ATRAP_CFG_AGENTID) | 489 | #define V_ATRAP_CFG_AGENTID(x) _SB_MAKEVALUE(x, S_ATRAP_CFG_AGENTID) |
490 | #define G_ATRAP_CFG_AGENTID(x) _SB_GETVALUE(x, S_ATRAP_CFG_AGENTID, M_ATRAP_CFG_AGENTID) | 490 | #define G_ATRAP_CFG_AGENTID(x) _SB_GETVALUE(x, S_ATRAP_CFG_AGENTID, M_ATRAP_CFG_AGENTID) |
491 | 491 | ||
492 | #define K_BUS_AGENT_CPU0 0 | 492 | #define K_BUS_AGENT_CPU0 0 |
493 | #define K_BUS_AGENT_CPU1 1 | 493 | #define K_BUS_AGENT_CPU1 1 |
494 | #define K_BUS_AGENT_IOB0 2 | 494 | #define K_BUS_AGENT_IOB0 2 |
495 | #define K_BUS_AGENT_IOB1 3 | 495 | #define K_BUS_AGENT_IOB1 3 |
496 | #define K_BUS_AGENT_SCD 4 | 496 | #define K_BUS_AGENT_SCD 4 |
497 | #define K_BUS_AGENT_L2C 6 | 497 | #define K_BUS_AGENT_L2C 6 |
498 | #define K_BUS_AGENT_MC 7 | 498 | #define K_BUS_AGENT_MC 7 |
499 | 499 | ||
500 | #define S_ATRAP_CFG_CATTR 12 | 500 | #define S_ATRAP_CFG_CATTR 12 |
@@ -503,13 +503,13 @@ | |||
503 | #define G_ATRAP_CFG_CATTR(x) _SB_GETVALUE(x, S_ATRAP_CFG_CATTR, M_ATRAP_CFG_CATTR) | 503 | #define G_ATRAP_CFG_CATTR(x) _SB_GETVALUE(x, S_ATRAP_CFG_CATTR, M_ATRAP_CFG_CATTR) |
504 | 504 | ||
505 | #define K_ATRAP_CFG_CATTR_IGNORE 0 | 505 | #define K_ATRAP_CFG_CATTR_IGNORE 0 |
506 | #define K_ATRAP_CFG_CATTR_UNC 1 | 506 | #define K_ATRAP_CFG_CATTR_UNC 1 |
507 | #define K_ATRAP_CFG_CATTR_CACHEABLE 2 | 507 | #define K_ATRAP_CFG_CATTR_CACHEABLE 2 |
508 | #define K_ATRAP_CFG_CATTR_NONCOH 3 | 508 | #define K_ATRAP_CFG_CATTR_NONCOH 3 |
509 | #define K_ATRAP_CFG_CATTR_COHERENT 4 | 509 | #define K_ATRAP_CFG_CATTR_COHERENT 4 |
510 | #define K_ATRAP_CFG_CATTR_NOTUNC 5 | 510 | #define K_ATRAP_CFG_CATTR_NOTUNC 5 |
511 | #define K_ATRAP_CFG_CATTR_NOTNONCOH 6 | 511 | #define K_ATRAP_CFG_CATTR_NOTNONCOH 6 |
512 | #define K_ATRAP_CFG_CATTR_NOTCOHERENT 7 | 512 | #define K_ATRAP_CFG_CATTR_NOTCOHERENT 7 |
513 | 513 | ||
514 | #endif /* 1250/112x */ | 514 | #endif /* 1250/112x */ |
515 | 515 | ||
@@ -517,16 +517,16 @@ | |||
517 | * Trace Buffer Config register | 517 | * Trace Buffer Config register |
518 | */ | 518 | */ |
519 | 519 | ||
520 | #define M_SCD_TRACE_CFG_RESET _SB_MAKEMASK1(0) | 520 | #define M_SCD_TRACE_CFG_RESET _SB_MAKEMASK1(0) |
521 | #define M_SCD_TRACE_CFG_START_READ _SB_MAKEMASK1(1) | 521 | #define M_SCD_TRACE_CFG_START_READ _SB_MAKEMASK1(1) |
522 | #define M_SCD_TRACE_CFG_START _SB_MAKEMASK1(2) | 522 | #define M_SCD_TRACE_CFG_START _SB_MAKEMASK1(2) |
523 | #define M_SCD_TRACE_CFG_STOP _SB_MAKEMASK1(3) | 523 | #define M_SCD_TRACE_CFG_STOP _SB_MAKEMASK1(3) |
524 | #define M_SCD_TRACE_CFG_FREEZE _SB_MAKEMASK1(4) | 524 | #define M_SCD_TRACE_CFG_FREEZE _SB_MAKEMASK1(4) |
525 | #define M_SCD_TRACE_CFG_FREEZE_FULL _SB_MAKEMASK1(5) | 525 | #define M_SCD_TRACE_CFG_FREEZE_FULL _SB_MAKEMASK1(5) |
526 | #define M_SCD_TRACE_CFG_DEBUG_FULL _SB_MAKEMASK1(6) | 526 | #define M_SCD_TRACE_CFG_DEBUG_FULL _SB_MAKEMASK1(6) |
527 | #define M_SCD_TRACE_CFG_FULL _SB_MAKEMASK1(7) | 527 | #define M_SCD_TRACE_CFG_FULL _SB_MAKEMASK1(7) |
528 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 528 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
529 | #define M_SCD_TRACE_CFG_FORCECNT _SB_MAKEMASK1(8) | 529 | #define M_SCD_TRACE_CFG_FORCECNT _SB_MAKEMASK1(8) |
530 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 530 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
531 | 531 | ||
532 | /* | 532 | /* |
@@ -534,121 +534,121 @@ | |||
534 | * a slightly different place in the register. | 534 | * a slightly different place in the register. |
535 | */ | 535 | */ |
536 | #if SIBYTE_HDR_FEATURE_1250_112x | 536 | #if SIBYTE_HDR_FEATURE_1250_112x |
537 | #define S_SCD_TRACE_CFG_CUR_ADDR 10 | 537 | #define S_SCD_TRACE_CFG_CUR_ADDR 10 |
538 | #else | 538 | #else |
539 | #if SIBYTE_HDR_FEATURE_CHIP(1480) | 539 | #if SIBYTE_HDR_FEATURE_CHIP(1480) |
540 | #define S_SCD_TRACE_CFG_CUR_ADDR 24 | 540 | #define S_SCD_TRACE_CFG_CUR_ADDR 24 |
541 | #endif /* 1480 */ | 541 | #endif /* 1480 */ |
542 | #endif /* 1250/112x */ | 542 | #endif /* 1250/112x */ |
543 | 543 | ||
544 | #define M_SCD_TRACE_CFG_CUR_ADDR _SB_MAKEMASK(8, S_SCD_TRACE_CFG_CUR_ADDR) | 544 | #define M_SCD_TRACE_CFG_CUR_ADDR _SB_MAKEMASK(8, S_SCD_TRACE_CFG_CUR_ADDR) |
545 | #define V_SCD_TRACE_CFG_CUR_ADDR(x) _SB_MAKEVALUE(x, S_SCD_TRACE_CFG_CUR_ADDR) | 545 | #define V_SCD_TRACE_CFG_CUR_ADDR(x) _SB_MAKEVALUE(x, S_SCD_TRACE_CFG_CUR_ADDR) |
546 | #define G_SCD_TRACE_CFG_CUR_ADDR(x) _SB_GETVALUE(x, S_SCD_TRACE_CFG_CUR_ADDR, M_SCD_TRACE_CFG_CUR_ADDR) | 546 | #define G_SCD_TRACE_CFG_CUR_ADDR(x) _SB_GETVALUE(x, S_SCD_TRACE_CFG_CUR_ADDR, M_SCD_TRACE_CFG_CUR_ADDR) |
547 | 547 | ||
548 | /* | 548 | /* |
549 | * Trace Event registers | 549 | * Trace Event registers |
550 | */ | 550 | */ |
551 | 551 | ||
552 | #define S_SCD_TREVT_ADDR_MATCH 0 | 552 | #define S_SCD_TREVT_ADDR_MATCH 0 |
553 | #define M_SCD_TREVT_ADDR_MATCH _SB_MAKEMASK(4, S_SCD_TREVT_ADDR_MATCH) | 553 | #define M_SCD_TREVT_ADDR_MATCH _SB_MAKEMASK(4, S_SCD_TREVT_ADDR_MATCH) |
554 | #define V_SCD_TREVT_ADDR_MATCH(x) _SB_MAKEVALUE(x, S_SCD_TREVT_ADDR_MATCH) | 554 | #define V_SCD_TREVT_ADDR_MATCH(x) _SB_MAKEVALUE(x, S_SCD_TREVT_ADDR_MATCH) |
555 | #define G_SCD_TREVT_ADDR_MATCH(x) _SB_GETVALUE(x, S_SCD_TREVT_ADDR_MATCH, M_SCD_TREVT_ADDR_MATCH) | 555 | #define G_SCD_TREVT_ADDR_MATCH(x) _SB_GETVALUE(x, S_SCD_TREVT_ADDR_MATCH, M_SCD_TREVT_ADDR_MATCH) |
556 | 556 | ||
557 | #define M_SCD_TREVT_REQID_MATCH _SB_MAKEMASK1(4) | 557 | #define M_SCD_TREVT_REQID_MATCH _SB_MAKEMASK1(4) |
558 | #define M_SCD_TREVT_DATAID_MATCH _SB_MAKEMASK1(5) | 558 | #define M_SCD_TREVT_DATAID_MATCH _SB_MAKEMASK1(5) |
559 | #define M_SCD_TREVT_RESPID_MATCH _SB_MAKEMASK1(6) | 559 | #define M_SCD_TREVT_RESPID_MATCH _SB_MAKEMASK1(6) |
560 | #define M_SCD_TREVT_INTERRUPT _SB_MAKEMASK1(7) | 560 | #define M_SCD_TREVT_INTERRUPT _SB_MAKEMASK1(7) |
561 | #define M_SCD_TREVT_DEBUG_PIN _SB_MAKEMASK1(9) | 561 | #define M_SCD_TREVT_DEBUG_PIN _SB_MAKEMASK1(9) |
562 | #define M_SCD_TREVT_WRITE _SB_MAKEMASK1(10) | 562 | #define M_SCD_TREVT_WRITE _SB_MAKEMASK1(10) |
563 | #define M_SCD_TREVT_READ _SB_MAKEMASK1(11) | 563 | #define M_SCD_TREVT_READ _SB_MAKEMASK1(11) |
564 | 564 | ||
565 | #define S_SCD_TREVT_REQID 12 | 565 | #define S_SCD_TREVT_REQID 12 |
566 | #define M_SCD_TREVT_REQID _SB_MAKEMASK(4, S_SCD_TREVT_REQID) | 566 | #define M_SCD_TREVT_REQID _SB_MAKEMASK(4, S_SCD_TREVT_REQID) |
567 | #define V_SCD_TREVT_REQID(x) _SB_MAKEVALUE(x, S_SCD_TREVT_REQID) | 567 | #define V_SCD_TREVT_REQID(x) _SB_MAKEVALUE(x, S_SCD_TREVT_REQID) |
568 | #define G_SCD_TREVT_REQID(x) _SB_GETVALUE(x, S_SCD_TREVT_REQID, M_SCD_TREVT_REQID) | 568 | #define G_SCD_TREVT_REQID(x) _SB_GETVALUE(x, S_SCD_TREVT_REQID, M_SCD_TREVT_REQID) |
569 | 569 | ||
570 | #define S_SCD_TREVT_RESPID 16 | 570 | #define S_SCD_TREVT_RESPID 16 |
571 | #define M_SCD_TREVT_RESPID _SB_MAKEMASK(4, S_SCD_TREVT_RESPID) | 571 | #define M_SCD_TREVT_RESPID _SB_MAKEMASK(4, S_SCD_TREVT_RESPID) |
572 | #define V_SCD_TREVT_RESPID(x) _SB_MAKEVALUE(x, S_SCD_TREVT_RESPID) | 572 | #define V_SCD_TREVT_RESPID(x) _SB_MAKEVALUE(x, S_SCD_TREVT_RESPID) |
573 | #define G_SCD_TREVT_RESPID(x) _SB_GETVALUE(x, S_SCD_TREVT_RESPID, M_SCD_TREVT_RESPID) | 573 | #define G_SCD_TREVT_RESPID(x) _SB_GETVALUE(x, S_SCD_TREVT_RESPID, M_SCD_TREVT_RESPID) |
574 | 574 | ||
575 | #define S_SCD_TREVT_DATAID 20 | 575 | #define S_SCD_TREVT_DATAID 20 |
576 | #define M_SCD_TREVT_DATAID _SB_MAKEMASK(4, S_SCD_TREVT_DATAID) | 576 | #define M_SCD_TREVT_DATAID _SB_MAKEMASK(4, S_SCD_TREVT_DATAID) |
577 | #define V_SCD_TREVT_DATAID(x) _SB_MAKEVALUE(x, S_SCD_TREVT_DATAID) | 577 | #define V_SCD_TREVT_DATAID(x) _SB_MAKEVALUE(x, S_SCD_TREVT_DATAID) |
578 | #define G_SCD_TREVT_DATAID(x) _SB_GETVALUE(x, S_SCD_TREVT_DATAID, M_SCD_TREVT_DATID) | 578 | #define G_SCD_TREVT_DATAID(x) _SB_GETVALUE(x, S_SCD_TREVT_DATAID, M_SCD_TREVT_DATID) |
579 | 579 | ||
580 | #define S_SCD_TREVT_COUNT 24 | 580 | #define S_SCD_TREVT_COUNT 24 |
581 | #define M_SCD_TREVT_COUNT _SB_MAKEMASK(8, S_SCD_TREVT_COUNT) | 581 | #define M_SCD_TREVT_COUNT _SB_MAKEMASK(8, S_SCD_TREVT_COUNT) |
582 | #define V_SCD_TREVT_COUNT(x) _SB_MAKEVALUE(x, S_SCD_TREVT_COUNT) | 582 | #define V_SCD_TREVT_COUNT(x) _SB_MAKEVALUE(x, S_SCD_TREVT_COUNT) |
583 | #define G_SCD_TREVT_COUNT(x) _SB_GETVALUE(x, S_SCD_TREVT_COUNT, M_SCD_TREVT_COUNT) | 583 | #define G_SCD_TREVT_COUNT(x) _SB_GETVALUE(x, S_SCD_TREVT_COUNT, M_SCD_TREVT_COUNT) |
584 | 584 | ||
585 | /* | 585 | /* |
586 | * Trace Sequence registers | 586 | * Trace Sequence registers |
587 | */ | 587 | */ |
588 | 588 | ||
589 | #define S_SCD_TRSEQ_EVENT4 0 | 589 | #define S_SCD_TRSEQ_EVENT4 0 |
590 | #define M_SCD_TRSEQ_EVENT4 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT4) | 590 | #define M_SCD_TRSEQ_EVENT4 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT4) |
591 | #define V_SCD_TRSEQ_EVENT4(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT4) | 591 | #define V_SCD_TRSEQ_EVENT4(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT4) |
592 | #define G_SCD_TRSEQ_EVENT4(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT4, M_SCD_TRSEQ_EVENT4) | 592 | #define G_SCD_TRSEQ_EVENT4(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT4, M_SCD_TRSEQ_EVENT4) |
593 | 593 | ||
594 | #define S_SCD_TRSEQ_EVENT3 4 | 594 | #define S_SCD_TRSEQ_EVENT3 4 |
595 | #define M_SCD_TRSEQ_EVENT3 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT3) | 595 | #define M_SCD_TRSEQ_EVENT3 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT3) |
596 | #define V_SCD_TRSEQ_EVENT3(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT3) | 596 | #define V_SCD_TRSEQ_EVENT3(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT3) |
597 | #define G_SCD_TRSEQ_EVENT3(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT3, M_SCD_TRSEQ_EVENT3) | 597 | #define G_SCD_TRSEQ_EVENT3(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT3, M_SCD_TRSEQ_EVENT3) |
598 | 598 | ||
599 | #define S_SCD_TRSEQ_EVENT2 8 | 599 | #define S_SCD_TRSEQ_EVENT2 8 |
600 | #define M_SCD_TRSEQ_EVENT2 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT2) | 600 | #define M_SCD_TRSEQ_EVENT2 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT2) |
601 | #define V_SCD_TRSEQ_EVENT2(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT2) | 601 | #define V_SCD_TRSEQ_EVENT2(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT2) |
602 | #define G_SCD_TRSEQ_EVENT2(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT2, M_SCD_TRSEQ_EVENT2) | 602 | #define G_SCD_TRSEQ_EVENT2(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT2, M_SCD_TRSEQ_EVENT2) |
603 | 603 | ||
604 | #define S_SCD_TRSEQ_EVENT1 12 | 604 | #define S_SCD_TRSEQ_EVENT1 12 |
605 | #define M_SCD_TRSEQ_EVENT1 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT1) | 605 | #define M_SCD_TRSEQ_EVENT1 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT1) |
606 | #define V_SCD_TRSEQ_EVENT1(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT1) | 606 | #define V_SCD_TRSEQ_EVENT1(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT1) |
607 | #define G_SCD_TRSEQ_EVENT1(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT1, M_SCD_TRSEQ_EVENT1) | 607 | #define G_SCD_TRSEQ_EVENT1(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT1, M_SCD_TRSEQ_EVENT1) |
608 | 608 | ||
609 | #define K_SCD_TRSEQ_E0 0 | 609 | #define K_SCD_TRSEQ_E0 0 |
610 | #define K_SCD_TRSEQ_E1 1 | 610 | #define K_SCD_TRSEQ_E1 1 |
611 | #define K_SCD_TRSEQ_E2 2 | 611 | #define K_SCD_TRSEQ_E2 2 |
612 | #define K_SCD_TRSEQ_E3 3 | 612 | #define K_SCD_TRSEQ_E3 3 |
613 | #define K_SCD_TRSEQ_E0_E1 4 | 613 | #define K_SCD_TRSEQ_E0_E1 4 |
614 | #define K_SCD_TRSEQ_E1_E2 5 | 614 | #define K_SCD_TRSEQ_E1_E2 5 |
615 | #define K_SCD_TRSEQ_E2_E3 6 | 615 | #define K_SCD_TRSEQ_E2_E3 6 |
616 | #define K_SCD_TRSEQ_E0_E1_E2 7 | 616 | #define K_SCD_TRSEQ_E0_E1_E2 7 |
617 | #define K_SCD_TRSEQ_E0_E1_E2_E3 8 | 617 | #define K_SCD_TRSEQ_E0_E1_E2_E3 8 |
618 | #define K_SCD_TRSEQ_E0E1 9 | 618 | #define K_SCD_TRSEQ_E0E1 9 |
619 | #define K_SCD_TRSEQ_E0E1E2 10 | 619 | #define K_SCD_TRSEQ_E0E1E2 10 |
620 | #define K_SCD_TRSEQ_E0E1E2E3 11 | 620 | #define K_SCD_TRSEQ_E0E1E2E3 11 |
621 | #define K_SCD_TRSEQ_E0E1_E2 12 | 621 | #define K_SCD_TRSEQ_E0E1_E2 12 |
622 | #define K_SCD_TRSEQ_E0E1_E2E3 13 | 622 | #define K_SCD_TRSEQ_E0E1_E2E3 13 |
623 | #define K_SCD_TRSEQ_E0E1_E2_E3 14 | 623 | #define K_SCD_TRSEQ_E0E1_E2_E3 14 |
624 | #define K_SCD_TRSEQ_IGNORED 15 | 624 | #define K_SCD_TRSEQ_IGNORED 15 |
625 | 625 | ||
626 | #define K_SCD_TRSEQ_TRIGGER_ALL (V_SCD_TRSEQ_EVENT1(K_SCD_TRSEQ_IGNORED) | \ | 626 | #define K_SCD_TRSEQ_TRIGGER_ALL (V_SCD_TRSEQ_EVENT1(K_SCD_TRSEQ_IGNORED) | \ |
627 | V_SCD_TRSEQ_EVENT2(K_SCD_TRSEQ_IGNORED) | \ | 627 | V_SCD_TRSEQ_EVENT2(K_SCD_TRSEQ_IGNORED) | \ |
628 | V_SCD_TRSEQ_EVENT3(K_SCD_TRSEQ_IGNORED) | \ | 628 | V_SCD_TRSEQ_EVENT3(K_SCD_TRSEQ_IGNORED) | \ |
629 | V_SCD_TRSEQ_EVENT4(K_SCD_TRSEQ_IGNORED)) | 629 | V_SCD_TRSEQ_EVENT4(K_SCD_TRSEQ_IGNORED)) |
630 | 630 | ||
631 | #define S_SCD_TRSEQ_FUNCTION 16 | 631 | #define S_SCD_TRSEQ_FUNCTION 16 |
632 | #define M_SCD_TRSEQ_FUNCTION _SB_MAKEMASK(4, S_SCD_TRSEQ_FUNCTION) | 632 | #define M_SCD_TRSEQ_FUNCTION _SB_MAKEMASK(4, S_SCD_TRSEQ_FUNCTION) |
633 | #define V_SCD_TRSEQ_FUNCTION(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_FUNCTION) | 633 | #define V_SCD_TRSEQ_FUNCTION(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_FUNCTION) |
634 | #define G_SCD_TRSEQ_FUNCTION(x) _SB_GETVALUE(x, S_SCD_TRSEQ_FUNCTION, M_SCD_TRSEQ_FUNCTION) | 634 | #define G_SCD_TRSEQ_FUNCTION(x) _SB_GETVALUE(x, S_SCD_TRSEQ_FUNCTION, M_SCD_TRSEQ_FUNCTION) |
635 | 635 | ||
636 | #define K_SCD_TRSEQ_FUNC_NOP 0 | 636 | #define K_SCD_TRSEQ_FUNC_NOP 0 |
637 | #define K_SCD_TRSEQ_FUNC_START 1 | 637 | #define K_SCD_TRSEQ_FUNC_START 1 |
638 | #define K_SCD_TRSEQ_FUNC_STOP 2 | 638 | #define K_SCD_TRSEQ_FUNC_STOP 2 |
639 | #define K_SCD_TRSEQ_FUNC_FREEZE 3 | 639 | #define K_SCD_TRSEQ_FUNC_FREEZE 3 |
640 | 640 | ||
641 | #define V_SCD_TRSEQ_FUNC_NOP V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_NOP) | 641 | #define V_SCD_TRSEQ_FUNC_NOP V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_NOP) |
642 | #define V_SCD_TRSEQ_FUNC_START V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_START) | 642 | #define V_SCD_TRSEQ_FUNC_START V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_START) |
643 | #define V_SCD_TRSEQ_FUNC_STOP V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_STOP) | 643 | #define V_SCD_TRSEQ_FUNC_STOP V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_STOP) |
644 | #define V_SCD_TRSEQ_FUNC_FREEZE V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_FREEZE) | 644 | #define V_SCD_TRSEQ_FUNC_FREEZE V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_FREEZE) |
645 | 645 | ||
646 | #define M_SCD_TRSEQ_ASAMPLE _SB_MAKEMASK1(18) | 646 | #define M_SCD_TRSEQ_ASAMPLE _SB_MAKEMASK1(18) |
647 | #define M_SCD_TRSEQ_DSAMPLE _SB_MAKEMASK1(19) | 647 | #define M_SCD_TRSEQ_DSAMPLE _SB_MAKEMASK1(19) |
648 | #define M_SCD_TRSEQ_DEBUGPIN _SB_MAKEMASK1(20) | 648 | #define M_SCD_TRSEQ_DEBUGPIN _SB_MAKEMASK1(20) |
649 | #define M_SCD_TRSEQ_DEBUGCPU _SB_MAKEMASK1(21) | 649 | #define M_SCD_TRSEQ_DEBUGCPU _SB_MAKEMASK1(21) |
650 | #define M_SCD_TRSEQ_CLEARUSE _SB_MAKEMASK1(22) | 650 | #define M_SCD_TRSEQ_CLEARUSE _SB_MAKEMASK1(22) |
651 | #define M_SCD_TRSEQ_ALLD_A _SB_MAKEMASK1(23) | 651 | #define M_SCD_TRSEQ_ALLD_A _SB_MAKEMASK1(23) |
652 | #define M_SCD_TRSEQ_ALL_A _SB_MAKEMASK1(24) | 652 | #define M_SCD_TRSEQ_ALL_A _SB_MAKEMASK1(24) |
653 | 653 | ||
654 | #endif | 654 | #endif |
diff --git a/arch/mips/include/asm/sibyte/sb1250_smbus.h b/arch/mips/include/asm/sibyte/sb1250_smbus.h index 128d6b75b819..3cb73e89bbbc 100644 --- a/arch/mips/include/asm/sibyte/sb1250_smbus.h +++ b/arch/mips/include/asm/sibyte/sb1250_smbus.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * SMBUS Constants File: sb1250_smbus.h | 4 | * SMBUS Constants File: sb1250_smbus.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the SB1250's SMbus devices. | 7 | * manipulating the SB1250's SMbus devices. |
@@ -40,83 +40,83 @@ | |||
40 | * SMBus Clock Frequency Register (Table 14-2) | 40 | * SMBus Clock Frequency Register (Table 14-2) |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #define S_SMB_FREQ_DIV 0 | 43 | #define S_SMB_FREQ_DIV 0 |
44 | #define M_SMB_FREQ_DIV _SB_MAKEMASK(13, S_SMB_FREQ_DIV) | 44 | #define M_SMB_FREQ_DIV _SB_MAKEMASK(13, S_SMB_FREQ_DIV) |
45 | #define V_SMB_FREQ_DIV(x) _SB_MAKEVALUE(x, S_SMB_FREQ_DIV) | 45 | #define V_SMB_FREQ_DIV(x) _SB_MAKEVALUE(x, S_SMB_FREQ_DIV) |
46 | 46 | ||
47 | #define K_SMB_FREQ_400KHZ 0x1F | 47 | #define K_SMB_FREQ_400KHZ 0x1F |
48 | #define K_SMB_FREQ_100KHZ 0x7D | 48 | #define K_SMB_FREQ_100KHZ 0x7D |
49 | #define K_SMB_FREQ_10KHZ 1250 | 49 | #define K_SMB_FREQ_10KHZ 1250 |
50 | 50 | ||
51 | #define S_SMB_CMD 0 | 51 | #define S_SMB_CMD 0 |
52 | #define M_SMB_CMD _SB_MAKEMASK(8, S_SMB_CMD) | 52 | #define M_SMB_CMD _SB_MAKEMASK(8, S_SMB_CMD) |
53 | #define V_SMB_CMD(x) _SB_MAKEVALUE(x, S_SMB_CMD) | 53 | #define V_SMB_CMD(x) _SB_MAKEVALUE(x, S_SMB_CMD) |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * SMBus control register (Table 14-4) | 56 | * SMBus control register (Table 14-4) |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #define M_SMB_ERR_INTR _SB_MAKEMASK1(0) | 59 | #define M_SMB_ERR_INTR _SB_MAKEMASK1(0) |
60 | #define M_SMB_FINISH_INTR _SB_MAKEMASK1(1) | 60 | #define M_SMB_FINISH_INTR _SB_MAKEMASK1(1) |
61 | 61 | ||
62 | #define S_SMB_DATA_OUT 4 | 62 | #define S_SMB_DATA_OUT 4 |
63 | #define M_SMB_DATA_OUT _SB_MAKEMASK1(S_SMB_DATA_OUT) | 63 | #define M_SMB_DATA_OUT _SB_MAKEMASK1(S_SMB_DATA_OUT) |
64 | #define V_SMB_DATA_OUT(x) _SB_MAKEVALUE(x, S_SMB_DATA_OUT) | 64 | #define V_SMB_DATA_OUT(x) _SB_MAKEVALUE(x, S_SMB_DATA_OUT) |
65 | 65 | ||
66 | #define M_SMB_DATA_DIR _SB_MAKEMASK1(5) | 66 | #define M_SMB_DATA_DIR _SB_MAKEMASK1(5) |
67 | #define M_SMB_DATA_DIR_OUTPUT M_SMB_DATA_DIR | 67 | #define M_SMB_DATA_DIR_OUTPUT M_SMB_DATA_DIR |
68 | #define M_SMB_CLK_OUT _SB_MAKEMASK1(6) | 68 | #define M_SMB_CLK_OUT _SB_MAKEMASK1(6) |
69 | #define M_SMB_DIRECT_ENABLE _SB_MAKEMASK1(7) | 69 | #define M_SMB_DIRECT_ENABLE _SB_MAKEMASK1(7) |
70 | 70 | ||
71 | /* | 71 | /* |
72 | * SMBus status registers (Table 14-5) | 72 | * SMBus status registers (Table 14-5) |
73 | */ | 73 | */ |
74 | 74 | ||
75 | #define M_SMB_BUSY _SB_MAKEMASK1(0) | 75 | #define M_SMB_BUSY _SB_MAKEMASK1(0) |
76 | #define M_SMB_ERROR _SB_MAKEMASK1(1) | 76 | #define M_SMB_ERROR _SB_MAKEMASK1(1) |
77 | #define M_SMB_ERROR_TYPE _SB_MAKEMASK1(2) | 77 | #define M_SMB_ERROR_TYPE _SB_MAKEMASK1(2) |
78 | 78 | ||
79 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 79 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
80 | #define S_SMB_SCL_IN 5 | 80 | #define S_SMB_SCL_IN 5 |
81 | #define M_SMB_SCL_IN _SB_MAKEMASK1(S_SMB_SCL_IN) | 81 | #define M_SMB_SCL_IN _SB_MAKEMASK1(S_SMB_SCL_IN) |
82 | #define V_SMB_SCL_IN(x) _SB_MAKEVALUE(x, S_SMB_SCL_IN) | 82 | #define V_SMB_SCL_IN(x) _SB_MAKEVALUE(x, S_SMB_SCL_IN) |
83 | #define G_SMB_SCL_IN(x) _SB_GETVALUE(x, S_SMB_SCL_IN, M_SMB_SCL_IN) | 83 | #define G_SMB_SCL_IN(x) _SB_GETVALUE(x, S_SMB_SCL_IN, M_SMB_SCL_IN) |
84 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 84 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
85 | 85 | ||
86 | #define S_SMB_REF 6 | 86 | #define S_SMB_REF 6 |
87 | #define M_SMB_REF _SB_MAKEMASK1(S_SMB_REF) | 87 | #define M_SMB_REF _SB_MAKEMASK1(S_SMB_REF) |
88 | #define V_SMB_REF(x) _SB_MAKEVALUE(x, S_SMB_REF) | 88 | #define V_SMB_REF(x) _SB_MAKEVALUE(x, S_SMB_REF) |
89 | #define G_SMB_REF(x) _SB_GETVALUE(x, S_SMB_REF, M_SMB_REF) | 89 | #define G_SMB_REF(x) _SB_GETVALUE(x, S_SMB_REF, M_SMB_REF) |
90 | 90 | ||
91 | #define S_SMB_DATA_IN 7 | 91 | #define S_SMB_DATA_IN 7 |
92 | #define M_SMB_DATA_IN _SB_MAKEMASK1(S_SMB_DATA_IN) | 92 | #define M_SMB_DATA_IN _SB_MAKEMASK1(S_SMB_DATA_IN) |
93 | #define V_SMB_DATA_IN(x) _SB_MAKEVALUE(x, S_SMB_DATA_IN) | 93 | #define V_SMB_DATA_IN(x) _SB_MAKEVALUE(x, S_SMB_DATA_IN) |
94 | #define G_SMB_DATA_IN(x) _SB_GETVALUE(x, S_SMB_DATA_IN, M_SMB_DATA_IN) | 94 | #define G_SMB_DATA_IN(x) _SB_GETVALUE(x, S_SMB_DATA_IN, M_SMB_DATA_IN) |
95 | 95 | ||
96 | /* | 96 | /* |
97 | * SMBus Start/Command registers (Table 14-9) | 97 | * SMBus Start/Command registers (Table 14-9) |
98 | */ | 98 | */ |
99 | 99 | ||
100 | #define S_SMB_ADDR 0 | 100 | #define S_SMB_ADDR 0 |
101 | #define M_SMB_ADDR _SB_MAKEMASK(7, S_SMB_ADDR) | 101 | #define M_SMB_ADDR _SB_MAKEMASK(7, S_SMB_ADDR) |
102 | #define V_SMB_ADDR(x) _SB_MAKEVALUE(x, S_SMB_ADDR) | 102 | #define V_SMB_ADDR(x) _SB_MAKEVALUE(x, S_SMB_ADDR) |
103 | #define G_SMB_ADDR(x) _SB_GETVALUE(x, S_SMB_ADDR, M_SMB_ADDR) | 103 | #define G_SMB_ADDR(x) _SB_GETVALUE(x, S_SMB_ADDR, M_SMB_ADDR) |
104 | 104 | ||
105 | #define M_SMB_QDATA _SB_MAKEMASK1(7) | 105 | #define M_SMB_QDATA _SB_MAKEMASK1(7) |
106 | 106 | ||
107 | #define S_SMB_TT 8 | 107 | #define S_SMB_TT 8 |
108 | #define M_SMB_TT _SB_MAKEMASK(3, S_SMB_TT) | 108 | #define M_SMB_TT _SB_MAKEMASK(3, S_SMB_TT) |
109 | #define V_SMB_TT(x) _SB_MAKEVALUE(x, S_SMB_TT) | 109 | #define V_SMB_TT(x) _SB_MAKEVALUE(x, S_SMB_TT) |
110 | #define G_SMB_TT(x) _SB_GETVALUE(x, S_SMB_TT, M_SMB_TT) | 110 | #define G_SMB_TT(x) _SB_GETVALUE(x, S_SMB_TT, M_SMB_TT) |
111 | 111 | ||
112 | #define K_SMB_TT_WR1BYTE 0 | 112 | #define K_SMB_TT_WR1BYTE 0 |
113 | #define K_SMB_TT_WR2BYTE 1 | 113 | #define K_SMB_TT_WR2BYTE 1 |
114 | #define K_SMB_TT_WR3BYTE 2 | 114 | #define K_SMB_TT_WR3BYTE 2 |
115 | #define K_SMB_TT_CMD_RD1BYTE 3 | 115 | #define K_SMB_TT_CMD_RD1BYTE 3 |
116 | #define K_SMB_TT_CMD_RD2BYTE 4 | 116 | #define K_SMB_TT_CMD_RD2BYTE 4 |
117 | #define K_SMB_TT_RD1BYTE 5 | 117 | #define K_SMB_TT_RD1BYTE 5 |
118 | #define K_SMB_TT_QUICKCMD 6 | 118 | #define K_SMB_TT_QUICKCMD 6 |
119 | #define K_SMB_TT_EEPROMREAD 7 | 119 | #define K_SMB_TT_EEPROMREAD 7 |
120 | 120 | ||
121 | #define V_SMB_TT_WR1BYTE V_SMB_TT(K_SMB_TT_WR1BYTE) | 121 | #define V_SMB_TT_WR1BYTE V_SMB_TT(K_SMB_TT_WR1BYTE) |
122 | #define V_SMB_TT_WR2BYTE V_SMB_TT(K_SMB_TT_WR2BYTE) | 122 | #define V_SMB_TT_WR2BYTE V_SMB_TT(K_SMB_TT_WR2BYTE) |
@@ -127,51 +127,51 @@ | |||
127 | #define V_SMB_TT_QUICKCMD V_SMB_TT(K_SMB_TT_QUICKCMD) | 127 | #define V_SMB_TT_QUICKCMD V_SMB_TT(K_SMB_TT_QUICKCMD) |
128 | #define V_SMB_TT_EEPROMREAD V_SMB_TT(K_SMB_TT_EEPROMREAD) | 128 | #define V_SMB_TT_EEPROMREAD V_SMB_TT(K_SMB_TT_EEPROMREAD) |
129 | 129 | ||
130 | #define M_SMB_PEC _SB_MAKEMASK1(15) | 130 | #define M_SMB_PEC _SB_MAKEMASK1(15) |
131 | 131 | ||
132 | /* | 132 | /* |
133 | * SMBus Data Register (Table 14-6) and SMBus Extra Register (Table 14-7) | 133 | * SMBus Data Register (Table 14-6) and SMBus Extra Register (Table 14-7) |
134 | */ | 134 | */ |
135 | 135 | ||
136 | #define S_SMB_LB 0 | 136 | #define S_SMB_LB 0 |
137 | #define M_SMB_LB _SB_MAKEMASK(8, S_SMB_LB) | 137 | #define M_SMB_LB _SB_MAKEMASK(8, S_SMB_LB) |
138 | #define V_SMB_LB(x) _SB_MAKEVALUE(x, S_SMB_LB) | 138 | #define V_SMB_LB(x) _SB_MAKEVALUE(x, S_SMB_LB) |
139 | 139 | ||
140 | #define S_SMB_MB 8 | 140 | #define S_SMB_MB 8 |
141 | #define M_SMB_MB _SB_MAKEMASK(8, S_SMB_MB) | 141 | #define M_SMB_MB _SB_MAKEMASK(8, S_SMB_MB) |
142 | #define V_SMB_MB(x) _SB_MAKEVALUE(x, S_SMB_MB) | 142 | #define V_SMB_MB(x) _SB_MAKEVALUE(x, S_SMB_MB) |
143 | 143 | ||
144 | 144 | ||
145 | /* | 145 | /* |
146 | * SMBus Packet Error Check register (Table 14-8) | 146 | * SMBus Packet Error Check register (Table 14-8) |
147 | */ | 147 | */ |
148 | 148 | ||
149 | #define S_SPEC_PEC 0 | 149 | #define S_SPEC_PEC 0 |
150 | #define M_SPEC_PEC _SB_MAKEMASK(8, S_SPEC_PEC) | 150 | #define M_SPEC_PEC _SB_MAKEMASK(8, S_SPEC_PEC) |
151 | #define V_SPEC_MB(x) _SB_MAKEVALUE(x, S_SPEC_PEC) | 151 | #define V_SPEC_MB(x) _SB_MAKEVALUE(x, S_SPEC_PEC) |
152 | 152 | ||
153 | 153 | ||
154 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 154 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
155 | 155 | ||
156 | #define S_SMB_CMDH 8 | 156 | #define S_SMB_CMDH 8 |
157 | #define M_SMB_CMDH _SB_MAKEMASK(8, S_SMB_CMDH) | 157 | #define M_SMB_CMDH _SB_MAKEMASK(8, S_SMB_CMDH) |
158 | #define V_SMB_CMDH(x) _SB_MAKEVALUE(x, S_SMB_CMDH) | 158 | #define V_SMB_CMDH(x) _SB_MAKEVALUE(x, S_SMB_CMDH) |
159 | 159 | ||
160 | #define M_SMB_EXTEND _SB_MAKEMASK1(14) | 160 | #define M_SMB_EXTEND _SB_MAKEMASK1(14) |
161 | 161 | ||
162 | #define S_SMB_DFMT 8 | 162 | #define S_SMB_DFMT 8 |
163 | #define M_SMB_DFMT _SB_MAKEMASK(3, S_SMB_DFMT) | 163 | #define M_SMB_DFMT _SB_MAKEMASK(3, S_SMB_DFMT) |
164 | #define V_SMB_DFMT(x) _SB_MAKEVALUE(x, S_SMB_DFMT) | 164 | #define V_SMB_DFMT(x) _SB_MAKEVALUE(x, S_SMB_DFMT) |
165 | #define G_SMB_DFMT(x) _SB_GETVALUE(x, S_SMB_DFMT, M_SMB_DFMT) | 165 | #define G_SMB_DFMT(x) _SB_GETVALUE(x, S_SMB_DFMT, M_SMB_DFMT) |
166 | 166 | ||
167 | #define K_SMB_DFMT_1BYTE 0 | 167 | #define K_SMB_DFMT_1BYTE 0 |
168 | #define K_SMB_DFMT_2BYTE 1 | 168 | #define K_SMB_DFMT_2BYTE 1 |
169 | #define K_SMB_DFMT_3BYTE 2 | 169 | #define K_SMB_DFMT_3BYTE 2 |
170 | #define K_SMB_DFMT_4BYTE 3 | 170 | #define K_SMB_DFMT_4BYTE 3 |
171 | #define K_SMB_DFMT_NODATA 4 | 171 | #define K_SMB_DFMT_NODATA 4 |
172 | #define K_SMB_DFMT_CMD4BYTE 5 | 172 | #define K_SMB_DFMT_CMD4BYTE 5 |
173 | #define K_SMB_DFMT_CMD5BYTE 6 | 173 | #define K_SMB_DFMT_CMD5BYTE 6 |
174 | #define K_SMB_DFMT_RESERVED 7 | 174 | #define K_SMB_DFMT_RESERVED 7 |
175 | 175 | ||
176 | #define V_SMB_DFMT_1BYTE V_SMB_DFMT(K_SMB_DFMT_1BYTE) | 176 | #define V_SMB_DFMT_1BYTE V_SMB_DFMT(K_SMB_DFMT_1BYTE) |
177 | #define V_SMB_DFMT_2BYTE V_SMB_DFMT(K_SMB_DFMT_2BYTE) | 177 | #define V_SMB_DFMT_2BYTE V_SMB_DFMT(K_SMB_DFMT_2BYTE) |
@@ -182,13 +182,13 @@ | |||
182 | #define V_SMB_DFMT_CMD5BYTE V_SMB_DFMT(K_SMB_DFMT_CMD5BYTE) | 182 | #define V_SMB_DFMT_CMD5BYTE V_SMB_DFMT(K_SMB_DFMT_CMD5BYTE) |
183 | #define V_SMB_DFMT_RESERVED V_SMB_DFMT(K_SMB_DFMT_RESERVED) | 183 | #define V_SMB_DFMT_RESERVED V_SMB_DFMT(K_SMB_DFMT_RESERVED) |
184 | 184 | ||
185 | #define S_SMB_AFMT 11 | 185 | #define S_SMB_AFMT 11 |
186 | #define M_SMB_AFMT _SB_MAKEMASK(2, S_SMB_AFMT) | 186 | #define M_SMB_AFMT _SB_MAKEMASK(2, S_SMB_AFMT) |
187 | #define V_SMB_AFMT(x) _SB_MAKEVALUE(x, S_SMB_AFMT) | 187 | #define V_SMB_AFMT(x) _SB_MAKEVALUE(x, S_SMB_AFMT) |
188 | #define G_SMB_AFMT(x) _SB_GETVALUE(x, S_SMB_AFMT, M_SMB_AFMT) | 188 | #define G_SMB_AFMT(x) _SB_GETVALUE(x, S_SMB_AFMT, M_SMB_AFMT) |
189 | 189 | ||
190 | #define K_SMB_AFMT_NONE 0 | 190 | #define K_SMB_AFMT_NONE 0 |
191 | #define K_SMB_AFMT_ADDR 1 | 191 | #define K_SMB_AFMT_ADDR 1 |
192 | #define K_SMB_AFMT_ADDR_CMD1BYTE 2 | 192 | #define K_SMB_AFMT_ADDR_CMD1BYTE 2 |
193 | #define K_SMB_AFMT_ADDR_CMD2BYTE 3 | 193 | #define K_SMB_AFMT_ADDR_CMD2BYTE 3 |
194 | 194 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250_syncser.h b/arch/mips/include/asm/sibyte/sb1250_syncser.h index 274e9179d326..b3acc75cf0f2 100644 --- a/arch/mips/include/asm/sibyte/sb1250_syncser.h +++ b/arch/mips/include/asm/sibyte/sb1250_syncser.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Synchronous Serial Constants File: sb1250_syncser.h | 4 | * Synchronous Serial Constants File: sb1250_syncser.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the SB1250's Synchronous Serial | 7 | * manipulating the SB1250's Synchronous Serial |
@@ -39,108 +39,108 @@ | |||
39 | * Serial Mode Configuration Register | 39 | * Serial Mode Configuration Register |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #define M_SYNCSER_CRC_MODE _SB_MAKEMASK1(0) | 42 | #define M_SYNCSER_CRC_MODE _SB_MAKEMASK1(0) |
43 | #define M_SYNCSER_MSB_FIRST _SB_MAKEMASK1(1) | 43 | #define M_SYNCSER_MSB_FIRST _SB_MAKEMASK1(1) |
44 | 44 | ||
45 | #define S_SYNCSER_FLAG_NUM 2 | 45 | #define S_SYNCSER_FLAG_NUM 2 |
46 | #define M_SYNCSER_FLAG_NUM _SB_MAKEMASK(4, S_SYNCSER_FLAG_NUM) | 46 | #define M_SYNCSER_FLAG_NUM _SB_MAKEMASK(4, S_SYNCSER_FLAG_NUM) |
47 | #define V_SYNCSER_FLAG_NUM _SB_MAKEVALUE(x, S_SYNCSER_FLAG_NUM) | 47 | #define V_SYNCSER_FLAG_NUM _SB_MAKEVALUE(x, S_SYNCSER_FLAG_NUM) |
48 | 48 | ||
49 | #define M_SYNCSER_FLAG_EN _SB_MAKEMASK1(6) | 49 | #define M_SYNCSER_FLAG_EN _SB_MAKEMASK1(6) |
50 | #define M_SYNCSER_HDLC_EN _SB_MAKEMASK1(7) | 50 | #define M_SYNCSER_HDLC_EN _SB_MAKEMASK1(7) |
51 | #define M_SYNCSER_LOOP_MODE _SB_MAKEMASK1(8) | 51 | #define M_SYNCSER_LOOP_MODE _SB_MAKEMASK1(8) |
52 | #define M_SYNCSER_LOOPBACK _SB_MAKEMASK1(9) | 52 | #define M_SYNCSER_LOOPBACK _SB_MAKEMASK1(9) |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * Serial Clock Source and Line Interface Mode Register | 55 | * Serial Clock Source and Line Interface Mode Register |
56 | */ | 56 | */ |
57 | 57 | ||
58 | #define M_SYNCSER_RXCLK_INV _SB_MAKEMASK1(0) | 58 | #define M_SYNCSER_RXCLK_INV _SB_MAKEMASK1(0) |
59 | #define M_SYNCSER_RXCLK_EXT _SB_MAKEMASK1(1) | 59 | #define M_SYNCSER_RXCLK_EXT _SB_MAKEMASK1(1) |
60 | 60 | ||
61 | #define S_SYNCSER_RXSYNC_DLY 2 | 61 | #define S_SYNCSER_RXSYNC_DLY 2 |
62 | #define M_SYNCSER_RXSYNC_DLY _SB_MAKEMASK(2, S_SYNCSER_RXSYNC_DLY) | 62 | #define M_SYNCSER_RXSYNC_DLY _SB_MAKEMASK(2, S_SYNCSER_RXSYNC_DLY) |
63 | #define V_SYNCSER_RXSYNC_DLY(x) _SB_MAKEVALUE(x, S_SYNCSER_RXSYNC_DLY) | 63 | #define V_SYNCSER_RXSYNC_DLY(x) _SB_MAKEVALUE(x, S_SYNCSER_RXSYNC_DLY) |
64 | 64 | ||
65 | #define M_SYNCSER_RXSYNC_LOW _SB_MAKEMASK1(4) | 65 | #define M_SYNCSER_RXSYNC_LOW _SB_MAKEMASK1(4) |
66 | #define M_SYNCSER_RXSTRB_LOW _SB_MAKEMASK1(5) | 66 | #define M_SYNCSER_RXSTRB_LOW _SB_MAKEMASK1(5) |
67 | 67 | ||
68 | #define M_SYNCSER_RXSYNC_EDGE _SB_MAKEMASK1(6) | 68 | #define M_SYNCSER_RXSYNC_EDGE _SB_MAKEMASK1(6) |
69 | #define M_SYNCSER_RXSYNC_INT _SB_MAKEMASK1(7) | 69 | #define M_SYNCSER_RXSYNC_INT _SB_MAKEMASK1(7) |
70 | 70 | ||
71 | #define M_SYNCSER_TXCLK_INV _SB_MAKEMASK1(8) | 71 | #define M_SYNCSER_TXCLK_INV _SB_MAKEMASK1(8) |
72 | #define M_SYNCSER_TXCLK_EXT _SB_MAKEMASK1(9) | 72 | #define M_SYNCSER_TXCLK_EXT _SB_MAKEMASK1(9) |
73 | 73 | ||
74 | #define S_SYNCSER_TXSYNC_DLY 10 | 74 | #define S_SYNCSER_TXSYNC_DLY 10 |
75 | #define M_SYNCSER_TXSYNC_DLY _SB_MAKEMASK(2, S_SYNCSER_TXSYNC_DLY) | 75 | #define M_SYNCSER_TXSYNC_DLY _SB_MAKEMASK(2, S_SYNCSER_TXSYNC_DLY) |
76 | #define V_SYNCSER_TXSYNC_DLY(x) _SB_MAKEVALUE(x, S_SYNCSER_TXSYNC_DLY) | 76 | #define V_SYNCSER_TXSYNC_DLY(x) _SB_MAKEVALUE(x, S_SYNCSER_TXSYNC_DLY) |
77 | 77 | ||
78 | #define M_SYNCSER_TXSYNC_LOW _SB_MAKEMASK1(12) | 78 | #define M_SYNCSER_TXSYNC_LOW _SB_MAKEMASK1(12) |
79 | #define M_SYNCSER_TXSTRB_LOW _SB_MAKEMASK1(13) | 79 | #define M_SYNCSER_TXSTRB_LOW _SB_MAKEMASK1(13) |
80 | 80 | ||
81 | #define M_SYNCSER_TXSYNC_EDGE _SB_MAKEMASK1(14) | 81 | #define M_SYNCSER_TXSYNC_EDGE _SB_MAKEMASK1(14) |
82 | #define M_SYNCSER_TXSYNC_INT _SB_MAKEMASK1(15) | 82 | #define M_SYNCSER_TXSYNC_INT _SB_MAKEMASK1(15) |
83 | 83 | ||
84 | /* | 84 | /* |
85 | * Serial Command Register | 85 | * Serial Command Register |
86 | */ | 86 | */ |
87 | 87 | ||
88 | #define M_SYNCSER_CMD_RX_EN _SB_MAKEMASK1(0) | 88 | #define M_SYNCSER_CMD_RX_EN _SB_MAKEMASK1(0) |
89 | #define M_SYNCSER_CMD_TX_EN _SB_MAKEMASK1(1) | 89 | #define M_SYNCSER_CMD_TX_EN _SB_MAKEMASK1(1) |
90 | #define M_SYNCSER_CMD_RX_RESET _SB_MAKEMASK1(2) | 90 | #define M_SYNCSER_CMD_RX_RESET _SB_MAKEMASK1(2) |
91 | #define M_SYNCSER_CMD_TX_RESET _SB_MAKEMASK1(3) | 91 | #define M_SYNCSER_CMD_TX_RESET _SB_MAKEMASK1(3) |
92 | #define M_SYNCSER_CMD_TX_PAUSE _SB_MAKEMASK1(5) | 92 | #define M_SYNCSER_CMD_TX_PAUSE _SB_MAKEMASK1(5) |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Serial DMA Enable Register | 95 | * Serial DMA Enable Register |
96 | */ | 96 | */ |
97 | 97 | ||
98 | #define M_SYNCSER_DMA_RX_EN _SB_MAKEMASK1(0) | 98 | #define M_SYNCSER_DMA_RX_EN _SB_MAKEMASK1(0) |
99 | #define M_SYNCSER_DMA_TX_EN _SB_MAKEMASK1(4) | 99 | #define M_SYNCSER_DMA_TX_EN _SB_MAKEMASK1(4) |
100 | 100 | ||
101 | /* | 101 | /* |
102 | * Serial Status Register | 102 | * Serial Status Register |
103 | */ | 103 | */ |
104 | 104 | ||
105 | #define M_SYNCSER_RX_CRCERR _SB_MAKEMASK1(0) | 105 | #define M_SYNCSER_RX_CRCERR _SB_MAKEMASK1(0) |
106 | #define M_SYNCSER_RX_ABORT _SB_MAKEMASK1(1) | 106 | #define M_SYNCSER_RX_ABORT _SB_MAKEMASK1(1) |
107 | #define M_SYNCSER_RX_OCTET _SB_MAKEMASK1(2) | 107 | #define M_SYNCSER_RX_OCTET _SB_MAKEMASK1(2) |
108 | #define M_SYNCSER_RX_LONGFRM _SB_MAKEMASK1(3) | 108 | #define M_SYNCSER_RX_LONGFRM _SB_MAKEMASK1(3) |
109 | #define M_SYNCSER_RX_SHORTFRM _SB_MAKEMASK1(4) | 109 | #define M_SYNCSER_RX_SHORTFRM _SB_MAKEMASK1(4) |
110 | #define M_SYNCSER_RX_OVERRUN _SB_MAKEMASK1(5) | 110 | #define M_SYNCSER_RX_OVERRUN _SB_MAKEMASK1(5) |
111 | #define M_SYNCSER_RX_SYNC_ERR _SB_MAKEMASK1(6) | 111 | #define M_SYNCSER_RX_SYNC_ERR _SB_MAKEMASK1(6) |
112 | #define M_SYNCSER_TX_CRCERR _SB_MAKEMASK1(8) | 112 | #define M_SYNCSER_TX_CRCERR _SB_MAKEMASK1(8) |
113 | #define M_SYNCSER_TX_UNDERRUN _SB_MAKEMASK1(9) | 113 | #define M_SYNCSER_TX_UNDERRUN _SB_MAKEMASK1(9) |
114 | #define M_SYNCSER_TX_SYNC_ERR _SB_MAKEMASK1(10) | 114 | #define M_SYNCSER_TX_SYNC_ERR _SB_MAKEMASK1(10) |
115 | #define M_SYNCSER_TX_PAUSE_COMPLETE _SB_MAKEMASK1(11) | 115 | #define M_SYNCSER_TX_PAUSE_COMPLETE _SB_MAKEMASK1(11) |
116 | #define M_SYNCSER_RX_EOP_COUNT _SB_MAKEMASK1(16) | 116 | #define M_SYNCSER_RX_EOP_COUNT _SB_MAKEMASK1(16) |
117 | #define M_SYNCSER_RX_EOP_TIMER _SB_MAKEMASK1(17) | 117 | #define M_SYNCSER_RX_EOP_TIMER _SB_MAKEMASK1(17) |
118 | #define M_SYNCSER_RX_EOP_SEEN _SB_MAKEMASK1(18) | 118 | #define M_SYNCSER_RX_EOP_SEEN _SB_MAKEMASK1(18) |
119 | #define M_SYNCSER_RX_HWM _SB_MAKEMASK1(19) | 119 | #define M_SYNCSER_RX_HWM _SB_MAKEMASK1(19) |
120 | #define M_SYNCSER_RX_LWM _SB_MAKEMASK1(20) | 120 | #define M_SYNCSER_RX_LWM _SB_MAKEMASK1(20) |
121 | #define M_SYNCSER_RX_DSCR _SB_MAKEMASK1(21) | 121 | #define M_SYNCSER_RX_DSCR _SB_MAKEMASK1(21) |
122 | #define M_SYNCSER_RX_DERR _SB_MAKEMASK1(22) | 122 | #define M_SYNCSER_RX_DERR _SB_MAKEMASK1(22) |
123 | #define M_SYNCSER_TX_EOP_COUNT _SB_MAKEMASK1(24) | 123 | #define M_SYNCSER_TX_EOP_COUNT _SB_MAKEMASK1(24) |
124 | #define M_SYNCSER_TX_EOP_TIMER _SB_MAKEMASK1(25) | 124 | #define M_SYNCSER_TX_EOP_TIMER _SB_MAKEMASK1(25) |
125 | #define M_SYNCSER_TX_EOP_SEEN _SB_MAKEMASK1(26) | 125 | #define M_SYNCSER_TX_EOP_SEEN _SB_MAKEMASK1(26) |
126 | #define M_SYNCSER_TX_HWM _SB_MAKEMASK1(27) | 126 | #define M_SYNCSER_TX_HWM _SB_MAKEMASK1(27) |
127 | #define M_SYNCSER_TX_LWM _SB_MAKEMASK1(28) | 127 | #define M_SYNCSER_TX_LWM _SB_MAKEMASK1(28) |
128 | #define M_SYNCSER_TX_DSCR _SB_MAKEMASK1(29) | 128 | #define M_SYNCSER_TX_DSCR _SB_MAKEMASK1(29) |
129 | #define M_SYNCSER_TX_DERR _SB_MAKEMASK1(30) | 129 | #define M_SYNCSER_TX_DERR _SB_MAKEMASK1(30) |
130 | #define M_SYNCSER_TX_DZERO _SB_MAKEMASK1(31) | 130 | #define M_SYNCSER_TX_DZERO _SB_MAKEMASK1(31) |
131 | 131 | ||
132 | /* | 132 | /* |
133 | * Sequencer Table Entry format | 133 | * Sequencer Table Entry format |
134 | */ | 134 | */ |
135 | 135 | ||
136 | #define M_SYNCSER_SEQ_LAST _SB_MAKEMASK1(0) | 136 | #define M_SYNCSER_SEQ_LAST _SB_MAKEMASK1(0) |
137 | #define M_SYNCSER_SEQ_BYTE _SB_MAKEMASK1(1) | 137 | #define M_SYNCSER_SEQ_BYTE _SB_MAKEMASK1(1) |
138 | 138 | ||
139 | #define S_SYNCSER_SEQ_COUNT 2 | 139 | #define S_SYNCSER_SEQ_COUNT 2 |
140 | #define M_SYNCSER_SEQ_COUNT _SB_MAKEMASK(4, S_SYNCSER_SEQ_COUNT) | 140 | #define M_SYNCSER_SEQ_COUNT _SB_MAKEMASK(4, S_SYNCSER_SEQ_COUNT) |
141 | #define V_SYNCSER_SEQ_COUNT(x) _SB_MAKEVALUE(x, S_SYNCSER_SEQ_COUNT) | 141 | #define V_SYNCSER_SEQ_COUNT(x) _SB_MAKEVALUE(x, S_SYNCSER_SEQ_COUNT) |
142 | 142 | ||
143 | #define M_SYNCSER_SEQ_ENABLE _SB_MAKEMASK1(6) | 143 | #define M_SYNCSER_SEQ_ENABLE _SB_MAKEMASK1(6) |
144 | #define M_SYNCSER_SEQ_STROBE _SB_MAKEMASK1(7) | 144 | #define M_SYNCSER_SEQ_STROBE _SB_MAKEMASK1(7) |
145 | 145 | ||
146 | #endif | 146 | #endif |
diff --git a/arch/mips/include/asm/sibyte/sb1250_uart.h b/arch/mips/include/asm/sibyte/sb1250_uart.h index bb99ecac5817..a43dc1976286 100644 --- a/arch/mips/include/asm/sibyte/sb1250_uart.h +++ b/arch/mips/include/asm/sibyte/sb1250_uart.h | |||
@@ -45,33 +45,33 @@ | |||
45 | * Register: DUART_MODE_REG_1_B | 45 | * Register: DUART_MODE_REG_1_B |
46 | */ | 46 | */ |
47 | 47 | ||
48 | #define S_DUART_BITS_PER_CHAR 0 | 48 | #define S_DUART_BITS_PER_CHAR 0 |
49 | #define M_DUART_BITS_PER_CHAR _SB_MAKEMASK(2, S_DUART_BITS_PER_CHAR) | 49 | #define M_DUART_BITS_PER_CHAR _SB_MAKEMASK(2, S_DUART_BITS_PER_CHAR) |
50 | #define V_DUART_BITS_PER_CHAR(x) _SB_MAKEVALUE(x, S_DUART_BITS_PER_CHAR) | 50 | #define V_DUART_BITS_PER_CHAR(x) _SB_MAKEVALUE(x, S_DUART_BITS_PER_CHAR) |
51 | 51 | ||
52 | #define K_DUART_BITS_PER_CHAR_RSV0 0 | 52 | #define K_DUART_BITS_PER_CHAR_RSV0 0 |
53 | #define K_DUART_BITS_PER_CHAR_RSV1 1 | 53 | #define K_DUART_BITS_PER_CHAR_RSV1 1 |
54 | #define K_DUART_BITS_PER_CHAR_7 2 | 54 | #define K_DUART_BITS_PER_CHAR_7 2 |
55 | #define K_DUART_BITS_PER_CHAR_8 3 | 55 | #define K_DUART_BITS_PER_CHAR_8 3 |
56 | 56 | ||
57 | #define V_DUART_BITS_PER_CHAR_RSV0 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_RSV0) | 57 | #define V_DUART_BITS_PER_CHAR_RSV0 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_RSV0) |
58 | #define V_DUART_BITS_PER_CHAR_RSV1 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_RSV1) | 58 | #define V_DUART_BITS_PER_CHAR_RSV1 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_RSV1) |
59 | #define V_DUART_BITS_PER_CHAR_7 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_7) | 59 | #define V_DUART_BITS_PER_CHAR_7 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_7) |
60 | #define V_DUART_BITS_PER_CHAR_8 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_8) | 60 | #define V_DUART_BITS_PER_CHAR_8 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_8) |
61 | 61 | ||
62 | 62 | ||
63 | #define M_DUART_PARITY_TYPE_EVEN 0x00 | 63 | #define M_DUART_PARITY_TYPE_EVEN 0x00 |
64 | #define M_DUART_PARITY_TYPE_ODD _SB_MAKEMASK1(2) | 64 | #define M_DUART_PARITY_TYPE_ODD _SB_MAKEMASK1(2) |
65 | 65 | ||
66 | #define S_DUART_PARITY_MODE 3 | 66 | #define S_DUART_PARITY_MODE 3 |
67 | #define M_DUART_PARITY_MODE _SB_MAKEMASK(2, S_DUART_PARITY_MODE) | 67 | #define M_DUART_PARITY_MODE _SB_MAKEMASK(2, S_DUART_PARITY_MODE) |
68 | #define V_DUART_PARITY_MODE(x) _SB_MAKEVALUE(x, S_DUART_PARITY_MODE) | 68 | #define V_DUART_PARITY_MODE(x) _SB_MAKEVALUE(x, S_DUART_PARITY_MODE) |
69 | 69 | ||
70 | #define K_DUART_PARITY_MODE_ADD 0 | 70 | #define K_DUART_PARITY_MODE_ADD 0 |
71 | #define K_DUART_PARITY_MODE_ADD_FIXED 1 | 71 | #define K_DUART_PARITY_MODE_ADD_FIXED 1 |
72 | #define K_DUART_PARITY_MODE_NONE 2 | 72 | #define K_DUART_PARITY_MODE_NONE 2 |
73 | 73 | ||
74 | #define V_DUART_PARITY_MODE_ADD V_DUART_PARITY_MODE(K_DUART_PARITY_MODE_ADD) | 74 | #define V_DUART_PARITY_MODE_ADD V_DUART_PARITY_MODE(K_DUART_PARITY_MODE_ADD) |
75 | #define V_DUART_PARITY_MODE_ADD_FIXED V_DUART_PARITY_MODE(K_DUART_PARITY_MODE_ADD_FIXED) | 75 | #define V_DUART_PARITY_MODE_ADD_FIXED V_DUART_PARITY_MODE(K_DUART_PARITY_MODE_ADD_FIXED) |
76 | #define V_DUART_PARITY_MODE_NONE V_DUART_PARITY_MODE(K_DUART_PARITY_MODE_NONE) | 76 | #define V_DUART_PARITY_MODE_NONE V_DUART_PARITY_MODE(K_DUART_PARITY_MODE_NONE) |
77 | 77 | ||
@@ -81,7 +81,7 @@ | |||
81 | #define M_DUART_RX_IRQ_SEL_RXRDY 0 | 81 | #define M_DUART_RX_IRQ_SEL_RXRDY 0 |
82 | #define M_DUART_RX_IRQ_SEL_RXFULL _SB_MAKEMASK1(6) | 82 | #define M_DUART_RX_IRQ_SEL_RXFULL _SB_MAKEMASK1(6) |
83 | 83 | ||
84 | #define M_DUART_RX_RTS_ENA _SB_MAKEMASK1(7) | 84 | #define M_DUART_RX_RTS_ENA _SB_MAKEMASK1(7) |
85 | 85 | ||
86 | /* | 86 | /* |
87 | * DUART Mode Register #2 (Table 10-4) | 87 | * DUART Mode Register #2 (Table 10-4) |
@@ -89,18 +89,18 @@ | |||
89 | * Register: DUART_MODE_REG_2_B | 89 | * Register: DUART_MODE_REG_2_B |
90 | */ | 90 | */ |
91 | 91 | ||
92 | #define M_DUART_MODE_RESERVED1 _SB_MAKEMASK(3, 0) /* ignored */ | 92 | #define M_DUART_MODE_RESERVED1 _SB_MAKEMASK(3, 0) /* ignored */ |
93 | 93 | ||
94 | #define M_DUART_STOP_BIT_LEN_2 _SB_MAKEMASK1(3) | 94 | #define M_DUART_STOP_BIT_LEN_2 _SB_MAKEMASK1(3) |
95 | #define M_DUART_STOP_BIT_LEN_1 0 | 95 | #define M_DUART_STOP_BIT_LEN_1 0 |
96 | 96 | ||
97 | #define M_DUART_TX_CTS_ENA _SB_MAKEMASK1(4) | 97 | #define M_DUART_TX_CTS_ENA _SB_MAKEMASK1(4) |
98 | 98 | ||
99 | 99 | ||
100 | #define M_DUART_MODE_RESERVED2 _SB_MAKEMASK1(5) /* must be zero */ | 100 | #define M_DUART_MODE_RESERVED2 _SB_MAKEMASK1(5) /* must be zero */ |
101 | 101 | ||
102 | #define S_DUART_CHAN_MODE 6 | 102 | #define S_DUART_CHAN_MODE 6 |
103 | #define M_DUART_CHAN_MODE _SB_MAKEMASK(2, S_DUART_CHAN_MODE) | 103 | #define M_DUART_CHAN_MODE _SB_MAKEMASK(2, S_DUART_CHAN_MODE) |
104 | #define V_DUART_CHAN_MODE(x) _SB_MAKEVALUE(x, S_DUART_CHAN_MODE) | 104 | #define V_DUART_CHAN_MODE(x) _SB_MAKEVALUE(x, S_DUART_CHAN_MODE) |
105 | 105 | ||
106 | #define K_DUART_CHAN_MODE_NORMAL 0 | 106 | #define K_DUART_CHAN_MODE_NORMAL 0 |
@@ -117,34 +117,34 @@ | |||
117 | * Register: DUART_CMD_B | 117 | * Register: DUART_CMD_B |
118 | */ | 118 | */ |
119 | 119 | ||
120 | #define M_DUART_RX_EN _SB_MAKEMASK1(0) | 120 | #define M_DUART_RX_EN _SB_MAKEMASK1(0) |
121 | #define M_DUART_RX_DIS _SB_MAKEMASK1(1) | 121 | #define M_DUART_RX_DIS _SB_MAKEMASK1(1) |
122 | #define M_DUART_TX_EN _SB_MAKEMASK1(2) | 122 | #define M_DUART_TX_EN _SB_MAKEMASK1(2) |
123 | #define M_DUART_TX_DIS _SB_MAKEMASK1(3) | 123 | #define M_DUART_TX_DIS _SB_MAKEMASK1(3) |
124 | 124 | ||
125 | #define S_DUART_MISC_CMD 4 | 125 | #define S_DUART_MISC_CMD 4 |
126 | #define M_DUART_MISC_CMD _SB_MAKEMASK(3, S_DUART_MISC_CMD) | 126 | #define M_DUART_MISC_CMD _SB_MAKEMASK(3, S_DUART_MISC_CMD) |
127 | #define V_DUART_MISC_CMD(x) _SB_MAKEVALUE(x, S_DUART_MISC_CMD) | 127 | #define V_DUART_MISC_CMD(x) _SB_MAKEVALUE(x, S_DUART_MISC_CMD) |
128 | 128 | ||
129 | #define K_DUART_MISC_CMD_NOACTION0 0 | 129 | #define K_DUART_MISC_CMD_NOACTION0 0 |
130 | #define K_DUART_MISC_CMD_NOACTION1 1 | 130 | #define K_DUART_MISC_CMD_NOACTION1 1 |
131 | #define K_DUART_MISC_CMD_RESET_RX 2 | 131 | #define K_DUART_MISC_CMD_RESET_RX 2 |
132 | #define K_DUART_MISC_CMD_RESET_TX 3 | 132 | #define K_DUART_MISC_CMD_RESET_TX 3 |
133 | #define K_DUART_MISC_CMD_NOACTION4 4 | 133 | #define K_DUART_MISC_CMD_NOACTION4 4 |
134 | #define K_DUART_MISC_CMD_RESET_BREAK_INT 5 | 134 | #define K_DUART_MISC_CMD_RESET_BREAK_INT 5 |
135 | #define K_DUART_MISC_CMD_START_BREAK 6 | 135 | #define K_DUART_MISC_CMD_START_BREAK 6 |
136 | #define K_DUART_MISC_CMD_STOP_BREAK 7 | 136 | #define K_DUART_MISC_CMD_STOP_BREAK 7 |
137 | 137 | ||
138 | #define V_DUART_MISC_CMD_NOACTION0 V_DUART_MISC_CMD(K_DUART_MISC_CMD_NOACTION0) | 138 | #define V_DUART_MISC_CMD_NOACTION0 V_DUART_MISC_CMD(K_DUART_MISC_CMD_NOACTION0) |
139 | #define V_DUART_MISC_CMD_NOACTION1 V_DUART_MISC_CMD(K_DUART_MISC_CMD_NOACTION1) | 139 | #define V_DUART_MISC_CMD_NOACTION1 V_DUART_MISC_CMD(K_DUART_MISC_CMD_NOACTION1) |
140 | #define V_DUART_MISC_CMD_RESET_RX V_DUART_MISC_CMD(K_DUART_MISC_CMD_RESET_RX) | 140 | #define V_DUART_MISC_CMD_RESET_RX V_DUART_MISC_CMD(K_DUART_MISC_CMD_RESET_RX) |
141 | #define V_DUART_MISC_CMD_RESET_TX V_DUART_MISC_CMD(K_DUART_MISC_CMD_RESET_TX) | 141 | #define V_DUART_MISC_CMD_RESET_TX V_DUART_MISC_CMD(K_DUART_MISC_CMD_RESET_TX) |
142 | #define V_DUART_MISC_CMD_NOACTION4 V_DUART_MISC_CMD(K_DUART_MISC_CMD_NOACTION4) | 142 | #define V_DUART_MISC_CMD_NOACTION4 V_DUART_MISC_CMD(K_DUART_MISC_CMD_NOACTION4) |
143 | #define V_DUART_MISC_CMD_RESET_BREAK_INT V_DUART_MISC_CMD(K_DUART_MISC_CMD_RESET_BREAK_INT) | 143 | #define V_DUART_MISC_CMD_RESET_BREAK_INT V_DUART_MISC_CMD(K_DUART_MISC_CMD_RESET_BREAK_INT) |
144 | #define V_DUART_MISC_CMD_START_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_START_BREAK) | 144 | #define V_DUART_MISC_CMD_START_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_START_BREAK) |
145 | #define V_DUART_MISC_CMD_STOP_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_STOP_BREAK) | 145 | #define V_DUART_MISC_CMD_STOP_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_STOP_BREAK) |
146 | 146 | ||
147 | #define M_DUART_CMD_RESERVED _SB_MAKEMASK1(7) | 147 | #define M_DUART_CMD_RESERVED _SB_MAKEMASK1(7) |
148 | 148 | ||
149 | /* | 149 | /* |
150 | * DUART Status Register (Table 10-6) | 150 | * DUART Status Register (Table 10-6) |
@@ -153,14 +153,14 @@ | |||
153 | * READ-ONLY | 153 | * READ-ONLY |
154 | */ | 154 | */ |
155 | 155 | ||
156 | #define M_DUART_RX_RDY _SB_MAKEMASK1(0) | 156 | #define M_DUART_RX_RDY _SB_MAKEMASK1(0) |
157 | #define M_DUART_RX_FFUL _SB_MAKEMASK1(1) | 157 | #define M_DUART_RX_FFUL _SB_MAKEMASK1(1) |
158 | #define M_DUART_TX_RDY _SB_MAKEMASK1(2) | 158 | #define M_DUART_TX_RDY _SB_MAKEMASK1(2) |
159 | #define M_DUART_TX_EMT _SB_MAKEMASK1(3) | 159 | #define M_DUART_TX_EMT _SB_MAKEMASK1(3) |
160 | #define M_DUART_OVRUN_ERR _SB_MAKEMASK1(4) | 160 | #define M_DUART_OVRUN_ERR _SB_MAKEMASK1(4) |
161 | #define M_DUART_PARITY_ERR _SB_MAKEMASK1(5) | 161 | #define M_DUART_PARITY_ERR _SB_MAKEMASK1(5) |
162 | #define M_DUART_FRM_ERR _SB_MAKEMASK1(6) | 162 | #define M_DUART_FRM_ERR _SB_MAKEMASK1(6) |
163 | #define M_DUART_RCVD_BRK _SB_MAKEMASK1(7) | 163 | #define M_DUART_RCVD_BRK _SB_MAKEMASK1(7) |
164 | 164 | ||
165 | /* | 165 | /* |
166 | * DUART Baud Rate Register (Table 10-7) | 166 | * DUART Baud Rate Register (Table 10-7) |
@@ -168,8 +168,8 @@ | |||
168 | * Register: DUART_CLK_SEL_B | 168 | * Register: DUART_CLK_SEL_B |
169 | */ | 169 | */ |
170 | 170 | ||
171 | #define M_DUART_CLK_COUNTER _SB_MAKEMASK(12, 0) | 171 | #define M_DUART_CLK_COUNTER _SB_MAKEMASK(12, 0) |
172 | #define V_DUART_BAUD_RATE(x) (100000000/((x)*20)-1) | 172 | #define V_DUART_BAUD_RATE(x) (100000000/((x)*20)-1) |
173 | 173 | ||
174 | /* | 174 | /* |
175 | * DUART Data Registers (Table 10-8 and 10-9) | 175 | * DUART Data Registers (Table 10-8 and 10-9) |
@@ -179,33 +179,33 @@ | |||
179 | * Register: DUART_TX_HOLD_B | 179 | * Register: DUART_TX_HOLD_B |
180 | */ | 180 | */ |
181 | 181 | ||
182 | #define M_DUART_RX_DATA _SB_MAKEMASK(8, 0) | 182 | #define M_DUART_RX_DATA _SB_MAKEMASK(8, 0) |
183 | #define M_DUART_TX_DATA _SB_MAKEMASK(8, 0) | 183 | #define M_DUART_TX_DATA _SB_MAKEMASK(8, 0) |
184 | 184 | ||
185 | /* | 185 | /* |
186 | * DUART Input Port Register (Table 10-10) | 186 | * DUART Input Port Register (Table 10-10) |
187 | * Register: DUART_IN_PORT | 187 | * Register: DUART_IN_PORT |
188 | */ | 188 | */ |
189 | 189 | ||
190 | #define M_DUART_IN_PIN0_VAL _SB_MAKEMASK1(0) | 190 | #define M_DUART_IN_PIN0_VAL _SB_MAKEMASK1(0) |
191 | #define M_DUART_IN_PIN1_VAL _SB_MAKEMASK1(1) | 191 | #define M_DUART_IN_PIN1_VAL _SB_MAKEMASK1(1) |
192 | #define M_DUART_IN_PIN2_VAL _SB_MAKEMASK1(2) | 192 | #define M_DUART_IN_PIN2_VAL _SB_MAKEMASK1(2) |
193 | #define M_DUART_IN_PIN3_VAL _SB_MAKEMASK1(3) | 193 | #define M_DUART_IN_PIN3_VAL _SB_MAKEMASK1(3) |
194 | #define M_DUART_IN_PIN4_VAL _SB_MAKEMASK1(4) | 194 | #define M_DUART_IN_PIN4_VAL _SB_MAKEMASK1(4) |
195 | #define M_DUART_IN_PIN5_VAL _SB_MAKEMASK1(5) | 195 | #define M_DUART_IN_PIN5_VAL _SB_MAKEMASK1(5) |
196 | #define M_DUART_RIN0_PIN _SB_MAKEMASK1(6) | 196 | #define M_DUART_RIN0_PIN _SB_MAKEMASK1(6) |
197 | #define M_DUART_RIN1_PIN _SB_MAKEMASK1(7) | 197 | #define M_DUART_RIN1_PIN _SB_MAKEMASK1(7) |
198 | 198 | ||
199 | /* | 199 | /* |
200 | * DUART Input Port Change Status Register (Tables 10-11, 10-12, and 10-13) | 200 | * DUART Input Port Change Status Register (Tables 10-11, 10-12, and 10-13) |
201 | * Register: DUART_INPORT_CHNG | 201 | * Register: DUART_INPORT_CHNG |
202 | */ | 202 | */ |
203 | 203 | ||
204 | #define S_DUART_IN_PIN_VAL 0 | 204 | #define S_DUART_IN_PIN_VAL 0 |
205 | #define M_DUART_IN_PIN_VAL _SB_MAKEMASK(4, S_DUART_IN_PIN_VAL) | 205 | #define M_DUART_IN_PIN_VAL _SB_MAKEMASK(4, S_DUART_IN_PIN_VAL) |
206 | 206 | ||
207 | #define S_DUART_IN_PIN_CHNG 4 | 207 | #define S_DUART_IN_PIN_CHNG 4 |
208 | #define M_DUART_IN_PIN_CHNG _SB_MAKEMASK(4, S_DUART_IN_PIN_CHNG) | 208 | #define M_DUART_IN_PIN_CHNG _SB_MAKEMASK(4, S_DUART_IN_PIN_CHNG) |
209 | 209 | ||
210 | 210 | ||
211 | /* | 211 | /* |
@@ -213,46 +213,46 @@ | |||
213 | * Register: DUART_OPCR | 213 | * Register: DUART_OPCR |
214 | */ | 214 | */ |
215 | 215 | ||
216 | #define M_DUART_OPCR_RESERVED0 _SB_MAKEMASK1(0) /* must be zero */ | 216 | #define M_DUART_OPCR_RESERVED0 _SB_MAKEMASK1(0) /* must be zero */ |
217 | #define M_DUART_OPC2_SEL _SB_MAKEMASK1(1) | 217 | #define M_DUART_OPC2_SEL _SB_MAKEMASK1(1) |
218 | #define M_DUART_OPCR_RESERVED1 _SB_MAKEMASK1(2) /* must be zero */ | 218 | #define M_DUART_OPCR_RESERVED1 _SB_MAKEMASK1(2) /* must be zero */ |
219 | #define M_DUART_OPC3_SEL _SB_MAKEMASK1(3) | 219 | #define M_DUART_OPC3_SEL _SB_MAKEMASK1(3) |
220 | #define M_DUART_OPCR_RESERVED2 _SB_MAKEMASK(4, 4) /* must be zero */ | 220 | #define M_DUART_OPCR_RESERVED2 _SB_MAKEMASK(4, 4) /* must be zero */ |
221 | 221 | ||
222 | /* | 222 | /* |
223 | * DUART Aux Control Register (Table 10-15) | 223 | * DUART Aux Control Register (Table 10-15) |
224 | * Register: DUART_AUX_CTRL | 224 | * Register: DUART_AUX_CTRL |
225 | */ | 225 | */ |
226 | 226 | ||
227 | #define M_DUART_IP0_CHNG_ENA _SB_MAKEMASK1(0) | 227 | #define M_DUART_IP0_CHNG_ENA _SB_MAKEMASK1(0) |
228 | #define M_DUART_IP1_CHNG_ENA _SB_MAKEMASK1(1) | 228 | #define M_DUART_IP1_CHNG_ENA _SB_MAKEMASK1(1) |
229 | #define M_DUART_IP2_CHNG_ENA _SB_MAKEMASK1(2) | 229 | #define M_DUART_IP2_CHNG_ENA _SB_MAKEMASK1(2) |
230 | #define M_DUART_IP3_CHNG_ENA _SB_MAKEMASK1(3) | 230 | #define M_DUART_IP3_CHNG_ENA _SB_MAKEMASK1(3) |
231 | #define M_DUART_ACR_RESERVED _SB_MAKEMASK(4, 4) | 231 | #define M_DUART_ACR_RESERVED _SB_MAKEMASK(4, 4) |
232 | 232 | ||
233 | #define M_DUART_CTS_CHNG_ENA _SB_MAKEMASK1(0) | 233 | #define M_DUART_CTS_CHNG_ENA _SB_MAKEMASK1(0) |
234 | #define M_DUART_CIN_CHNG_ENA _SB_MAKEMASK1(2) | 234 | #define M_DUART_CIN_CHNG_ENA _SB_MAKEMASK1(2) |
235 | 235 | ||
236 | /* | 236 | /* |
237 | * DUART Interrupt Status Register (Table 10-16) | 237 | * DUART Interrupt Status Register (Table 10-16) |
238 | * Register: DUART_ISR | 238 | * Register: DUART_ISR |
239 | */ | 239 | */ |
240 | 240 | ||
241 | #define M_DUART_ISR_TX_A _SB_MAKEMASK1(0) | 241 | #define M_DUART_ISR_TX_A _SB_MAKEMASK1(0) |
242 | 242 | ||
243 | #define S_DUART_ISR_RX_A 1 | 243 | #define S_DUART_ISR_RX_A 1 |
244 | #define M_DUART_ISR_RX_A _SB_MAKEMASK1(S_DUART_ISR_RX_A) | 244 | #define M_DUART_ISR_RX_A _SB_MAKEMASK1(S_DUART_ISR_RX_A) |
245 | #define V_DUART_ISR_RX_A(x) _SB_MAKEVALUE(x, S_DUART_ISR_RX_A) | 245 | #define V_DUART_ISR_RX_A(x) _SB_MAKEVALUE(x, S_DUART_ISR_RX_A) |
246 | #define G_DUART_ISR_RX_A(x) _SB_GETVALUE(x, S_DUART_ISR_RX_A, M_DUART_ISR_RX_A) | 246 | #define G_DUART_ISR_RX_A(x) _SB_GETVALUE(x, S_DUART_ISR_RX_A, M_DUART_ISR_RX_A) |
247 | 247 | ||
248 | #define M_DUART_ISR_BRK_A _SB_MAKEMASK1(2) | 248 | #define M_DUART_ISR_BRK_A _SB_MAKEMASK1(2) |
249 | #define M_DUART_ISR_IN_A _SB_MAKEMASK1(3) | 249 | #define M_DUART_ISR_IN_A _SB_MAKEMASK1(3) |
250 | #define M_DUART_ISR_ALL_A _SB_MAKEMASK(4, 0) | 250 | #define M_DUART_ISR_ALL_A _SB_MAKEMASK(4, 0) |
251 | 251 | ||
252 | #define M_DUART_ISR_TX_B _SB_MAKEMASK1(4) | 252 | #define M_DUART_ISR_TX_B _SB_MAKEMASK1(4) |
253 | #define M_DUART_ISR_RX_B _SB_MAKEMASK1(5) | 253 | #define M_DUART_ISR_RX_B _SB_MAKEMASK1(5) |
254 | #define M_DUART_ISR_BRK_B _SB_MAKEMASK1(6) | 254 | #define M_DUART_ISR_BRK_B _SB_MAKEMASK1(6) |
255 | #define M_DUART_ISR_IN_B _SB_MAKEMASK1(7) | 255 | #define M_DUART_ISR_IN_B _SB_MAKEMASK1(7) |
256 | #define M_DUART_ISR_ALL_B _SB_MAKEMASK(4, 4) | 256 | #define M_DUART_ISR_ALL_B _SB_MAKEMASK(4, 4) |
257 | 257 | ||
258 | /* | 258 | /* |
@@ -262,29 +262,29 @@ | |||
262 | * Register: DUART_ISR_B | 262 | * Register: DUART_ISR_B |
263 | */ | 263 | */ |
264 | 264 | ||
265 | #define M_DUART_ISR_TX _SB_MAKEMASK1(0) | 265 | #define M_DUART_ISR_TX _SB_MAKEMASK1(0) |
266 | #define M_DUART_ISR_RX _SB_MAKEMASK1(1) | 266 | #define M_DUART_ISR_RX _SB_MAKEMASK1(1) |
267 | #define M_DUART_ISR_BRK _SB_MAKEMASK1(2) | 267 | #define M_DUART_ISR_BRK _SB_MAKEMASK1(2) |
268 | #define M_DUART_ISR_IN _SB_MAKEMASK1(3) | 268 | #define M_DUART_ISR_IN _SB_MAKEMASK1(3) |
269 | #define M_DUART_ISR_ALL _SB_MAKEMASK(4, 0) | 269 | #define M_DUART_ISR_ALL _SB_MAKEMASK(4, 0) |
270 | #define M_DUART_ISR_RESERVED _SB_MAKEMASK(4, 4) | 270 | #define M_DUART_ISR_RESERVED _SB_MAKEMASK(4, 4) |
271 | 271 | ||
272 | /* | 272 | /* |
273 | * DUART Interrupt Mask Register (Table 10-19) | 273 | * DUART Interrupt Mask Register (Table 10-19) |
274 | * Register: DUART_IMR | 274 | * Register: DUART_IMR |
275 | */ | 275 | */ |
276 | 276 | ||
277 | #define M_DUART_IMR_TX_A _SB_MAKEMASK1(0) | 277 | #define M_DUART_IMR_TX_A _SB_MAKEMASK1(0) |
278 | #define M_DUART_IMR_RX_A _SB_MAKEMASK1(1) | 278 | #define M_DUART_IMR_RX_A _SB_MAKEMASK1(1) |
279 | #define M_DUART_IMR_BRK_A _SB_MAKEMASK1(2) | 279 | #define M_DUART_IMR_BRK_A _SB_MAKEMASK1(2) |
280 | #define M_DUART_IMR_IN_A _SB_MAKEMASK1(3) | 280 | #define M_DUART_IMR_IN_A _SB_MAKEMASK1(3) |
281 | #define M_DUART_IMR_ALL_A _SB_MAKEMASK(4, 0) | 281 | #define M_DUART_IMR_ALL_A _SB_MAKEMASK(4, 0) |
282 | 282 | ||
283 | #define M_DUART_IMR_TX_B _SB_MAKEMASK1(4) | 283 | #define M_DUART_IMR_TX_B _SB_MAKEMASK1(4) |
284 | #define M_DUART_IMR_RX_B _SB_MAKEMASK1(5) | 284 | #define M_DUART_IMR_RX_B _SB_MAKEMASK1(5) |
285 | #define M_DUART_IMR_BRK_B _SB_MAKEMASK1(6) | 285 | #define M_DUART_IMR_BRK_B _SB_MAKEMASK1(6) |
286 | #define M_DUART_IMR_IN_B _SB_MAKEMASK1(7) | 286 | #define M_DUART_IMR_IN_B _SB_MAKEMASK1(7) |
287 | #define M_DUART_IMR_ALL_B _SB_MAKEMASK(4, 4) | 287 | #define M_DUART_IMR_ALL_B _SB_MAKEMASK(4, 4) |
288 | 288 | ||
289 | /* | 289 | /* |
290 | * DUART Channel A Interrupt Mask Register (Table 10-20) | 290 | * DUART Channel A Interrupt Mask Register (Table 10-20) |
@@ -293,12 +293,12 @@ | |||
293 | * Register: DUART_IMR_B | 293 | * Register: DUART_IMR_B |
294 | */ | 294 | */ |
295 | 295 | ||
296 | #define M_DUART_IMR_TX _SB_MAKEMASK1(0) | 296 | #define M_DUART_IMR_TX _SB_MAKEMASK1(0) |
297 | #define M_DUART_IMR_RX _SB_MAKEMASK1(1) | 297 | #define M_DUART_IMR_RX _SB_MAKEMASK1(1) |
298 | #define M_DUART_IMR_BRK _SB_MAKEMASK1(2) | 298 | #define M_DUART_IMR_BRK _SB_MAKEMASK1(2) |
299 | #define M_DUART_IMR_IN _SB_MAKEMASK1(3) | 299 | #define M_DUART_IMR_IN _SB_MAKEMASK1(3) |
300 | #define M_DUART_IMR_ALL _SB_MAKEMASK(4, 0) | 300 | #define M_DUART_IMR_ALL _SB_MAKEMASK(4, 0) |
301 | #define M_DUART_IMR_RESERVED _SB_MAKEMASK(4, 4) | 301 | #define M_DUART_IMR_RESERVED _SB_MAKEMASK(4, 4) |
302 | 302 | ||
303 | 303 | ||
304 | /* | 304 | /* |
@@ -306,33 +306,33 @@ | |||
306 | * Register: DUART_SET_OPR | 306 | * Register: DUART_SET_OPR |
307 | */ | 307 | */ |
308 | 308 | ||
309 | #define M_DUART_SET_OPR0 _SB_MAKEMASK1(0) | 309 | #define M_DUART_SET_OPR0 _SB_MAKEMASK1(0) |
310 | #define M_DUART_SET_OPR1 _SB_MAKEMASK1(1) | 310 | #define M_DUART_SET_OPR1 _SB_MAKEMASK1(1) |
311 | #define M_DUART_SET_OPR2 _SB_MAKEMASK1(2) | 311 | #define M_DUART_SET_OPR2 _SB_MAKEMASK1(2) |
312 | #define M_DUART_SET_OPR3 _SB_MAKEMASK1(3) | 312 | #define M_DUART_SET_OPR3 _SB_MAKEMASK1(3) |
313 | #define M_DUART_OPSR_RESERVED _SB_MAKEMASK(4, 4) | 313 | #define M_DUART_OPSR_RESERVED _SB_MAKEMASK(4, 4) |
314 | 314 | ||
315 | /* | 315 | /* |
316 | * DUART Output Port Clear Register (Table 10-23) | 316 | * DUART Output Port Clear Register (Table 10-23) |
317 | * Register: DUART_CLEAR_OPR | 317 | * Register: DUART_CLEAR_OPR |
318 | */ | 318 | */ |
319 | 319 | ||
320 | #define M_DUART_CLR_OPR0 _SB_MAKEMASK1(0) | 320 | #define M_DUART_CLR_OPR0 _SB_MAKEMASK1(0) |
321 | #define M_DUART_CLR_OPR1 _SB_MAKEMASK1(1) | 321 | #define M_DUART_CLR_OPR1 _SB_MAKEMASK1(1) |
322 | #define M_DUART_CLR_OPR2 _SB_MAKEMASK1(2) | 322 | #define M_DUART_CLR_OPR2 _SB_MAKEMASK1(2) |
323 | #define M_DUART_CLR_OPR3 _SB_MAKEMASK1(3) | 323 | #define M_DUART_CLR_OPR3 _SB_MAKEMASK1(3) |
324 | #define M_DUART_OPCR_RESERVED _SB_MAKEMASK(4, 4) | 324 | #define M_DUART_OPCR_RESERVED _SB_MAKEMASK(4, 4) |
325 | 325 | ||
326 | /* | 326 | /* |
327 | * DUART Output Port RTS Register (Table 10-24) | 327 | * DUART Output Port RTS Register (Table 10-24) |
328 | * Register: DUART_OUT_PORT | 328 | * Register: DUART_OUT_PORT |
329 | */ | 329 | */ |
330 | 330 | ||
331 | #define M_DUART_OUT_PIN_SET0 _SB_MAKEMASK1(0) | 331 | #define M_DUART_OUT_PIN_SET0 _SB_MAKEMASK1(0) |
332 | #define M_DUART_OUT_PIN_SET1 _SB_MAKEMASK1(1) | 332 | #define M_DUART_OUT_PIN_SET1 _SB_MAKEMASK1(1) |
333 | #define M_DUART_OUT_PIN_CLR0 _SB_MAKEMASK1(2) | 333 | #define M_DUART_OUT_PIN_CLR0 _SB_MAKEMASK1(2) |
334 | #define M_DUART_OUT_PIN_CLR1 _SB_MAKEMASK1(3) | 334 | #define M_DUART_OUT_PIN_CLR1 _SB_MAKEMASK1(3) |
335 | #define M_DUART_OPRR_RESERVED _SB_MAKEMASK(4, 4) | 335 | #define M_DUART_OPRR_RESERVED _SB_MAKEMASK(4, 4) |
336 | 336 | ||
337 | #define M_DUART_OUT_PIN_SET(chan) \ | 337 | #define M_DUART_OUT_PIN_SET(chan) \ |
338 | (chan == 0 ? M_DUART_OUT_PIN_SET0 : M_DUART_OUT_PIN_SET1) | 338 | (chan == 0 ? M_DUART_OUT_PIN_SET0 : M_DUART_OUT_PIN_SET1) |
@@ -344,15 +344,15 @@ | |||
344 | * Full Interrupt Control Register | 344 | * Full Interrupt Control Register |
345 | */ | 345 | */ |
346 | 346 | ||
347 | #define S_DUART_SIG_FULL _SB_MAKE64(0) | 347 | #define S_DUART_SIG_FULL _SB_MAKE64(0) |
348 | #define M_DUART_SIG_FULL _SB_MAKEMASK(4, S_DUART_SIG_FULL) | 348 | #define M_DUART_SIG_FULL _SB_MAKEMASK(4, S_DUART_SIG_FULL) |
349 | #define V_DUART_SIG_FULL(x) _SB_MAKEVALUE(x, S_DUART_SIG_FULL) | 349 | #define V_DUART_SIG_FULL(x) _SB_MAKEVALUE(x, S_DUART_SIG_FULL) |
350 | #define G_DUART_SIG_FULL(x) _SB_GETVALUE(x, S_DUART_SIG_FULL, M_DUART_SIG_FULL) | 350 | #define G_DUART_SIG_FULL(x) _SB_GETVALUE(x, S_DUART_SIG_FULL, M_DUART_SIG_FULL) |
351 | 351 | ||
352 | #define S_DUART_INT_TIME _SB_MAKE64(4) | 352 | #define S_DUART_INT_TIME _SB_MAKE64(4) |
353 | #define M_DUART_INT_TIME _SB_MAKEMASK(4, S_DUART_INT_TIME) | 353 | #define M_DUART_INT_TIME _SB_MAKEMASK(4, S_DUART_INT_TIME) |
354 | #define V_DUART_INT_TIME(x) _SB_MAKEVALUE(x, S_DUART_INT_TIME) | 354 | #define V_DUART_INT_TIME(x) _SB_MAKEVALUE(x, S_DUART_INT_TIME) |
355 | #define G_DUART_INT_TIME(x) _SB_GETVALUE(x, S_DUART_INT_TIME, M_DUART_INT_TIME) | 355 | #define G_DUART_INT_TIME(x) _SB_GETVALUE(x, S_DUART_INT_TIME, M_DUART_INT_TIME) |
356 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 356 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
357 | 357 | ||
358 | 358 | ||
diff --git a/arch/mips/include/asm/sibyte/sentosa.h b/arch/mips/include/asm/sibyte/sentosa.h index 64c47874f32d..0351a46eebbd 100644 --- a/arch/mips/include/asm/sibyte/sentosa.h +++ b/arch/mips/include/asm/sibyte/sentosa.h | |||
@@ -30,11 +30,11 @@ | |||
30 | 30 | ||
31 | /* Generic bus chip selects */ | 31 | /* Generic bus chip selects */ |
32 | #ifdef CONFIG_SIBYTE_RHONE | 32 | #ifdef CONFIG_SIBYTE_RHONE |
33 | #define LEDS_CS 6 | 33 | #define LEDS_CS 6 |
34 | #define LEDS_PHYS 0x1d0a0000 | 34 | #define LEDS_PHYS 0x1d0a0000 |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | /* GPIOs */ | 37 | /* GPIOs */ |
38 | #define K_GPIO_DBG_LED 0 | 38 | #define K_GPIO_DBG_LED 0 |
39 | 39 | ||
40 | #endif /* __ASM_SIBYTE_SENTOSA_H */ | 40 | #endif /* __ASM_SIBYTE_SENTOSA_H */ |
diff --git a/arch/mips/include/asm/sibyte/swarm.h b/arch/mips/include/asm/sibyte/swarm.h index 114d9d29ca9d..187cfb1f67cb 100644 --- a/arch/mips/include/asm/sibyte/swarm.h +++ b/arch/mips/include/asm/sibyte/swarm.h | |||
@@ -24,41 +24,41 @@ | |||
24 | #ifdef CONFIG_SIBYTE_SWARM | 24 | #ifdef CONFIG_SIBYTE_SWARM |
25 | #define SIBYTE_BOARD_NAME "BCM91250A (SWARM)" | 25 | #define SIBYTE_BOARD_NAME "BCM91250A (SWARM)" |
26 | #define SIBYTE_HAVE_PCMCIA 1 | 26 | #define SIBYTE_HAVE_PCMCIA 1 |
27 | #define SIBYTE_HAVE_IDE 1 | 27 | #define SIBYTE_HAVE_IDE 1 |
28 | #endif | 28 | #endif |
29 | #ifdef CONFIG_SIBYTE_LITTLESUR | 29 | #ifdef CONFIG_SIBYTE_LITTLESUR |
30 | #define SIBYTE_BOARD_NAME "BCM91250C2 (LittleSur)" | 30 | #define SIBYTE_BOARD_NAME "BCM91250C2 (LittleSur)" |
31 | #define SIBYTE_HAVE_PCMCIA 0 | 31 | #define SIBYTE_HAVE_PCMCIA 0 |
32 | #define SIBYTE_HAVE_IDE 1 | 32 | #define SIBYTE_HAVE_IDE 1 |
33 | #define SIBYTE_DEFAULT_CONSOLE "cfe0" | 33 | #define SIBYTE_DEFAULT_CONSOLE "cfe0" |
34 | #endif | 34 | #endif |
35 | #ifdef CONFIG_SIBYTE_CRHONE | 35 | #ifdef CONFIG_SIBYTE_CRHONE |
36 | #define SIBYTE_BOARD_NAME "BCM91125C (CRhone)" | 36 | #define SIBYTE_BOARD_NAME "BCM91125C (CRhone)" |
37 | #define SIBYTE_HAVE_PCMCIA 0 | 37 | #define SIBYTE_HAVE_PCMCIA 0 |
38 | #define SIBYTE_HAVE_IDE 0 | 38 | #define SIBYTE_HAVE_IDE 0 |
39 | #endif | 39 | #endif |
40 | #ifdef CONFIG_SIBYTE_CRHINE | 40 | #ifdef CONFIG_SIBYTE_CRHINE |
41 | #define SIBYTE_BOARD_NAME "BCM91120C (CRhine)" | 41 | #define SIBYTE_BOARD_NAME "BCM91120C (CRhine)" |
42 | #define SIBYTE_HAVE_PCMCIA 0 | 42 | #define SIBYTE_HAVE_PCMCIA 0 |
43 | #define SIBYTE_HAVE_IDE 0 | 43 | #define SIBYTE_HAVE_IDE 0 |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | /* Generic bus chip selects */ | 46 | /* Generic bus chip selects */ |
47 | #define LEDS_CS 3 | 47 | #define LEDS_CS 3 |
48 | #define LEDS_PHYS 0x100a0000 | 48 | #define LEDS_PHYS 0x100a0000 |
49 | 49 | ||
50 | #ifdef SIBYTE_HAVE_IDE | 50 | #ifdef SIBYTE_HAVE_IDE |
51 | #define IDE_CS 4 | 51 | #define IDE_CS 4 |
52 | #define IDE_PHYS 0x100b0000 | 52 | #define IDE_PHYS 0x100b0000 |
53 | #define K_GPIO_GB_IDE 4 | 53 | #define K_GPIO_GB_IDE 4 |
54 | #define K_INT_GB_IDE (K_INT_GPIO_0 + K_GPIO_GB_IDE) | 54 | #define K_INT_GB_IDE (K_INT_GPIO_0 + K_GPIO_GB_IDE) |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | #ifdef SIBYTE_HAVE_PCMCIA | 57 | #ifdef SIBYTE_HAVE_PCMCIA |
58 | #define PCMCIA_CS 6 | 58 | #define PCMCIA_CS 6 |
59 | #define PCMCIA_PHYS 0x11000000 | 59 | #define PCMCIA_PHYS 0x11000000 |
60 | #define K_GPIO_PC_READY 9 | 60 | #define K_GPIO_PC_READY 9 |
61 | #define K_INT_PC_READY (K_INT_GPIO_0 + K_GPIO_PC_READY) | 61 | #define K_INT_PC_READY (K_INT_GPIO_0 + K_GPIO_PC_READY) |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #endif /* __ASM_SIBYTE_SWARM_H */ | 64 | #endif /* __ASM_SIBYTE_SWARM_H */ |
diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h index f33b5fd6972b..eb6008758484 100644 --- a/arch/mips/include/asm/smp.h +++ b/arch/mips/include/asm/smp.h | |||
@@ -26,7 +26,7 @@ extern cpumask_t cpu_sibling_map[]; | |||
26 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 26 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
27 | 27 | ||
28 | /* Map from cpu id to sequential logical cpu number. This will only | 28 | /* Map from cpu id to sequential logical cpu number. This will only |
29 | not be idempotent when cpus failed to come on-line. */ | 29 | not be idempotent when cpus failed to come on-line. */ |
30 | extern int __cpu_number_map[NR_CPUS]; | 30 | extern int __cpu_number_map[NR_CPUS]; |
31 | #define cpu_number_map(cpu) __cpu_number_map[cpu] | 31 | #define cpu_number_map(cpu) __cpu_number_map[cpu] |
32 | 32 | ||
@@ -36,7 +36,7 @@ extern int __cpu_logical_map[NR_CPUS]; | |||
36 | 36 | ||
37 | #define NO_PROC_ID (-1) | 37 | #define NO_PROC_ID (-1) |
38 | 38 | ||
39 | #define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */ | 39 | #define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */ |
40 | #define SMP_CALL_FUNCTION 0x2 | 40 | #define SMP_CALL_FUNCTION 0x2 |
41 | /* Octeon - Tell another core to flush its icache */ | 41 | /* Octeon - Tell another core to flush its icache */ |
42 | #define SMP_ICACHE_FLUSH 0x4 | 42 | #define SMP_ICACHE_FLUSH 0x4 |
@@ -62,14 +62,14 @@ static inline void smp_send_reschedule(int cpu) | |||
62 | #ifdef CONFIG_HOTPLUG_CPU | 62 | #ifdef CONFIG_HOTPLUG_CPU |
63 | static inline int __cpu_disable(void) | 63 | static inline int __cpu_disable(void) |
64 | { | 64 | { |
65 | extern struct plat_smp_ops *mp_ops; /* private */ | 65 | extern struct plat_smp_ops *mp_ops; /* private */ |
66 | 66 | ||
67 | return mp_ops->cpu_disable(); | 67 | return mp_ops->cpu_disable(); |
68 | } | 68 | } |
69 | 69 | ||
70 | static inline void __cpu_die(unsigned int cpu) | 70 | static inline void __cpu_die(unsigned int cpu) |
71 | { | 71 | { |
72 | extern struct plat_smp_ops *mp_ops; /* private */ | 72 | extern struct plat_smp_ops *mp_ops; /* private */ |
73 | 73 | ||
74 | mp_ops->cpu_die(cpu); | 74 | mp_ops->cpu_die(cpu); |
75 | } | 75 | } |
@@ -81,14 +81,14 @@ extern asmlinkage void smp_call_function_interrupt(void); | |||
81 | 81 | ||
82 | static inline void arch_send_call_function_single_ipi(int cpu) | 82 | static inline void arch_send_call_function_single_ipi(int cpu) |
83 | { | 83 | { |
84 | extern struct plat_smp_ops *mp_ops; /* private */ | 84 | extern struct plat_smp_ops *mp_ops; /* private */ |
85 | 85 | ||
86 | mp_ops->send_ipi_mask(&cpumask_of_cpu(cpu), SMP_CALL_FUNCTION); | 86 | mp_ops->send_ipi_mask(&cpumask_of_cpu(cpu), SMP_CALL_FUNCTION); |
87 | } | 87 | } |
88 | 88 | ||
89 | static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask) | 89 | static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask) |
90 | { | 90 | { |
91 | extern struct plat_smp_ops *mp_ops; /* private */ | 91 | extern struct plat_smp_ops *mp_ops; /* private */ |
92 | 92 | ||
93 | mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION); | 93 | mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION); |
94 | } | 94 | } |
diff --git a/arch/mips/include/asm/smtc.h b/arch/mips/include/asm/smtc.h index 8935426a56ab..e56b439b7871 100644 --- a/arch/mips/include/asm/smtc.h +++ b/arch/mips/include/asm/smtc.h | |||
@@ -14,8 +14,8 @@ | |||
14 | 14 | ||
15 | extern unsigned int smtc_status; | 15 | extern unsigned int smtc_status; |
16 | 16 | ||
17 | #define SMTC_TLB_SHARED 0x00000001 | 17 | #define SMTC_TLB_SHARED 0x00000001 |
18 | #define SMTC_MTC_ACTIVE 0x00000002 | 18 | #define SMTC_MTC_ACTIVE 0x00000002 |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * TLB/ASID Management information | 21 | * TLB/ASID Management information |
diff --git a/arch/mips/include/asm/sn/addrs.h b/arch/mips/include/asm/sn/addrs.h index 2367b56dcdef..66814f8ba8e8 100644 --- a/arch/mips/include/asm/sn/addrs.h +++ b/arch/mips/include/asm/sn/addrs.h | |||
@@ -88,8 +88,8 @@ | |||
88 | 88 | ||
89 | #define SWIN_SIZE_BITS 24 | 89 | #define SWIN_SIZE_BITS 24 |
90 | #define SWIN_SIZE (UINT64_CAST 1 << 24) | 90 | #define SWIN_SIZE (UINT64_CAST 1 << 24) |
91 | #define SWIN_SIZEMASK (SWIN_SIZE - 1) | 91 | #define SWIN_SIZEMASK (SWIN_SIZE - 1) |
92 | #define SWIN_WIDGET_MASK 0xF | 92 | #define SWIN_WIDGET_MASK 0xF |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Convert smallwindow address to xtalk address. | 95 | * Convert smallwindow address to xtalk address. |
@@ -97,8 +97,8 @@ | |||
97 | * 'addr' can be physical or virtual address, but will be converted | 97 | * 'addr' can be physical or virtual address, but will be converted |
98 | * to Xtalk address in the range 0 -> SWINZ_SIZEMASK | 98 | * to Xtalk address in the range 0 -> SWINZ_SIZEMASK |
99 | */ | 99 | */ |
100 | #define SWIN_WIDGETADDR(addr) ((addr) & SWIN_SIZEMASK) | 100 | #define SWIN_WIDGETADDR(addr) ((addr) & SWIN_SIZEMASK) |
101 | #define SWIN_WIDGETNUM(addr) (((addr) >> SWIN_SIZE_BITS) & SWIN_WIDGET_MASK) | 101 | #define SWIN_WIDGETNUM(addr) (((addr) >> SWIN_SIZE_BITS) & SWIN_WIDGET_MASK) |
102 | /* | 102 | /* |
103 | * Verify if addr belongs to small window address on node with "nasid" | 103 | * Verify if addr belongs to small window address on node with "nasid" |
104 | * | 104 | * |
@@ -108,7 +108,7 @@ | |||
108 | * | 108 | * |
109 | * | 109 | * |
110 | */ | 110 | */ |
111 | #define NODE_SWIN_ADDR(nasid, addr) \ | 111 | #define NODE_SWIN_ADDR(nasid, addr) \ |
112 | (((addr) >= NODE_SWIN_BASE(nasid, 0)) && \ | 112 | (((addr) >= NODE_SWIN_BASE(nasid, 0)) && \ |
113 | ((addr) < (NODE_SWIN_BASE(nasid, HUB_NUM_WIDGET) + SWIN_SIZE)\ | 113 | ((addr) < (NODE_SWIN_BASE(nasid, HUB_NUM_WIDGET) + SWIN_SIZE)\ |
114 | )) | 114 | )) |
@@ -150,7 +150,7 @@ | |||
150 | 150 | ||
151 | #endif | 151 | #endif |
152 | 152 | ||
153 | #define HUB_REGISTER_WIDGET 1 | 153 | #define HUB_REGISTER_WIDGET 1 |
154 | #define IALIAS_BASE NODE_SWIN_BASE(0, HUB_REGISTER_WIDGET) | 154 | #define IALIAS_BASE NODE_SWIN_BASE(0, HUB_REGISTER_WIDGET) |
155 | #define IALIAS_SIZE 0x800000 /* 8 Megabytes */ | 155 | #define IALIAS_SIZE 0x800000 /* 8 Megabytes */ |
156 | #define IS_IALIAS(_a) (((_a) >= IALIAS_BASE) && \ | 156 | #define IS_IALIAS(_a) (((_a) >= IALIAS_BASE) && \ |
@@ -174,16 +174,16 @@ | |||
174 | * WARNING: They won't work in assembler. | 174 | * WARNING: They won't work in assembler. |
175 | * | 175 | * |
176 | * BDDIR_ENTRY_LO returns the address of the low double-word of the dir | 176 | * BDDIR_ENTRY_LO returns the address of the low double-word of the dir |
177 | * entry corresponding to a physical (Cac or Uncac) address. | 177 | * entry corresponding to a physical (Cac or Uncac) address. |
178 | * BDDIR_ENTRY_HI returns the address of the high double-word of the entry. | 178 | * BDDIR_ENTRY_HI returns the address of the high double-word of the entry. |
179 | * BDPRT_ENTRY returns the address of the double-word protection entry | 179 | * BDPRT_ENTRY returns the address of the double-word protection entry |
180 | * corresponding to the page containing the physical address. | 180 | * corresponding to the page containing the physical address. |
181 | * BDPRT_ENTRY_S Stores the value into the protection entry. | 181 | * BDPRT_ENTRY_S Stores the value into the protection entry. |
182 | * BDPRT_ENTRY_L Load the value from the protection entry. | 182 | * BDPRT_ENTRY_L Load the value from the protection entry. |
183 | * BDECC_ENTRY returns the address of the ECC byte corresponding to a | 183 | * BDECC_ENTRY returns the address of the ECC byte corresponding to a |
184 | * double-word at a specified physical address. | 184 | * double-word at a specified physical address. |
185 | * BDECC_ENTRY_H returns the address of the two ECC bytes corresponding to a | 185 | * BDECC_ENTRY_H returns the address of the two ECC bytes corresponding to a |
186 | * quad-word at a specified physical address. | 186 | * quad-word at a specified physical address. |
187 | */ | 187 | */ |
188 | #define NODE_BDOOR_BASE(_n) (NODE_HSPEC_BASE(_n) + (NODE_ADDRSPACE_SIZE/2)) | 188 | #define NODE_BDOOR_BASE(_n) (NODE_HSPEC_BASE(_n) + (NODE_ADDRSPACE_SIZE/2)) |
189 | 189 | ||
@@ -226,11 +226,11 @@ | |||
226 | #define BDADDR_IS_DIR(_ba) ((UINT64_CAST (_ba) & 0x200) != 0) | 226 | #define BDADDR_IS_DIR(_ba) ((UINT64_CAST (_ba) & 0x200) != 0) |
227 | #define BDADDR_IS_PRT(_ba) ((UINT64_CAST (_ba) & 0x200) == 0) | 227 | #define BDADDR_IS_PRT(_ba) ((UINT64_CAST (_ba) & 0x200) == 0) |
228 | 228 | ||
229 | #define BDDIR_TO_MEM(_ba) (UINT64_CAST (_ba) & NASID_MASK | \ | 229 | #define BDDIR_TO_MEM(_ba) (UINT64_CAST (_ba) & NASID_MASK | \ |
230 | (UINT64_CAST(_ba) & BDDIR_UPPER_MASK)<<2 | \ | 230 | (UINT64_CAST(_ba) & BDDIR_UPPER_MASK)<<2 | \ |
231 | (UINT64_CAST(_ba) & 0x1f << 4) << 3) | 231 | (UINT64_CAST(_ba) & 0x1f << 4) << 3) |
232 | 232 | ||
233 | #define BDPRT_TO_MEM(_ba) (UINT64_CAST (_ba) & NASID_MASK | \ | 233 | #define BDPRT_TO_MEM(_ba) (UINT64_CAST (_ba) & NASID_MASK | \ |
234 | (UINT64_CAST(_ba) & BDDIR_UPPER_MASK)<<2) | 234 | (UINT64_CAST(_ba) & BDDIR_UPPER_MASK)<<2) |
235 | 235 | ||
236 | #define BDECC_TO_MEM(_ba) (UINT64_CAST (_ba) & NASID_MASK | \ | 236 | #define BDECC_TO_MEM(_ba) (UINT64_CAST (_ba) & NASID_MASK | \ |
@@ -251,23 +251,23 @@ | |||
251 | /* | 251 | /* |
252 | * WARNING: | 252 | * WARNING: |
253 | * When certain Hub chip workaround are defined, it's not sufficient | 253 | * When certain Hub chip workaround are defined, it's not sufficient |
254 | * to dereference the *_HUB_ADDR() macros. You should instead use | 254 | * to dereference the *_HUB_ADDR() macros. You should instead use |
255 | * HUB_L() and HUB_S() if you must deal with pointers to hub registers. | 255 | * HUB_L() and HUB_S() if you must deal with pointers to hub registers. |
256 | * Otherwise, the recommended approach is to use *_HUB_L() and *_HUB_S(). | 256 | * Otherwise, the recommended approach is to use *_HUB_L() and *_HUB_S(). |
257 | * They're always safe. | 257 | * They're always safe. |
258 | */ | 258 | */ |
259 | #define LOCAL_HUB_ADDR(_x) (HUBREG_CAST (IALIAS_BASE + (_x))) | 259 | #define LOCAL_HUB_ADDR(_x) (HUBREG_CAST (IALIAS_BASE + (_x))) |
260 | #define REMOTE_HUB_ADDR(_n, _x) (HUBREG_CAST (NODE_SWIN_BASE(_n, 1) + \ | 260 | #define REMOTE_HUB_ADDR(_n, _x) (HUBREG_CAST (NODE_SWIN_BASE(_n, 1) + \ |
261 | 0x800000 + (_x))) | 261 | 0x800000 + (_x))) |
262 | #ifdef CONFIG_SGI_IP27 | 262 | #ifdef CONFIG_SGI_IP27 |
263 | #define REMOTE_HUB_PI_ADDR(_n, _sn, _x) (HUBREG_CAST (NODE_SWIN_BASE(_n, 1) + \ | 263 | #define REMOTE_HUB_PI_ADDR(_n, _sn, _x) (HUBREG_CAST (NODE_SWIN_BASE(_n, 1) + \ |
264 | 0x800000 + (_x))) | 264 | 0x800000 + (_x))) |
265 | #endif /* CONFIG_SGI_IP27 */ | 265 | #endif /* CONFIG_SGI_IP27 */ |
266 | 266 | ||
267 | #ifndef __ASSEMBLY__ | 267 | #ifndef __ASSEMBLY__ |
268 | 268 | ||
269 | #define HUB_L(_a) *(_a) | 269 | #define HUB_L(_a) *(_a) |
270 | #define HUB_S(_a, _d) *(_a) = (_d) | 270 | #define HUB_S(_a, _d) *(_a) = (_d) |
271 | 271 | ||
272 | #define LOCAL_HUB_L(_r) HUB_L(LOCAL_HUB_ADDR(_r)) | 272 | #define LOCAL_HUB_L(_r) HUB_L(LOCAL_HUB_ADDR(_r)) |
273 | #define LOCAL_HUB_S(_r, _d) HUB_S(LOCAL_HUB_ADDR(_r), (_d)) | 273 | #define LOCAL_HUB_S(_r, _d) HUB_S(LOCAL_HUB_ADDR(_r), (_d)) |
@@ -330,14 +330,14 @@ | |||
330 | 330 | ||
331 | #define KLI_LAUNCH 0 /* Dir. entries */ | 331 | #define KLI_LAUNCH 0 /* Dir. entries */ |
332 | #define KLI_KLCONFIG 1 | 332 | #define KLI_KLCONFIG 1 |
333 | #define KLI_NMI 2 | 333 | #define KLI_NMI 2 |
334 | #define KLI_GDA 3 | 334 | #define KLI_GDA 3 |
335 | #define KLI_FREEMEM 4 | 335 | #define KLI_FREEMEM 4 |
336 | #define KLI_SYMMON_STK 5 | 336 | #define KLI_SYMMON_STK 5 |
337 | #define KLI_PI_ERROR 6 | 337 | #define KLI_PI_ERROR 6 |
338 | #define KLI_KERN_VARS 7 | 338 | #define KLI_KERN_VARS 7 |
339 | #define KLI_KERN_XP 8 | 339 | #define KLI_KERN_XP 8 |
340 | #define KLI_KERN_PARTID 9 | 340 | #define KLI_KERN_PARTID 9 |
341 | 341 | ||
342 | #ifndef __ASSEMBLY__ | 342 | #ifndef __ASSEMBLY__ |
343 | 343 | ||
@@ -350,8 +350,8 @@ | |||
350 | #define KLD_SYMMON_STK(nasid) (KLD_BASE(nasid) + KLI_SYMMON_STK) | 350 | #define KLD_SYMMON_STK(nasid) (KLD_BASE(nasid) + KLI_SYMMON_STK) |
351 | #define KLD_FREEMEM(nasid) (KLD_BASE(nasid) + KLI_FREEMEM) | 351 | #define KLD_FREEMEM(nasid) (KLD_BASE(nasid) + KLI_FREEMEM) |
352 | #define KLD_KERN_VARS(nasid) (KLD_BASE(nasid) + KLI_KERN_VARS) | 352 | #define KLD_KERN_VARS(nasid) (KLD_BASE(nasid) + KLI_KERN_VARS) |
353 | #define KLD_KERN_XP(nasid) (KLD_BASE(nasid) + KLI_KERN_XP) | 353 | #define KLD_KERN_XP(nasid) (KLD_BASE(nasid) + KLI_KERN_XP) |
354 | #define KLD_KERN_PARTID(nasid) (KLD_BASE(nasid) + KLI_KERN_PARTID) | 354 | #define KLD_KERN_PARTID(nasid) (KLD_BASE(nasid) + KLI_KERN_PARTID) |
355 | 355 | ||
356 | #define LAUNCH_OFFSET(nasid, slice) \ | 356 | #define LAUNCH_OFFSET(nasid, slice) \ |
357 | (KLD_LAUNCH(nasid)->offset + \ | 357 | (KLD_LAUNCH(nasid)->offset + \ |
@@ -365,7 +365,7 @@ | |||
365 | KLD_NMI(nasid)->stride * (slice)) | 365 | KLD_NMI(nasid)->stride * (slice)) |
366 | #define NMI_ADDR(nasid, slice) \ | 366 | #define NMI_ADDR(nasid, slice) \ |
367 | TO_NODE_UNCAC((nasid), SN_NMI_OFFSET(nasid, slice)) | 367 | TO_NODE_UNCAC((nasid), SN_NMI_OFFSET(nasid, slice)) |
368 | #define NMI_SIZE(nasid) KLD_NMI(nasid)->size | 368 | #define NMI_SIZE(nasid) KLD_NMI(nasid)->size |
369 | 369 | ||
370 | #define KLCONFIG_OFFSET(nasid) KLD_KLCONFIG(nasid)->offset | 370 | #define KLCONFIG_OFFSET(nasid) KLD_KLCONFIG(nasid)->offset |
371 | #define KLCONFIG_ADDR(nasid) \ | 371 | #define KLCONFIG_ADDR(nasid) \ |
@@ -390,8 +390,8 @@ | |||
390 | /* loading symmon 4k below UNIX. the arcs loader needs the topaddr for a | 390 | /* loading symmon 4k below UNIX. the arcs loader needs the topaddr for a |
391 | * relocatable program | 391 | * relocatable program |
392 | */ | 392 | */ |
393 | #define UNIX_DEBUG_LOADADDR 0x300000 | 393 | #define UNIX_DEBUG_LOADADDR 0x300000 |
394 | #define SYMMON_LOADADDR(nasid) \ | 394 | #define SYMMON_LOADADDR(nasid) \ |
395 | TO_NODE(nasid, PHYS_TO_K0(UNIX_DEBUG_LOADADDR - 0x1000)) | 395 | TO_NODE(nasid, PHYS_TO_K0(UNIX_DEBUG_LOADADDR - 0x1000)) |
396 | 396 | ||
397 | #define FREEMEM_OFFSET(nasid) KLD_FREEMEM(nasid)->offset | 397 | #define FREEMEM_OFFSET(nasid) KLD_FREEMEM(nasid)->offset |
@@ -420,8 +420,8 @@ | |||
420 | #define KERN_VARS_ADDR(nasid) KLD_KERN_VARS(nasid)->pointer | 420 | #define KERN_VARS_ADDR(nasid) KLD_KERN_VARS(nasid)->pointer |
421 | #define KERN_VARS_SIZE(nasid) KLD_KERN_VARS(nasid)->size | 421 | #define KERN_VARS_SIZE(nasid) KLD_KERN_VARS(nasid)->size |
422 | 422 | ||
423 | #define KERN_XP_ADDR(nasid) KLD_KERN_XP(nasid)->pointer | 423 | #define KERN_XP_ADDR(nasid) KLD_KERN_XP(nasid)->pointer |
424 | #define KERN_XP_SIZE(nasid) KLD_KERN_XP(nasid)->size | 424 | #define KERN_XP_SIZE(nasid) KLD_KERN_XP(nasid)->size |
425 | 425 | ||
426 | #define GPDA_ADDR(nasid) TO_NODE_CAC(nasid, GPDA_OFFSET) | 426 | #define GPDA_ADDR(nasid) TO_NODE_CAC(nasid, GPDA_OFFSET) |
427 | 427 | ||
diff --git a/arch/mips/include/asm/sn/agent.h b/arch/mips/include/asm/sn/agent.h index dc81114d4742..e33d09293019 100644 --- a/arch/mips/include/asm/sn/agent.h +++ b/arch/mips/include/asm/sn/agent.h | |||
@@ -25,21 +25,21 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #if defined(CONFIG_SGI_IP27) | 27 | #if defined(CONFIG_SGI_IP27) |
28 | #define HUB_NIC_ADDR(_cpuid) \ | 28 | #define HUB_NIC_ADDR(_cpuid) \ |
29 | REMOTE_HUB_ADDR(COMPACT_TO_NASID_NODEID(cpu_to_node(_cpuid)), \ | 29 | REMOTE_HUB_ADDR(COMPACT_TO_NASID_NODEID(cpu_to_node(_cpuid)), \ |
30 | MD_MLAN_CTL) | 30 | MD_MLAN_CTL) |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #define SET_HUB_NIC(_my_cpuid, _val) \ | 33 | #define SET_HUB_NIC(_my_cpuid, _val) \ |
34 | (HUB_S(HUB_NIC_ADDR(_my_cpuid), (_val))) | 34 | (HUB_S(HUB_NIC_ADDR(_my_cpuid), (_val))) |
35 | 35 | ||
36 | #define SET_MY_HUB_NIC(_v) \ | 36 | #define SET_MY_HUB_NIC(_v) \ |
37 | SET_HUB_NIC(cpuid(), (_v)) | 37 | SET_HUB_NIC(cpuid(), (_v)) |
38 | 38 | ||
39 | #define GET_HUB_NIC(_my_cpuid) \ | 39 | #define GET_HUB_NIC(_my_cpuid) \ |
40 | (HUB_L(HUB_NIC_ADDR(_my_cpuid))) | 40 | (HUB_L(HUB_NIC_ADDR(_my_cpuid))) |
41 | 41 | ||
42 | #define GET_MY_HUB_NIC() \ | 42 | #define GET_MY_HUB_NIC() \ |
43 | GET_HUB_NIC(cpuid()) | 43 | GET_HUB_NIC(cpuid()) |
44 | 44 | ||
45 | #endif /* _ASM_SGI_SN_AGENT_H */ | 45 | #endif /* _ASM_SGI_SN_AGENT_H */ |
diff --git a/arch/mips/include/asm/sn/arch.h b/arch/mips/include/asm/sn/arch.h index bd75945e10ff..471e6870d876 100644 --- a/arch/mips/include/asm/sn/arch.h +++ b/arch/mips/include/asm/sn/arch.h | |||
@@ -28,14 +28,14 @@ typedef u64 hubreg_t; | |||
28 | #define INVALID_CNODEID (cnodeid_t)-1 | 28 | #define INVALID_CNODEID (cnodeid_t)-1 |
29 | #define INVALID_PNODEID (pnodeid_t)-1 | 29 | #define INVALID_PNODEID (pnodeid_t)-1 |
30 | #define INVALID_MODULE (moduleid_t)-1 | 30 | #define INVALID_MODULE (moduleid_t)-1 |
31 | #define INVALID_PARTID (partid_t)-1 | 31 | #define INVALID_PARTID (partid_t)-1 |
32 | 32 | ||
33 | extern nasid_t get_nasid(void); | 33 | extern nasid_t get_nasid(void); |
34 | extern cnodeid_t get_cpu_cnode(cpuid_t); | 34 | extern cnodeid_t get_cpu_cnode(cpuid_t); |
35 | extern int get_cpu_slice(cpuid_t); | 35 | extern int get_cpu_slice(cpuid_t); |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * NO ONE should access these arrays directly. The only reason we refer to | 38 | * NO ONE should access these arrays directly. The only reason we refer to |
39 | * them here is to avoid the procedure call that would be required in the | 39 | * them here is to avoid the procedure call that would be required in the |
40 | * macros below. (Really want private data members here :-) | 40 | * macros below. (Really want private data members here :-) |
41 | */ | 41 | */ |
@@ -44,12 +44,12 @@ extern nasid_t compact_to_nasid_node[MAX_COMPACT_NODES]; | |||
44 | 44 | ||
45 | /* | 45 | /* |
46 | * These macros are used by various parts of the kernel to convert | 46 | * These macros are used by various parts of the kernel to convert |
47 | * between the three different kinds of node numbering. At least some | 47 | * between the three different kinds of node numbering. At least some |
48 | * of them may change to procedure calls in the future, but the macros | 48 | * of them may change to procedure calls in the future, but the macros |
49 | * will continue to work. Don't use the arrays above directly. | 49 | * will continue to work. Don't use the arrays above directly. |
50 | */ | 50 | */ |
51 | 51 | ||
52 | #define NASID_TO_REGION(nnode) \ | 52 | #define NASID_TO_REGION(nnode) \ |
53 | ((nnode) >> \ | 53 | ((nnode) >> \ |
54 | (is_fine_dirmode() ? NASID_TO_FINEREG_SHFT : NASID_TO_COARSEREG_SHFT)) | 54 | (is_fine_dirmode() ? NASID_TO_FINEREG_SHFT : NASID_TO_COARSEREG_SHFT)) |
55 | 55 | ||
diff --git a/arch/mips/include/asm/sn/fru.h b/arch/mips/include/asm/sn/fru.h index b3e3606723b7..bbb83257c8e2 100644 --- a/arch/mips/include/asm/sn/fru.h +++ b/arch/mips/include/asm/sn/fru.h | |||
@@ -21,24 +21,24 @@ typedef struct kf_mem_s { | |||
21 | * is this necessary ? | 21 | * is this necessary ? |
22 | */ | 22 | */ |
23 | confidence_t km_dimm[MAX_DIMMS]; | 23 | confidence_t km_dimm[MAX_DIMMS]; |
24 | /* confidence level that dimm[i] is bad | 24 | /* confidence level that dimm[i] is bad |
25 | *I think this is the right number | 25 | *I think this is the right number |
26 | */ | 26 | */ |
27 | 27 | ||
28 | } kf_mem_t; | 28 | } kf_mem_t; |
29 | 29 | ||
30 | typedef struct kf_cpu_s { | 30 | typedef struct kf_cpu_s { |
31 | confidence_t kc_confidence; /* confidence level that cpu is bad */ | 31 | confidence_t kc_confidence; /* confidence level that cpu is bad */ |
32 | confidence_t kc_icache; /* confidence level that instr. cache is bad */ | 32 | confidence_t kc_icache; /* confidence level that instr. cache is bad */ |
33 | confidence_t kc_dcache; /* confidence level that data cache is bad */ | 33 | confidence_t kc_dcache; /* confidence level that data cache is bad */ |
34 | confidence_t kc_scache; /* confidence level that sec. cache is bad */ | 34 | confidence_t kc_scache; /* confidence level that sec. cache is bad */ |
35 | confidence_t kc_sysbus; /* confidence level that sysad/cmd/state bus is bad */ | 35 | confidence_t kc_sysbus; /* confidence level that sysad/cmd/state bus is bad */ |
36 | } kf_cpu_t; | 36 | } kf_cpu_t; |
37 | 37 | ||
38 | typedef struct kf_pci_bus_s { | 38 | typedef struct kf_pci_bus_s { |
39 | confidence_t kpb_belief; /* confidence level that the pci bus is bad */ | 39 | confidence_t kpb_belief; /* confidence level that the pci bus is bad */ |
40 | confidence_t kpb_pcidev_belief[MAX_PCIDEV]; | 40 | confidence_t kpb_pcidev_belief[MAX_PCIDEV]; |
41 | /* confidence level that the pci dev is bad */ | 41 | /* confidence level that the pci dev is bad */ |
42 | } kf_pci_bus_t; | 42 | } kf_pci_bus_t; |
43 | 43 | ||
44 | #endif /* __ASM_SN_FRU_H */ | 44 | #endif /* __ASM_SN_FRU_H */ |
diff --git a/arch/mips/include/asm/sn/gda.h b/arch/mips/include/asm/sn/gda.h index 9cb6ff770915..85fa1b5f639d 100644 --- a/arch/mips/include/asm/sn/gda.h +++ b/arch/mips/include/asm/sn/gda.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc. |
9 | * | 9 | * |
10 | * gda.h -- Contains the data structure for the global data area, | 10 | * gda.h -- Contains the data structure for the global data area, |
11 | * The GDA contains information communicated between the | 11 | * The GDA contains information communicated between the |
12 | * PROM, SYMMON, and the kernel. | 12 | * PROM, SYMMON, and the kernel. |
13 | */ | 13 | */ |
14 | #ifndef _ASM_SN_GDA_H | 14 | #ifndef _ASM_SN_GDA_H |
@@ -23,8 +23,8 @@ | |||
23 | * | 23 | * |
24 | * Version # | Change | 24 | * Version # | Change |
25 | * -------------+------------------------------------------------------- | 25 | * -------------+------------------------------------------------------- |
26 | * 1 | Initial SN0 version | 26 | * 1 | Initial SN0 version |
27 | * 2 | Prom sets g_partid field to the partition number. 0 IS | 27 | * 2 | Prom sets g_partid field to the partition number. 0 IS |
28 | * | a valid partition #. | 28 | * | a valid partition #. |
29 | */ | 29 | */ |
30 | 30 | ||
@@ -60,7 +60,7 @@ typedef struct gda { | |||
60 | /* Pointer to a mask of nodes with copies | 60 | /* Pointer to a mask of nodes with copies |
61 | * of the kernel. */ | 61 | * of the kernel. */ |
62 | char g_padding[56]; /* pad out to 128 bytes */ | 62 | char g_padding[56]; /* pad out to 128 bytes */ |
63 | nasid_t g_nasidtable[MAX_COMPACT_NODES]; /* NASID of each node, | 63 | nasid_t g_nasidtable[MAX_COMPACT_NODES]; /* NASID of each node, |
64 | * indexed by cnodeid. | 64 | * indexed by cnodeid. |
65 | */ | 65 | */ |
66 | } gda_t; | 66 | } gda_t; |
@@ -74,7 +74,7 @@ typedef struct gda { | |||
74 | * revisions assume GDA is NOT set up, and read partition | 74 | * revisions assume GDA is NOT set up, and read partition |
75 | * information from the board info. | 75 | * information from the board info. |
76 | */ | 76 | */ |
77 | #define PART_GDA_VERSION 2 | 77 | #define PART_GDA_VERSION 2 |
78 | 78 | ||
79 | /* | 79 | /* |
80 | * The following requests can be sent to the PROM during startup. | 80 | * The following requests can be sent to the PROM during startup. |
@@ -83,17 +83,17 @@ typedef struct gda { | |||
83 | #define PROMOP_MAGIC 0x0ead0000 | 83 | #define PROMOP_MAGIC 0x0ead0000 |
84 | #define PROMOP_MAGIC_MASK 0x0fff0000 | 84 | #define PROMOP_MAGIC_MASK 0x0fff0000 |
85 | 85 | ||
86 | #define PROMOP_BIST_SHIFT 11 | 86 | #define PROMOP_BIST_SHIFT 11 |
87 | #define PROMOP_BIST_MASK (0x3 << 11) | 87 | #define PROMOP_BIST_MASK (0x3 << 11) |
88 | 88 | ||
89 | #define PROMOP_REG PI_ERR_STACK_ADDR_A | 89 | #define PROMOP_REG PI_ERR_STACK_ADDR_A |
90 | 90 | ||
91 | #define PROMOP_INVALID (PROMOP_MAGIC | 0x00) | 91 | #define PROMOP_INVALID (PROMOP_MAGIC | 0x00) |
92 | #define PROMOP_HALT (PROMOP_MAGIC | 0x10) | 92 | #define PROMOP_HALT (PROMOP_MAGIC | 0x10) |
93 | #define PROMOP_POWERDOWN (PROMOP_MAGIC | 0x20) | 93 | #define PROMOP_POWERDOWN (PROMOP_MAGIC | 0x20) |
94 | #define PROMOP_RESTART (PROMOP_MAGIC | 0x30) | 94 | #define PROMOP_RESTART (PROMOP_MAGIC | 0x30) |
95 | #define PROMOP_REBOOT (PROMOP_MAGIC | 0x40) | 95 | #define PROMOP_REBOOT (PROMOP_MAGIC | 0x40) |
96 | #define PROMOP_IMODE (PROMOP_MAGIC | 0x50) | 96 | #define PROMOP_IMODE (PROMOP_MAGIC | 0x50) |
97 | 97 | ||
98 | #define PROMOP_CMD_MASK 0x00f0 | 98 | #define PROMOP_CMD_MASK 0x00f0 |
99 | #define PROMOP_OPTIONS_MASK 0xfff0 | 99 | #define PROMOP_OPTIONS_MASK 0xfff0 |
diff --git a/arch/mips/include/asm/sn/intr.h b/arch/mips/include/asm/sn/intr.h index 6718b644b970..fc1348193957 100644 --- a/arch/mips/include/asm/sn/intr.h +++ b/arch/mips/include/asm/sn/intr.h | |||
@@ -14,8 +14,8 @@ | |||
14 | #define INT_PEND0_BASELVL 0 | 14 | #define INT_PEND0_BASELVL 0 |
15 | #define INT_PEND1_BASELVL 64 | 15 | #define INT_PEND1_BASELVL 64 |
16 | 16 | ||
17 | #define N_INTPENDJUNK_BITS 8 | 17 | #define N_INTPENDJUNK_BITS 8 |
18 | #define INTPENDJUNK_CLRBIT 0x80 | 18 | #define INTPENDJUNK_CLRBIT 0x80 |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * Macros to manipulate the interrupt register on the calling hub chip. | 21 | * Macros to manipulate the interrupt register on the calling hub chip. |
@@ -32,7 +32,7 @@ | |||
32 | * We do an uncached load of the int_pend0 register to ensure this. | 32 | * We do an uncached load of the int_pend0 register to ensure this. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #define LOCAL_HUB_CLR_INTR(level) \ | 35 | #define LOCAL_HUB_CLR_INTR(level) \ |
36 | do { \ | 36 | do { \ |
37 | LOCAL_HUB_S(PI_INT_PEND_MOD, (level)); \ | 37 | LOCAL_HUB_S(PI_INT_PEND_MOD, (level)); \ |
38 | LOCAL_HUB_L(PI_INT_PEND0); \ | 38 | LOCAL_HUB_L(PI_INT_PEND0); \ |
@@ -40,7 +40,7 @@ do { \ | |||
40 | 40 | ||
41 | #define REMOTE_HUB_CLR_INTR(hub, level) \ | 41 | #define REMOTE_HUB_CLR_INTR(hub, level) \ |
42 | do { \ | 42 | do { \ |
43 | nasid_t __hub = (hub); \ | 43 | nasid_t __hub = (hub); \ |
44 | \ | 44 | \ |
45 | REMOTE_HUB_S(__hub, PI_INT_PEND_MOD, (level)); \ | 45 | REMOTE_HUB_S(__hub, PI_INT_PEND_MOD, (level)); \ |
46 | REMOTE_HUB_L(__hub, PI_INT_PEND0); \ | 46 | REMOTE_HUB_L(__hub, PI_INT_PEND0); \ |
@@ -102,8 +102,8 @@ do { \ | |||
102 | #define LLP_PFAIL_INTR_A 41 /* see ml/SN/SN0/sysctlr.c */ | 102 | #define LLP_PFAIL_INTR_A 41 /* see ml/SN/SN0/sysctlr.c */ |
103 | #define LLP_PFAIL_INTR_B 42 | 103 | #define LLP_PFAIL_INTR_B 42 |
104 | 104 | ||
105 | #define TLB_INTR_A 43 /* used for tlb flush random */ | 105 | #define TLB_INTR_A 43 /* used for tlb flush random */ |
106 | #define TLB_INTR_B 44 | 106 | #define TLB_INTR_B 44 |
107 | 107 | ||
108 | #define IP27_INTR_0 45 /* Reserved for PROM use */ | 108 | #define IP27_INTR_0 45 /* Reserved for PROM use */ |
109 | #define IP27_INTR_1 46 /* do not use in Kernel */ | 109 | #define IP27_INTR_1 46 /* do not use in Kernel */ |
@@ -116,8 +116,8 @@ do { \ | |||
116 | 116 | ||
117 | #define BRIDGE_ERROR_INTR 53 /* Setup by PROM to catch */ | 117 | #define BRIDGE_ERROR_INTR 53 /* Setup by PROM to catch */ |
118 | /* Bridge Errors */ | 118 | /* Bridge Errors */ |
119 | #define DEBUG_INTR_A 54 | 119 | #define DEBUG_INTR_A 54 |
120 | #define DEBUG_INTR_B 55 /* Used by symmon to stop all cpus */ | 120 | #define DEBUG_INTR_B 55 /* Used by symmon to stop all cpus */ |
121 | #define IO_ERROR_INTR 57 /* Setup by PROM */ | 121 | #define IO_ERROR_INTR 57 /* Setup by PROM */ |
122 | #define CLK_ERR_INTR 58 | 122 | #define CLK_ERR_INTR 58 |
123 | #define COR_ERR_INTR_A 59 | 123 | #define COR_ERR_INTR_A 59 |
diff --git a/arch/mips/include/asm/sn/io.h b/arch/mips/include/asm/sn/io.h index 24c6775fbb0f..d5174d04538c 100644 --- a/arch/mips/include/asm/sn/io.h +++ b/arch/mips/include/asm/sn/io.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #define HUB_PIO_MAP_TO_MEM 0 | 31 | #define HUB_PIO_MAP_TO_MEM 0 |
32 | #define HUB_PIO_MAP_TO_IO 1 | 32 | #define HUB_PIO_MAP_TO_IO 1 |
33 | 33 | ||
34 | #define IIO_ITTE_INVALID_WIDGET 3 /* an invalid widget */ | 34 | #define IIO_ITTE_INVALID_WIDGET 3 /* an invalid widget */ |
35 | 35 | ||
36 | #define IIO_ITTE_PUT(nasid, bigwin, io_or_mem, widget, addr) \ | 36 | #define IIO_ITTE_PUT(nasid, bigwin, io_or_mem, widget, addr) \ |
37 | REMOTE_HUB_S((nasid), IIO_ITTE(bigwin), \ | 37 | REMOTE_HUB_S((nasid), IIO_ITTE(bigwin), \ |
@@ -52,7 +52,7 @@ | |||
52 | * value _x is expected to be a widget number in the range | 52 | * value _x is expected to be a widget number in the range |
53 | * 0, 8 - 0xF | 53 | * 0, 8 - 0xF |
54 | */ | 54 | */ |
55 | #define IIO_IOPRB(_x) (IIO_IOPRB_0 + ( ( (_x) < HUB_WIDGET_ID_MIN ? \ | 55 | #define IIO_IOPRB(_x) (IIO_IOPRB_0 + ( ( (_x) < HUB_WIDGET_ID_MIN ? \ |
56 | (_x) : \ | 56 | (_x) : \ |
57 | (_x) - (HUB_WIDGET_ID_MIN-1)) << 3) ) | 57 | (_x) - (HUB_WIDGET_ID_MIN-1)) << 3) ) |
58 | 58 | ||
diff --git a/arch/mips/include/asm/sn/ioc3.h b/arch/mips/include/asm/sn/ioc3.h index 099677774d71..e33f0363235b 100644 --- a/arch/mips/include/asm/sn/ioc3.h +++ b/arch/mips/include/asm/sn/ioc3.h | |||
@@ -62,8 +62,8 @@ struct ioc3_sioregs { | |||
62 | 62 | ||
63 | volatile u8 fill3[0x170 - 0x169 - 1]; | 63 | volatile u8 fill3[0x170 - 0x169 - 1]; |
64 | 64 | ||
65 | struct ioc3_uartregs uartb; /* 0x20170 */ | 65 | struct ioc3_uartregs uartb; /* 0x20170 */ |
66 | struct ioc3_uartregs uarta; /* 0x20178 */ | 66 | struct ioc3_uartregs uarta; /* 0x20178 */ |
67 | }; | 67 | }; |
68 | 68 | ||
69 | /* Register layout of IOC3 in configuration space. */ | 69 | /* Register layout of IOC3 in configuration space. */ |
@@ -106,7 +106,7 @@ struct ioc3 { | |||
106 | volatile u32 ppbr_l_b; /* 0x00094 */ | 106 | volatile u32 ppbr_l_b; /* 0x00094 */ |
107 | volatile u32 ppcr_b; /* 0x00098 */ | 107 | volatile u32 ppcr_b; /* 0x00098 */ |
108 | 108 | ||
109 | /* Keyboard and Mouse Registers */ | 109 | /* Keyboard and Mouse Registers */ |
110 | volatile u32 km_csr; /* 0x0009c */ | 110 | volatile u32 km_csr; /* 0x0009c */ |
111 | volatile u32 k_rd; /* 0x000a0 */ | 111 | volatile u32 k_rd; /* 0x000a0 */ |
112 | volatile u32 m_rd; /* 0x000a4 */ | 112 | volatile u32 m_rd; /* 0x000a4 */ |
@@ -208,7 +208,7 @@ struct ioc3_erxbuf { | |||
208 | /* | 208 | /* |
209 | * Ethernet TX Descriptor | 209 | * Ethernet TX Descriptor |
210 | */ | 210 | */ |
211 | #define ETXD_DATALEN 104 | 211 | #define ETXD_DATALEN 104 |
212 | struct ioc3_etxd { | 212 | struct ioc3_etxd { |
213 | u32 cmd; /* command field */ | 213 | u32 cmd; /* command field */ |
214 | u32 bufcnt; /* buffer counts field */ | 214 | u32 bufcnt; /* buffer counts field */ |
diff --git a/arch/mips/include/asm/sn/klconfig.h b/arch/mips/include/asm/sn/klconfig.h index fe02900b930d..467c313d5767 100644 --- a/arch/mips/include/asm/sn/klconfig.h +++ b/arch/mips/include/asm/sn/klconfig.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Copyright (C) 1992 - 1997, 1999, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1992 - 1997, 1999, 2000 Silicon Graphics, Inc. |
9 | * Copyright (C) 1999, 2000 by Ralf Baechle | 9 | * Copyright (C) 1999, 2000 by Ralf Baechle |
10 | */ | 10 | */ |
11 | #ifndef _ASM_SN_KLCONFIG_H | 11 | #ifndef _ASM_SN_KLCONFIG_H |
12 | #define _ASM_SN_KLCONFIG_H | 12 | #define _ASM_SN_KLCONFIG_H |
13 | 13 | ||
14 | /* | 14 | /* |
15 | * The KLCONFIG structures store info about the various BOARDs found | 15 | * The KLCONFIG structures store info about the various BOARDs found |
@@ -20,11 +20,11 @@ | |||
20 | /* | 20 | /* |
21 | * WARNING: | 21 | * WARNING: |
22 | * Certain assembly language routines (notably xxxxx.s) in the IP27PROM | 22 | * Certain assembly language routines (notably xxxxx.s) in the IP27PROM |
23 | * will depend on the format of the data structures in this file. In | 23 | * will depend on the format of the data structures in this file. In |
24 | * most cases, rearranging the fields can seriously break things. | 24 | * most cases, rearranging the fields can seriously break things. |
25 | * Adding fields in the beginning or middle can also break things. | 25 | * Adding fields in the beginning or middle can also break things. |
26 | * Add fields if necessary, to the end of a struct in such a way | 26 | * Add fields if necessary, to the end of a struct in such a way |
27 | * that offsets of existing fields do not change. | 27 | * that offsets of existing fields do not change. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
@@ -35,7 +35,7 @@ | |||
35 | #include <asm/sn/sn0/addrs.h> | 35 | #include <asm/sn/sn0/addrs.h> |
36 | //#include <sys/SN/router.h> | 36 | //#include <sys/SN/router.h> |
37 | // XXX Stolen from <sys/SN/router.h>: | 37 | // XXX Stolen from <sys/SN/router.h>: |
38 | #define MAX_ROUTER_PORTS (6) /* Max. number of ports on a router */ | 38 | #define MAX_ROUTER_PORTS (6) /* Max. number of ports on a router */ |
39 | #include <asm/sn/fru.h> | 39 | #include <asm/sn/fru.h> |
40 | //#include <sys/graph.h> | 40 | //#include <sys/graph.h> |
41 | //#include <sys/xtalk/xbow.h> | 41 | //#include <sys/xtalk/xbow.h> |
@@ -63,14 +63,14 @@ | |||
63 | 63 | ||
64 | typedef u64 nic_t; | 64 | typedef u64 nic_t; |
65 | 65 | ||
66 | #define KLCFGINFO_MAGIC 0xbeedbabe | 66 | #define KLCFGINFO_MAGIC 0xbeedbabe |
67 | 67 | ||
68 | typedef s32 klconf_off_t; | 68 | typedef s32 klconf_off_t; |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * Some IMPORTANT OFFSETS. These are the offsets on all NODES. | 71 | * Some IMPORTANT OFFSETS. These are the offsets on all NODES. |
72 | */ | 72 | */ |
73 | #define MAX_MODULE_ID 255 | 73 | #define MAX_MODULE_ID 255 |
74 | #define SIZE_PAD 4096 /* 4k padding for structures */ | 74 | #define SIZE_PAD 4096 /* 4k padding for structures */ |
75 | /* | 75 | /* |
76 | * 1 NODE brd, 2 Router brd (1 8p, 1 meta), 6 Widgets, | 76 | * 1 NODE brd, 2 Router brd (1 8p, 1 meta), 6 Widgets, |
@@ -86,25 +86,25 @@ typedef s32 klconf_off_t; | |||
86 | /* All bits in this field are currently used. Try the pad fields if | 86 | /* All bits in this field are currently used. Try the pad fields if |
87 | you need more flag bits */ | 87 | you need more flag bits */ |
88 | 88 | ||
89 | #define ENABLE_BOARD 0x01 | 89 | #define ENABLE_BOARD 0x01 |
90 | #define FAILED_BOARD 0x02 | 90 | #define FAILED_BOARD 0x02 |
91 | #define DUPLICATE_BOARD 0x04 /* Boards like midplanes/routers which | 91 | #define DUPLICATE_BOARD 0x04 /* Boards like midplanes/routers which |
92 | are discovered twice. Use one of them */ | 92 | are discovered twice. Use one of them */ |
93 | #define VISITED_BOARD 0x08 /* Used for compact hub numbering. */ | 93 | #define VISITED_BOARD 0x08 /* Used for compact hub numbering. */ |
94 | #define LOCAL_MASTER_IO6 0x10 /* master io6 for that node */ | 94 | #define LOCAL_MASTER_IO6 0x10 /* master io6 for that node */ |
95 | #define GLOBAL_MASTER_IO6 0x20 | 95 | #define GLOBAL_MASTER_IO6 0x20 |
96 | #define THIRD_NIC_PRESENT 0x40 /* for future use */ | 96 | #define THIRD_NIC_PRESENT 0x40 /* for future use */ |
97 | #define SECOND_NIC_PRESENT 0x80 /* addons like MIO are present */ | 97 | #define SECOND_NIC_PRESENT 0x80 /* addons like MIO are present */ |
98 | 98 | ||
99 | /* klinfo->flags fields */ | 99 | /* klinfo->flags fields */ |
100 | 100 | ||
101 | #define KLINFO_ENABLE 0x01 /* This component is enabled */ | 101 | #define KLINFO_ENABLE 0x01 /* This component is enabled */ |
102 | #define KLINFO_FAILED 0x02 /* This component failed */ | 102 | #define KLINFO_FAILED 0x02 /* This component failed */ |
103 | #define KLINFO_DEVICE 0x04 /* This component is a device */ | 103 | #define KLINFO_DEVICE 0x04 /* This component is a device */ |
104 | #define KLINFO_VISITED 0x08 /* This component has been visited */ | 104 | #define KLINFO_VISITED 0x08 /* This component has been visited */ |
105 | #define KLINFO_CONTROLLER 0x10 /* This component is a device controller */ | 105 | #define KLINFO_CONTROLLER 0x10 /* This component is a device controller */ |
106 | #define KLINFO_INSTALL 0x20 /* Install a driver */ | 106 | #define KLINFO_INSTALL 0x20 /* Install a driver */ |
107 | #define KLINFO_HEADLESS 0x40 /* Headless (or hubless) component */ | 107 | #define KLINFO_HEADLESS 0x40 /* Headless (or hubless) component */ |
108 | #define IS_CONSOLE_IOC3(i) ((((klinfo_t *)i)->flags) & KLINFO_INSTALL) | 108 | #define IS_CONSOLE_IOC3(i) ((((klinfo_t *)i)->flags) & KLINFO_INSTALL) |
109 | 109 | ||
110 | #define GB2 0x80000000 | 110 | #define GB2 0x80000000 |
@@ -116,30 +116,30 @@ typedef s32 klconf_off_t; | |||
116 | is used in the code to allocate various areas. | 116 | is used in the code to allocate various areas. |
117 | */ | 117 | */ |
118 | 118 | ||
119 | #define BOARD_STRUCT 0 | 119 | #define BOARD_STRUCT 0 |
120 | #define COMPONENT_STRUCT 1 | 120 | #define COMPONENT_STRUCT 1 |
121 | #define ERRINFO_STRUCT 2 | 121 | #define ERRINFO_STRUCT 2 |
122 | #define KLMALLOC_TYPE_MAX (ERRINFO_STRUCT + 1) | 122 | #define KLMALLOC_TYPE_MAX (ERRINFO_STRUCT + 1) |
123 | #define DEVICE_STRUCT 3 | 123 | #define DEVICE_STRUCT 3 |
124 | 124 | ||
125 | 125 | ||
126 | typedef struct console_s { | 126 | typedef struct console_s { |
127 | unsigned long uart_base; | 127 | unsigned long uart_base; |
128 | unsigned long config_base; | 128 | unsigned long config_base; |
129 | unsigned long memory_base; | 129 | unsigned long memory_base; |
130 | short baud; | 130 | short baud; |
131 | short flag; | 131 | short flag; |
132 | int type; | 132 | int type; |
133 | nasid_t nasid; | 133 | nasid_t nasid; |
134 | char wid; | 134 | char wid; |
135 | char npci; | 135 | char npci; |
136 | nic_t baseio_nic; | 136 | nic_t baseio_nic; |
137 | } console_t; | 137 | } console_t; |
138 | 138 | ||
139 | typedef struct klc_malloc_hdr { | 139 | typedef struct klc_malloc_hdr { |
140 | klconf_off_t km_base; | 140 | klconf_off_t km_base; |
141 | klconf_off_t km_limit; | 141 | klconf_off_t km_limit; |
142 | klconf_off_t km_current; | 142 | klconf_off_t km_current; |
143 | } klc_malloc_hdr_t; | 143 | } klc_malloc_hdr_t; |
144 | 144 | ||
145 | /* Functions/macros needed to use this structure */ | 145 | /* Functions/macros needed to use this structure */ |
@@ -148,7 +148,7 @@ typedef struct kl_config_hdr { | |||
148 | u64 ch_magic; /* set this to KLCFGINFO_MAGIC */ | 148 | u64 ch_magic; /* set this to KLCFGINFO_MAGIC */ |
149 | u32 ch_version; /* structure version number */ | 149 | u32 ch_version; /* structure version number */ |
150 | klconf_off_t ch_malloc_hdr_off; /* offset of ch_malloc_hdr */ | 150 | klconf_off_t ch_malloc_hdr_off; /* offset of ch_malloc_hdr */ |
151 | klconf_off_t ch_cons_off; /* offset of ch_cons */ | 151 | klconf_off_t ch_cons_off; /* offset of ch_cons */ |
152 | klconf_off_t ch_board_info; /* the link list of boards */ | 152 | klconf_off_t ch_board_info; /* the link list of boards */ |
153 | console_t ch_cons_info; /* address info of the console */ | 153 | console_t ch_cons_info; /* address info of the console */ |
154 | klc_malloc_hdr_t ch_malloc_hdr[KLMALLOC_TYPE_MAX]; | 154 | klc_malloc_hdr_t ch_malloc_hdr[KLMALLOC_TYPE_MAX]; |
@@ -157,27 +157,27 @@ typedef struct kl_config_hdr { | |||
157 | } kl_config_hdr_t; | 157 | } kl_config_hdr_t; |
158 | 158 | ||
159 | 159 | ||
160 | #define KL_CONFIG_HDR(_nasid) ((kl_config_hdr_t *)(KLCONFIG_ADDR(_nasid))) | 160 | #define KL_CONFIG_HDR(_nasid) ((kl_config_hdr_t *)(KLCONFIG_ADDR(_nasid))) |
161 | #define KL_CONFIG_INFO_OFFSET(_nasid) \ | 161 | #define KL_CONFIG_INFO_OFFSET(_nasid) \ |
162 | (KL_CONFIG_HDR(_nasid)->ch_board_info) | 162 | (KL_CONFIG_HDR(_nasid)->ch_board_info) |
163 | #define KL_CONFIG_INFO_SET_OFFSET(_nasid, _off) \ | 163 | #define KL_CONFIG_INFO_SET_OFFSET(_nasid, _off) \ |
164 | (KL_CONFIG_HDR(_nasid)->ch_board_info = (_off)) | 164 | (KL_CONFIG_HDR(_nasid)->ch_board_info = (_off)) |
165 | 165 | ||
166 | #define KL_CONFIG_INFO(_nasid) \ | 166 | #define KL_CONFIG_INFO(_nasid) \ |
167 | (lboard_t *)((KL_CONFIG_HDR(_nasid)->ch_board_info) ? \ | 167 | (lboard_t *)((KL_CONFIG_HDR(_nasid)->ch_board_info) ? \ |
168 | NODE_OFFSET_TO_K1((_nasid), KL_CONFIG_HDR(_nasid)->ch_board_info) : \ | 168 | NODE_OFFSET_TO_K1((_nasid), KL_CONFIG_HDR(_nasid)->ch_board_info) : \ |
169 | 0) | 169 | 0) |
170 | #define KL_CONFIG_MAGIC(_nasid) (KL_CONFIG_HDR(_nasid)->ch_magic) | 170 | #define KL_CONFIG_MAGIC(_nasid) (KL_CONFIG_HDR(_nasid)->ch_magic) |
171 | 171 | ||
172 | #define KL_CONFIG_CHECK_MAGIC(_nasid) \ | 172 | #define KL_CONFIG_CHECK_MAGIC(_nasid) \ |
173 | (KL_CONFIG_HDR(_nasid)->ch_magic == KLCFGINFO_MAGIC) | 173 | (KL_CONFIG_HDR(_nasid)->ch_magic == KLCFGINFO_MAGIC) |
174 | 174 | ||
175 | #define KL_CONFIG_HDR_INIT_MAGIC(_nasid) \ | 175 | #define KL_CONFIG_HDR_INIT_MAGIC(_nasid) \ |
176 | (KL_CONFIG_HDR(_nasid)->ch_magic = KLCFGINFO_MAGIC) | 176 | (KL_CONFIG_HDR(_nasid)->ch_magic = KLCFGINFO_MAGIC) |
177 | 177 | ||
178 | /* --- New Macros for the changed kl_config_hdr_t structure --- */ | 178 | /* --- New Macros for the changed kl_config_hdr_t structure --- */ |
179 | 179 | ||
180 | #define PTR_CH_MALLOC_HDR(_k) ((klc_malloc_hdr_t *)\ | 180 | #define PTR_CH_MALLOC_HDR(_k) ((klc_malloc_hdr_t *)\ |
181 | ((unsigned long)_k + (_k->ch_malloc_hdr_off))) | 181 | ((unsigned long)_k + (_k->ch_malloc_hdr_off))) |
182 | 182 | ||
183 | #define KL_CONFIG_CH_MALLOC_HDR(_n) PTR_CH_MALLOC_HDR(KL_CONFIG_HDR(_n)) | 183 | #define KL_CONFIG_CH_MALLOC_HDR(_n) PTR_CH_MALLOC_HDR(KL_CONFIG_HDR(_n)) |
@@ -190,29 +190,29 @@ typedef struct kl_config_hdr { | |||
190 | /* ------------------------------------------------------------- */ | 190 | /* ------------------------------------------------------------- */ |
191 | 191 | ||
192 | #define KL_CONFIG_INFO_START(_nasid) \ | 192 | #define KL_CONFIG_INFO_START(_nasid) \ |
193 | (klconf_off_t)(KLCONFIG_OFFSET(_nasid) + sizeof(kl_config_hdr_t)) | 193 | (klconf_off_t)(KLCONFIG_OFFSET(_nasid) + sizeof(kl_config_hdr_t)) |
194 | 194 | ||
195 | #define KL_CONFIG_BOARD_NASID(_brd) ((_brd)->brd_nasid) | 195 | #define KL_CONFIG_BOARD_NASID(_brd) ((_brd)->brd_nasid) |
196 | #define KL_CONFIG_BOARD_SET_NEXT(_brd, _off) ((_brd)->brd_next = (_off)) | 196 | #define KL_CONFIG_BOARD_SET_NEXT(_brd, _off) ((_brd)->brd_next = (_off)) |
197 | 197 | ||
198 | #define KL_CONFIG_DUPLICATE_BOARD(_brd) ((_brd)->brd_flags & DUPLICATE_BOARD) | 198 | #define KL_CONFIG_DUPLICATE_BOARD(_brd) ((_brd)->brd_flags & DUPLICATE_BOARD) |
199 | 199 | ||
200 | #define XBOW_PORT_TYPE_HUB(_xbowp, _link) \ | 200 | #define XBOW_PORT_TYPE_HUB(_xbowp, _link) \ |
201 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_HUB) | 201 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_HUB) |
202 | #define XBOW_PORT_TYPE_IO(_xbowp, _link) \ | 202 | #define XBOW_PORT_TYPE_IO(_xbowp, _link) \ |
203 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_IO) | 203 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_IO) |
204 | 204 | ||
205 | #define XBOW_PORT_IS_ENABLED(_xbowp, _link) \ | 205 | #define XBOW_PORT_IS_ENABLED(_xbowp, _link) \ |
206 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_ENABLE) | 206 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_ENABLE) |
207 | #define XBOW_PORT_NASID(_xbowp, _link) \ | 207 | #define XBOW_PORT_NASID(_xbowp, _link) \ |
208 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_nasid) | 208 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_nasid) |
209 | 209 | ||
210 | #define XBOW_PORT_IO 0x1 | 210 | #define XBOW_PORT_IO 0x1 |
211 | #define XBOW_PORT_HUB 0x2 | 211 | #define XBOW_PORT_HUB 0x2 |
212 | #define XBOW_PORT_ENABLE 0x4 | 212 | #define XBOW_PORT_ENABLE 0x4 |
213 | 213 | ||
214 | #define SN0_PORT_FENCE_SHFT 0 | 214 | #define SN0_PORT_FENCE_SHFT 0 |
215 | #define SN0_PORT_FENCE_MASK (1 << SN0_PORT_FENCE_SHFT) | 215 | #define SN0_PORT_FENCE_MASK (1 << SN0_PORT_FENCE_SHFT) |
216 | 216 | ||
217 | /* | 217 | /* |
218 | * The KLCONFIG area is organized as a LINKED LIST of BOARDs. A BOARD | 218 | * The KLCONFIG area is organized as a LINKED LIST of BOARDs. A BOARD |
@@ -242,28 +242,28 @@ typedef struct kl_config_hdr { | |||
242 | * | 242 | * |
243 | KLCONFIG | 243 | KLCONFIG |
244 | 244 | ||
245 | +------------+ +------------+ +------------+ +------------+ | 245 | +------------+ +------------+ +------------+ +------------+ |
246 | | lboard | +-->| lboard | +-->| rboard | +-->| lboard | | 246 | | lboard | +-->| lboard | +-->| rboard | +-->| lboard | |
247 | +------------+ | +------------+ | +------------+ | +------------+ | 247 | +------------+ | +------------+ | +------------+ | +------------+ |
248 | | board info | | | board info | | |errinfo,bptr| | | board info | | 248 | | board info | | | board info | | |errinfo,bptr| | | board info | |
249 | +------------+ | +------------+ | +------------+ | +------------+ | 249 | +------------+ | +------------+ | +------------+ | +------------+ |
250 | | offset |--+ | offset |--+ | offset |--+ |offset=NULL | | 250 | | offset |--+ | offset |--+ | offset |--+ |offset=NULL | |
251 | +------------+ +------------+ +------------+ +------------+ | 251 | +------------+ +------------+ +------------+ +------------+ |
252 | 252 | ||
253 | 253 | ||
254 | +------------+ | 254 | +------------+ |
255 | | board info | | 255 | | board info | |
256 | +------------+ +--------------------------------+ | 256 | +------------+ +--------------------------------+ |
257 | | compt 1 |------>| type, rev, diaginfo, size ... | (CPU) | 257 | | compt 1 |------>| type, rev, diaginfo, size ... | (CPU) |
258 | +------------+ +--------------------------------+ | 258 | +------------+ +--------------------------------+ |
259 | | compt 2 |--+ | 259 | | compt 2 |--+ |
260 | +------------+ | +--------------------------------+ | 260 | +------------+ | +--------------------------------+ |
261 | | ... | +--->| type, rev, diaginfo, size ... | (MEM_BANK) | 261 | | ... | +--->| type, rev, diaginfo, size ... | (MEM_BANK) |
262 | +------------+ +--------------------------------+ | 262 | +------------+ +--------------------------------+ |
263 | | errinfo |--+ | 263 | | errinfo |--+ |
264 | +------------+ | +--------------------------------+ | 264 | +------------+ | +--------------------------------+ |
265 | +--->|r/l brd errinfo,compt err flags | | 265 | +--->|r/l brd errinfo,compt err flags | |
266 | +--------------------------------+ | 266 | +--------------------------------+ |
267 | 267 | ||
268 | * | 268 | * |
269 | * Each BOARD consists of COMPONENTs and the BOARD structure has | 269 | * Each BOARD consists of COMPONENTs and the BOARD structure has |
@@ -311,7 +311,7 @@ typedef struct kl_config_hdr { | |||
311 | */ | 311 | */ |
312 | #define KL_CPU_R4000 0x1 /* Standard R4000 */ | 312 | #define KL_CPU_R4000 0x1 /* Standard R4000 */ |
313 | #define KL_CPU_TFP 0x2 /* TFP processor */ | 313 | #define KL_CPU_TFP 0x2 /* TFP processor */ |
314 | #define KL_CPU_R10000 0x3 /* R10000 (T5) */ | 314 | #define KL_CPU_R10000 0x3 /* R10000 (T5) */ |
315 | #define KL_CPU_NONE (-1) /* no cpu present in slot */ | 315 | #define KL_CPU_NONE (-1) /* no cpu present in slot */ |
316 | 316 | ||
317 | /* | 317 | /* |
@@ -320,13 +320,13 @@ typedef struct kl_config_hdr { | |||
320 | 320 | ||
321 | #define KLCLASS_MASK 0xf0 | 321 | #define KLCLASS_MASK 0xf0 |
322 | #define KLCLASS_NONE 0x00 | 322 | #define KLCLASS_NONE 0x00 |
323 | #define KLCLASS_NODE 0x10 /* CPU, Memory and HUB board */ | 323 | #define KLCLASS_NODE 0x10 /* CPU, Memory and HUB board */ |
324 | #define KLCLASS_CPU KLCLASS_NODE | 324 | #define KLCLASS_CPU KLCLASS_NODE |
325 | #define KLCLASS_IO 0x20 /* BaseIO, 4 ch SCSI, ethernet, FDDI | 325 | #define KLCLASS_IO 0x20 /* BaseIO, 4 ch SCSI, ethernet, FDDI |
326 | and the non-graphics widget boards */ | 326 | and the non-graphics widget boards */ |
327 | #define KLCLASS_ROUTER 0x30 /* Router board */ | 327 | #define KLCLASS_ROUTER 0x30 /* Router board */ |
328 | #define KLCLASS_MIDPLANE 0x40 /* We need to treat this as a board | 328 | #define KLCLASS_MIDPLANE 0x40 /* We need to treat this as a board |
329 | so that we can record error info */ | 329 | so that we can record error info */ |
330 | #define KLCLASS_GFX 0x50 /* graphics boards */ | 330 | #define KLCLASS_GFX 0x50 /* graphics boards */ |
331 | 331 | ||
332 | #define KLCLASS_PSEUDO_GFX 0x60 /* HDTV type cards that use a gfx | 332 | #define KLCLASS_PSEUDO_GFX 0x60 /* HDTV type cards that use a gfx |
@@ -336,7 +336,7 @@ typedef struct kl_config_hdr { | |||
336 | #define KLCLASS_MAX 7 /* Bump this if a new CLASS is added */ | 336 | #define KLCLASS_MAX 7 /* Bump this if a new CLASS is added */ |
337 | #define KLTYPE_MAX 10 /* Bump this if a new CLASS is added */ | 337 | #define KLTYPE_MAX 10 /* Bump this if a new CLASS is added */ |
338 | 338 | ||
339 | #define KLCLASS_UNKNOWN 0xf0 | 339 | #define KLCLASS_UNKNOWN 0xf0 |
340 | 340 | ||
341 | #define KLCLASS(_x) ((_x) & KLCLASS_MASK) | 341 | #define KLCLASS(_x) ((_x) & KLCLASS_MASK) |
342 | 342 | ||
@@ -353,36 +353,36 @@ typedef struct kl_config_hdr { | |||
353 | 353 | ||
354 | #define KLTYPE_WEIRDIO (KLCLASS_IO | 0x0) | 354 | #define KLTYPE_WEIRDIO (KLCLASS_IO | 0x0) |
355 | #define KLTYPE_BASEIO (KLCLASS_IO | 0x1) /* IOC3, SuperIO, Bridge, SCSI */ | 355 | #define KLTYPE_BASEIO (KLCLASS_IO | 0x1) /* IOC3, SuperIO, Bridge, SCSI */ |
356 | #define KLTYPE_IO6 KLTYPE_BASEIO /* Additional name */ | 356 | #define KLTYPE_IO6 KLTYPE_BASEIO /* Additional name */ |
357 | #define KLTYPE_4CHSCSI (KLCLASS_IO | 0x2) | 357 | #define KLTYPE_4CHSCSI (KLCLASS_IO | 0x2) |
358 | #define KLTYPE_MSCSI KLTYPE_4CHSCSI /* Additional name */ | 358 | #define KLTYPE_MSCSI KLTYPE_4CHSCSI /* Additional name */ |
359 | #define KLTYPE_ETHERNET (KLCLASS_IO | 0x3) | 359 | #define KLTYPE_ETHERNET (KLCLASS_IO | 0x3) |
360 | #define KLTYPE_MENET KLTYPE_ETHERNET /* Additional name */ | 360 | #define KLTYPE_MENET KLTYPE_ETHERNET /* Additional name */ |
361 | #define KLTYPE_FDDI (KLCLASS_IO | 0x4) | 361 | #define KLTYPE_FDDI (KLCLASS_IO | 0x4) |
362 | #define KLTYPE_UNUSED (KLCLASS_IO | 0x5) /* XXX UNUSED */ | 362 | #define KLTYPE_UNUSED (KLCLASS_IO | 0x5) /* XXX UNUSED */ |
363 | #define KLTYPE_HAROLD (KLCLASS_IO | 0x6) /* PCI SHOE BOX */ | 363 | #define KLTYPE_HAROLD (KLCLASS_IO | 0x6) /* PCI SHOE BOX */ |
364 | #define KLTYPE_PCI KLTYPE_HAROLD | 364 | #define KLTYPE_PCI KLTYPE_HAROLD |
365 | #define KLTYPE_VME (KLCLASS_IO | 0x7) /* Any 3rd party VME card */ | 365 | #define KLTYPE_VME (KLCLASS_IO | 0x7) /* Any 3rd party VME card */ |
366 | #define KLTYPE_MIO (KLCLASS_IO | 0x8) | 366 | #define KLTYPE_MIO (KLCLASS_IO | 0x8) |
367 | #define KLTYPE_FC (KLCLASS_IO | 0x9) | 367 | #define KLTYPE_FC (KLCLASS_IO | 0x9) |
368 | #define KLTYPE_LINC (KLCLASS_IO | 0xA) | 368 | #define KLTYPE_LINC (KLCLASS_IO | 0xA) |
369 | #define KLTYPE_TPU (KLCLASS_IO | 0xB) /* Tensor Processing Unit */ | 369 | #define KLTYPE_TPU (KLCLASS_IO | 0xB) /* Tensor Processing Unit */ |
370 | #define KLTYPE_GSN_A (KLCLASS_IO | 0xC) /* Main GSN board */ | 370 | #define KLTYPE_GSN_A (KLCLASS_IO | 0xC) /* Main GSN board */ |
371 | #define KLTYPE_GSN_B (KLCLASS_IO | 0xD) /* Auxiliary GSN board */ | 371 | #define KLTYPE_GSN_B (KLCLASS_IO | 0xD) /* Auxiliary GSN board */ |
372 | 372 | ||
373 | #define KLTYPE_GFX (KLCLASS_GFX | 0x0) /* unknown graphics type */ | 373 | #define KLTYPE_GFX (KLCLASS_GFX | 0x0) /* unknown graphics type */ |
374 | #define KLTYPE_GFX_KONA (KLCLASS_GFX | 0x1) /* KONA graphics on IP27 */ | 374 | #define KLTYPE_GFX_KONA (KLCLASS_GFX | 0x1) /* KONA graphics on IP27 */ |
375 | #define KLTYPE_GFX_MGRA (KLCLASS_GFX | 0x3) /* MGRAS graphics on IP27 */ | 375 | #define KLTYPE_GFX_MGRA (KLCLASS_GFX | 0x3) /* MGRAS graphics on IP27 */ |
376 | 376 | ||
377 | #define KLTYPE_WEIRDROUTER (KLCLASS_ROUTER | 0x0) | 377 | #define KLTYPE_WEIRDROUTER (KLCLASS_ROUTER | 0x0) |
378 | #define KLTYPE_ROUTER (KLCLASS_ROUTER | 0x1) | 378 | #define KLTYPE_ROUTER (KLCLASS_ROUTER | 0x1) |
379 | #define KLTYPE_ROUTER2 KLTYPE_ROUTER /* Obsolete! */ | 379 | #define KLTYPE_ROUTER2 KLTYPE_ROUTER /* Obsolete! */ |
380 | #define KLTYPE_NULL_ROUTER (KLCLASS_ROUTER | 0x2) | 380 | #define KLTYPE_NULL_ROUTER (KLCLASS_ROUTER | 0x2) |
381 | #define KLTYPE_META_ROUTER (KLCLASS_ROUTER | 0x3) | 381 | #define KLTYPE_META_ROUTER (KLCLASS_ROUTER | 0x3) |
382 | 382 | ||
383 | #define KLTYPE_WEIRDMIDPLANE (KLCLASS_MIDPLANE | 0x0) | 383 | #define KLTYPE_WEIRDMIDPLANE (KLCLASS_MIDPLANE | 0x0) |
384 | #define KLTYPE_MIDPLANE8 (KLCLASS_MIDPLANE | 0x1) /* 8 slot backplane */ | 384 | #define KLTYPE_MIDPLANE8 (KLCLASS_MIDPLANE | 0x1) /* 8 slot backplane */ |
385 | #define KLTYPE_MIDPLANE KLTYPE_MIDPLANE8 | 385 | #define KLTYPE_MIDPLANE KLTYPE_MIDPLANE8 |
386 | #define KLTYPE_PBRICK_XBOW (KLCLASS_MIDPLANE | 0x2) | 386 | #define KLTYPE_PBRICK_XBOW (KLCLASS_MIDPLANE | 0x2) |
387 | 387 | ||
388 | #define KLTYPE_IOBRICK (KLCLASS_IOBRICK | 0x0) | 388 | #define KLTYPE_IOBRICK (KLCLASS_IOBRICK | 0x0) |
@@ -398,11 +398,11 @@ typedef struct kl_config_hdr { | |||
398 | * When bringup started nic names had not standardized and so we | 398 | * When bringup started nic names had not standardized and so we |
399 | * had to hard code. (For people interested in history.) | 399 | * had to hard code. (For people interested in history.) |
400 | */ | 400 | */ |
401 | #define KLTYPE_XTHD (KLCLASS_PSEUDO_GFX | 0x9) | 401 | #define KLTYPE_XTHD (KLCLASS_PSEUDO_GFX | 0x9) |
402 | 402 | ||
403 | #define KLTYPE_UNKNOWN (KLCLASS_UNKNOWN | 0xf) | 403 | #define KLTYPE_UNKNOWN (KLCLASS_UNKNOWN | 0xf) |
404 | 404 | ||
405 | #define KLTYPE(_x) ((_x) & KLTYPE_MASK) | 405 | #define KLTYPE(_x) ((_x) & KLTYPE_MASK) |
406 | #define IS_MIO_PRESENT(l) ((l->brd_type == KLTYPE_BASEIO) && \ | 406 | #define IS_MIO_PRESENT(l) ((l->brd_type == KLTYPE_BASEIO) && \ |
407 | (l->brd_flags & SECOND_NIC_PRESENT)) | 407 | (l->brd_flags & SECOND_NIC_PRESENT)) |
408 | #define IS_MIO_IOC3(l, n) (IS_MIO_PRESENT(l) && (n > 2)) | 408 | #define IS_MIO_IOC3(l, n) (IS_MIO_PRESENT(l) && (n > 2)) |
@@ -416,33 +416,33 @@ typedef struct kl_config_hdr { | |||
416 | #define LOCAL_BOARD 1 | 416 | #define LOCAL_BOARD 1 |
417 | #define REMOTE_BOARD 2 | 417 | #define REMOTE_BOARD 2 |
418 | 418 | ||
419 | #define LBOARD_STRUCT_VERSION 2 | 419 | #define LBOARD_STRUCT_VERSION 2 |
420 | 420 | ||
421 | typedef struct lboard_s { | 421 | typedef struct lboard_s { |
422 | klconf_off_t brd_next; /* Next BOARD */ | 422 | klconf_off_t brd_next; /* Next BOARD */ |
423 | unsigned char struct_type; /* type of structure, local or remote */ | 423 | unsigned char struct_type; /* type of structure, local or remote */ |
424 | unsigned char brd_type; /* type+class */ | 424 | unsigned char brd_type; /* type+class */ |
425 | unsigned char brd_sversion; /* version of this structure */ | 425 | unsigned char brd_sversion; /* version of this structure */ |
426 | unsigned char brd_brevision; /* board revision */ | 426 | unsigned char brd_brevision; /* board revision */ |
427 | unsigned char brd_promver; /* board prom version, if any */ | 427 | unsigned char brd_promver; /* board prom version, if any */ |
428 | unsigned char brd_flags; /* Enabled, Disabled etc */ | 428 | unsigned char brd_flags; /* Enabled, Disabled etc */ |
429 | unsigned char brd_slot; /* slot number */ | 429 | unsigned char brd_slot; /* slot number */ |
430 | unsigned short brd_debugsw; /* Debug switches */ | 430 | unsigned short brd_debugsw; /* Debug switches */ |
431 | moduleid_t brd_module; /* module to which it belongs */ | 431 | moduleid_t brd_module; /* module to which it belongs */ |
432 | partid_t brd_partition; /* Partition number */ | 432 | partid_t brd_partition; /* Partition number */ |
433 | unsigned short brd_diagval; /* diagnostic value */ | 433 | unsigned short brd_diagval; /* diagnostic value */ |
434 | unsigned short brd_diagparm; /* diagnostic parameter */ | 434 | unsigned short brd_diagparm; /* diagnostic parameter */ |
435 | unsigned char brd_inventory; /* inventory history */ | 435 | unsigned char brd_inventory; /* inventory history */ |
436 | unsigned char brd_numcompts; /* Number of components */ | 436 | unsigned char brd_numcompts; /* Number of components */ |
437 | nic_t brd_nic; /* Number in CAN */ | 437 | nic_t brd_nic; /* Number in CAN */ |
438 | nasid_t brd_nasid; /* passed parameter */ | 438 | nasid_t brd_nasid; /* passed parameter */ |
439 | klconf_off_t brd_compts[MAX_COMPTS_PER_BRD]; /* pointers to COMPONENTS */ | 439 | klconf_off_t brd_compts[MAX_COMPTS_PER_BRD]; /* pointers to COMPONENTS */ |
440 | klconf_off_t brd_errinfo; /* Board's error information */ | 440 | klconf_off_t brd_errinfo; /* Board's error information */ |
441 | struct lboard_s *brd_parent; /* Logical parent for this brd */ | 441 | struct lboard_s *brd_parent; /* Logical parent for this brd */ |
442 | vertex_hdl_t brd_graph_link; /* vertex hdl to connect extern compts */ | 442 | vertex_hdl_t brd_graph_link; /* vertex hdl to connect extern compts */ |
443 | confidence_t brd_confidence; /* confidence that the board is bad */ | 443 | confidence_t brd_confidence; /* confidence that the board is bad */ |
444 | nasid_t brd_owner; /* who owns this board */ | 444 | nasid_t brd_owner; /* who owns this board */ |
445 | unsigned char brd_nic_flags; /* To handle 8 more NICs */ | 445 | unsigned char brd_nic_flags; /* To handle 8 more NICs */ |
446 | char brd_name[32]; | 446 | char brd_name[32]; |
447 | } lboard_t; | 447 | } lboard_t; |
448 | 448 | ||
@@ -456,23 +456,23 @@ typedef struct lboard_s { | |||
456 | 456 | ||
457 | #define KLCF_CLASS(_brd) KLCLASS((_brd)->brd_type) | 457 | #define KLCF_CLASS(_brd) KLCLASS((_brd)->brd_type) |
458 | #define KLCF_TYPE(_brd) KLTYPE((_brd)->brd_type) | 458 | #define KLCF_TYPE(_brd) KLTYPE((_brd)->brd_type) |
459 | #define KLCF_REMOTE(_brd) (((_brd)->struct_type & LOCAL_BOARD) ? 0 : 1) | 459 | #define KLCF_REMOTE(_brd) (((_brd)->struct_type & LOCAL_BOARD) ? 0 : 1) |
460 | #define KLCF_NUM_COMPS(_brd) ((_brd)->brd_numcompts) | 460 | #define KLCF_NUM_COMPS(_brd) ((_brd)->brd_numcompts) |
461 | #define KLCF_MODULE_ID(_brd) ((_brd)->brd_module) | 461 | #define KLCF_MODULE_ID(_brd) ((_brd)->brd_module) |
462 | 462 | ||
463 | #define KLCF_NEXT(_brd) \ | 463 | #define KLCF_NEXT(_brd) \ |
464 | ((_brd)->brd_next ? \ | 464 | ((_brd)->brd_next ? \ |
465 | (lboard_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), (_brd)->brd_next)):\ | 465 | (lboard_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), (_brd)->brd_next)):\ |
466 | NULL) | 466 | NULL) |
467 | #define KLCF_COMP(_brd, _ndx) \ | 467 | #define KLCF_COMP(_brd, _ndx) \ |
468 | (klinfo_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), \ | 468 | (klinfo_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), \ |
469 | (_brd)->brd_compts[(_ndx)])) | 469 | (_brd)->brd_compts[(_ndx)])) |
470 | 470 | ||
471 | #define KLCF_COMP_ERROR(_brd, _comp) \ | 471 | #define KLCF_COMP_ERROR(_brd, _comp) \ |
472 | (NODE_OFFSET_TO_K1(NASID_GET(_brd), (_comp)->errinfo)) | 472 | (NODE_OFFSET_TO_K1(NASID_GET(_brd), (_comp)->errinfo)) |
473 | 473 | ||
474 | #define KLCF_COMP_TYPE(_comp) ((_comp)->struct_type) | 474 | #define KLCF_COMP_TYPE(_comp) ((_comp)->struct_type) |
475 | #define KLCF_BRIDGE_W_ID(_comp) ((_comp)->physid) /* Widget ID */ | 475 | #define KLCF_BRIDGE_W_ID(_comp) ((_comp)->physid) /* Widget ID */ |
476 | 476 | ||
477 | 477 | ||
478 | 478 | ||
@@ -481,73 +481,73 @@ typedef struct lboard_s { | |||
481 | * component. | 481 | * component. |
482 | */ | 482 | */ |
483 | 483 | ||
484 | typedef struct klinfo_s { /* Generic info */ | 484 | typedef struct klinfo_s { /* Generic info */ |
485 | unsigned char struct_type; /* type of this structure */ | 485 | unsigned char struct_type; /* type of this structure */ |
486 | unsigned char struct_version; /* version of this structure */ | 486 | unsigned char struct_version; /* version of this structure */ |
487 | unsigned char flags; /* Enabled, disabled etc */ | 487 | unsigned char flags; /* Enabled, disabled etc */ |
488 | unsigned char revision; /* component revision */ | 488 | unsigned char revision; /* component revision */ |
489 | unsigned short diagval; /* result of diagnostics */ | 489 | unsigned short diagval; /* result of diagnostics */ |
490 | unsigned short diagparm; /* diagnostic parameter */ | 490 | unsigned short diagparm; /* diagnostic parameter */ |
491 | unsigned char inventory; /* previous inventory status */ | 491 | unsigned char inventory; /* previous inventory status */ |
492 | nic_t nic; /* MUst be aligned properly */ | 492 | nic_t nic; /* MUst be aligned properly */ |
493 | unsigned char physid; /* physical id of component */ | 493 | unsigned char physid; /* physical id of component */ |
494 | unsigned int virtid; /* virtual id as seen by system */ | 494 | unsigned int virtid; /* virtual id as seen by system */ |
495 | unsigned char widid; /* Widget id - if applicable */ | 495 | unsigned char widid; /* Widget id - if applicable */ |
496 | nasid_t nasid; /* node number - from parent */ | 496 | nasid_t nasid; /* node number - from parent */ |
497 | char pad1; /* pad out structure. */ | 497 | char pad1; /* pad out structure. */ |
498 | char pad2; /* pad out structure. */ | 498 | char pad2; /* pad out structure. */ |
499 | COMPONENT *arcs_compt; /* ptr to the arcs struct for ease*/ | 499 | COMPONENT *arcs_compt; /* ptr to the arcs struct for ease*/ |
500 | klconf_off_t errinfo; /* component specific errors */ | 500 | klconf_off_t errinfo; /* component specific errors */ |
501 | unsigned short pad3; /* pci fields have moved over to */ | 501 | unsigned short pad3; /* pci fields have moved over to */ |
502 | unsigned short pad4; /* klbri_t */ | 502 | unsigned short pad4; /* klbri_t */ |
503 | } klinfo_t ; | 503 | } klinfo_t ; |
504 | 504 | ||
505 | #define KLCONFIG_INFO_ENABLED(_i) ((_i)->flags & KLINFO_ENABLE) | 505 | #define KLCONFIG_INFO_ENABLED(_i) ((_i)->flags & KLINFO_ENABLE) |
506 | /* | 506 | /* |
507 | * Component structures. | 507 | * Component structures. |
508 | * Following are the currently identified components: | 508 | * Following are the currently identified components: |
509 | * CPU, HUB, MEM_BANK, | 509 | * CPU, HUB, MEM_BANK, |
510 | * XBOW(consists of 16 WIDGETs, each of which can be HUB or GRAPHICS or BRIDGE) | 510 | * XBOW(consists of 16 WIDGETs, each of which can be HUB or GRAPHICS or BRIDGE) |
511 | * BRIDGE, IOC3, SuperIO, SCSI, FDDI | 511 | * BRIDGE, IOC3, SuperIO, SCSI, FDDI |
512 | * ROUTER | 512 | * ROUTER |
513 | * GRAPHICS | 513 | * GRAPHICS |
514 | */ | 514 | */ |
515 | #define KLSTRUCT_UNKNOWN 0 | 515 | #define KLSTRUCT_UNKNOWN 0 |
516 | #define KLSTRUCT_CPU 1 | 516 | #define KLSTRUCT_CPU 1 |
517 | #define KLSTRUCT_HUB 2 | 517 | #define KLSTRUCT_HUB 2 |
518 | #define KLSTRUCT_MEMBNK 3 | 518 | #define KLSTRUCT_MEMBNK 3 |
519 | #define KLSTRUCT_XBOW 4 | 519 | #define KLSTRUCT_XBOW 4 |
520 | #define KLSTRUCT_BRI 5 | 520 | #define KLSTRUCT_BRI 5 |
521 | #define KLSTRUCT_IOC3 6 | 521 | #define KLSTRUCT_IOC3 6 |
522 | #define KLSTRUCT_PCI 7 | 522 | #define KLSTRUCT_PCI 7 |
523 | #define KLSTRUCT_VME 8 | 523 | #define KLSTRUCT_VME 8 |
524 | #define KLSTRUCT_ROU 9 | 524 | #define KLSTRUCT_ROU 9 |
525 | #define KLSTRUCT_GFX 10 | 525 | #define KLSTRUCT_GFX 10 |
526 | #define KLSTRUCT_SCSI 11 | 526 | #define KLSTRUCT_SCSI 11 |
527 | #define KLSTRUCT_FDDI 12 | 527 | #define KLSTRUCT_FDDI 12 |
528 | #define KLSTRUCT_MIO 13 | 528 | #define KLSTRUCT_MIO 13 |
529 | #define KLSTRUCT_DISK 14 | 529 | #define KLSTRUCT_DISK 14 |
530 | #define KLSTRUCT_TAPE 15 | 530 | #define KLSTRUCT_TAPE 15 |
531 | #define KLSTRUCT_CDROM 16 | 531 | #define KLSTRUCT_CDROM 16 |
532 | #define KLSTRUCT_HUB_UART 17 | 532 | #define KLSTRUCT_HUB_UART 17 |
533 | #define KLSTRUCT_IOC3ENET 18 | 533 | #define KLSTRUCT_IOC3ENET 18 |
534 | #define KLSTRUCT_IOC3UART 19 | 534 | #define KLSTRUCT_IOC3UART 19 |
535 | #define KLSTRUCT_UNUSED 20 /* XXX UNUSED */ | 535 | #define KLSTRUCT_UNUSED 20 /* XXX UNUSED */ |
536 | #define KLSTRUCT_IOC3PCKM 21 | 536 | #define KLSTRUCT_IOC3PCKM 21 |
537 | #define KLSTRUCT_RAD 22 | 537 | #define KLSTRUCT_RAD 22 |
538 | #define KLSTRUCT_HUB_TTY 23 | 538 | #define KLSTRUCT_HUB_TTY 23 |
539 | #define KLSTRUCT_IOC3_TTY 24 | 539 | #define KLSTRUCT_IOC3_TTY 24 |
540 | 540 | ||
541 | /* Early Access IO proms are compatible | 541 | /* Early Access IO proms are compatible |
542 | only with KLSTRUCT values up to 24. */ | 542 | only with KLSTRUCT values up to 24. */ |
543 | 543 | ||
544 | #define KLSTRUCT_FIBERCHANNEL 25 | 544 | #define KLSTRUCT_FIBERCHANNEL 25 |
545 | #define KLSTRUCT_MOD_SERIAL_NUM 26 | 545 | #define KLSTRUCT_MOD_SERIAL_NUM 26 |
546 | #define KLSTRUCT_IOC3MS 27 | 546 | #define KLSTRUCT_IOC3MS 27 |
547 | #define KLSTRUCT_TPU 28 | 547 | #define KLSTRUCT_TPU 28 |
548 | #define KLSTRUCT_GSN_A 29 | 548 | #define KLSTRUCT_GSN_A 29 |
549 | #define KLSTRUCT_GSN_B 30 | 549 | #define KLSTRUCT_GSN_B 30 |
550 | #define KLSTRUCT_XTHD 31 | 550 | #define KLSTRUCT_XTHD 31 |
551 | 551 | ||
552 | /* | 552 | /* |
553 | * These are the indices of various components within a lboard structure. | 553 | * These are the indices of various components within a lboard structure. |
@@ -583,7 +583,7 @@ typedef u64 *router_t; | |||
583 | * The port info in ip27_cfg area translates to a lboart_t in the | 583 | * The port info in ip27_cfg area translates to a lboart_t in the |
584 | * KLCONFIG area. But since KLCONFIG does not use pointers, lboart_t | 584 | * KLCONFIG area. But since KLCONFIG does not use pointers, lboart_t |
585 | * is stored in terms of a nasid and a offset from start of KLCONFIG | 585 | * is stored in terms of a nasid and a offset from start of KLCONFIG |
586 | * area on that nasid. | 586 | * area on that nasid. |
587 | */ | 587 | */ |
588 | typedef struct klport_s { | 588 | typedef struct klport_s { |
589 | nasid_t port_nasid; | 589 | nasid_t port_nasid; |
@@ -591,20 +591,20 @@ typedef struct klport_s { | |||
591 | klconf_off_t port_offset; | 591 | klconf_off_t port_offset; |
592 | } klport_t; | 592 | } klport_t; |
593 | 593 | ||
594 | typedef struct klcpu_s { /* CPU */ | 594 | typedef struct klcpu_s { /* CPU */ |
595 | klinfo_t cpu_info; | 595 | klinfo_t cpu_info; |
596 | unsigned short cpu_prid; /* Processor PRID value */ | 596 | unsigned short cpu_prid; /* Processor PRID value */ |
597 | unsigned short cpu_fpirr; /* FPU IRR value */ | 597 | unsigned short cpu_fpirr; /* FPU IRR value */ |
598 | unsigned short cpu_speed; /* Speed in MHZ */ | 598 | unsigned short cpu_speed; /* Speed in MHZ */ |
599 | unsigned short cpu_scachesz; /* secondary cache size in MB */ | 599 | unsigned short cpu_scachesz; /* secondary cache size in MB */ |
600 | unsigned short cpu_scachespeed;/* secondary cache speed in MHz */ | 600 | unsigned short cpu_scachespeed;/* secondary cache speed in MHz */ |
601 | } klcpu_t ; | 601 | } klcpu_t ; |
602 | 602 | ||
603 | #define CPU_STRUCT_VERSION 2 | 603 | #define CPU_STRUCT_VERSION 2 |
604 | 604 | ||
605 | typedef struct klhub_s { /* HUB */ | 605 | typedef struct klhub_s { /* HUB */ |
606 | klinfo_t hub_info; | 606 | klinfo_t hub_info; |
607 | unsigned int hub_flags; /* PCFG_HUB_xxx flags */ | 607 | unsigned int hub_flags; /* PCFG_HUB_xxx flags */ |
608 | klport_t hub_port; /* hub is connected to this */ | 608 | klport_t hub_port; /* hub is connected to this */ |
609 | nic_t hub_box_nic; /* nic of containing box */ | 609 | nic_t hub_box_nic; /* nic of containing box */ |
610 | klconf_off_t hub_mfg_nic; /* MFG NIC string */ | 610 | klconf_off_t hub_mfg_nic; /* MFG NIC string */ |
@@ -612,36 +612,36 @@ typedef struct klhub_s { /* HUB */ | |||
612 | } klhub_t ; | 612 | } klhub_t ; |
613 | 613 | ||
614 | typedef struct klhub_uart_s { /* HUB */ | 614 | typedef struct klhub_uart_s { /* HUB */ |
615 | klinfo_t hubuart_info; | 615 | klinfo_t hubuart_info; |
616 | unsigned int hubuart_flags; /* PCFG_HUB_xxx flags */ | 616 | unsigned int hubuart_flags; /* PCFG_HUB_xxx flags */ |
617 | nic_t hubuart_box_nic; /* nic of containing box */ | 617 | nic_t hubuart_box_nic; /* nic of containing box */ |
618 | } klhub_uart_t ; | 618 | } klhub_uart_t ; |
619 | 619 | ||
620 | #define MEMORY_STRUCT_VERSION 2 | 620 | #define MEMORY_STRUCT_VERSION 2 |
621 | 621 | ||
622 | typedef struct klmembnk_s { /* MEMORY BANK */ | 622 | typedef struct klmembnk_s { /* MEMORY BANK */ |
623 | klinfo_t membnk_info; | 623 | klinfo_t membnk_info; |
624 | short membnk_memsz; /* Total memory in megabytes */ | 624 | short membnk_memsz; /* Total memory in megabytes */ |
625 | short membnk_dimm_select; /* bank to physical addr mapping*/ | 625 | short membnk_dimm_select; /* bank to physical addr mapping*/ |
626 | short membnk_bnksz[MD_MEM_BANKS]; /* Memory bank sizes */ | 626 | short membnk_bnksz[MD_MEM_BANKS]; /* Memory bank sizes */ |
627 | short membnk_attr; | 627 | short membnk_attr; |
628 | } klmembnk_t ; | 628 | } klmembnk_t ; |
629 | 629 | ||
630 | #define KLCONFIG_MEMBNK_SIZE(_info, _bank) \ | 630 | #define KLCONFIG_MEMBNK_SIZE(_info, _bank) \ |
631 | ((_info)->membnk_bnksz[(_bank)]) | 631 | ((_info)->membnk_bnksz[(_bank)]) |
632 | 632 | ||
633 | 633 | ||
634 | #define MEMBNK_PREMIUM 1 | 634 | #define MEMBNK_PREMIUM 1 |
635 | #define KLCONFIG_MEMBNK_PREMIUM(_info, _bank) \ | 635 | #define KLCONFIG_MEMBNK_PREMIUM(_info, _bank) \ |
636 | ((_info)->membnk_attr & (MEMBNK_PREMIUM << (_bank))) | 636 | ((_info)->membnk_attr & (MEMBNK_PREMIUM << (_bank))) |
637 | 637 | ||
638 | #define MAX_SERIAL_NUM_SIZE 10 | 638 | #define MAX_SERIAL_NUM_SIZE 10 |
639 | 639 | ||
640 | typedef struct klmod_serial_num_s { | 640 | typedef struct klmod_serial_num_s { |
641 | klinfo_t snum_info; | 641 | klinfo_t snum_info; |
642 | union { | 642 | union { |
643 | char snum_str[MAX_SERIAL_NUM_SIZE]; | 643 | char snum_str[MAX_SERIAL_NUM_SIZE]; |
644 | unsigned long long snum_int; | 644 | unsigned long long snum_int; |
645 | } snum; | 645 | } snum; |
646 | } klmod_serial_num_t; | 646 | } klmod_serial_num_t; |
647 | 647 | ||
@@ -650,43 +650,43 @@ typedef struct klmod_serial_num_s { | |||
650 | serial number struct as a component without losing compatibility | 650 | serial number struct as a component without losing compatibility |
651 | between prom versions. */ | 651 | between prom versions. */ |
652 | 652 | ||
653 | #define GET_SNUM_COMP(_l) ((klmod_serial_num_t *)\ | 653 | #define GET_SNUM_COMP(_l) ((klmod_serial_num_t *)\ |
654 | KLCF_COMP(_l, _l->brd_numcompts)) | 654 | KLCF_COMP(_l, _l->brd_numcompts)) |
655 | 655 | ||
656 | #define MAX_XBOW_LINKS 16 | 656 | #define MAX_XBOW_LINKS 16 |
657 | 657 | ||
658 | typedef struct klxbow_s { /* XBOW */ | 658 | typedef struct klxbow_s { /* XBOW */ |
659 | klinfo_t xbow_info ; | 659 | klinfo_t xbow_info ; |
660 | klport_t xbow_port_info[MAX_XBOW_LINKS] ; /* Module number */ | 660 | klport_t xbow_port_info[MAX_XBOW_LINKS] ; /* Module number */ |
661 | int xbow_master_hub_link; | 661 | int xbow_master_hub_link; |
662 | /* type of brd connected+component struct ptr+flags */ | 662 | /* type of brd connected+component struct ptr+flags */ |
663 | } klxbow_t ; | 663 | } klxbow_t ; |
664 | 664 | ||
665 | #define MAX_PCI_SLOTS 8 | 665 | #define MAX_PCI_SLOTS 8 |
666 | 666 | ||
667 | typedef struct klpci_device_s { | 667 | typedef struct klpci_device_s { |
668 | s32 pci_device_id; /* 32 bits of vendor/device ID. */ | 668 | s32 pci_device_id; /* 32 bits of vendor/device ID. */ |
669 | s32 pci_device_pad; /* 32 bits of padding. */ | 669 | s32 pci_device_pad; /* 32 bits of padding. */ |
670 | } klpci_device_t; | 670 | } klpci_device_t; |
671 | 671 | ||
672 | #define BRIDGE_STRUCT_VERSION 2 | 672 | #define BRIDGE_STRUCT_VERSION 2 |
673 | 673 | ||
674 | typedef struct klbri_s { /* BRIDGE */ | 674 | typedef struct klbri_s { /* BRIDGE */ |
675 | klinfo_t bri_info ; | 675 | klinfo_t bri_info ; |
676 | unsigned char bri_eprominfo ; /* IO6prom connected to bridge */ | 676 | unsigned char bri_eprominfo ; /* IO6prom connected to bridge */ |
677 | unsigned char bri_bustype ; /* PCI/VME BUS bridge/GIO */ | 677 | unsigned char bri_bustype ; /* PCI/VME BUS bridge/GIO */ |
678 | pci_t pci_specific ; /* PCI Board config info */ | 678 | pci_t pci_specific ; /* PCI Board config info */ |
679 | klpci_device_t bri_devices[MAX_PCI_DEVS] ; /* PCI IDs */ | 679 | klpci_device_t bri_devices[MAX_PCI_DEVS] ; /* PCI IDs */ |
680 | klconf_off_t bri_mfg_nic ; | 680 | klconf_off_t bri_mfg_nic ; |
681 | } klbri_t ; | 681 | } klbri_t ; |
682 | 682 | ||
683 | #define MAX_IOC3_TTY 2 | 683 | #define MAX_IOC3_TTY 2 |
684 | 684 | ||
685 | typedef struct klioc3_s { /* IOC3 */ | 685 | typedef struct klioc3_s { /* IOC3 */ |
686 | klinfo_t ioc3_info ; | 686 | klinfo_t ioc3_info ; |
687 | unsigned char ioc3_ssram ; /* Info about ssram */ | 687 | unsigned char ioc3_ssram ; /* Info about ssram */ |
688 | unsigned char ioc3_nvram ; /* Info about nvram */ | 688 | unsigned char ioc3_nvram ; /* Info about nvram */ |
689 | klinfo_t ioc3_superio ; /* Info about superio */ | 689 | klinfo_t ioc3_superio ; /* Info about superio */ |
690 | klconf_off_t ioc3_tty_off ; | 690 | klconf_off_t ioc3_tty_off ; |
691 | klinfo_t ioc3_enet ; | 691 | klinfo_t ioc3_enet ; |
692 | klconf_off_t ioc3_enet_off ; | 692 | klconf_off_t ioc3_enet_off ; |
@@ -695,27 +695,27 @@ typedef struct klioc3_s { /* IOC3 */ | |||
695 | 695 | ||
696 | #define MAX_VME_SLOTS 8 | 696 | #define MAX_VME_SLOTS 8 |
697 | 697 | ||
698 | typedef struct klvmeb_s { /* VME BRIDGE - PCI CTLR */ | 698 | typedef struct klvmeb_s { /* VME BRIDGE - PCI CTLR */ |
699 | klinfo_t vmeb_info ; | 699 | klinfo_t vmeb_info ; |
700 | vmeb_t vmeb_specific ; | 700 | vmeb_t vmeb_specific ; |
701 | klconf_off_t vmeb_brdinfo[MAX_VME_SLOTS] ; /* VME Board config info */ | 701 | klconf_off_t vmeb_brdinfo[MAX_VME_SLOTS] ; /* VME Board config info */ |
702 | } klvmeb_t ; | 702 | } klvmeb_t ; |
703 | 703 | ||
704 | typedef struct klvmed_s { /* VME DEVICE - VME BOARD */ | 704 | typedef struct klvmed_s { /* VME DEVICE - VME BOARD */ |
705 | klinfo_t vmed_info ; | 705 | klinfo_t vmed_info ; |
706 | vmed_t vmed_specific ; | 706 | vmed_t vmed_specific ; |
707 | klconf_off_t vmed_brdinfo[MAX_VME_SLOTS] ; /* VME Board config info */ | 707 | klconf_off_t vmed_brdinfo[MAX_VME_SLOTS] ; /* VME Board config info */ |
708 | } klvmed_t ; | 708 | } klvmed_t ; |
709 | 709 | ||
710 | #define ROUTER_VECTOR_VERS 2 | 710 | #define ROUTER_VECTOR_VERS 2 |
711 | 711 | ||
712 | /* XXX - Don't we need the number of ports here?!? */ | 712 | /* XXX - Don't we need the number of ports here?!? */ |
713 | typedef struct klrou_s { /* ROUTER */ | 713 | typedef struct klrou_s { /* ROUTER */ |
714 | klinfo_t rou_info ; | 714 | klinfo_t rou_info ; |
715 | unsigned int rou_flags ; /* PCFG_ROUTER_xxx flags */ | 715 | unsigned int rou_flags ; /* PCFG_ROUTER_xxx flags */ |
716 | nic_t rou_box_nic ; /* nic of the containing module */ | 716 | nic_t rou_box_nic ; /* nic of the containing module */ |
717 | klport_t rou_port[MAX_ROUTER_PORTS + 1] ; /* array index 1 to 6 */ | 717 | klport_t rou_port[MAX_ROUTER_PORTS + 1] ; /* array index 1 to 6 */ |
718 | klconf_off_t rou_mfg_nic ; /* MFG NIC string */ | 718 | klconf_off_t rou_mfg_nic ; /* MFG NIC string */ |
719 | u64 rou_vector; /* vector from master node */ | 719 | u64 rou_vector; /* vector from master node */ |
720 | } klrou_t ; | 720 | } klrou_t ; |
721 | 721 | ||
@@ -732,30 +732,30 @@ typedef struct klrou_s { /* ROUTER */ | |||
732 | #define KLGFX_COOKIE 0x0c0de000 | 732 | #define KLGFX_COOKIE 0x0c0de000 |
733 | 733 | ||
734 | typedef struct klgfx_s { /* GRAPHICS Device */ | 734 | typedef struct klgfx_s { /* GRAPHICS Device */ |
735 | klinfo_t gfx_info; | 735 | klinfo_t gfx_info; |
736 | klconf_off_t old_gndevs; /* for compatibility with older proms */ | 736 | klconf_off_t old_gndevs; /* for compatibility with older proms */ |
737 | klconf_off_t old_gdoff0; /* for compatibility with older proms */ | 737 | klconf_off_t old_gdoff0; /* for compatibility with older proms */ |
738 | unsigned int cookie; /* for compatibility with older proms */ | 738 | unsigned int cookie; /* for compatibility with older proms */ |
739 | unsigned int moduleslot; | 739 | unsigned int moduleslot; |
740 | struct klgfx_s *gfx_next_pipe; | 740 | struct klgfx_s *gfx_next_pipe; |
741 | graphics_t gfx_specific; | 741 | graphics_t gfx_specific; |
742 | klconf_off_t pad0; /* for compatibility with older proms */ | 742 | klconf_off_t pad0; /* for compatibility with older proms */ |
743 | klconf_off_t gfx_mfg_nic; | 743 | klconf_off_t gfx_mfg_nic; |
744 | } klgfx_t; | 744 | } klgfx_t; |
745 | 745 | ||
746 | typedef struct klxthd_s { | 746 | typedef struct klxthd_s { |
747 | klinfo_t xthd_info ; | 747 | klinfo_t xthd_info ; |
748 | klconf_off_t xthd_mfg_nic ; /* MFG NIC string */ | 748 | klconf_off_t xthd_mfg_nic ; /* MFG NIC string */ |
749 | } klxthd_t ; | 749 | } klxthd_t ; |
750 | 750 | ||
751 | typedef struct kltpu_s { /* TPU board */ | 751 | typedef struct kltpu_s { /* TPU board */ |
752 | klinfo_t tpu_info ; | 752 | klinfo_t tpu_info ; |
753 | klconf_off_t tpu_mfg_nic ; /* MFG NIC string */ | 753 | klconf_off_t tpu_mfg_nic ; /* MFG NIC string */ |
754 | } kltpu_t ; | 754 | } kltpu_t ; |
755 | 755 | ||
756 | typedef struct klgsn_s { /* GSN board */ | 756 | typedef struct klgsn_s { /* GSN board */ |
757 | klinfo_t gsn_info ; | 757 | klinfo_t gsn_info ; |
758 | klconf_off_t gsn_mfg_nic ; /* MFG NIC string */ | 758 | klconf_off_t gsn_mfg_nic ; /* MFG NIC string */ |
759 | } klgsn_t ; | 759 | } klgsn_t ; |
760 | 760 | ||
761 | #define MAX_SCSI_DEVS 16 | 761 | #define MAX_SCSI_DEVS 16 |
@@ -767,57 +767,57 @@ typedef struct klgsn_s { /* GSN board */ | |||
767 | * that as the size to be klmalloced. | 767 | * that as the size to be klmalloced. |
768 | */ | 768 | */ |
769 | 769 | ||
770 | typedef struct klscsi_s { /* SCSI Controller */ | 770 | typedef struct klscsi_s { /* SCSI Controller */ |
771 | klinfo_t scsi_info ; | 771 | klinfo_t scsi_info ; |
772 | scsi_t scsi_specific ; | 772 | scsi_t scsi_specific ; |
773 | unsigned char scsi_numdevs ; | 773 | unsigned char scsi_numdevs ; |
774 | klconf_off_t scsi_devinfo[MAX_SCSI_DEVS] ; | 774 | klconf_off_t scsi_devinfo[MAX_SCSI_DEVS] ; |
775 | } klscsi_t ; | 775 | } klscsi_t ; |
776 | 776 | ||
777 | typedef struct klscdev_s { /* SCSI device */ | 777 | typedef struct klscdev_s { /* SCSI device */ |
778 | klinfo_t scdev_info ; | 778 | klinfo_t scdev_info ; |
779 | struct scsidisk_data *scdev_cfg ; /* driver fills up this */ | 779 | struct scsidisk_data *scdev_cfg ; /* driver fills up this */ |
780 | } klscdev_t ; | 780 | } klscdev_t ; |
781 | 781 | ||
782 | typedef struct klttydev_s { /* TTY device */ | 782 | typedef struct klttydev_s { /* TTY device */ |
783 | klinfo_t ttydev_info ; | 783 | klinfo_t ttydev_info ; |
784 | struct terminal_data *ttydev_cfg ; /* driver fills up this */ | 784 | struct terminal_data *ttydev_cfg ; /* driver fills up this */ |
785 | } klttydev_t ; | 785 | } klttydev_t ; |
786 | 786 | ||
787 | typedef struct klenetdev_s { /* ENET device */ | 787 | typedef struct klenetdev_s { /* ENET device */ |
788 | klinfo_t enetdev_info ; | 788 | klinfo_t enetdev_info ; |
789 | struct net_data *enetdev_cfg ; /* driver fills up this */ | 789 | struct net_data *enetdev_cfg ; /* driver fills up this */ |
790 | } klenetdev_t ; | 790 | } klenetdev_t ; |
791 | 791 | ||
792 | typedef struct klkbddev_s { /* KBD device */ | 792 | typedef struct klkbddev_s { /* KBD device */ |
793 | klinfo_t kbddev_info ; | 793 | klinfo_t kbddev_info ; |
794 | struct keyboard_data *kbddev_cfg ; /* driver fills up this */ | 794 | struct keyboard_data *kbddev_cfg ; /* driver fills up this */ |
795 | } klkbddev_t ; | 795 | } klkbddev_t ; |
796 | 796 | ||
797 | typedef struct klmsdev_s { /* mouse device */ | 797 | typedef struct klmsdev_s { /* mouse device */ |
798 | klinfo_t msdev_info ; | 798 | klinfo_t msdev_info ; |
799 | void *msdev_cfg ; | 799 | void *msdev_cfg ; |
800 | } klmsdev_t ; | 800 | } klmsdev_t ; |
801 | 801 | ||
802 | #define MAX_FDDI_DEVS 10 /* XXX Is this true */ | 802 | #define MAX_FDDI_DEVS 10 /* XXX Is this true */ |
803 | 803 | ||
804 | typedef struct klfddi_s { /* FDDI */ | 804 | typedef struct klfddi_s { /* FDDI */ |
805 | klinfo_t fddi_info ; | 805 | klinfo_t fddi_info ; |
806 | fddi_t fddi_specific ; | 806 | fddi_t fddi_specific ; |
807 | klconf_off_t fddi_devinfo[MAX_FDDI_DEVS] ; | 807 | klconf_off_t fddi_devinfo[MAX_FDDI_DEVS] ; |
808 | } klfddi_t ; | 808 | } klfddi_t ; |
809 | 809 | ||
810 | typedef struct klmio_s { /* MIO */ | 810 | typedef struct klmio_s { /* MIO */ |
811 | klinfo_t mio_info ; | 811 | klinfo_t mio_info ; |
812 | mio_t mio_specific ; | 812 | mio_t mio_specific ; |
813 | } klmio_t ; | 813 | } klmio_t ; |
814 | 814 | ||
815 | 815 | ||
816 | typedef union klcomp_s { | 816 | typedef union klcomp_s { |
817 | klcpu_t kc_cpu; | 817 | klcpu_t kc_cpu; |
818 | klhub_t kc_hub; | 818 | klhub_t kc_hub; |
819 | klmembnk_t kc_mem; | 819 | klmembnk_t kc_mem; |
820 | klxbow_t kc_xbow; | 820 | klxbow_t kc_xbow; |
821 | klbri_t kc_bri; | 821 | klbri_t kc_bri; |
822 | klioc3_t kc_ioc3; | 822 | klioc3_t kc_ioc3; |
823 | klvmeb_t kc_vmeb; | 823 | klvmeb_t kc_vmeb; |
@@ -831,11 +831,11 @@ typedef union klcomp_s { | |||
831 | klmod_serial_num_t kc_snum ; | 831 | klmod_serial_num_t kc_snum ; |
832 | } klcomp_t; | 832 | } klcomp_t; |
833 | 833 | ||
834 | typedef union kldev_s { /* for device structure allocation */ | 834 | typedef union kldev_s { /* for device structure allocation */ |
835 | klscdev_t kc_scsi_dev ; | 835 | klscdev_t kc_scsi_dev ; |
836 | klttydev_t kc_tty_dev ; | 836 | klttydev_t kc_tty_dev ; |
837 | klenetdev_t kc_enet_dev ; | 837 | klenetdev_t kc_enet_dev ; |
838 | klkbddev_t kc_kbd_dev ; | 838 | klkbddev_t kc_kbd_dev ; |
839 | } kldev_t ; | 839 | } kldev_t ; |
840 | 840 | ||
841 | /* Data structure interface routines. TBD */ | 841 | /* Data structure interface routines. TBD */ |
diff --git a/arch/mips/include/asm/sn/kldir.h b/arch/mips/include/asm/sn/kldir.h index 1327e12e9645..bfb3aec94539 100644 --- a/arch/mips/include/asm/sn/kldir.h +++ b/arch/mips/include/asm/sn/kldir.h | |||
@@ -16,8 +16,8 @@ | |||
16 | * The kldir memory area resides at a fixed place in each node's memory and | 16 | * The kldir memory area resides at a fixed place in each node's memory and |
17 | * provides pointers to most other IP27 memory areas. This allows us to | 17 | * provides pointers to most other IP27 memory areas. This allows us to |
18 | * resize and/or relocate memory areas at a later time without breaking all | 18 | * resize and/or relocate memory areas at a later time without breaking all |
19 | * firmware and kernels that use them. Indices in the array are | 19 | * firmware and kernels that use them. Indices in the array are |
20 | * permanently dedicated to areas listed below. Some memory areas (marked | 20 | * permanently dedicated to areas listed below. Some memory areas (marked |
21 | * below) reside at a permanently fixed location, but are included in the | 21 | * below) reside at a permanently fixed location, but are included in the |
22 | * directory for completeness. | 22 | * directory for completeness. |
23 | */ | 23 | */ |
@@ -28,98 +28,98 @@ | |||
28 | * The upper portion of the memory map applies during boot | 28 | * The upper portion of the memory map applies during boot |
29 | * only and is overwritten by IRIX/SYMMON. | 29 | * only and is overwritten by IRIX/SYMMON. |
30 | * | 30 | * |
31 | * MEMORY MAP PER NODE | 31 | * MEMORY MAP PER NODE |
32 | * | 32 | * |
33 | * 0x2000000 (32M) +-----------------------------------------+ | 33 | * 0x2000000 (32M) +-----------------------------------------+ |
34 | * | IO6 BUFFERS FOR FLASH ENET IOC3 | | 34 | * | IO6 BUFFERS FOR FLASH ENET IOC3 | |
35 | * 0x1F80000 (31.5M) +-----------------------------------------+ | 35 | * 0x1F80000 (31.5M) +-----------------------------------------+ |
36 | * | IO6 TEXT/DATA/BSS/stack | | 36 | * | IO6 TEXT/DATA/BSS/stack | |
37 | * 0x1C00000 (30M) +-----------------------------------------+ | 37 | * 0x1C00000 (30M) +-----------------------------------------+ |
38 | * | IO6 PROM DEBUG TEXT/DATA/BSS/stack | | 38 | * | IO6 PROM DEBUG TEXT/DATA/BSS/stack | |
39 | * 0x0800000 (28M) +-----------------------------------------+ | 39 | * 0x0800000 (28M) +-----------------------------------------+ |
40 | * | IP27 PROM TEXT/DATA/BSS/stack | | 40 | * | IP27 PROM TEXT/DATA/BSS/stack | |
41 | * 0x1B00000 (27M) +-----------------------------------------+ | 41 | * 0x1B00000 (27M) +-----------------------------------------+ |
42 | * | IP27 CFG | | 42 | * | IP27 CFG | |
43 | * 0x1A00000 (26M) +-----------------------------------------+ | 43 | * 0x1A00000 (26M) +-----------------------------------------+ |
44 | * | Graphics PROM | | 44 | * | Graphics PROM | |
45 | * 0x1800000 (24M) +-----------------------------------------+ | 45 | * 0x1800000 (24M) +-----------------------------------------+ |
46 | * | 3rd Party PROM drivers | | 46 | * | 3rd Party PROM drivers | |
47 | * 0x1600000 (22M) +-----------------------------------------+ | 47 | * 0x1600000 (22M) +-----------------------------------------+ |
48 | * | | | 48 | * | | |
49 | * | Free | | 49 | * | Free | |
50 | * | | | 50 | * | | |
51 | * +-----------------------------------------+ | 51 | * +-----------------------------------------+ |
52 | * | UNIX DEBUG Version | | 52 | * | UNIX DEBUG Version | |
53 | * 0x190000 (2M--) +-----------------------------------------+ | 53 | * 0x190000 (2M--) +-----------------------------------------+ |
54 | * | SYMMON | | 54 | * | SYMMON | |
55 | * | (For UNIX Debug only) | | 55 | * | (For UNIX Debug only) | |
56 | * 0x34000 (208K) +-----------------------------------------+ | 56 | * 0x34000 (208K) +-----------------------------------------+ |
57 | * | SYMMON STACK [NUM_CPU_PER_NODE] | | 57 | * | SYMMON STACK [NUM_CPU_PER_NODE] | |
58 | * | (For UNIX Debug only) | | 58 | * | (For UNIX Debug only) | |
59 | * 0x25000 (148K) +-----------------------------------------+ | 59 | * 0x25000 (148K) +-----------------------------------------+ |
60 | * | KLCONFIG - II (temp) | | 60 | * | KLCONFIG - II (temp) | |
61 | * | | | 61 | * | | |
62 | * | ---------------------------- | | 62 | * | ---------------------------- | |
63 | * | | | 63 | * | | |
64 | * | UNIX NON-DEBUG Version | | 64 | * | UNIX NON-DEBUG Version | |
65 | * 0x19000 (100K) +-----------------------------------------+ | 65 | * 0x19000 (100K) +-----------------------------------------+ |
66 | * | 66 | * |
67 | * | 67 | * |
68 | * The lower portion of the memory map contains information that is | 68 | * The lower portion of the memory map contains information that is |
69 | * permanent and is used by the IP27PROM, IO6PROM and IRIX. | 69 | * permanent and is used by the IP27PROM, IO6PROM and IRIX. |
70 | * | 70 | * |
71 | * 0x19000 (100K) +-----------------------------------------+ | 71 | * 0x19000 (100K) +-----------------------------------------+ |
72 | * | | | 72 | * | | |
73 | * | PI Error Spools (32K) | | 73 | * | PI Error Spools (32K) | |
74 | * | | | 74 | * | | |
75 | * 0x12000 (72K) +-----------------------------------------+ | 75 | * 0x12000 (72K) +-----------------------------------------+ |
76 | * | Unused | | 76 | * | Unused | |
77 | * 0x11c00 (71K) +-----------------------------------------+ | 77 | * 0x11c00 (71K) +-----------------------------------------+ |
78 | * | CPU 1 NMI Eframe area | | 78 | * | CPU 1 NMI Eframe area | |
79 | * 0x11a00 (70.5K) +-----------------------------------------+ | 79 | * 0x11a00 (70.5K) +-----------------------------------------+ |
80 | * | CPU 0 NMI Eframe area | | 80 | * | CPU 0 NMI Eframe area | |
81 | * 0x11800 (70K) +-----------------------------------------+ | 81 | * 0x11800 (70K) +-----------------------------------------+ |
82 | * | CPU 1 NMI Register save area | | 82 | * | CPU 1 NMI Register save area | |
83 | * 0x11600 (69.5K) +-----------------------------------------+ | 83 | * 0x11600 (69.5K) +-----------------------------------------+ |
84 | * | CPU 0 NMI Register save area | | 84 | * | CPU 0 NMI Register save area | |
85 | * 0x11400 (69K) +-----------------------------------------+ | 85 | * 0x11400 (69K) +-----------------------------------------+ |
86 | * | GDA (1k) | | 86 | * | GDA (1k) | |
87 | * 0x11000 (68K) +-----------------------------------------+ | 87 | * 0x11000 (68K) +-----------------------------------------+ |
88 | * | Early cache Exception stack | | 88 | * | Early cache Exception stack | |
89 | * | and/or | | 89 | * | and/or | |
90 | * | kernel/io6prom nmi registers | | 90 | * | kernel/io6prom nmi registers | |
91 | * 0x10800 (66k) +-----------------------------------------+ | 91 | * 0x10800 (66k) +-----------------------------------------+ |
92 | * | cache error eframe | | 92 | * | cache error eframe | |
93 | * 0x10400 (65K) +-----------------------------------------+ | 93 | * 0x10400 (65K) +-----------------------------------------+ |
94 | * | Exception Handlers (UALIAS copy) | | 94 | * | Exception Handlers (UALIAS copy) | |
95 | * 0x10000 (64K) +-----------------------------------------+ | 95 | * 0x10000 (64K) +-----------------------------------------+ |
96 | * | | | 96 | * | | |
97 | * | | | 97 | * | | |
98 | * | KLCONFIG - I (permanent) (48K) | | 98 | * | KLCONFIG - I (permanent) (48K) | |
99 | * | | | 99 | * | | |
100 | * | | | 100 | * | | |
101 | * | | | 101 | * | | |
102 | * 0x4000 (16K) +-----------------------------------------+ | 102 | * 0x4000 (16K) +-----------------------------------------+ |
103 | * | NMI Handler (Protected Page) | | 103 | * | NMI Handler (Protected Page) | |
104 | * 0x3000 (12K) +-----------------------------------------+ | 104 | * 0x3000 (12K) +-----------------------------------------+ |
105 | * | ARCS PVECTORS (master node only) | | 105 | * | ARCS PVECTORS (master node only) | |
106 | * 0x2c00 (11K) +-----------------------------------------+ | 106 | * 0x2c00 (11K) +-----------------------------------------+ |
107 | * | ARCS TVECTORS (master node only) | | 107 | * | ARCS TVECTORS (master node only) | |
108 | * 0x2800 (10K) +-----------------------------------------+ | 108 | * 0x2800 (10K) +-----------------------------------------+ |
109 | * | LAUNCH [NUM_CPU] | | 109 | * | LAUNCH [NUM_CPU] | |
110 | * 0x2400 (9K) +-----------------------------------------+ | 110 | * 0x2400 (9K) +-----------------------------------------+ |
111 | * | Low memory directory (KLDIR) | | 111 | * | Low memory directory (KLDIR) | |
112 | * 0x2000 (8K) +-----------------------------------------+ | 112 | * 0x2000 (8K) +-----------------------------------------+ |
113 | * | ARCS SPB (1K) | | 113 | * | ARCS SPB (1K) | |
114 | * 0x1000 (4K) +-----------------------------------------+ | 114 | * 0x1000 (4K) +-----------------------------------------+ |
115 | * | Early cache Exception stack | | 115 | * | Early cache Exception stack | |
116 | * | and/or | | 116 | * | and/or | |
117 | * | kernel/io6prom nmi registers | | 117 | * | kernel/io6prom nmi registers | |
118 | * 0x800 (2k) +-----------------------------------------+ | 118 | * 0x800 (2k) +-----------------------------------------+ |
119 | * | cache error eframe | | 119 | * | cache error eframe | |
120 | * 0x400 (1K) +-----------------------------------------+ | 120 | * 0x400 (1K) +-----------------------------------------+ |
121 | * | Exception Handlers | | 121 | * | Exception Handlers | |
122 | * 0x0 (0K) +-----------------------------------------+ | 122 | * 0x0 (0K) +-----------------------------------------+ |
123 | */ | 123 | */ |
124 | 124 | ||
125 | #ifdef __ASSEMBLY__ | 125 | #ifdef __ASSEMBLY__ |
@@ -202,13 +202,13 @@ | |||
202 | 202 | ||
203 | #ifndef __ASSEMBLY__ | 203 | #ifndef __ASSEMBLY__ |
204 | typedef struct kldir_ent_s { | 204 | typedef struct kldir_ent_s { |
205 | u64 magic; /* Indicates validity of entry */ | 205 | u64 magic; /* Indicates validity of entry */ |
206 | off_t offset; /* Offset from start of node space */ | 206 | off_t offset; /* Offset from start of node space */ |
207 | unsigned long pointer; /* Pointer to area in some cases */ | 207 | unsigned long pointer; /* Pointer to area in some cases */ |
208 | size_t size; /* Size in bytes */ | 208 | size_t size; /* Size in bytes */ |
209 | u64 count; /* Repeat count if array, 1 if not */ | 209 | u64 count; /* Repeat count if array, 1 if not */ |
210 | size_t stride; /* Stride if array, 0 if not */ | 210 | size_t stride; /* Stride if array, 0 if not */ |
211 | char rsvd[16]; /* Pad entry to 0x40 bytes */ | 211 | char rsvd[16]; /* Pad entry to 0x40 bytes */ |
212 | /* NOTE: These 16 bytes are used in the Partition KLDIR | 212 | /* NOTE: These 16 bytes are used in the Partition KLDIR |
213 | entry to store partition info. Refer to klpart.h for this. */ | 213 | entry to store partition info. Refer to klpart.h for this. */ |
214 | } kldir_ent_t; | 214 | } kldir_ent_t; |
diff --git a/arch/mips/include/asm/sn/launch.h b/arch/mips/include/asm/sn/launch.h index b7c2226312c6..04226d8d30c4 100644 --- a/arch/mips/include/asm/sn/launch.h +++ b/arch/mips/include/asm/sn/launch.h | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | * The master stores launch parameters in the launch structure | 20 | * The master stores launch parameters in the launch structure |
21 | * corresponding to a target processor that is in a slave loop, then sends | 21 | * corresponding to a target processor that is in a slave loop, then sends |
22 | * an interrupt to the slave processor. The slave calls the desired | 22 | * an interrupt to the slave processor. The slave calls the desired |
23 | * function, then returns to the slave loop. The master may poll or wait | 23 | * function, then returns to the slave loop. The master may poll or wait |
24 | * for the slaves to finish. | 24 | * for the slaves to finish. |
25 | * | 25 | * |
@@ -33,7 +33,7 @@ | |||
33 | #define LAUNCH_PADSZ 0xa0 | 33 | #define LAUNCH_PADSZ 0xa0 |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #define LAUNCH_OFF_MAGIC 0x00 /* Struct offsets for assembly */ | 36 | #define LAUNCH_OFF_MAGIC 0x00 /* Struct offsets for assembly */ |
37 | #define LAUNCH_OFF_BUSY 0x08 | 37 | #define LAUNCH_OFF_BUSY 0x08 |
38 | #define LAUNCH_OFF_CALL 0x10 | 38 | #define LAUNCH_OFF_CALL 0x10 |
39 | #define LAUNCH_OFF_CALLC 0x18 | 39 | #define LAUNCH_OFF_CALLC 0x18 |
@@ -44,7 +44,7 @@ | |||
44 | #define LAUNCH_OFF_BEVNORMAL 0x40 | 44 | #define LAUNCH_OFF_BEVNORMAL 0x40 |
45 | #define LAUNCH_OFF_BEVECC 0x48 | 45 | #define LAUNCH_OFF_BEVECC 0x48 |
46 | 46 | ||
47 | #define LAUNCH_STATE_DONE 0 /* Return value of LAUNCH_POLL */ | 47 | #define LAUNCH_STATE_DONE 0 /* Return value of LAUNCH_POLL */ |
48 | #define LAUNCH_STATE_SENT 1 | 48 | #define LAUNCH_STATE_SENT 1 |
49 | #define LAUNCH_STATE_RECD 2 | 49 | #define LAUNCH_STATE_RECD 2 |
50 | 50 | ||
@@ -65,16 +65,16 @@ typedef int launch_state_t; | |||
65 | typedef void (*launch_proc_t)(u64 call_parm); | 65 | typedef void (*launch_proc_t)(u64 call_parm); |
66 | 66 | ||
67 | typedef struct launch_s { | 67 | typedef struct launch_s { |
68 | volatile u64 magic; /* Magic number */ | 68 | volatile u64 magic; /* Magic number */ |
69 | volatile u64 busy; /* Slave currently active */ | 69 | volatile u64 busy; /* Slave currently active */ |
70 | volatile launch_proc_t call_addr; /* Func. for slave to call */ | 70 | volatile launch_proc_t call_addr; /* Func. for slave to call */ |
71 | volatile u64 call_addr_c; /* 1's complement of call_addr*/ | 71 | volatile u64 call_addr_c; /* 1's complement of call_addr*/ |
72 | volatile u64 call_parm; /* Single parm passed to call*/ | 72 | volatile u64 call_parm; /* Single parm passed to call*/ |
73 | volatile void *stack_addr; /* Stack pointer for slave function */ | 73 | volatile void *stack_addr; /* Stack pointer for slave function */ |
74 | volatile void *gp_addr; /* Global pointer for slave func. */ | 74 | volatile void *gp_addr; /* Global pointer for slave func. */ |
75 | volatile char *bevutlb;/* Address of bev utlb ex handler */ | 75 | volatile char *bevutlb;/* Address of bev utlb ex handler */ |
76 | volatile char *bevnormal;/*Address of bev normal ex handler */ | 76 | volatile char *bevnormal;/*Address of bev normal ex handler */ |
77 | volatile char *bevecc;/* Address of bev cache err handler */ | 77 | volatile char *bevecc;/* Address of bev cache err handler */ |
78 | volatile char pad[160]; /* Pad to LAUNCH_SIZEOF */ | 78 | volatile char pad[160]; /* Pad to LAUNCH_SIZEOF */ |
79 | } launch_t; | 79 | } launch_t; |
80 | 80 | ||
diff --git a/arch/mips/include/asm/sn/mapped_kernel.h b/arch/mips/include/asm/sn/mapped_kernel.h index 721496a0bb92..401f3b0eee17 100644 --- a/arch/mips/include/asm/sn/mapped_kernel.h +++ b/arch/mips/include/asm/sn/mapped_kernel.h | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | #endif /* CONFIG_MAPPED_KERNEL */ | 49 | #endif /* CONFIG_MAPPED_KERNEL */ |
50 | 50 | ||
51 | #define MAPPED_KERN_RO_TO_K0(x) PHYS_TO_K0(MAPPED_KERN_RO_TO_PHYS(x)) | 51 | #define MAPPED_KERN_RO_TO_K0(x) PHYS_TO_K0(MAPPED_KERN_RO_TO_PHYS(x)) |
52 | #define MAPPED_KERN_RW_TO_K0(x) PHYS_TO_K0(MAPPED_KERN_RW_TO_PHYS(x)) | 52 | #define MAPPED_KERN_RW_TO_K0(x) PHYS_TO_K0(MAPPED_KERN_RW_TO_PHYS(x)) |
53 | 53 | ||
54 | #endif /* __ASM_SN_MAPPED_KERNEL_H */ | 54 | #endif /* __ASM_SN_MAPPED_KERNEL_H */ |
diff --git a/arch/mips/include/asm/sn/nmi.h b/arch/mips/include/asm/sn/nmi.h index 1af49897d4e1..12ac210f12a1 100644 --- a/arch/mips/include/asm/sn/nmi.h +++ b/arch/mips/include/asm/sn/nmi.h | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | * The master stores launch parameters in the launch structure | 20 | * The master stores launch parameters in the launch structure |
21 | * corresponding to a target processor that is in a slave loop, then sends | 21 | * corresponding to a target processor that is in a slave loop, then sends |
22 | * an interrupt to the slave processor. The slave calls the desired | 22 | * an interrupt to the slave processor. The slave calls the desired |
23 | * function, followed by an optional rendezvous function, then returns to | 23 | * function, followed by an optional rendezvous function, then returns to |
24 | * the slave loop. The master does not wait for the slaves before | 24 | * the slave loop. The master does not wait for the slaves before |
25 | * returning. | 25 | * returning. |
@@ -31,7 +31,7 @@ | |||
31 | #define NMI_MAGIC 0x48414d4d455201 | 31 | #define NMI_MAGIC 0x48414d4d455201 |
32 | #define NMI_SIZEOF 0x40 | 32 | #define NMI_SIZEOF 0x40 |
33 | 33 | ||
34 | #define NMI_OFF_MAGIC 0x00 /* Struct offsets for assembly */ | 34 | #define NMI_OFF_MAGIC 0x00 /* Struct offsets for assembly */ |
35 | #define NMI_OFF_FLAGS 0x08 | 35 | #define NMI_OFF_FLAGS 0x08 |
36 | #define NMI_OFF_CALL 0x10 | 36 | #define NMI_OFF_CALL 0x10 |
37 | #define NMI_OFF_CALLC 0x18 | 37 | #define NMI_OFF_CALLC 0x18 |
@@ -53,8 +53,8 @@ | |||
53 | typedef struct nmi_s { | 53 | typedef struct nmi_s { |
54 | volatile unsigned long magic; /* Magic number */ | 54 | volatile unsigned long magic; /* Magic number */ |
55 | volatile unsigned long flags; /* Combination of flags above */ | 55 | volatile unsigned long flags; /* Combination of flags above */ |
56 | volatile void *call_addr; /* Routine for slave to call */ | 56 | volatile void *call_addr; /* Routine for slave to call */ |
57 | volatile void *call_addr_c; /* 1's complement of address */ | 57 | volatile void *call_addr_c; /* 1's complement of address */ |
58 | volatile void *call_parm; /* Single parm passed to call */ | 58 | volatile void *call_parm; /* Single parm passed to call */ |
59 | volatile unsigned long gmaster; /* Flag true only on global master*/ | 59 | volatile unsigned long gmaster; /* Flag true only on global master*/ |
60 | } nmi_t; | 60 | } nmi_t; |
diff --git a/arch/mips/include/asm/sn/sn0/addrs.h b/arch/mips/include/asm/sn/sn0/addrs.h index b06190093bbc..6b53070f400f 100644 --- a/arch/mips/include/asm/sn/sn0/addrs.h +++ b/arch/mips/include/asm/sn/sn0/addrs.h | |||
@@ -29,7 +29,7 @@ | |||
29 | * chapter of the Hub specification. | 29 | * chapter of the Hub specification. |
30 | * | 30 | * |
31 | * NOTE: This header file is included both by C and by assembler source | 31 | * NOTE: This header file is included both by C and by assembler source |
32 | * files. Please bracket any language-dependent definitions | 32 | * files. Please bracket any language-dependent definitions |
33 | * appropriately. | 33 | * appropriately. |
34 | */ | 34 | */ |
35 | 35 | ||
@@ -102,14 +102,14 @@ | |||
102 | 102 | ||
103 | #define BWIN_INDEX_BITS 3 | 103 | #define BWIN_INDEX_BITS 3 |
104 | #define BWIN_SIZE (UINT64_CAST 1 << BWIN_SIZE_BITS) | 104 | #define BWIN_SIZE (UINT64_CAST 1 << BWIN_SIZE_BITS) |
105 | #define BWIN_SIZEMASK (BWIN_SIZE - 1) | 105 | #define BWIN_SIZEMASK (BWIN_SIZE - 1) |
106 | #define BWIN_WIDGET_MASK 0x7 | 106 | #define BWIN_WIDGET_MASK 0x7 |
107 | #define NODE_BWIN_BASE0(nasid) (NODE_IO_BASE(nasid) + BWIN_SIZE) | 107 | #define NODE_BWIN_BASE0(nasid) (NODE_IO_BASE(nasid) + BWIN_SIZE) |
108 | #define NODE_BWIN_BASE(nasid, bigwin) (NODE_BWIN_BASE0(nasid) + \ | 108 | #define NODE_BWIN_BASE(nasid, bigwin) (NODE_BWIN_BASE0(nasid) + \ |
109 | (UINT64_CAST(bigwin) << BWIN_SIZE_BITS)) | 109 | (UINT64_CAST(bigwin) << BWIN_SIZE_BITS)) |
110 | 110 | ||
111 | #define BWIN_WIDGETADDR(addr) ((addr) & BWIN_SIZEMASK) | 111 | #define BWIN_WIDGETADDR(addr) ((addr) & BWIN_SIZEMASK) |
112 | #define BWIN_WINDOWNUM(addr) (((addr) >> BWIN_SIZE_BITS) & BWIN_WIDGET_MASK) | 112 | #define BWIN_WINDOWNUM(addr) (((addr) >> BWIN_SIZE_BITS) & BWIN_WIDGET_MASK) |
113 | /* | 113 | /* |
114 | * Verify if addr belongs to large window address of node with "nasid" | 114 | * Verify if addr belongs to large window address of node with "nasid" |
115 | * | 115 | * |
@@ -120,7 +120,7 @@ | |||
120 | * | 120 | * |
121 | */ | 121 | */ |
122 | 122 | ||
123 | #define NODE_BWIN_ADDR(nasid, addr) \ | 123 | #define NODE_BWIN_ADDR(nasid, addr) \ |
124 | (((addr) >= NODE_BWIN_BASE0(nasid)) && \ | 124 | (((addr) >= NODE_BWIN_BASE0(nasid)) && \ |
125 | ((addr) < (NODE_BWIN_BASE(nasid, HUB_NUM_BIG_WINDOW) + \ | 125 | ((addr) < (NODE_BWIN_BASE(nasid, HUB_NUM_BIG_WINDOW) + \ |
126 | BWIN_SIZE))) | 126 | BWIN_SIZE))) |
@@ -129,7 +129,7 @@ | |||
129 | * The following define the major position-independent aliases used | 129 | * The following define the major position-independent aliases used |
130 | * in SN0. | 130 | * in SN0. |
131 | * CALIAS -- Varies in size, points to the first n bytes of memory | 131 | * CALIAS -- Varies in size, points to the first n bytes of memory |
132 | * on the reader's node. | 132 | * on the reader's node. |
133 | */ | 133 | */ |
134 | 134 | ||
135 | #define CALIAS_BASE CAC_BASE | 135 | #define CALIAS_BASE CAC_BASE |
@@ -146,7 +146,7 @@ | |||
146 | 146 | ||
147 | #ifndef __ASSEMBLY__ | 147 | #ifndef __ASSEMBLY__ |
148 | #define KERN_NMI_ADDR(nasid, slice) \ | 148 | #define KERN_NMI_ADDR(nasid, slice) \ |
149 | TO_NODE_UNCAC((nasid), IP27_NMI_KREGS_OFFSET + \ | 149 | TO_NODE_UNCAC((nasid), IP27_NMI_KREGS_OFFSET + \ |
150 | (IP27_NMI_KREGS_CPU_SIZE * (slice))) | 150 | (IP27_NMI_KREGS_CPU_SIZE * (slice))) |
151 | #endif /* !__ASSEMBLY__ */ | 151 | #endif /* !__ASSEMBLY__ */ |
152 | 152 | ||
@@ -203,7 +203,7 @@ | |||
203 | 203 | ||
204 | #define IO6PROM_BASE PHYS_TO_K0(0x01c00000) | 204 | #define IO6PROM_BASE PHYS_TO_K0(0x01c00000) |
205 | #define IO6PROM_SIZE 0x400000 | 205 | #define IO6PROM_SIZE 0x400000 |
206 | #define IO6PROM_BASE_MAPPED (UNCAC_BASE | 0x11c00000) | 206 | #define IO6PROM_BASE_MAPPED (UNCAC_BASE | 0x11c00000) |
207 | #define IO6DPROM_BASE PHYS_TO_K0(0x01c00000) | 207 | #define IO6DPROM_BASE PHYS_TO_K0(0x01c00000) |
208 | #define IO6DPROM_SIZE 0x200000 | 208 | #define IO6DPROM_SIZE 0x200000 |
209 | 209 | ||
diff --git a/arch/mips/include/asm/sn/sn0/arch.h b/arch/mips/include/asm/sn/sn0/arch.h index f734f2007f24..425a67e6a947 100644 --- a/arch/mips/include/asm/sn/sn0/arch.h +++ b/arch/mips/include/asm/sn/sn0/arch.h | |||
@@ -12,23 +12,23 @@ | |||
12 | #define _ASM_SN_SN0_ARCH_H | 12 | #define _ASM_SN_SN0_ARCH_H |
13 | 13 | ||
14 | 14 | ||
15 | #ifndef SN0XXL /* 128 cpu SMP max */ | 15 | #ifndef SN0XXL /* 128 cpu SMP max */ |
16 | /* | 16 | /* |
17 | * This is the maximum number of nodes that can be part of a kernel. | 17 | * This is the maximum number of nodes that can be part of a kernel. |
18 | * Effectively, it's the maximum number of compact node ids (cnodeid_t). | 18 | * Effectively, it's the maximum number of compact node ids (cnodeid_t). |
19 | */ | 19 | */ |
20 | #define MAX_COMPACT_NODES 64 | 20 | #define MAX_COMPACT_NODES 64 |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * MAXCPUS refers to the maximum number of CPUs in a single kernel. | 23 | * MAXCPUS refers to the maximum number of CPUs in a single kernel. |
24 | * This is not necessarily the same as MAXNODES * CPUS_PER_NODE | 24 | * This is not necessarily the same as MAXNODES * CPUS_PER_NODE |
25 | */ | 25 | */ |
26 | #define MAXCPUS 128 | 26 | #define MAXCPUS 128 |
27 | 27 | ||
28 | #else /* SN0XXL system */ | 28 | #else /* SN0XXL system */ |
29 | 29 | ||
30 | #define MAX_COMPACT_NODES 128 | 30 | #define MAX_COMPACT_NODES 128 |
31 | #define MAXCPUS 256 | 31 | #define MAXCPUS 256 |
32 | 32 | ||
33 | #endif /* SN0XXL */ | 33 | #endif /* SN0XXL */ |
34 | 34 | ||
@@ -41,9 +41,9 @@ | |||
41 | /* | 41 | /* |
42 | * MAX_REGIONS refers to the maximum number of hardware partitioned regions. | 42 | * MAX_REGIONS refers to the maximum number of hardware partitioned regions. |
43 | */ | 43 | */ |
44 | #define MAX_REGIONS 64 | 44 | #define MAX_REGIONS 64 |
45 | #define MAX_NONPREMIUM_REGIONS 16 | 45 | #define MAX_NONPREMIUM_REGIONS 16 |
46 | #define MAX_PREMIUM_REGIONS MAX_REGIONS | 46 | #define MAX_PREMIUM_REGIONS MAX_REGIONS |
47 | 47 | ||
48 | /* | 48 | /* |
49 | * MAX_PARITIONS refers to the maximum number of logically defined | 49 | * MAX_PARITIONS refers to the maximum number of logically defined |
@@ -57,12 +57,12 @@ | |||
57 | * Slot constants for SN0 | 57 | * Slot constants for SN0 |
58 | */ | 58 | */ |
59 | #ifdef CONFIG_SGI_SN_N_MODE | 59 | #ifdef CONFIG_SGI_SN_N_MODE |
60 | #define MAX_MEM_SLOTS 16 /* max slots per node */ | 60 | #define MAX_MEM_SLOTS 16 /* max slots per node */ |
61 | #else /* !CONFIG_SGI_SN_N_MODE, assume CONFIG_SGI_SN_M_MODE */ | 61 | #else /* !CONFIG_SGI_SN_N_MODE, assume CONFIG_SGI_SN_M_MODE */ |
62 | #define MAX_MEM_SLOTS 32 /* max slots per node */ | 62 | #define MAX_MEM_SLOTS 32 /* max slots per node */ |
63 | #endif /* CONFIG_SGI_SN_M_MODE */ | 63 | #endif /* CONFIG_SGI_SN_M_MODE */ |
64 | 64 | ||
65 | #define SLOT_SHIFT (27) | 65 | #define SLOT_SHIFT (27) |
66 | #define SLOT_MIN_MEM_SIZE (32*1024*1024) | 66 | #define SLOT_MIN_MEM_SIZE (32*1024*1024) |
67 | 67 | ||
68 | #define CPUS_PER_NODE 2 /* CPUs on a single hub */ | 68 | #define CPUS_PER_NODE 2 /* CPUs on a single hub */ |
diff --git a/arch/mips/include/asm/sn/sn0/hub.h b/arch/mips/include/asm/sn/sn0/hub.h index 3e228f8e7969..d78dd76d5dcf 100644 --- a/arch/mips/include/asm/sn/sn0/hub.h +++ b/arch/mips/include/asm/sn/sn0/hub.h | |||
@@ -19,8 +19,8 @@ | |||
19 | #define HUB_REV_2_0 2 | 19 | #define HUB_REV_2_0 2 |
20 | #define HUB_REV_2_1 3 | 20 | #define HUB_REV_2_1 3 |
21 | #define HUB_REV_2_2 4 | 21 | #define HUB_REV_2_2 4 |
22 | #define HUB_REV_2_3 5 | 22 | #define HUB_REV_2_3 5 |
23 | #define HUB_REV_2_4 6 | 23 | #define HUB_REV_2_4 6 |
24 | 24 | ||
25 | #define MAX_HUB_PATH 80 | 25 | #define MAX_HUB_PATH 80 |
26 | 26 | ||
@@ -32,9 +32,9 @@ | |||
32 | //#include <asm/sn/sn0/hubcore.h> | 32 | //#include <asm/sn/sn0/hubcore.h> |
33 | 33 | ||
34 | /* Translation of uncached attributes */ | 34 | /* Translation of uncached attributes */ |
35 | #define UATTR_HSPEC 0 | 35 | #define UATTR_HSPEC 0 |
36 | #define UATTR_IO 1 | 36 | #define UATTR_IO 1 |
37 | #define UATTR_MSPEC 2 | 37 | #define UATTR_MSPEC 2 |
38 | #define UATTR_UNCAC 3 | 38 | #define UATTR_UNCAC 3 |
39 | 39 | ||
40 | #endif /* _ASM_SN_SN0_HUB_H */ | 40 | #endif /* _ASM_SN_SN0_HUB_H */ |
diff --git a/arch/mips/include/asm/sn/sn0/hubio.h b/arch/mips/include/asm/sn/sn0/hubio.h index 46286d8302a7..5998b13e9764 100644 --- a/arch/mips/include/asm/sn/sn0/hubio.h +++ b/arch/mips/include/asm/sn/sn0/hubio.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. | 8 | * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. |
9 | * Copyright (C) 1999 by Ralf Baechle | 9 | * Copyright (C) 1999 by Ralf Baechle |
10 | */ | 10 | */ |
11 | #ifndef _ASM_SGI_SN_SN0_HUBIO_H | 11 | #ifndef _ASM_SGI_SN_SN0_HUBIO_H |
12 | #define _ASM_SGI_SN_SN0_HUBIO_H | 12 | #define _ASM_SGI_SN_SN0_HUBIO_H |
13 | 13 | ||
14 | /* | 14 | /* |
15 | * Hub I/O interface registers | 15 | * Hub I/O interface registers |
@@ -22,7 +22,7 @@ | |||
22 | * Slightly friendlier names for some common registers. | 22 | * Slightly friendlier names for some common registers. |
23 | * The hardware definitions follow. | 23 | * The hardware definitions follow. |
24 | */ | 24 | */ |
25 | #define IIO_WIDGET IIO_WID /* Widget identification */ | 25 | #define IIO_WIDGET IIO_WID /* Widget identification */ |
26 | #define IIO_WIDGET_STAT IIO_WSTAT /* Widget status register */ | 26 | #define IIO_WIDGET_STAT IIO_WSTAT /* Widget status register */ |
27 | #define IIO_WIDGET_CTRL IIO_WCR /* Widget control register */ | 27 | #define IIO_WIDGET_CTRL IIO_WCR /* Widget control register */ |
28 | #define IIO_WIDGET_TOUT IIO_WRTO /* Widget request timeout */ | 28 | #define IIO_WIDGET_TOUT IIO_WRTO /* Widget request timeout */ |
@@ -37,21 +37,21 @@ | |||
37 | #define IIO_XTALKCC_TOUT IIO_IXCC /* Xtalk credit count timeout*/ | 37 | #define IIO_XTALKCC_TOUT IIO_IXCC /* Xtalk credit count timeout*/ |
38 | #define IIO_XTALKTT_TOUT IIO_IXTT /* Xtalk tail timeout */ | 38 | #define IIO_XTALKTT_TOUT IIO_IXTT /* Xtalk tail timeout */ |
39 | #define IIO_IO_ERR_CLR IIO_IECLR /* IO error clear */ | 39 | #define IIO_IO_ERR_CLR IIO_IECLR /* IO error clear */ |
40 | #define IIO_BTE_CRB_CNT IIO_IBCN /* IO BTE CRB count */ | 40 | #define IIO_BTE_CRB_CNT IIO_IBCN /* IO BTE CRB count */ |
41 | 41 | ||
42 | #define IIO_LLP_CSR_IS_UP 0x00002000 | 42 | #define IIO_LLP_CSR_IS_UP 0x00002000 |
43 | #define IIO_LLP_CSR_LLP_STAT_MASK 0x00003000 | 43 | #define IIO_LLP_CSR_LLP_STAT_MASK 0x00003000 |
44 | #define IIO_LLP_CSR_LLP_STAT_SHFT 12 | 44 | #define IIO_LLP_CSR_LLP_STAT_SHFT 12 |
45 | 45 | ||
46 | /* key to IIO_PROTECT_OVRRD */ | 46 | /* key to IIO_PROTECT_OVRRD */ |
47 | #define IIO_PROTECT_OVRRD_KEY 0x53474972756c6573ull /* "SGIrules" */ | 47 | #define IIO_PROTECT_OVRRD_KEY 0x53474972756c6573ull /* "SGIrules" */ |
48 | 48 | ||
49 | /* BTE register names */ | 49 | /* BTE register names */ |
50 | #define IIO_BTE_STAT_0 IIO_IBLS_0 /* Also BTE length/status 0 */ | 50 | #define IIO_BTE_STAT_0 IIO_IBLS_0 /* Also BTE length/status 0 */ |
51 | #define IIO_BTE_SRC_0 IIO_IBSA_0 /* Also BTE source address 0 */ | 51 | #define IIO_BTE_SRC_0 IIO_IBSA_0 /* Also BTE source address 0 */ |
52 | #define IIO_BTE_DEST_0 IIO_IBDA_0 /* Also BTE dest. address 0 */ | 52 | #define IIO_BTE_DEST_0 IIO_IBDA_0 /* Also BTE dest. address 0 */ |
53 | #define IIO_BTE_CTRL_0 IIO_IBCT_0 /* Also BTE control/terminate 0 */ | 53 | #define IIO_BTE_CTRL_0 IIO_IBCT_0 /* Also BTE control/terminate 0 */ |
54 | #define IIO_BTE_NOTIFY_0 IIO_IBNA_0 /* Also BTE notification 0 */ | 54 | #define IIO_BTE_NOTIFY_0 IIO_IBNA_0 /* Also BTE notification 0 */ |
55 | #define IIO_BTE_INT_0 IIO_IBIA_0 /* Also BTE interrupt 0 */ | 55 | #define IIO_BTE_INT_0 IIO_IBIA_0 /* Also BTE interrupt 0 */ |
56 | #define IIO_BTE_OFF_0 0 /* Base offset from BTE 0 regs. */ | 56 | #define IIO_BTE_OFF_0 0 /* Base offset from BTE 0 regs. */ |
57 | #define IIO_BTE_OFF_1 IIO_IBLS_1 - IIO_IBLS_0 /* Offset from base to BTE 1 */ | 57 | #define IIO_BTE_OFF_1 IIO_IBLS_1 - IIO_IBLS_0 /* Offset from base to BTE 1 */ |
@@ -83,11 +83,11 @@ | |||
83 | #define IIO_WSTAT 0x400008 /* Widget status */ | 83 | #define IIO_WSTAT 0x400008 /* Widget status */ |
84 | #define IIO_WCR 0x400020 /* Widget control */ | 84 | #define IIO_WCR 0x400020 /* Widget control */ |
85 | 85 | ||
86 | #define IIO_WSTAT_ECRAZY (1ULL << 32) /* Hub gone crazy */ | 86 | #define IIO_WSTAT_ECRAZY (1ULL << 32) /* Hub gone crazy */ |
87 | #define IIO_WSTAT_TXRETRY (1ULL << 9) /* Hub Tx Retry timeout */ | 87 | #define IIO_WSTAT_TXRETRY (1ULL << 9) /* Hub Tx Retry timeout */ |
88 | #define IIO_WSTAT_TXRETRY_MASK (0x7F) | 88 | #define IIO_WSTAT_TXRETRY_MASK (0x7F) |
89 | #define IIO_WSTAT_TXRETRY_SHFT (16) | 89 | #define IIO_WSTAT_TXRETRY_SHFT (16) |
90 | #define IIO_WSTAT_TXRETRY_CNT(w) (((w) >> IIO_WSTAT_TXRETRY_SHFT) & \ | 90 | #define IIO_WSTAT_TXRETRY_CNT(w) (((w) >> IIO_WSTAT_TXRETRY_SHFT) & \ |
91 | IIO_WSTAT_TXRETRY_MASK) | 91 | IIO_WSTAT_TXRETRY_MASK) |
92 | 92 | ||
93 | #define IIO_ILAPR 0x400100 /* Local Access Protection */ | 93 | #define IIO_ILAPR 0x400100 /* Local Access Protection */ |
@@ -130,12 +130,12 @@ | |||
130 | #define IIO_IGFX_INIT(widget, node, cpu, valid) (\ | 130 | #define IIO_IGFX_INIT(widget, node, cpu, valid) (\ |
131 | (((widget) & IIO_IGFX_W_NUM_MASK) << IIO_IGFX_W_NUM_SHIFT) | \ | 131 | (((widget) & IIO_IGFX_W_NUM_MASK) << IIO_IGFX_W_NUM_SHIFT) | \ |
132 | (((node) & IIO_IGFX_N_NUM_MASK) << IIO_IGFX_N_NUM_SHIFT) | \ | 132 | (((node) & IIO_IGFX_N_NUM_MASK) << IIO_IGFX_N_NUM_SHIFT) | \ |
133 | (((cpu) & IIO_IGFX_P_NUM_MASK) << IIO_IGFX_P_NUM_SHIFT) | \ | 133 | (((cpu) & IIO_IGFX_P_NUM_MASK) << IIO_IGFX_P_NUM_SHIFT) | \ |
134 | (((valid) & IIO_IGFX_VLD_MASK) << IIO_IGFX_VLD_SHIFT) ) | 134 | (((valid) & IIO_IGFX_VLD_MASK) << IIO_IGFX_VLD_SHIFT) ) |
135 | 135 | ||
136 | /* Scratch registers (not all bits available) */ | 136 | /* Scratch registers (not all bits available) */ |
137 | #define IIO_SCRATCH_REG0 0x400150 | 137 | #define IIO_SCRATCH_REG0 0x400150 |
138 | #define IIO_SCRATCH_REG1 0x400158 | 138 | #define IIO_SCRATCH_REG1 0x400158 |
139 | #define IIO_SCRATCH_MASK 0x0000000f00f11fff | 139 | #define IIO_SCRATCH_MASK 0x0000000f00f11fff |
140 | 140 | ||
141 | #define IIO_SCRATCH_BIT0_0 0x0000000800000000 | 141 | #define IIO_SCRATCH_BIT0_0 0x0000000800000000 |
@@ -174,43 +174,43 @@ | |||
174 | typedef union hubii_wid_u { | 174 | typedef union hubii_wid_u { |
175 | u64 wid_reg_value; | 175 | u64 wid_reg_value; |
176 | struct { | 176 | struct { |
177 | u64 wid_rsvd: 32, /* unused */ | 177 | u64 wid_rsvd: 32, /* unused */ |
178 | wid_rev_num: 4, /* revision number */ | 178 | wid_rev_num: 4, /* revision number */ |
179 | wid_part_num: 16, /* the widget type: hub=c101 */ | 179 | wid_part_num: 16, /* the widget type: hub=c101 */ |
180 | wid_mfg_num: 11, /* Manufacturer id (IBM) */ | 180 | wid_mfg_num: 11, /* Manufacturer id (IBM) */ |
181 | wid_rsvd1: 1; /* Reserved */ | 181 | wid_rsvd1: 1; /* Reserved */ |
182 | } wid_fields_s; | 182 | } wid_fields_s; |
183 | } hubii_wid_t; | 183 | } hubii_wid_t; |
184 | 184 | ||
185 | 185 | ||
186 | typedef union hubii_wcr_u { | 186 | typedef union hubii_wcr_u { |
187 | u64 wcr_reg_value; | 187 | u64 wcr_reg_value; |
188 | struct { | 188 | struct { |
189 | u64 wcr_rsvd: 41, /* unused */ | 189 | u64 wcr_rsvd: 41, /* unused */ |
190 | wcr_e_thresh: 5, /* elasticity threshold */ | 190 | wcr_e_thresh: 5, /* elasticity threshold */ |
191 | wcr_dir_con: 1, /* widget direct connect */ | 191 | wcr_dir_con: 1, /* widget direct connect */ |
192 | wcr_f_bad_pkt: 1, /* Force bad llp pkt enable */ | 192 | wcr_f_bad_pkt: 1, /* Force bad llp pkt enable */ |
193 | wcr_xbar_crd: 3, /* LLP crossbar credit */ | 193 | wcr_xbar_crd: 3, /* LLP crossbar credit */ |
194 | wcr_rsvd1: 8, /* Reserved */ | 194 | wcr_rsvd1: 8, /* Reserved */ |
195 | wcr_tag_mode: 1, /* Tag mode */ | 195 | wcr_tag_mode: 1, /* Tag mode */ |
196 | wcr_widget_id: 4; /* LLP crossbar credit */ | 196 | wcr_widget_id: 4; /* LLP crossbar credit */ |
197 | } wcr_fields_s; | 197 | } wcr_fields_s; |
198 | } hubii_wcr_t; | 198 | } hubii_wcr_t; |
199 | 199 | ||
200 | #define iwcr_dir_con wcr_fields_s.wcr_dir_con | 200 | #define iwcr_dir_con wcr_fields_s.wcr_dir_con |
201 | 201 | ||
202 | typedef union hubii_wstat_u { | 202 | typedef union hubii_wstat_u { |
203 | u64 reg_value; | 203 | u64 reg_value; |
204 | struct { | 204 | struct { |
205 | u64 rsvd1: 31, | 205 | u64 rsvd1: 31, |
206 | crazy: 1, /* Crazy bit */ | 206 | crazy: 1, /* Crazy bit */ |
207 | rsvd2: 8, | 207 | rsvd2: 8, |
208 | llp_tx_cnt: 8, /* LLP Xmit retry counter */ | 208 | llp_tx_cnt: 8, /* LLP Xmit retry counter */ |
209 | rsvd3: 6, | 209 | rsvd3: 6, |
210 | tx_max_rtry: 1, /* LLP Retry Timeout Signal */ | 210 | tx_max_rtry: 1, /* LLP Retry Timeout Signal */ |
211 | rsvd4: 2, | 211 | rsvd4: 2, |
212 | xt_tail_to: 1, /* Xtalk Tail Timeout */ | 212 | xt_tail_to: 1, /* Xtalk Tail Timeout */ |
213 | xt_crd_to: 1, /* Xtalk Credit Timeout */ | 213 | xt_crd_to: 1, /* Xtalk Credit Timeout */ |
214 | pending: 4; /* Pending Requests */ | 214 | pending: 4; /* Pending Requests */ |
215 | } wstat_fields_s; | 215 | } wstat_fields_s; |
216 | } hubii_wstat_t; | 216 | } hubii_wstat_t; |
@@ -219,50 +219,50 @@ typedef union hubii_wstat_u { | |||
219 | typedef union hubii_ilcsr_u { | 219 | typedef union hubii_ilcsr_u { |
220 | u64 icsr_reg_value; | 220 | u64 icsr_reg_value; |
221 | struct { | 221 | struct { |
222 | u64 icsr_rsvd: 22, /* unused */ | 222 | u64 icsr_rsvd: 22, /* unused */ |
223 | icsr_max_burst: 10, /* max burst */ | 223 | icsr_max_burst: 10, /* max burst */ |
224 | icsr_rsvd4: 6, /* reserved */ | 224 | icsr_rsvd4: 6, /* reserved */ |
225 | icsr_max_retry: 10, /* max retry */ | 225 | icsr_max_retry: 10, /* max retry */ |
226 | icsr_rsvd3: 2, /* reserved */ | 226 | icsr_rsvd3: 2, /* reserved */ |
227 | icsr_lnk_stat: 2, /* link status */ | 227 | icsr_lnk_stat: 2, /* link status */ |
228 | icsr_bm8: 1, /* Bit mode 8 */ | 228 | icsr_bm8: 1, /* Bit mode 8 */ |
229 | icsr_llp_en: 1, /* LLP enable bit */ | 229 | icsr_llp_en: 1, /* LLP enable bit */ |
230 | icsr_rsvd2: 1, /* reserver */ | 230 | icsr_rsvd2: 1, /* reserver */ |
231 | icsr_wrm_reset: 1, /* Warm reset bit */ | 231 | icsr_wrm_reset: 1, /* Warm reset bit */ |
232 | icsr_rsvd1: 2, /* Data ready offset */ | 232 | icsr_rsvd1: 2, /* Data ready offset */ |
233 | icsr_null_to: 6; /* Null timeout */ | 233 | icsr_null_to: 6; /* Null timeout */ |
234 | 234 | ||
235 | } icsr_fields_s; | 235 | } icsr_fields_s; |
236 | } hubii_ilcsr_t; | 236 | } hubii_ilcsr_t; |
237 | 237 | ||
238 | 238 | ||
239 | typedef union hubii_iowa_u { | 239 | typedef union hubii_iowa_u { |
240 | u64 iowa_reg_value; | 240 | u64 iowa_reg_value; |
241 | struct { | 241 | struct { |
242 | u64 iowa_rsvd: 48, /* unused */ | 242 | u64 iowa_rsvd: 48, /* unused */ |
243 | iowa_wxoac: 8, /* xtalk widget access bits */ | 243 | iowa_wxoac: 8, /* xtalk widget access bits */ |
244 | iowa_rsvd1: 7, /* xtalk widget access bits */ | 244 | iowa_rsvd1: 7, /* xtalk widget access bits */ |
245 | iowa_w0oac: 1; /* xtalk widget access bits */ | 245 | iowa_w0oac: 1; /* xtalk widget access bits */ |
246 | } iowa_fields_s; | 246 | } iowa_fields_s; |
247 | } hubii_iowa_t; | 247 | } hubii_iowa_t; |
248 | 248 | ||
249 | typedef union hubii_iiwa_u { | 249 | typedef union hubii_iiwa_u { |
250 | u64 iiwa_reg_value; | 250 | u64 iiwa_reg_value; |
251 | struct { | 251 | struct { |
252 | u64 iiwa_rsvd: 48, /* unused */ | 252 | u64 iiwa_rsvd: 48, /* unused */ |
253 | iiwa_wxiac: 8, /* hub wid access bits */ | 253 | iiwa_wxiac: 8, /* hub wid access bits */ |
254 | iiwa_rsvd1: 7, /* reserved */ | 254 | iiwa_rsvd1: 7, /* reserved */ |
255 | iiwa_w0iac: 1; /* hub wid0 access */ | 255 | iiwa_w0iac: 1; /* hub wid0 access */ |
256 | } iiwa_fields_s; | 256 | } iiwa_fields_s; |
257 | } hubii_iiwa_t; | 257 | } hubii_iiwa_t; |
258 | 258 | ||
259 | typedef union hubii_illr_u { | 259 | typedef union hubii_illr_u { |
260 | u64 illr_reg_value; | 260 | u64 illr_reg_value; |
261 | struct { | 261 | struct { |
262 | u64 illr_rsvd: 32, /* unused */ | 262 | u64 illr_rsvd: 32, /* unused */ |
263 | illr_cb_cnt: 16, /* checkbit error count */ | 263 | illr_cb_cnt: 16, /* checkbit error count */ |
264 | illr_sn_cnt: 16; /* sequence number count */ | 264 | illr_sn_cnt: 16; /* sequence number count */ |
265 | } illr_fields_s; | 265 | } illr_fields_s; |
266 | } hubii_illr_t; | 266 | } hubii_illr_t; |
267 | 267 | ||
268 | /* The structures below are defined to extract and modify the ii | 268 | /* The structures below are defined to extract and modify the ii |
@@ -273,7 +273,7 @@ performance registers */ | |||
273 | typedef union io_perf_sel { | 273 | typedef union io_perf_sel { |
274 | u64 perf_sel_reg; | 274 | u64 perf_sel_reg; |
275 | struct { | 275 | struct { |
276 | u64 perf_rsvd : 48, | 276 | u64 perf_rsvd : 48, |
277 | perf_icct : 8, | 277 | perf_icct : 8, |
278 | perf_ippr1 : 4, | 278 | perf_ippr1 : 4, |
279 | perf_ippr0 : 4; | 279 | perf_ippr0 : 4; |
@@ -301,7 +301,7 @@ typedef union io_perf_cnt { | |||
301 | #define IIO_LLP_SN_MAX 0xffff | 301 | #define IIO_LLP_SN_MAX 0xffff |
302 | 302 | ||
303 | /* IO PRB Entries */ | 303 | /* IO PRB Entries */ |
304 | #define IIO_NUM_IPRBS (9) | 304 | #define IIO_NUM_IPRBS (9) |
305 | #define IIO_IOPRB_0 0x400198 /* PRB entry 0 */ | 305 | #define IIO_IOPRB_0 0x400198 /* PRB entry 0 */ |
306 | #define IIO_IOPRB_8 0x4001a0 /* PRB entry 8 */ | 306 | #define IIO_IOPRB_8 0x4001a0 /* PRB entry 8 */ |
307 | #define IIO_IOPRB_9 0x4001a8 /* PRB entry 9 */ | 307 | #define IIO_IOPRB_9 0x4001a8 /* PRB entry 9 */ |
@@ -318,21 +318,21 @@ typedef union io_perf_cnt { | |||
318 | #define IIO_IMEM 0x4001e8 /* Miscellaneous Enable Mask */ | 318 | #define IIO_IMEM 0x4001e8 /* Miscellaneous Enable Mask */ |
319 | #define IIO_IXTT 0x4001f0 /* Crosstalk tail timeout */ | 319 | #define IIO_IXTT 0x4001f0 /* Crosstalk tail timeout */ |
320 | #define IIO_IECLR 0x4001f8 /* IO error clear */ | 320 | #define IIO_IECLR 0x4001f8 /* IO error clear */ |
321 | #define IIO_IBCN 0x400200 /* IO BTE CRB count */ | 321 | #define IIO_IBCN 0x400200 /* IO BTE CRB count */ |
322 | 322 | ||
323 | /* | 323 | /* |
324 | * IIO_IMEM Register fields. | 324 | * IIO_IMEM Register fields. |
325 | */ | 325 | */ |
326 | #define IIO_IMEM_W0ESD 0x1 /* Widget 0 shut down due to error */ | 326 | #define IIO_IMEM_W0ESD 0x1 /* Widget 0 shut down due to error */ |
327 | #define IIO_IMEM_B0ESD (1 << 4) /* BTE 0 shut down due to error */ | 327 | #define IIO_IMEM_B0ESD (1 << 4) /* BTE 0 shut down due to error */ |
328 | #define IIO_IMEM_B1ESD (1 << 8) /* BTE 1 Shut down due to error */ | 328 | #define IIO_IMEM_B1ESD (1 << 8) /* BTE 1 Shut down due to error */ |
329 | 329 | ||
330 | /* PIO Read address Table Entries */ | 330 | /* PIO Read address Table Entries */ |
331 | #define IIO_IPCA 0x400300 /* PRB Counter adjust */ | 331 | #define IIO_IPCA 0x400300 /* PRB Counter adjust */ |
332 | #define IIO_NUM_PRTES 8 /* Total number of PRB table entries */ | 332 | #define IIO_NUM_PRTES 8 /* Total number of PRB table entries */ |
333 | #define IIO_PRTE_0 0x400308 /* PIO Read address table entry 0 */ | 333 | #define IIO_PRTE_0 0x400308 /* PIO Read address table entry 0 */ |
334 | #define IIO_PRTE(_x) (IIO_PRTE_0 + (8 * (_x))) | 334 | #define IIO_PRTE(_x) (IIO_PRTE_0 + (8 * (_x))) |
335 | #define IIO_WIDPRTE(x) IIO_PRTE(((x) - 8)) /* widget ID to its PRTE num */ | 335 | #define IIO_WIDPRTE(x) IIO_PRTE(((x) - 8)) /* widget ID to its PRTE num */ |
336 | #define IIO_IPDR 0x400388 /* PIO table entry deallocation */ | 336 | #define IIO_IPDR 0x400388 /* PIO table entry deallocation */ |
337 | #define IIO_ICDR 0x400390 /* CRB Entry Deallocation */ | 337 | #define IIO_ICDR 0x400390 /* CRB Entry Deallocation */ |
338 | #define IIO_IFDR 0x400398 /* IOQ FIFO Depth */ | 338 | #define IIO_IFDR 0x400398 /* IOQ FIFO Depth */ |
@@ -369,35 +369,35 @@ typedef union io_perf_cnt { | |||
369 | /* | 369 | /* |
370 | * IIO PIO Deallocation register field masks : (IIO_IPDR) | 370 | * IIO PIO Deallocation register field masks : (IIO_IPDR) |
371 | */ | 371 | */ |
372 | #define IIO_IPDR_PND (1 << 4) | 372 | #define IIO_IPDR_PND (1 << 4) |
373 | 373 | ||
374 | /* | 374 | /* |
375 | * IIO CRB deallocation register field masks: (IIO_ICDR) | 375 | * IIO CRB deallocation register field masks: (IIO_ICDR) |
376 | */ | 376 | */ |
377 | #define IIO_ICDR_PND (1 << 4) | 377 | #define IIO_ICDR_PND (1 << 4) |
378 | 378 | ||
379 | /* | 379 | /* |
380 | * IIO CRB control register Fields: IIO_ICCR | 380 | * IIO CRB control register Fields: IIO_ICCR |
381 | */ | 381 | */ |
382 | #define IIO_ICCR_PENDING (0x10000) | 382 | #define IIO_ICCR_PENDING (0x10000) |
383 | #define IIO_ICCR_CMD_MASK (0xFF) | 383 | #define IIO_ICCR_CMD_MASK (0xFF) |
384 | #define IIO_ICCR_CMD_SHFT (7) | 384 | #define IIO_ICCR_CMD_SHFT (7) |
385 | #define IIO_ICCR_CMD_NOP (0x0) /* No Op */ | 385 | #define IIO_ICCR_CMD_NOP (0x0) /* No Op */ |
386 | #define IIO_ICCR_CMD_WAKE (0x100) /* Reactivate CRB entry and process */ | 386 | #define IIO_ICCR_CMD_WAKE (0x100) /* Reactivate CRB entry and process */ |
387 | #define IIO_ICCR_CMD_TIMEOUT (0x200) /* Make CRB timeout & mark invalid */ | 387 | #define IIO_ICCR_CMD_TIMEOUT (0x200) /* Make CRB timeout & mark invalid */ |
388 | #define IIO_ICCR_CMD_EJECT (0x400) /* Contents of entry written to memory | 388 | #define IIO_ICCR_CMD_EJECT (0x400) /* Contents of entry written to memory |
389 | * via a WB | 389 | * via a WB |
390 | */ | 390 | */ |
391 | #define IIO_ICCR_CMD_FLUSH (0x800) | 391 | #define IIO_ICCR_CMD_FLUSH (0x800) |
392 | 392 | ||
393 | /* | 393 | /* |
394 | * CRB manipulation macros | 394 | * CRB manipulation macros |
395 | * The CRB macros are slightly complicated, since there are up to | 395 | * The CRB macros are slightly complicated, since there are up to |
396 | * four registers associated with each CRB entry. | 396 | * four registers associated with each CRB entry. |
397 | */ | 397 | */ |
398 | #define IIO_NUM_CRBS 15 /* Number of CRBs */ | 398 | #define IIO_NUM_CRBS 15 /* Number of CRBs */ |
399 | #define IIO_NUM_NORMAL_CRBS 12 /* Number of regular CRB entries */ | 399 | #define IIO_NUM_NORMAL_CRBS 12 /* Number of regular CRB entries */ |
400 | #define IIO_NUM_PC_CRBS 4 /* Number of partial cache CRBs */ | 400 | #define IIO_NUM_PC_CRBS 4 /* Number of partial cache CRBs */ |
401 | #define IIO_ICRB_OFFSET 8 | 401 | #define IIO_ICRB_OFFSET 8 |
402 | #define IIO_ICRB_0 0x400400 | 402 | #define IIO_ICRB_0 0x400400 |
403 | /* XXX - This is now tuneable: | 403 | /* XXX - This is now tuneable: |
@@ -405,9 +405,9 @@ typedef union io_perf_cnt { | |||
405 | */ | 405 | */ |
406 | 406 | ||
407 | #define IIO_ICRB_A(_x) (IIO_ICRB_0 + (4 * IIO_ICRB_OFFSET * (_x))) | 407 | #define IIO_ICRB_A(_x) (IIO_ICRB_0 + (4 * IIO_ICRB_OFFSET * (_x))) |
408 | #define IIO_ICRB_B(_x) (IIO_ICRB_A(_x) + 1*IIO_ICRB_OFFSET) | 408 | #define IIO_ICRB_B(_x) (IIO_ICRB_A(_x) + 1*IIO_ICRB_OFFSET) |
409 | #define IIO_ICRB_C(_x) (IIO_ICRB_A(_x) + 2*IIO_ICRB_OFFSET) | 409 | #define IIO_ICRB_C(_x) (IIO_ICRB_A(_x) + 2*IIO_ICRB_OFFSET) |
410 | #define IIO_ICRB_D(_x) (IIO_ICRB_A(_x) + 3*IIO_ICRB_OFFSET) | 410 | #define IIO_ICRB_D(_x) (IIO_ICRB_A(_x) + 3*IIO_ICRB_OFFSET) |
411 | 411 | ||
412 | /* XXX - IBUE register coming for Hub 2 */ | 412 | /* XXX - IBUE register coming for Hub 2 */ |
413 | 413 | ||
@@ -444,16 +444,16 @@ typedef union io_perf_cnt { | |||
444 | typedef union icrba_u { | 444 | typedef union icrba_u { |
445 | u64 reg_value; | 445 | u64 reg_value; |
446 | struct { | 446 | struct { |
447 | u64 resvd: 6, | 447 | u64 resvd: 6, |
448 | stall_bte0: 1, /* Stall BTE 0 */ | 448 | stall_bte0: 1, /* Stall BTE 0 */ |
449 | stall_bte1: 1, /* Stall BTE 1 */ | 449 | stall_bte1: 1, /* Stall BTE 1 */ |
450 | error: 1, /* CRB has an error */ | 450 | error: 1, /* CRB has an error */ |
451 | ecode: 3, /* Error Code */ | 451 | ecode: 3, /* Error Code */ |
452 | lnetuce: 1, /* SN0net Uncorrectable error */ | 452 | lnetuce: 1, /* SN0net Uncorrectable error */ |
453 | mark: 1, /* CRB Has been marked */ | 453 | mark: 1, /* CRB Has been marked */ |
454 | xerr: 1, /* Error bit set in xtalk header */ | 454 | xerr: 1, /* Error bit set in xtalk header */ |
455 | sidn: 4, /* SIDN field from xtalk */ | 455 | sidn: 4, /* SIDN field from xtalk */ |
456 | tnum: 5, /* TNUM field in xtalk */ | 456 | tnum: 5, /* TNUM field in xtalk */ |
457 | addr: 38, /* Address of request */ | 457 | addr: 38, /* Address of request */ |
458 | valid: 1, /* Valid status */ | 458 | valid: 1, /* Valid status */ |
459 | iow: 1; /* IO Write operation */ | 459 | iow: 1; /* IO Write operation */ |
@@ -467,15 +467,15 @@ typedef union h1_icrba_u { | |||
467 | u64 reg_value; | 467 | u64 reg_value; |
468 | 468 | ||
469 | struct { | 469 | struct { |
470 | u64 resvd: 6, | 470 | u64 resvd: 6, |
471 | unused: 1, /* Unused but RW!! */ | 471 | unused: 1, /* Unused but RW!! */ |
472 | error: 1, /* CRB has an error */ | 472 | error: 1, /* CRB has an error */ |
473 | ecode: 4, /* Error Code */ | 473 | ecode: 4, /* Error Code */ |
474 | lnetuce: 1, /* SN0net Uncorrectable error */ | 474 | lnetuce: 1, /* SN0net Uncorrectable error */ |
475 | mark: 1, /* CRB Has been marked */ | 475 | mark: 1, /* CRB Has been marked */ |
476 | xerr: 1, /* Error bit set in xtalk header */ | 476 | xerr: 1, /* Error bit set in xtalk header */ |
477 | sidn: 4, /* SIDN field from xtalk */ | 477 | sidn: 4, /* SIDN field from xtalk */ |
478 | tnum: 5, /* TNUM field in xtalk */ | 478 | tnum: 5, /* TNUM field in xtalk */ |
479 | addr: 38, /* Address of request */ | 479 | addr: 38, /* Address of request */ |
480 | valid: 1, /* Valid status */ | 480 | valid: 1, /* Valid status */ |
481 | iow: 1; /* IO Write operation */ | 481 | iow: 1; /* IO Write operation */ |
@@ -488,21 +488,21 @@ typedef union h1_icrba_u { | |||
488 | 488 | ||
489 | #endif /* !__ASSEMBLY__ */ | 489 | #endif /* !__ASSEMBLY__ */ |
490 | 490 | ||
491 | #define IIO_ICRB_ADDR_SHFT 2 /* Shift to get proper address */ | 491 | #define IIO_ICRB_ADDR_SHFT 2 /* Shift to get proper address */ |
492 | 492 | ||
493 | /* | 493 | /* |
494 | * values for "ecode" field | 494 | * values for "ecode" field |
495 | */ | 495 | */ |
496 | #define IIO_ICRB_ECODE_DERR 0 /* Directory error due to IIO access */ | 496 | #define IIO_ICRB_ECODE_DERR 0 /* Directory error due to IIO access */ |
497 | #define IIO_ICRB_ECODE_PERR 1 /* Poison error on IO access */ | 497 | #define IIO_ICRB_ECODE_PERR 1 /* Poison error on IO access */ |
498 | #define IIO_ICRB_ECODE_WERR 2 /* Write error by IIO access | 498 | #define IIO_ICRB_ECODE_WERR 2 /* Write error by IIO access |
499 | * e.g. WINV to a Read only line. | 499 | * e.g. WINV to a Read only line. |
500 | */ | 500 | */ |
501 | #define IIO_ICRB_ECODE_AERR 3 /* Access error caused by IIO access */ | 501 | #define IIO_ICRB_ECODE_AERR 3 /* Access error caused by IIO access */ |
502 | #define IIO_ICRB_ECODE_PWERR 4 /* Error on partial write */ | 502 | #define IIO_ICRB_ECODE_PWERR 4 /* Error on partial write */ |
503 | #define IIO_ICRB_ECODE_PRERR 5 /* Error on partial read */ | 503 | #define IIO_ICRB_ECODE_PRERR 5 /* Error on partial read */ |
504 | #define IIO_ICRB_ECODE_TOUT 6 /* CRB timeout before deallocating */ | 504 | #define IIO_ICRB_ECODE_TOUT 6 /* CRB timeout before deallocating */ |
505 | #define IIO_ICRB_ECODE_XTERR 7 /* Incoming xtalk pkt had error bit */ | 505 | #define IIO_ICRB_ECODE_XTERR 7 /* Incoming xtalk pkt had error bit */ |
506 | 506 | ||
507 | 507 | ||
508 | 508 | ||
@@ -513,10 +513,10 @@ typedef union h1_icrba_u { | |||
513 | typedef union icrbb_u { | 513 | typedef union icrbb_u { |
514 | u64 reg_value; | 514 | u64 reg_value; |
515 | struct { | 515 | struct { |
516 | u64 rsvd1: 5, | 516 | u64 rsvd1: 5, |
517 | btenum: 1, /* BTE to which entry belongs to */ | 517 | btenum: 1, /* BTE to which entry belongs to */ |
518 | cohtrans: 1, /* Coherent transaction */ | 518 | cohtrans: 1, /* Coherent transaction */ |
519 | xtsize: 2, /* Xtalk operation size | 519 | xtsize: 2, /* Xtalk operation size |
520 | * 0: Double Word | 520 | * 0: Double Word |
521 | * 1: 32 Bytes. | 521 | * 1: 32 Bytes. |
522 | * 2: 128 Bytes, | 522 | * 2: 128 Bytes, |
@@ -526,11 +526,11 @@ typedef union icrbb_u { | |||
526 | srcinit: 2, /* Source Initiator: | 526 | srcinit: 2, /* Source Initiator: |
527 | * See below for field values. | 527 | * See below for field values. |
528 | */ | 528 | */ |
529 | useold: 1, /* Use OLD command for processing */ | 529 | useold: 1, /* Use OLD command for processing */ |
530 | imsgtype: 2, /* Incoming message type | 530 | imsgtype: 2, /* Incoming message type |
531 | * see below for field values | 531 | * see below for field values |
532 | */ | 532 | */ |
533 | imsg: 8, /* Incoming message */ | 533 | imsg: 8, /* Incoming message */ |
534 | initator: 3, /* Initiator of original request | 534 | initator: 3, /* Initiator of original request |
535 | * See below for field values. | 535 | * See below for field values. |
536 | */ | 536 | */ |
@@ -538,12 +538,12 @@ typedef union icrbb_u { | |||
538 | * See below for field values. | 538 | * See below for field values. |
539 | */ | 539 | */ |
540 | rsvd2: 7, | 540 | rsvd2: 7, |
541 | ackcnt: 11, /* Invalidate ack count */ | 541 | ackcnt: 11, /* Invalidate ack count */ |
542 | resp: 1, /* data response given to processor */ | 542 | resp: 1, /* data response given to processor */ |
543 | ack: 1, /* indicates data ack received */ | 543 | ack: 1, /* indicates data ack received */ |
544 | hold: 1, /* entry is gathering inval acks */ | 544 | hold: 1, /* entry is gathering inval acks */ |
545 | wb_pend:1, /* waiting for writeback to complete */ | 545 | wb_pend:1, /* waiting for writeback to complete */ |
546 | intvn: 1, /* Intervention */ | 546 | intvn: 1, /* Intervention */ |
547 | stall_ib: 1, /* Stall Ibuf (from crosstalk) */ | 547 | stall_ib: 1, /* Stall Ibuf (from crosstalk) */ |
548 | stall_intr: 1; /* Stall internal interrupts */ | 548 | stall_intr: 1; /* Stall internal interrupts */ |
549 | } icrbb_field_s; | 549 | } icrbb_field_s; |
@@ -556,9 +556,9 @@ typedef union h1_icrbb_u { | |||
556 | u64 reg_value; | 556 | u64 reg_value; |
557 | struct { | 557 | struct { |
558 | u64 rsvd1: 5, | 558 | u64 rsvd1: 5, |
559 | btenum: 1, /* BTE to which entry belongs to */ | 559 | btenum: 1, /* BTE to which entry belongs to */ |
560 | cohtrans: 1, /* Coherent transaction */ | 560 | cohtrans: 1, /* Coherent transaction */ |
561 | xtsize: 2, /* Xtalk operation size | 561 | xtsize: 2, /* Xtalk operation size |
562 | * 0: Double Word | 562 | * 0: Double Word |
563 | * 1: 32 Bytes. | 563 | * 1: 32 Bytes. |
564 | * 2: 128 Bytes, | 564 | * 2: 128 Bytes, |
@@ -568,99 +568,99 @@ typedef union h1_icrbb_u { | |||
568 | srcinit: 2, /* Source Initiator: | 568 | srcinit: 2, /* Source Initiator: |
569 | * See below for field values. | 569 | * See below for field values. |
570 | */ | 570 | */ |
571 | useold: 1, /* Use OLD command for processing */ | 571 | useold: 1, /* Use OLD command for processing */ |
572 | imsgtype: 2, /* Incoming message type | 572 | imsgtype: 2, /* Incoming message type |
573 | * see below for field values | 573 | * see below for field values |
574 | */ | 574 | */ |
575 | imsg: 8, /* Incoming message */ | 575 | imsg: 8, /* Incoming message */ |
576 | initator: 3, /* Initiator of original request | 576 | initator: 3, /* Initiator of original request |
577 | * See below for field values. | 577 | * See below for field values. |
578 | */ | 578 | */ |
579 | rsvd2: 1, | 579 | rsvd2: 1, |
580 | pcache: 1, /* entry belongs to partial cache */ | 580 | pcache: 1, /* entry belongs to partial cache */ |
581 | reqtype: 5, /* Identifies type of request | 581 | reqtype: 5, /* Identifies type of request |
582 | * See below for field values. | 582 | * See below for field values. |
583 | */ | 583 | */ |
584 | stl_ib: 1, /* stall Ibus coming from xtalk */ | 584 | stl_ib: 1, /* stall Ibus coming from xtalk */ |
585 | stl_intr: 1, /* Stall internal interrupts */ | 585 | stl_intr: 1, /* Stall internal interrupts */ |
586 | stl_bte0: 1, /* Stall BTE 0 */ | 586 | stl_bte0: 1, /* Stall BTE 0 */ |
587 | stl_bte1: 1, /* Stall BTE 1 */ | 587 | stl_bte1: 1, /* Stall BTE 1 */ |
588 | intrvn: 1, /* Req was target of intervention */ | 588 | intrvn: 1, /* Req was target of intervention */ |
589 | ackcnt: 11, /* Invalidate ack count */ | 589 | ackcnt: 11, /* Invalidate ack count */ |
590 | resp: 1, /* data response given to processor */ | 590 | resp: 1, /* data response given to processor */ |
591 | ack: 1, /* indicates data ack received */ | 591 | ack: 1, /* indicates data ack received */ |
592 | hold: 1, /* entry is gathering inval acks */ | 592 | hold: 1, /* entry is gathering inval acks */ |
593 | wb_pend:1, /* waiting for writeback to complete */ | 593 | wb_pend:1, /* waiting for writeback to complete */ |
594 | sleep: 1, /* xtalk req sleeping till IO-sync */ | 594 | sleep: 1, /* xtalk req sleeping till IO-sync */ |
595 | pnd_reply: 1, /* replies not issed due to IOQ full */ | 595 | pnd_reply: 1, /* replies not issed due to IOQ full */ |
596 | pnd_req: 1; /* reqs not issued due to IOQ full */ | 596 | pnd_req: 1; /* reqs not issued due to IOQ full */ |
597 | } h1_icrbb_field_s; | 597 | } h1_icrbb_field_s; |
598 | } h1_icrbb_t; | 598 | } h1_icrbb_t; |
599 | 599 | ||
600 | 600 | ||
601 | #define b_imsgtype icrbb_field_s.imsgtype | 601 | #define b_imsgtype icrbb_field_s.imsgtype |
602 | #define b_btenum icrbb_field_s.btenum | 602 | #define b_btenum icrbb_field_s.btenum |
603 | #define b_cohtrans icrbb_field_s.cohtrans | 603 | #define b_cohtrans icrbb_field_s.cohtrans |
604 | #define b_xtsize icrbb_field_s.xtsize | 604 | #define b_xtsize icrbb_field_s.xtsize |
605 | #define b_srcnode icrbb_field_s.srcnode | 605 | #define b_srcnode icrbb_field_s.srcnode |
606 | #define b_srcinit icrbb_field_s.srcinit | 606 | #define b_srcinit icrbb_field_s.srcinit |
607 | #define b_imsgtype icrbb_field_s.imsgtype | 607 | #define b_imsgtype icrbb_field_s.imsgtype |
608 | #define b_imsg icrbb_field_s.imsg | 608 | #define b_imsg icrbb_field_s.imsg |
609 | #define b_initiator icrbb_field_s.initiator | 609 | #define b_initiator icrbb_field_s.initiator |
610 | 610 | ||
611 | #endif /* !__ASSEMBLY__ */ | 611 | #endif /* !__ASSEMBLY__ */ |
612 | 612 | ||
613 | /* | 613 | /* |
614 | * values for field xtsize | 614 | * values for field xtsize |
615 | */ | 615 | */ |
616 | #define IIO_ICRB_XTSIZE_DW 0 /* Xtalk operation size is 8 bytes */ | 616 | #define IIO_ICRB_XTSIZE_DW 0 /* Xtalk operation size is 8 bytes */ |
617 | #define IIO_ICRB_XTSIZE_32 1 /* Xtalk operation size is 32 bytes */ | 617 | #define IIO_ICRB_XTSIZE_32 1 /* Xtalk operation size is 32 bytes */ |
618 | #define IIO_ICRB_XTSIZE_128 2 /* Xtalk operation size is 128 bytes */ | 618 | #define IIO_ICRB_XTSIZE_128 2 /* Xtalk operation size is 128 bytes */ |
619 | 619 | ||
620 | /* | 620 | /* |
621 | * values for field srcinit | 621 | * values for field srcinit |
622 | */ | 622 | */ |
623 | #define IIO_ICRB_PROC0 0 /* Source of request is Proc 0 */ | 623 | #define IIO_ICRB_PROC0 0 /* Source of request is Proc 0 */ |
624 | #define IIO_ICRB_PROC1 1 /* Source of request is Proc 1 */ | 624 | #define IIO_ICRB_PROC1 1 /* Source of request is Proc 1 */ |
625 | #define IIO_ICRB_GB_REQ 2 /* Source is Guaranteed BW request */ | 625 | #define IIO_ICRB_GB_REQ 2 /* Source is Guaranteed BW request */ |
626 | #define IIO_ICRB_IO_REQ 3 /* Source is Normal IO request */ | 626 | #define IIO_ICRB_IO_REQ 3 /* Source is Normal IO request */ |
627 | 627 | ||
628 | /* | 628 | /* |
629 | * Values for field imsgtype | 629 | * Values for field imsgtype |
630 | */ | 630 | */ |
631 | #define IIO_ICRB_IMSGT_XTALK 0 /* Incoming Meessage from Xtalk */ | 631 | #define IIO_ICRB_IMSGT_XTALK 0 /* Incoming Meessage from Xtalk */ |
632 | #define IIO_ICRB_IMSGT_BTE 1 /* Incoming message from BTE */ | 632 | #define IIO_ICRB_IMSGT_BTE 1 /* Incoming message from BTE */ |
633 | #define IIO_ICRB_IMSGT_SN0NET 2 /* Incoming message from SN0 net */ | 633 | #define IIO_ICRB_IMSGT_SN0NET 2 /* Incoming message from SN0 net */ |
634 | #define IIO_ICRB_IMSGT_CRB 3 /* Incoming message from CRB ??? */ | 634 | #define IIO_ICRB_IMSGT_CRB 3 /* Incoming message from CRB ??? */ |
635 | 635 | ||
636 | /* | 636 | /* |
637 | * values for field initiator. | 637 | * values for field initiator. |
638 | */ | 638 | */ |
639 | #define IIO_ICRB_INIT_XTALK 0 /* Message originated in xtalk */ | 639 | #define IIO_ICRB_INIT_XTALK 0 /* Message originated in xtalk */ |
640 | #define IIO_ICRB_INIT_BTE0 0x1 /* Message originated in BTE 0 */ | 640 | #define IIO_ICRB_INIT_BTE0 0x1 /* Message originated in BTE 0 */ |
641 | #define IIO_ICRB_INIT_SN0NET 0x2 /* Message originated in SN0net */ | 641 | #define IIO_ICRB_INIT_SN0NET 0x2 /* Message originated in SN0net */ |
642 | #define IIO_ICRB_INIT_CRB 0x3 /* Message originated in CRB ? */ | 642 | #define IIO_ICRB_INIT_CRB 0x3 /* Message originated in CRB ? */ |
643 | #define IIO_ICRB_INIT_BTE1 0x5 /* MEssage originated in BTE 1 */ | 643 | #define IIO_ICRB_INIT_BTE1 0x5 /* MEssage originated in BTE 1 */ |
644 | 644 | ||
645 | /* | 645 | /* |
646 | * Values for field reqtype. | 646 | * Values for field reqtype. |
647 | */ | 647 | */ |
648 | /* XXX - Need to fix this for Hub 2 */ | 648 | /* XXX - Need to fix this for Hub 2 */ |
649 | #define IIO_ICRB_REQ_DWRD 0 /* Request type double word */ | 649 | #define IIO_ICRB_REQ_DWRD 0 /* Request type double word */ |
650 | #define IIO_ICRB_REQ_QCLRD 1 /* Request is Qrtr Caceh line Rd */ | 650 | #define IIO_ICRB_REQ_QCLRD 1 /* Request is Qrtr Caceh line Rd */ |
651 | #define IIO_ICRB_REQ_BLKRD 2 /* Request is block read */ | 651 | #define IIO_ICRB_REQ_BLKRD 2 /* Request is block read */ |
652 | #define IIO_ICRB_REQ_RSHU 6 /* Request is BTE block read */ | 652 | #define IIO_ICRB_REQ_RSHU 6 /* Request is BTE block read */ |
653 | #define IIO_ICRB_REQ_REXU 7 /* request is BTE Excl Read */ | 653 | #define IIO_ICRB_REQ_REXU 7 /* request is BTE Excl Read */ |
654 | #define IIO_ICRB_REQ_RDEX 8 /* Request is Read Exclusive */ | 654 | #define IIO_ICRB_REQ_RDEX 8 /* Request is Read Exclusive */ |
655 | #define IIO_ICRB_REQ_WINC 9 /* Request is Write Invalidate */ | 655 | #define IIO_ICRB_REQ_WINC 9 /* Request is Write Invalidate */ |
656 | #define IIO_ICRB_REQ_BWINV 10 /* Request is BTE Winv */ | 656 | #define IIO_ICRB_REQ_BWINV 10 /* Request is BTE Winv */ |
657 | #define IIO_ICRB_REQ_PIORD 11 /* Request is PIO read */ | 657 | #define IIO_ICRB_REQ_PIORD 11 /* Request is PIO read */ |
658 | #define IIO_ICRB_REQ_PIOWR 12 /* Request is PIO Write */ | 658 | #define IIO_ICRB_REQ_PIOWR 12 /* Request is PIO Write */ |
659 | #define IIO_ICRB_REQ_PRDM 13 /* Request is Fetch&Op */ | 659 | #define IIO_ICRB_REQ_PRDM 13 /* Request is Fetch&Op */ |
660 | #define IIO_ICRB_REQ_PWRM 14 /* Request is Store &Op */ | 660 | #define IIO_ICRB_REQ_PWRM 14 /* Request is Store &Op */ |
661 | #define IIO_ICRB_REQ_PTPWR 15 /* Request is Peer to peer */ | 661 | #define IIO_ICRB_REQ_PTPWR 15 /* Request is Peer to peer */ |
662 | #define IIO_ICRB_REQ_WB 16 /* Request is Write back */ | 662 | #define IIO_ICRB_REQ_WB 16 /* Request is Write back */ |
663 | #define IIO_ICRB_REQ_DEX 17 /* Retained DEX Cache line */ | 663 | #define IIO_ICRB_REQ_DEX 17 /* Retained DEX Cache line */ |
664 | 664 | ||
665 | /* | 665 | /* |
666 | * Fields in CRB Register C | 666 | * Fields in CRB Register C |
@@ -674,8 +674,8 @@ typedef union icrbc_s { | |||
674 | u64 rsvd: 6, | 674 | u64 rsvd: 6, |
675 | sleep: 1, | 675 | sleep: 1, |
676 | pricnt: 4, /* Priority count sent with Read req */ | 676 | pricnt: 4, /* Priority count sent with Read req */ |
677 | pripsc: 4, /* Priority Pre scalar */ | 677 | pripsc: 4, /* Priority Pre scalar */ |
678 | bteop: 1, /* BTE Operation */ | 678 | bteop: 1, /* BTE Operation */ |
679 | push_be: 34, /* Push address Byte enable | 679 | push_be: 34, /* Push address Byte enable |
680 | * Holds push addr, if CRB is for BTE | 680 | * Holds push addr, if CRB is for BTE |
681 | * If CRB belongs to Partial cache, | 681 | * If CRB belongs to Partial cache, |
@@ -684,20 +684,20 @@ typedef union icrbc_s { | |||
684 | */ | 684 | */ |
685 | suppl: 11, /* Supplemental field */ | 685 | suppl: 11, /* Supplemental field */ |
686 | barrop: 1, /* Barrier Op bit set in xtalk req */ | 686 | barrop: 1, /* Barrier Op bit set in xtalk req */ |
687 | doresp: 1, /* Xtalk req needs a response */ | 687 | doresp: 1, /* Xtalk req needs a response */ |
688 | gbr: 1; /* GBR bit set in xtalk packet */ | 688 | gbr: 1; /* GBR bit set in xtalk packet */ |
689 | } icrbc_field_s; | 689 | } icrbc_field_s; |
690 | } icrbc_t; | 690 | } icrbc_t; |
691 | 691 | ||
692 | #define c_pricnt icrbc_field_s.pricnt | 692 | #define c_pricnt icrbc_field_s.pricnt |
693 | #define c_pripsc icrbc_field_s.pripsc | 693 | #define c_pripsc icrbc_field_s.pripsc |
694 | #define c_bteop icrbc_field_s.bteop | 694 | #define c_bteop icrbc_field_s.bteop |
695 | #define c_bteaddr icrbc_field_s.push_be /* push_be field has 2 names */ | 695 | #define c_bteaddr icrbc_field_s.push_be /* push_be field has 2 names */ |
696 | #define c_benable icrbc_field_s.push_be /* push_be field has 2 names */ | 696 | #define c_benable icrbc_field_s.push_be /* push_be field has 2 names */ |
697 | #define c_suppl icrbc_field_s.suppl | 697 | #define c_suppl icrbc_field_s.suppl |
698 | #define c_barrop icrbc_field_s.barrop | 698 | #define c_barrop icrbc_field_s.barrop |
699 | #define c_doresp icrbc_field_s.doresp | 699 | #define c_doresp icrbc_field_s.doresp |
700 | #define c_gbr icrbc_field_s.gbr | 700 | #define c_gbr icrbc_field_s.gbr |
701 | #endif /* !__ASSEMBLY__ */ | 701 | #endif /* !__ASSEMBLY__ */ |
702 | 702 | ||
703 | /* | 703 | /* |
@@ -708,31 +708,31 @@ typedef union icrbc_s { | |||
708 | typedef union icrbd_s { | 708 | typedef union icrbd_s { |
709 | u64 reg_value; | 709 | u64 reg_value; |
710 | struct { | 710 | struct { |
711 | u64 rsvd: 38, | 711 | u64 rsvd: 38, |
712 | toutvld: 1, /* Timeout in progress for this CRB */ | 712 | toutvld: 1, /* Timeout in progress for this CRB */ |
713 | ctxtvld: 1, /* Context field below is valid */ | 713 | ctxtvld: 1, /* Context field below is valid */ |
714 | rsvd2: 1, | 714 | rsvd2: 1, |
715 | context: 15, /* Bit vector: | 715 | context: 15, /* Bit vector: |
716 | * Has a bit set for each CRB entry | 716 | * Has a bit set for each CRB entry |
717 | * which needs to be deallocated | 717 | * which needs to be deallocated |
718 | * before this CRB entry is processed. | 718 | * before this CRB entry is processed. |
719 | * Set only for barrier operations. | 719 | * Set only for barrier operations. |
720 | */ | 720 | */ |
721 | timeout: 8; /* Timeout Upper 8 bits */ | 721 | timeout: 8; /* Timeout Upper 8 bits */ |
722 | } icrbd_field_s; | 722 | } icrbd_field_s; |
723 | } icrbd_t; | 723 | } icrbd_t; |
724 | 724 | ||
725 | #define icrbd_toutvld icrbd_field_s.toutvld | 725 | #define icrbd_toutvld icrbd_field_s.toutvld |
726 | #define icrbd_ctxtvld icrbd_field_s.ctxtvld | 726 | #define icrbd_ctxtvld icrbd_field_s.ctxtvld |
727 | #define icrbd_context icrbd_field_s.context | 727 | #define icrbd_context icrbd_field_s.context |
728 | 728 | ||
729 | 729 | ||
730 | typedef union hubii_ifdr_u { | 730 | typedef union hubii_ifdr_u { |
731 | u64 hi_ifdr_value; | 731 | u64 hi_ifdr_value; |
732 | struct { | 732 | struct { |
733 | u64 ifdr_rsvd: 49, | 733 | u64 ifdr_rsvd: 49, |
734 | ifdr_maxrp: 7, | 734 | ifdr_maxrp: 7, |
735 | ifdr_rsvd1: 1, | 735 | ifdr_rsvd1: 1, |
736 | ifdr_maxrq: 7; | 736 | ifdr_maxrq: 7; |
737 | } hi_ifdr_fields; | 737 | } hi_ifdr_fields; |
738 | } hubii_ifdr_t; | 738 | } hubii_ifdr_t; |
@@ -789,26 +789,26 @@ typedef union hubii_ifdr_u { | |||
789 | typedef union iprte_a { | 789 | typedef union iprte_a { |
790 | u64 entry; | 790 | u64 entry; |
791 | struct { | 791 | struct { |
792 | u64 rsvd1 : 7, /* Reserved field */ | 792 | u64 rsvd1 : 7, /* Reserved field */ |
793 | valid : 1, /* Maps to a timeout entry */ | 793 | valid : 1, /* Maps to a timeout entry */ |
794 | rsvd2 : 1, | 794 | rsvd2 : 1, |
795 | srcnode : 9, /* Node which did this PIO */ | 795 | srcnode : 9, /* Node which did this PIO */ |
796 | initiator : 2, /* If T5A or T5B or IO */ | 796 | initiator : 2, /* If T5A or T5B or IO */ |
797 | rsvd3 : 3, | 797 | rsvd3 : 3, |
798 | addr : 38, /* Physical address of PIO */ | 798 | addr : 38, /* Physical address of PIO */ |
799 | rsvd4 : 3; | 799 | rsvd4 : 3; |
800 | } iprte_fields; | 800 | } iprte_fields; |
801 | } iprte_a_t; | 801 | } iprte_a_t; |
802 | 802 | ||
803 | #define iprte_valid iprte_fields.valid | 803 | #define iprte_valid iprte_fields.valid |
804 | #define iprte_timeout iprte_fields.timeout | 804 | #define iprte_timeout iprte_fields.timeout |
805 | #define iprte_srcnode iprte_fields.srcnode | 805 | #define iprte_srcnode iprte_fields.srcnode |
806 | #define iprte_init iprte_fields.initiator | 806 | #define iprte_init iprte_fields.initiator |
807 | #define iprte_addr iprte_fields.addr | 807 | #define iprte_addr iprte_fields.addr |
808 | 808 | ||
809 | #endif /* !__ASSEMBLY__ */ | 809 | #endif /* !__ASSEMBLY__ */ |
810 | 810 | ||
811 | #define IPRTE_ADDRSHFT 3 | 811 | #define IPRTE_ADDRSHFT 3 |
812 | 812 | ||
813 | /* | 813 | /* |
814 | * Hub IIO PRB Register format. | 814 | * Hub IIO PRB Register format. |
@@ -823,14 +823,14 @@ typedef union iprte_a { | |||
823 | typedef union iprb_u { | 823 | typedef union iprb_u { |
824 | u64 reg_value; | 824 | u64 reg_value; |
825 | struct { | 825 | struct { |
826 | u64 rsvd1: 15, | 826 | u64 rsvd1: 15, |
827 | error: 1, /* Widget rcvd wr resp pkt w/ error */ | 827 | error: 1, /* Widget rcvd wr resp pkt w/ error */ |
828 | ovflow: 5, /* Overflow count. perf measurement */ | 828 | ovflow: 5, /* Overflow count. perf measurement */ |
829 | fire_and_forget: 1, /* Launch Write without response */ | 829 | fire_and_forget: 1, /* Launch Write without response */ |
830 | mode: 2, /* Widget operation Mode */ | 830 | mode: 2, /* Widget operation Mode */ |
831 | rsvd2: 2, | 831 | rsvd2: 2, |
832 | bnakctr: 14, | 832 | bnakctr: 14, |
833 | rsvd3: 2, | 833 | rsvd3: 2, |
834 | anakctr: 14, | 834 | anakctr: 14, |
835 | xtalkctr: 8; | 835 | xtalkctr: 8; |
836 | } iprb_fields_s; | 836 | } iprb_fields_s; |
@@ -838,13 +838,13 @@ typedef union iprb_u { | |||
838 | 838 | ||
839 | #define iprb_regval reg_value | 839 | #define iprb_regval reg_value |
840 | 840 | ||
841 | #define iprb_error iprb_fields_s.error | 841 | #define iprb_error iprb_fields_s.error |
842 | #define iprb_ovflow iprb_fields_s.ovflow | 842 | #define iprb_ovflow iprb_fields_s.ovflow |
843 | #define iprb_ff iprb_fields_s.fire_and_forget | 843 | #define iprb_ff iprb_fields_s.fire_and_forget |
844 | #define iprb_mode iprb_fields_s.mode | 844 | #define iprb_mode iprb_fields_s.mode |
845 | #define iprb_bnakctr iprb_fields_s.bnakctr | 845 | #define iprb_bnakctr iprb_fields_s.bnakctr |
846 | #define iprb_anakctr iprb_fields_s.anakctr | 846 | #define iprb_anakctr iprb_fields_s.anakctr |
847 | #define iprb_xtalkctr iprb_fields_s.xtalkctr | 847 | #define iprb_xtalkctr iprb_fields_s.xtalkctr |
848 | 848 | ||
849 | #endif /* !__ASSEMBLY__ */ | 849 | #endif /* !__ASSEMBLY__ */ |
850 | 850 | ||
@@ -853,10 +853,10 @@ typedef union iprb_u { | |||
853 | * For details of the meanings of NAK and Accept, refer the PIO flow | 853 | * For details of the meanings of NAK and Accept, refer the PIO flow |
854 | * document | 854 | * document |
855 | */ | 855 | */ |
856 | #define IPRB_MODE_NORMAL (0) | 856 | #define IPRB_MODE_NORMAL (0) |
857 | #define IPRB_MODE_COLLECT_A (1) /* PRB in collect A mode */ | 857 | #define IPRB_MODE_COLLECT_A (1) /* PRB in collect A mode */ |
858 | #define IPRB_MODE_SERVICE_A (2) /* NAK B and Accept A */ | 858 | #define IPRB_MODE_SERVICE_A (2) /* NAK B and Accept A */ |
859 | #define IPRB_MODE_SERVICE_B (3) /* NAK A and Accept B */ | 859 | #define IPRB_MODE_SERVICE_B (3) /* NAK A and Accept B */ |
860 | 860 | ||
861 | /* | 861 | /* |
862 | * IO CRB entry C_A to E_A : Partial (cache) CRBS | 862 | * IO CRB entry C_A to E_A : Partial (cache) CRBS |
@@ -865,31 +865,31 @@ typedef union iprb_u { | |||
865 | typedef union icrbp_a { | 865 | typedef union icrbp_a { |
866 | u64 ip_reg; /* the entire register value */ | 866 | u64 ip_reg; /* the entire register value */ |
867 | struct { | 867 | struct { |
868 | u64 error: 1, /* 63, error occurred */ | 868 | u64 error: 1, /* 63, error occurred */ |
869 | ln_uce: 1, /* 62: uncorrectable memory */ | 869 | ln_uce: 1, /* 62: uncorrectable memory */ |
870 | ln_ae: 1, /* 61: protection violation */ | 870 | ln_ae: 1, /* 61: protection violation */ |
871 | ln_werr:1, /* 60: write access error */ | 871 | ln_werr:1, /* 60: write access error */ |
872 | ln_aerr:1, /* 59: sn0net: Address error */ | 872 | ln_aerr:1, /* 59: sn0net: Address error */ |
873 | ln_perr:1, /* 58: sn0net: poison error */ | 873 | ln_perr:1, /* 58: sn0net: poison error */ |
874 | timeout:1, /* 57: CRB timed out */ | 874 | timeout:1, /* 57: CRB timed out */ |
875 | l_bdpkt:1, /* 56: truncated pkt on sn0net */ | 875 | l_bdpkt:1, /* 56: truncated pkt on sn0net */ |
876 | c_bdpkt:1, /* 55: truncated pkt on xtalk */ | 876 | c_bdpkt:1, /* 55: truncated pkt on xtalk */ |
877 | c_err: 1, /* 54: incoming xtalk req, err set*/ | 877 | c_err: 1, /* 54: incoming xtalk req, err set*/ |
878 | rsvd1: 12, /* 53-42: reserved */ | 878 | rsvd1: 12, /* 53-42: reserved */ |
879 | valid: 1, /* 41: Valid status */ | 879 | valid: 1, /* 41: Valid status */ |
880 | sidn: 4, /* 40-37: SIDN field of xtalk rqst */ | 880 | sidn: 4, /* 40-37: SIDN field of xtalk rqst */ |
881 | tnum: 5, /* 36-32: TNUM of xtalk request */ | 881 | tnum: 5, /* 36-32: TNUM of xtalk request */ |
882 | bo: 1, /* 31: barrier op set in xtalk rqst*/ | 882 | bo: 1, /* 31: barrier op set in xtalk rqst*/ |
883 | resprqd:1, /* 30: xtalk rqst requires response*/ | 883 | resprqd:1, /* 30: xtalk rqst requires response*/ |
884 | gbr: 1, /* 29: gbr bit set in xtalk rqst */ | 884 | gbr: 1, /* 29: gbr bit set in xtalk rqst */ |
885 | size: 2, /* 28-27: size of xtalk request */ | 885 | size: 2, /* 28-27: size of xtalk request */ |
886 | excl: 4, /* 26-23: exclusive bit(s) */ | 886 | excl: 4, /* 26-23: exclusive bit(s) */ |
887 | stall: 3, /* 22-20: stall (xtalk, bte 0/1) */ | 887 | stall: 3, /* 22-20: stall (xtalk, bte 0/1) */ |
888 | intvn: 1, /* 19: rqst target of intervention*/ | 888 | intvn: 1, /* 19: rqst target of intervention*/ |
889 | resp: 1, /* 18: Data response given to t5 */ | 889 | resp: 1, /* 18: Data response given to t5 */ |
890 | ack: 1, /* 17: Data ack received. */ | 890 | ack: 1, /* 17: Data ack received. */ |
891 | hold: 1, /* 16: crb gathering invalidate acks*/ | 891 | hold: 1, /* 16: crb gathering invalidate acks*/ |
892 | wb: 1, /* 15: writeback pending. */ | 892 | wb: 1, /* 15: writeback pending. */ |
893 | ack_cnt:11, /* 14-04: counter of invalidate acks*/ | 893 | ack_cnt:11, /* 14-04: counter of invalidate acks*/ |
894 | tscaler:4; /* 03-00: Timeout prescaler */ | 894 | tscaler:4; /* 03-00: Timeout prescaler */ |
895 | } ip_fmt; | 895 | } ip_fmt; |
@@ -908,13 +908,13 @@ typedef union hubii_idsr { | |||
908 | u64 iin_reg; | 908 | u64 iin_reg; |
909 | struct { | 909 | struct { |
910 | u64 rsvd1 : 35, | 910 | u64 rsvd1 : 35, |
911 | isent : 1, | 911 | isent : 1, |
912 | rsvd2 : 3, | 912 | rsvd2 : 3, |
913 | ienable: 1, | 913 | ienable: 1, |
914 | rsvd : 7, | 914 | rsvd : 7, |
915 | node : 9, | 915 | node : 9, |
916 | rsvd4 : 1, | 916 | rsvd4 : 1, |
917 | level : 7; | 917 | level : 7; |
918 | } iin_fmt; | 918 | } iin_fmt; |
919 | } hubii_idsr_t; | 919 | } hubii_idsr_t; |
920 | #endif /* !__ASSEMBLY__ */ | 920 | #endif /* !__ASSEMBLY__ */ |
@@ -966,7 +966,7 @@ typedef union hubii_idsr { | |||
966 | * Value of 3 is required by Xbow 1.1 | 966 | * Value of 3 is required by Xbow 1.1 |
967 | * We may be able to increase this to 4 with Xbow 1.2. | 967 | * We may be able to increase this to 4 with Xbow 1.2. |
968 | */ | 968 | */ |
969 | #define HUBII_XBOW_CREDIT 3 | 969 | #define HUBII_XBOW_CREDIT 3 |
970 | #define HUBII_XBOW_REV2_CREDIT 4 | 970 | #define HUBII_XBOW_REV2_CREDIT 4 |
971 | 971 | ||
972 | #endif /* _ASM_SGI_SN_SN0_HUBIO_H */ | 972 | #endif /* _ASM_SGI_SN_SN0_HUBIO_H */ |
diff --git a/arch/mips/include/asm/sn/sn0/hubmd.h b/arch/mips/include/asm/sn/sn0/hubmd.h index 14c225d80664..305d002be182 100644 --- a/arch/mips/include/asm/sn/sn0/hubmd.h +++ b/arch/mips/include/asm/sn/sn0/hubmd.h | |||
@@ -8,16 +8,16 @@ | |||
8 | * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. | 8 | * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. |
9 | * Copyright (C) 1999 by Ralf Baechle | 9 | * Copyright (C) 1999 by Ralf Baechle |
10 | */ | 10 | */ |
11 | #ifndef _ASM_SN_SN0_HUBMD_H | 11 | #ifndef _ASM_SN_SN0_HUBMD_H |
12 | #define _ASM_SN_SN0_HUBMD_H | 12 | #define _ASM_SN_SN0_HUBMD_H |
13 | 13 | ||
14 | 14 | ||
15 | /* | 15 | /* |
16 | * Hub Memory/Directory interface registers | 16 | * Hub Memory/Directory interface registers |
17 | */ | 17 | */ |
18 | #define CACHE_SLINE_SIZE 128 /* Secondary cache line size on SN0 */ | 18 | #define CACHE_SLINE_SIZE 128 /* Secondary cache line size on SN0 */ |
19 | 19 | ||
20 | #define MAX_REGIONS 64 | 20 | #define MAX_REGIONS 64 |
21 | 21 | ||
22 | /* Hardware page size and shift */ | 22 | /* Hardware page size and shift */ |
23 | 23 | ||
@@ -34,62 +34,62 @@ | |||
34 | #define MD_IO_PROT_OVRRD 0x200008 /* Clear my bit in MD_IO_PROTECT */ | 34 | #define MD_IO_PROT_OVRRD 0x200008 /* Clear my bit in MD_IO_PROTECT */ |
35 | #define MD_HSPEC_PROTECT 0x200010 /* BDDIR, LBOOT, RBOOT protection */ | 35 | #define MD_HSPEC_PROTECT 0x200010 /* BDDIR, LBOOT, RBOOT protection */ |
36 | #define MD_MEMORY_CONFIG 0x200018 /* Memory/Directory DIMM control */ | 36 | #define MD_MEMORY_CONFIG 0x200018 /* Memory/Directory DIMM control */ |
37 | #define MD_REFRESH_CONTROL 0x200020 /* Memory/Directory refresh ctrl */ | 37 | #define MD_REFRESH_CONTROL 0x200020 /* Memory/Directory refresh ctrl */ |
38 | #define MD_FANDOP_CAC_STAT 0x200028 /* Fetch-and-op cache status */ | 38 | #define MD_FANDOP_CAC_STAT 0x200028 /* Fetch-and-op cache status */ |
39 | #define MD_MIG_DIFF_THRESH 0x200030 /* Page migr. count diff thresh. */ | 39 | #define MD_MIG_DIFF_THRESH 0x200030 /* Page migr. count diff thresh. */ |
40 | #define MD_MIG_VALUE_THRESH 0x200038 /* Page migr. count abs. thresh. */ | 40 | #define MD_MIG_VALUE_THRESH 0x200038 /* Page migr. count abs. thresh. */ |
41 | #define MD_MIG_CANDIDATE 0x200040 /* Latest page migration candidate */ | 41 | #define MD_MIG_CANDIDATE 0x200040 /* Latest page migration candidate */ |
42 | #define MD_MIG_CANDIDATE_CLR 0x200048 /* Clear page migration candidate */ | 42 | #define MD_MIG_CANDIDATE_CLR 0x200048 /* Clear page migration candidate */ |
43 | #define MD_DIR_ERROR 0x200050 /* Directory DIMM error */ | 43 | #define MD_DIR_ERROR 0x200050 /* Directory DIMM error */ |
44 | #define MD_DIR_ERROR_CLR 0x200058 /* Directory DIMM error clear */ | 44 | #define MD_DIR_ERROR_CLR 0x200058 /* Directory DIMM error clear */ |
45 | #define MD_PROTOCOL_ERROR 0x200060 /* Directory protocol error */ | 45 | #define MD_PROTOCOL_ERROR 0x200060 /* Directory protocol error */ |
46 | #define MD_PROTOCOL_ERROR_CLR 0x200068 /* Directory protocol error clear */ | 46 | #define MD_PROTOCOL_ERROR_CLR 0x200068 /* Directory protocol error clear */ |
47 | #define MD_MEM_ERROR 0x200070 /* Memory DIMM error */ | 47 | #define MD_MEM_ERROR 0x200070 /* Memory DIMM error */ |
48 | #define MD_MEM_ERROR_CLR 0x200078 /* Memory DIMM error clear */ | 48 | #define MD_MEM_ERROR_CLR 0x200078 /* Memory DIMM error clear */ |
49 | #define MD_MISC_ERROR 0x200080 /* Miscellaneous MD error */ | 49 | #define MD_MISC_ERROR 0x200080 /* Miscellaneous MD error */ |
50 | #define MD_MISC_ERROR_CLR 0x200088 /* Miscellaneous MD error clear */ | 50 | #define MD_MISC_ERROR_CLR 0x200088 /* Miscellaneous MD error clear */ |
51 | #define MD_MEM_DIMM_INIT 0x200090 /* Memory DIMM mode initization. */ | 51 | #define MD_MEM_DIMM_INIT 0x200090 /* Memory DIMM mode initization. */ |
52 | #define MD_DIR_DIMM_INIT 0x200098 /* Directory DIMM mode init. */ | 52 | #define MD_DIR_DIMM_INIT 0x200098 /* Directory DIMM mode init. */ |
53 | #define MD_MOQ_SIZE 0x2000a0 /* MD outgoing queue size */ | 53 | #define MD_MOQ_SIZE 0x2000a0 /* MD outgoing queue size */ |
54 | #define MD_MLAN_CTL 0x2000a8 /* NIC (Microlan) control register */ | 54 | #define MD_MLAN_CTL 0x2000a8 /* NIC (Microlan) control register */ |
55 | 55 | ||
56 | #define MD_PERF_SEL 0x210000 /* Select perf monitor events */ | 56 | #define MD_PERF_SEL 0x210000 /* Select perf monitor events */ |
57 | #define MD_PERF_CNT0 0x210010 /* Performance counter 0 */ | 57 | #define MD_PERF_CNT0 0x210010 /* Performance counter 0 */ |
58 | #define MD_PERF_CNT1 0x210018 /* Performance counter 1 */ | 58 | #define MD_PERF_CNT1 0x210018 /* Performance counter 1 */ |
59 | #define MD_PERF_CNT2 0x210020 /* Performance counter 2 */ | 59 | #define MD_PERF_CNT2 0x210020 /* Performance counter 2 */ |
60 | #define MD_PERF_CNT3 0x210028 /* Performance counter 3 */ | 60 | #define MD_PERF_CNT3 0x210028 /* Performance counter 3 */ |
61 | #define MD_PERF_CNT4 0x210030 /* Performance counter 4 */ | 61 | #define MD_PERF_CNT4 0x210030 /* Performance counter 4 */ |
62 | #define MD_PERF_CNT5 0x210038 /* Performance counter 5 */ | 62 | #define MD_PERF_CNT5 0x210038 /* Performance counter 5 */ |
63 | 63 | ||
64 | #define MD_UREG0_0 0x220000 /* uController/UART 0 register */ | 64 | #define MD_UREG0_0 0x220000 /* uController/UART 0 register */ |
65 | #define MD_UREG0_1 0x220008 /* uController/UART 0 register */ | 65 | #define MD_UREG0_1 0x220008 /* uController/UART 0 register */ |
66 | #define MD_UREG0_2 0x220010 /* uController/UART 0 register */ | 66 | #define MD_UREG0_2 0x220010 /* uController/UART 0 register */ |
67 | #define MD_UREG0_3 0x220018 /* uController/UART 0 register */ | 67 | #define MD_UREG0_3 0x220018 /* uController/UART 0 register */ |
68 | #define MD_UREG0_4 0x220020 /* uController/UART 0 register */ | 68 | #define MD_UREG0_4 0x220020 /* uController/UART 0 register */ |
69 | #define MD_UREG0_5 0x220028 /* uController/UART 0 register */ | 69 | #define MD_UREG0_5 0x220028 /* uController/UART 0 register */ |
70 | #define MD_UREG0_6 0x220030 /* uController/UART 0 register */ | 70 | #define MD_UREG0_6 0x220030 /* uController/UART 0 register */ |
71 | #define MD_UREG0_7 0x220038 /* uController/UART 0 register */ | 71 | #define MD_UREG0_7 0x220038 /* uController/UART 0 register */ |
72 | 72 | ||
73 | #define MD_SLOTID_USTAT 0x220048 /* Hub slot ID & UART/uCtlr status */ | 73 | #define MD_SLOTID_USTAT 0x220048 /* Hub slot ID & UART/uCtlr status */ |
74 | #define MD_LED0 0x220050 /* Eight-bit LED for CPU A */ | 74 | #define MD_LED0 0x220050 /* Eight-bit LED for CPU A */ |
75 | #define MD_LED1 0x220058 /* Eight-bit LED for CPU B */ | 75 | #define MD_LED1 0x220058 /* Eight-bit LED for CPU B */ |
76 | 76 | ||
77 | #define MD_UREG1_0 0x220080 /* uController/UART 1 register */ | 77 | #define MD_UREG1_0 0x220080 /* uController/UART 1 register */ |
78 | #define MD_UREG1_1 0x220088 /* uController/UART 1 register */ | 78 | #define MD_UREG1_1 0x220088 /* uController/UART 1 register */ |
79 | #define MD_UREG1_2 0x220090 /* uController/UART 1 register */ | 79 | #define MD_UREG1_2 0x220090 /* uController/UART 1 register */ |
80 | #define MD_UREG1_3 0x220098 /* uController/UART 1 register */ | 80 | #define MD_UREG1_3 0x220098 /* uController/UART 1 register */ |
81 | #define MD_UREG1_4 0x2200a0 /* uController/UART 1 register */ | 81 | #define MD_UREG1_4 0x2200a0 /* uController/UART 1 register */ |
82 | #define MD_UREG1_5 0x2200a8 /* uController/UART 1 register */ | 82 | #define MD_UREG1_5 0x2200a8 /* uController/UART 1 register */ |
83 | #define MD_UREG1_6 0x2200b0 /* uController/UART 1 register */ | 83 | #define MD_UREG1_6 0x2200b0 /* uController/UART 1 register */ |
84 | #define MD_UREG1_7 0x2200b8 /* uController/UART 1 register */ | 84 | #define MD_UREG1_7 0x2200b8 /* uController/UART 1 register */ |
85 | #define MD_UREG1_8 0x2200c0 /* uController/UART 1 register */ | 85 | #define MD_UREG1_8 0x2200c0 /* uController/UART 1 register */ |
86 | #define MD_UREG1_9 0x2200c8 /* uController/UART 1 register */ | 86 | #define MD_UREG1_9 0x2200c8 /* uController/UART 1 register */ |
87 | #define MD_UREG1_10 0x2200d0 /* uController/UART 1 register */ | 87 | #define MD_UREG1_10 0x2200d0 /* uController/UART 1 register */ |
88 | #define MD_UREG1_11 0x2200d8 /* uController/UART 1 register */ | 88 | #define MD_UREG1_11 0x2200d8 /* uController/UART 1 register */ |
89 | #define MD_UREG1_12 0x2200e0 /* uController/UART 1 register */ | 89 | #define MD_UREG1_12 0x2200e0 /* uController/UART 1 register */ |
90 | #define MD_UREG1_13 0x2200e8 /* uController/UART 1 register */ | 90 | #define MD_UREG1_13 0x2200e8 /* uController/UART 1 register */ |
91 | #define MD_UREG1_14 0x2200f0 /* uController/UART 1 register */ | 91 | #define MD_UREG1_14 0x2200f0 /* uController/UART 1 register */ |
92 | #define MD_UREG1_15 0x2200f8 /* uController/UART 1 register */ | 92 | #define MD_UREG1_15 0x2200f8 /* uController/UART 1 register */ |
93 | 93 | ||
94 | #ifdef CONFIG_SGI_SN_N_MODE | 94 | #ifdef CONFIG_SGI_SN_N_MODE |
95 | #define MD_MEM_BANKS 4 /* 4 banks of memory max in N mode */ | 95 | #define MD_MEM_BANKS 4 /* 4 banks of memory max in N mode */ |
@@ -106,14 +106,14 @@ | |||
106 | * Bits not used by the MD are used by software. | 106 | * Bits not used by the MD are used by software. |
107 | */ | 107 | */ |
108 | 108 | ||
109 | #define MD_SIZE_EMPTY 0 /* Valid in MEMORY_CONFIG */ | 109 | #define MD_SIZE_EMPTY 0 /* Valid in MEMORY_CONFIG */ |
110 | #define MD_SIZE_8MB 1 | 110 | #define MD_SIZE_8MB 1 |
111 | #define MD_SIZE_16MB 2 | 111 | #define MD_SIZE_16MB 2 |
112 | #define MD_SIZE_32MB 3 /* Broken in Hub 1 */ | 112 | #define MD_SIZE_32MB 3 /* Broken in Hub 1 */ |
113 | #define MD_SIZE_64MB 4 /* Valid in MEMORY_CONFIG */ | 113 | #define MD_SIZE_64MB 4 /* Valid in MEMORY_CONFIG */ |
114 | #define MD_SIZE_128MB 5 /* Valid in MEMORY_CONFIG */ | 114 | #define MD_SIZE_128MB 5 /* Valid in MEMORY_CONFIG */ |
115 | #define MD_SIZE_256MB 6 | 115 | #define MD_SIZE_256MB 6 |
116 | #define MD_SIZE_512MB 7 /* Valid in MEMORY_CONFIG */ | 116 | #define MD_SIZE_512MB 7 /* Valid in MEMORY_CONFIG */ |
117 | #define MD_SIZE_1GB 8 | 117 | #define MD_SIZE_1GB 8 |
118 | #define MD_SIZE_2GB 9 | 118 | #define MD_SIZE_2GB 9 |
119 | #define MD_SIZE_4GB 10 | 119 | #define MD_SIZE_4GB 10 |
@@ -207,16 +207,16 @@ | |||
207 | 207 | ||
208 | /* MD_SLOTID_USTAT bit definitions */ | 208 | /* MD_SLOTID_USTAT bit definitions */ |
209 | 209 | ||
210 | #define MSU_CORECLK_TST_SHFT 7 /* You don't wanna know */ | 210 | #define MSU_CORECLK_TST_SHFT 7 /* You don't wanna know */ |
211 | #define MSU_CORECLK_TST_MASK (UINT64_CAST 1 << 7) | 211 | #define MSU_CORECLK_TST_MASK (UINT64_CAST 1 << 7) |
212 | #define MSU_CORECLK_TST (UINT64_CAST 1 << 7) | 212 | #define MSU_CORECLK_TST (UINT64_CAST 1 << 7) |
213 | #define MSU_CORECLK_SHFT 6 /* You don't wanna know */ | 213 | #define MSU_CORECLK_SHFT 6 /* You don't wanna know */ |
214 | #define MSU_CORECLK_MASK (UINT64_CAST 1 << 6) | 214 | #define MSU_CORECLK_MASK (UINT64_CAST 1 << 6) |
215 | #define MSU_CORECLK (UINT64_CAST 1 << 6) | 215 | #define MSU_CORECLK (UINT64_CAST 1 << 6) |
216 | #define MSU_NETSYNC_SHFT 5 /* You don't wanna know */ | 216 | #define MSU_NETSYNC_SHFT 5 /* You don't wanna know */ |
217 | #define MSU_NETSYNC_MASK (UINT64_CAST 1 << 5) | 217 | #define MSU_NETSYNC_MASK (UINT64_CAST 1 << 5) |
218 | #define MSU_NETSYNC (UINT64_CAST 1 << 5) | 218 | #define MSU_NETSYNC (UINT64_CAST 1 << 5) |
219 | #define MSU_FPROMRDY_SHFT 4 /* Flash PROM ready bit */ | 219 | #define MSU_FPROMRDY_SHFT 4 /* Flash PROM ready bit */ |
220 | #define MSU_FPROMRDY_MASK (UINT64_CAST 1 << 4) | 220 | #define MSU_FPROMRDY_MASK (UINT64_CAST 1 << 4) |
221 | #define MSU_FPROMRDY (UINT64_CAST 1 << 4) | 221 | #define MSU_FPROMRDY (UINT64_CAST 1 << 4) |
222 | #define MSU_I2CINTR_SHFT 3 /* I2C interrupt bit */ | 222 | #define MSU_I2CINTR_SHFT 3 /* I2C interrupt bit */ |
@@ -228,8 +228,8 @@ | |||
228 | #define MSU_SN00_SLOTID_SHFT 7 | 228 | #define MSU_SN00_SLOTID_SHFT 7 |
229 | #define MSU_SN00_SLOTID_MASK (UINT64_CAST 0x80) | 229 | #define MSU_SN00_SLOTID_MASK (UINT64_CAST 0x80) |
230 | 230 | ||
231 | #define MSU_PIMM_PSC_SHFT 4 | 231 | #define MSU_PIMM_PSC_SHFT 4 |
232 | #define MSU_PIMM_PSC_MASK (0xf << MSU_PIMM_PSC_SHFT) | 232 | #define MSU_PIMM_PSC_MASK (0xf << MSU_PIMM_PSC_SHFT) |
233 | 233 | ||
234 | /* MD_MIG_DIFF_THRESH bit definitions */ | 234 | /* MD_MIG_DIFF_THRESH bit definitions */ |
235 | 235 | ||
@@ -260,7 +260,7 @@ | |||
260 | 260 | ||
261 | /* Other MD definitions */ | 261 | /* Other MD definitions */ |
262 | 262 | ||
263 | #define MD_BANK_SHFT 29 /* log2(512 MB) */ | 263 | #define MD_BANK_SHFT 29 /* log2(512 MB) */ |
264 | #define MD_BANK_MASK (UINT64_CAST 7 << 29) | 264 | #define MD_BANK_MASK (UINT64_CAST 7 << 29) |
265 | #define MD_BANK_SIZE (UINT64_CAST 1 << MD_BANK_SHFT) /* 512 MB */ | 265 | #define MD_BANK_SIZE (UINT64_CAST 1 << MD_BANK_SHFT) /* 512 MB */ |
266 | #define MD_BANK_OFFSET(_b) (UINT64_CAST (_b) << MD_BANK_SHFT) | 266 | #define MD_BANK_OFFSET(_b) (UINT64_CAST (_b) << MD_BANK_SHFT) |
@@ -300,32 +300,32 @@ | |||
300 | * Format C: STATE != shared (FINE must be 0) | 300 | * Format C: STATE != shared (FINE must be 0) |
301 | */ | 301 | */ |
302 | 302 | ||
303 | #define MD_PDIR_MASK 0xffffffffffff /* Whole entry */ | 303 | #define MD_PDIR_MASK 0xffffffffffff /* Whole entry */ |
304 | #define MD_PDIR_ECC_SHFT 0 /* ABC low or high */ | 304 | #define MD_PDIR_ECC_SHFT 0 /* ABC low or high */ |
305 | #define MD_PDIR_ECC_MASK 0x7f | 305 | #define MD_PDIR_ECC_MASK 0x7f |
306 | #define MD_PDIR_PRIO_SHFT 8 /* ABC low */ | 306 | #define MD_PDIR_PRIO_SHFT 8 /* ABC low */ |
307 | #define MD_PDIR_PRIO_MASK (0xf << 8) | 307 | #define MD_PDIR_PRIO_MASK (0xf << 8) |
308 | #define MD_PDIR_AX_SHFT 7 /* ABC low */ | 308 | #define MD_PDIR_AX_SHFT 7 /* ABC low */ |
309 | #define MD_PDIR_AX_MASK (1 << 7) | 309 | #define MD_PDIR_AX_MASK (1 << 7) |
310 | #define MD_PDIR_AX (1 << 7) | 310 | #define MD_PDIR_AX (1 << 7) |
311 | #define MD_PDIR_FINE_SHFT 12 /* ABC low */ | 311 | #define MD_PDIR_FINE_SHFT 12 /* ABC low */ |
312 | #define MD_PDIR_FINE_MASK (1 << 12) | 312 | #define MD_PDIR_FINE_MASK (1 << 12) |
313 | #define MD_PDIR_FINE (1 << 12) | 313 | #define MD_PDIR_FINE (1 << 12) |
314 | #define MD_PDIR_OCT_SHFT 13 /* A low */ | 314 | #define MD_PDIR_OCT_SHFT 13 /* A low */ |
315 | #define MD_PDIR_OCT_MASK (7 << 13) | 315 | #define MD_PDIR_OCT_MASK (7 << 13) |
316 | #define MD_PDIR_STATE_SHFT 13 /* BC low */ | 316 | #define MD_PDIR_STATE_SHFT 13 /* BC low */ |
317 | #define MD_PDIR_STATE_MASK (7 << 13) | 317 | #define MD_PDIR_STATE_MASK (7 << 13) |
318 | #define MD_PDIR_ONECNT_SHFT 16 /* BC low */ | 318 | #define MD_PDIR_ONECNT_SHFT 16 /* BC low */ |
319 | #define MD_PDIR_ONECNT_MASK (0x3f << 16) | 319 | #define MD_PDIR_ONECNT_MASK (0x3f << 16) |
320 | #define MD_PDIR_PTR_SHFT 22 /* C low */ | 320 | #define MD_PDIR_PTR_SHFT 22 /* C low */ |
321 | #define MD_PDIR_PTR_MASK (UINT64_CAST 0x7ff << 22) | 321 | #define MD_PDIR_PTR_MASK (UINT64_CAST 0x7ff << 22) |
322 | #define MD_PDIR_VECMSB_SHFT 22 /* AB low */ | 322 | #define MD_PDIR_VECMSB_SHFT 22 /* AB low */ |
323 | #define MD_PDIR_VECMSB_BITMASK 0x3ffffff | 323 | #define MD_PDIR_VECMSB_BITMASK 0x3ffffff |
324 | #define MD_PDIR_VECMSB_BITSHFT 27 | 324 | #define MD_PDIR_VECMSB_BITSHFT 27 |
325 | #define MD_PDIR_VECMSB_MASK (UINT64_CAST MD_PDIR_VECMSB_BITMASK << 22) | 325 | #define MD_PDIR_VECMSB_MASK (UINT64_CAST MD_PDIR_VECMSB_BITMASK << 22) |
326 | #define MD_PDIR_CWOFF_SHFT 7 /* C high */ | 326 | #define MD_PDIR_CWOFF_SHFT 7 /* C high */ |
327 | #define MD_PDIR_CWOFF_MASK (7 << 7) | 327 | #define MD_PDIR_CWOFF_MASK (7 << 7) |
328 | #define MD_PDIR_VECLSB_SHFT 10 /* AB high */ | 328 | #define MD_PDIR_VECLSB_SHFT 10 /* AB high */ |
329 | #define MD_PDIR_VECLSB_BITMASK (UINT64_CAST 0x3fffffffff) | 329 | #define MD_PDIR_VECLSB_BITMASK (UINT64_CAST 0x3fffffffff) |
330 | #define MD_PDIR_VECLSB_BITSHFT 0 | 330 | #define MD_PDIR_VECLSB_BITSHFT 0 |
331 | #define MD_PDIR_VECLSB_MASK (MD_PDIR_VECLSB_BITMASK << 10) | 331 | #define MD_PDIR_VECLSB_MASK (MD_PDIR_VECLSB_BITMASK << 10) |
@@ -349,25 +349,25 @@ | |||
349 | * Format C: STATE != shared | 349 | * Format C: STATE != shared |
350 | */ | 350 | */ |
351 | 351 | ||
352 | #define MD_SDIR_MASK 0xffff /* Whole entry */ | 352 | #define MD_SDIR_MASK 0xffff /* Whole entry */ |
353 | #define MD_SDIR_ECC_SHFT 0 /* AC low or high */ | 353 | #define MD_SDIR_ECC_SHFT 0 /* AC low or high */ |
354 | #define MD_SDIR_ECC_MASK 0x1f | 354 | #define MD_SDIR_ECC_MASK 0x1f |
355 | #define MD_SDIR_PRIO_SHFT 6 /* AC low */ | 355 | #define MD_SDIR_PRIO_SHFT 6 /* AC low */ |
356 | #define MD_SDIR_PRIO_MASK (1 << 6) | 356 | #define MD_SDIR_PRIO_MASK (1 << 6) |
357 | #define MD_SDIR_AX_SHFT 5 /* AC low */ | 357 | #define MD_SDIR_AX_SHFT 5 /* AC low */ |
358 | #define MD_SDIR_AX_MASK (1 << 5) | 358 | #define MD_SDIR_AX_MASK (1 << 5) |
359 | #define MD_SDIR_AX (1 << 5) | 359 | #define MD_SDIR_AX (1 << 5) |
360 | #define MD_SDIR_STATE_SHFT 7 /* AC low */ | 360 | #define MD_SDIR_STATE_SHFT 7 /* AC low */ |
361 | #define MD_SDIR_STATE_MASK (7 << 7) | 361 | #define MD_SDIR_STATE_MASK (7 << 7) |
362 | #define MD_SDIR_PTR_SHFT 10 /* C low */ | 362 | #define MD_SDIR_PTR_SHFT 10 /* C low */ |
363 | #define MD_SDIR_PTR_MASK (0x3f << 10) | 363 | #define MD_SDIR_PTR_MASK (0x3f << 10) |
364 | #define MD_SDIR_CWOFF_SHFT 5 /* C high */ | 364 | #define MD_SDIR_CWOFF_SHFT 5 /* C high */ |
365 | #define MD_SDIR_CWOFF_MASK (7 << 5) | 365 | #define MD_SDIR_CWOFF_MASK (7 << 5) |
366 | #define MD_SDIR_VECMSB_SHFT 11 /* A low */ | 366 | #define MD_SDIR_VECMSB_SHFT 11 /* A low */ |
367 | #define MD_SDIR_VECMSB_BITMASK 0x1f | 367 | #define MD_SDIR_VECMSB_BITMASK 0x1f |
368 | #define MD_SDIR_VECMSB_BITSHFT 7 | 368 | #define MD_SDIR_VECMSB_BITSHFT 7 |
369 | #define MD_SDIR_VECMSB_MASK (MD_SDIR_VECMSB_BITMASK << 11) | 369 | #define MD_SDIR_VECMSB_MASK (MD_SDIR_VECMSB_BITMASK << 11) |
370 | #define MD_SDIR_VECLSB_SHFT 5 /* A high */ | 370 | #define MD_SDIR_VECLSB_SHFT 5 /* A high */ |
371 | #define MD_SDIR_VECLSB_BITMASK 0x7ff | 371 | #define MD_SDIR_VECLSB_BITMASK 0x7ff |
372 | #define MD_SDIR_VECLSB_BITSHFT 0 | 372 | #define MD_SDIR_VECLSB_BITSHFT 0 |
373 | #define MD_SDIR_VECLSB_MASK (MD_SDIR_VECLSB_BITMASK << 5) | 373 | #define MD_SDIR_VECLSB_MASK (MD_SDIR_VECLSB_BITMASK << 5) |
@@ -390,7 +390,7 @@ | |||
390 | 390 | ||
391 | /* Premium SIMM protection entry shifts and masks. */ | 391 | /* Premium SIMM protection entry shifts and masks. */ |
392 | 392 | ||
393 | #define MD_PPROT_SHFT 0 /* Prot. field */ | 393 | #define MD_PPROT_SHFT 0 /* Prot. field */ |
394 | #define MD_PPROT_MASK 7 | 394 | #define MD_PPROT_MASK 7 |
395 | #define MD_PPROT_MIGMD_SHFT 3 /* Migration mode */ | 395 | #define MD_PPROT_MIGMD_SHFT 3 /* Migration mode */ |
396 | #define MD_PPROT_MIGMD_MASK (3 << 3) | 396 | #define MD_PPROT_MIGMD_MASK (3 << 3) |
@@ -403,7 +403,7 @@ | |||
403 | 403 | ||
404 | /* Standard SIMM protection entry shifts and masks. */ | 404 | /* Standard SIMM protection entry shifts and masks. */ |
405 | 405 | ||
406 | #define MD_SPROT_SHFT 0 /* Prot. field */ | 406 | #define MD_SPROT_SHFT 0 /* Prot. field */ |
407 | #define MD_SPROT_MASK 7 | 407 | #define MD_SPROT_MASK 7 |
408 | #define MD_SPROT_MIGMD_SHFT 3 /* Migration mode */ | 408 | #define MD_SPROT_MIGMD_SHFT 3 /* Migration mode */ |
409 | #define MD_SPROT_MIGMD_MASK (3 << 3) | 409 | #define MD_SPROT_MIGMD_MASK (3 << 3) |
@@ -431,13 +431,13 @@ | |||
431 | 431 | ||
432 | #define CPU_LED_ADDR(_nasid, _slice) \ | 432 | #define CPU_LED_ADDR(_nasid, _slice) \ |
433 | (private.p_sn00 ? \ | 433 | (private.p_sn00 ? \ |
434 | REMOTE_HUB_ADDR((_nasid), MD_UREG1_0 + ((_slice) << 5)) : \ | 434 | REMOTE_HUB_ADDR((_nasid), MD_UREG1_0 + ((_slice) << 5)) : \ |
435 | REMOTE_HUB_ADDR((_nasid), MD_LED0 + ((_slice) << 3))) | 435 | REMOTE_HUB_ADDR((_nasid), MD_LED0 + ((_slice) << 3))) |
436 | 436 | ||
437 | #define SET_CPU_LEDS(_nasid, _slice, _val) \ | 437 | #define SET_CPU_LEDS(_nasid, _slice, _val) \ |
438 | (HUB_S(CPU_LED_ADDR(_nasid, _slice), (_val))) | 438 | (HUB_S(CPU_LED_ADDR(_nasid, _slice), (_val))) |
439 | 439 | ||
440 | #define SET_MY_LEDS(_v) \ | 440 | #define SET_MY_LEDS(_v) \ |
441 | SET_CPU_LEDS(get_nasid(), get_slice(), (_v)) | 441 | SET_CPU_LEDS(get_nasid(), get_slice(), (_v)) |
442 | 442 | ||
443 | /* | 443 | /* |
@@ -541,7 +541,7 @@ | |||
541 | */ | 541 | */ |
542 | 542 | ||
543 | struct dir_error_reg { | 543 | struct dir_error_reg { |
544 | u64 uce_vld: 1, /* 63: valid directory uce */ | 544 | u64 uce_vld: 1, /* 63: valid directory uce */ |
545 | ae_vld: 1, /* 62: valid dir prot ecc error */ | 545 | ae_vld: 1, /* 62: valid dir prot ecc error */ |
546 | ce_vld: 1, /* 61: valid correctable ECC err*/ | 546 | ce_vld: 1, /* 61: valid correctable ECC err*/ |
547 | rsvd1: 19, /* 60-42: reserved */ | 547 | rsvd1: 19, /* 60-42: reserved */ |
@@ -555,13 +555,13 @@ struct dir_error_reg { | |||
555 | }; | 555 | }; |
556 | 556 | ||
557 | typedef union md_dir_error { | 557 | typedef union md_dir_error { |
558 | u64 derr_reg; /* the entire register */ | 558 | u64 derr_reg; /* the entire register */ |
559 | struct dir_error_reg derr_fmt; /* the register format */ | 559 | struct dir_error_reg derr_fmt; /* the register format */ |
560 | } md_dir_error_t; | 560 | } md_dir_error_t; |
561 | 561 | ||
562 | 562 | ||
563 | struct mem_error_reg { | 563 | struct mem_error_reg { |
564 | u64 uce_vld: 1, /* 63: valid memory uce */ | 564 | u64 uce_vld: 1, /* 63: valid memory uce */ |
565 | ce_vld: 1, /* 62: valid correctable ECC err*/ | 565 | ce_vld: 1, /* 62: valid correctable ECC err*/ |
566 | rsvd1: 22, /* 61-40: reserved */ | 566 | rsvd1: 22, /* 61-40: reserved */ |
567 | bad_syn: 8, /* 39-32: bad mem ecc syndrome */ | 567 | bad_syn: 8, /* 39-32: bad mem ecc syndrome */ |
@@ -573,8 +573,8 @@ struct mem_error_reg { | |||
573 | 573 | ||
574 | 574 | ||
575 | typedef union md_mem_error { | 575 | typedef union md_mem_error { |
576 | u64 merr_reg; /* the entire register */ | 576 | u64 merr_reg; /* the entire register */ |
577 | struct mem_error_reg merr_fmt; /* format of the mem_error reg */ | 577 | struct mem_error_reg merr_fmt; /* format of the mem_error reg */ |
578 | } md_mem_error_t; | 578 | } md_mem_error_t; |
579 | 579 | ||
580 | 580 | ||
@@ -594,7 +594,7 @@ struct proto_error_reg { | |||
594 | }; | 594 | }; |
595 | 595 | ||
596 | typedef union md_proto_error { | 596 | typedef union md_proto_error { |
597 | u64 perr_reg; /* the entire register */ | 597 | u64 perr_reg; /* the entire register */ |
598 | struct proto_error_reg perr_fmt; /* format of the register */ | 598 | struct proto_error_reg perr_fmt; /* format of the register */ |
599 | } md_proto_error_t; | 599 | } md_proto_error_t; |
600 | 600 | ||
@@ -695,33 +695,33 @@ typedef union md_pdir_loent { | |||
695 | * represent directory memory information. | 695 | * represent directory memory information. |
696 | */ | 696 | */ |
697 | 697 | ||
698 | typedef union md_dir_high { | 698 | typedef union md_dir_high { |
699 | md_sdir_high_t md_sdir_high; | 699 | md_sdir_high_t md_sdir_high; |
700 | md_pdir_high_t md_pdir_high; | 700 | md_pdir_high_t md_pdir_high; |
701 | } md_dir_high_t; | 701 | } md_dir_high_t; |
702 | 702 | ||
703 | typedef union md_dir_low { | 703 | typedef union md_dir_low { |
704 | md_sdir_low_t md_sdir_low; | 704 | md_sdir_low_t md_sdir_low; |
705 | md_pdir_low_t md_pdir_low; | 705 | md_pdir_low_t md_pdir_low; |
706 | } md_dir_low_t; | 706 | } md_dir_low_t; |
707 | 707 | ||
708 | typedef struct bddir_entry { | 708 | typedef struct bddir_entry { |
709 | md_dir_low_t md_dir_low; | 709 | md_dir_low_t md_dir_low; |
710 | md_dir_high_t md_dir_high; | 710 | md_dir_high_t md_dir_high; |
711 | } bddir_entry_t; | 711 | } bddir_entry_t; |
712 | 712 | ||
713 | typedef struct dir_mem_entry { | 713 | typedef struct dir_mem_entry { |
714 | u64 prcpf[MAX_REGIONS]; | 714 | u64 prcpf[MAX_REGIONS]; |
715 | bddir_entry_t directory_words[MD_PAGE_SIZE/CACHE_SLINE_SIZE]; | 715 | bddir_entry_t directory_words[MD_PAGE_SIZE/CACHE_SLINE_SIZE]; |
716 | } dir_mem_entry_t; | 716 | } dir_mem_entry_t; |
717 | 717 | ||
718 | 718 | ||
719 | 719 | ||
720 | typedef union md_perf_sel { | 720 | typedef union md_perf_sel { |
721 | u64 perf_sel_reg; | 721 | u64 perf_sel_reg; |
722 | struct { | 722 | struct { |
723 | u64 perf_rsvd : 60, | 723 | u64 perf_rsvd : 60, |
724 | perf_en : 1, | 724 | perf_en : 1, |
725 | perf_sel : 3; | 725 | perf_sel : 3; |
726 | } perf_sel_bits; | 726 | } perf_sel_bits; |
727 | } md_perf_sel_t; | 727 | } md_perf_sel_t; |
@@ -730,7 +730,7 @@ typedef union md_perf_cnt { | |||
730 | u64 perf_cnt; | 730 | u64 perf_cnt; |
731 | struct { | 731 | struct { |
732 | u64 perf_rsvd : 44, | 732 | u64 perf_rsvd : 44, |
733 | perf_cnt : 20; | 733 | perf_cnt : 20; |
734 | } perf_cnt_bits; | 734 | } perf_cnt_bits; |
735 | } md_perf_cnt_t; | 735 | } md_perf_cnt_t; |
736 | 736 | ||
diff --git a/arch/mips/include/asm/sn/sn0/hubni.h b/arch/mips/include/asm/sn/sn0/hubni.h index b40d3ef97a12..b73c4bee65f2 100644 --- a/arch/mips/include/asm/sn/sn0/hubni.h +++ b/arch/mips/include/asm/sn/sn0/hubni.h | |||
@@ -25,38 +25,38 @@ | |||
25 | #define NI_BASE_TABLES 0x630000 | 25 | #define NI_BASE_TABLES 0x630000 |
26 | 26 | ||
27 | #define NI_STATUS_REV_ID 0x600000 /* Hub network status, rev, and ID */ | 27 | #define NI_STATUS_REV_ID 0x600000 /* Hub network status, rev, and ID */ |
28 | #define NI_PORT_RESET 0x600008 /* Reset the network interface */ | 28 | #define NI_PORT_RESET 0x600008 /* Reset the network interface */ |
29 | #define NI_PROTECTION 0x600010 /* NI register access permissions */ | 29 | #define NI_PROTECTION 0x600010 /* NI register access permissions */ |
30 | #define NI_GLOBAL_PARMS 0x600018 /* LLP parameters */ | 30 | #define NI_GLOBAL_PARMS 0x600018 /* LLP parameters */ |
31 | #define NI_SCRATCH_REG0 0x600100 /* Scratch register 0 (64 bits) */ | 31 | #define NI_SCRATCH_REG0 0x600100 /* Scratch register 0 (64 bits) */ |
32 | #define NI_SCRATCH_REG1 0x600108 /* Scratch register 1 (64 bits) */ | 32 | #define NI_SCRATCH_REG1 0x600108 /* Scratch register 1 (64 bits) */ |
33 | #define NI_DIAG_PARMS 0x600110 /* Parameters for diags */ | 33 | #define NI_DIAG_PARMS 0x600110 /* Parameters for diags */ |
34 | 34 | ||
35 | #define NI_VECTOR_PARMS 0x600200 /* Vector PIO routing parameters */ | 35 | #define NI_VECTOR_PARMS 0x600200 /* Vector PIO routing parameters */ |
36 | #define NI_VECTOR 0x600208 /* Vector PIO route */ | 36 | #define NI_VECTOR 0x600208 /* Vector PIO route */ |
37 | #define NI_VECTOR_DATA 0x600210 /* Vector PIO data */ | 37 | #define NI_VECTOR_DATA 0x600210 /* Vector PIO data */ |
38 | #define NI_VECTOR_STATUS 0x600300 /* Vector PIO return status */ | 38 | #define NI_VECTOR_STATUS 0x600300 /* Vector PIO return status */ |
39 | #define NI_RETURN_VECTOR 0x600308 /* Vector PIO return vector */ | 39 | #define NI_RETURN_VECTOR 0x600308 /* Vector PIO return vector */ |
40 | #define NI_VECTOR_READ_DATA 0x600310 /* Vector PIO read data */ | 40 | #define NI_VECTOR_READ_DATA 0x600310 /* Vector PIO read data */ |
41 | #define NI_VECTOR_CLEAR 0x600380 /* Vector PIO read & clear status */ | 41 | #define NI_VECTOR_CLEAR 0x600380 /* Vector PIO read & clear status */ |
42 | 42 | ||
43 | #define NI_IO_PROTECT 0x600400 /* PIO protection bits */ | 43 | #define NI_IO_PROTECT 0x600400 /* PIO protection bits */ |
44 | #define NI_IO_PROT_OVRRD 0x600408 /* PIO protection bit override */ | 44 | #define NI_IO_PROT_OVRRD 0x600408 /* PIO protection bit override */ |
45 | 45 | ||
46 | #define NI_AGE_CPU0_MEMORY 0x600500 /* CPU 0 memory age control */ | 46 | #define NI_AGE_CPU0_MEMORY 0x600500 /* CPU 0 memory age control */ |
47 | #define NI_AGE_CPU0_PIO 0x600508 /* CPU 0 PIO age control */ | 47 | #define NI_AGE_CPU0_PIO 0x600508 /* CPU 0 PIO age control */ |
48 | #define NI_AGE_CPU1_MEMORY 0x600510 /* CPU 1 memory age control */ | 48 | #define NI_AGE_CPU1_MEMORY 0x600510 /* CPU 1 memory age control */ |
49 | #define NI_AGE_CPU1_PIO 0x600518 /* CPU 1 PIO age control */ | 49 | #define NI_AGE_CPU1_PIO 0x600518 /* CPU 1 PIO age control */ |
50 | #define NI_AGE_GBR_MEMORY 0x600520 /* GBR memory age control */ | 50 | #define NI_AGE_GBR_MEMORY 0x600520 /* GBR memory age control */ |
51 | #define NI_AGE_GBR_PIO 0x600528 /* GBR PIO age control */ | 51 | #define NI_AGE_GBR_PIO 0x600528 /* GBR PIO age control */ |
52 | #define NI_AGE_IO_MEMORY 0x600530 /* IO memory age control */ | 52 | #define NI_AGE_IO_MEMORY 0x600530 /* IO memory age control */ |
53 | #define NI_AGE_IO_PIO 0x600538 /* IO PIO age control */ | 53 | #define NI_AGE_IO_PIO 0x600538 /* IO PIO age control */ |
54 | #define NI_AGE_REG_MIN NI_AGE_CPU0_MEMORY | 54 | #define NI_AGE_REG_MIN NI_AGE_CPU0_MEMORY |
55 | #define NI_AGE_REG_MAX NI_AGE_IO_PIO | 55 | #define NI_AGE_REG_MAX NI_AGE_IO_PIO |
56 | 56 | ||
57 | #define NI_PORT_PARMS 0x608000 /* LLP Parameters */ | 57 | #define NI_PORT_PARMS 0x608000 /* LLP Parameters */ |
58 | #define NI_PORT_ERROR 0x608008 /* LLP Errors */ | 58 | #define NI_PORT_ERROR 0x608008 /* LLP Errors */ |
59 | #define NI_PORT_ERROR_CLEAR 0x608088 /* Clear the error bits */ | 59 | #define NI_PORT_ERROR_CLEAR 0x608088 /* Clear the error bits */ |
60 | 60 | ||
61 | #define NI_META_TABLE0 0x638000 /* First meta routing table entry */ | 61 | #define NI_META_TABLE0 0x638000 /* First meta routing table entry */ |
62 | #define NI_META_TABLE(_x) (NI_META_TABLE0 + (8 * (_x))) | 62 | #define NI_META_TABLE(_x) (NI_META_TABLE0 + (8 * (_x))) |
@@ -76,13 +76,13 @@ | |||
76 | #define NSRI_LINKUP_SHFT 29 | 76 | #define NSRI_LINKUP_SHFT 29 |
77 | #define NSRI_LINKUP_MASK (UINT64_CAST 0x1 << 29) | 77 | #define NSRI_LINKUP_MASK (UINT64_CAST 0x1 << 29) |
78 | #define NSRI_DOWNREASON_SHFT 28 /* 0=failed, 1=never came */ | 78 | #define NSRI_DOWNREASON_SHFT 28 /* 0=failed, 1=never came */ |
79 | #define NSRI_DOWNREASON_MASK (UINT64_CAST 0x1 << 28) /* out of reset. */ | 79 | #define NSRI_DOWNREASON_MASK (UINT64_CAST 0x1 << 28) /* out of reset. */ |
80 | #define NSRI_MORENODES_SHFT 18 | 80 | #define NSRI_MORENODES_SHFT 18 |
81 | #define NSRI_MORENODES_MASK (UINT64_CAST 1 << 18) /* Max. # of nodes */ | 81 | #define NSRI_MORENODES_MASK (UINT64_CAST 1 << 18) /* Max. # of nodes */ |
82 | #define MORE_MEMORY 0 | 82 | #define MORE_MEMORY 0 |
83 | #define MORE_NODES 1 | 83 | #define MORE_NODES 1 |
84 | #define NSRI_REGIONSIZE_SHFT 17 | 84 | #define NSRI_REGIONSIZE_SHFT 17 |
85 | #define NSRI_REGIONSIZE_MASK (UINT64_CAST 1 << 17) /* Granularity */ | 85 | #define NSRI_REGIONSIZE_MASK (UINT64_CAST 1 << 17) /* Granularity */ |
86 | #define REGIONSIZE_FINE 1 | 86 | #define REGIONSIZE_FINE 1 |
87 | #define REGIONSIZE_COARSE 0 | 87 | #define REGIONSIZE_COARSE 0 |
88 | #define NSRI_NODEID_SHFT 8 | 88 | #define NSRI_NODEID_SHFT 8 |
@@ -90,14 +90,14 @@ | |||
90 | #define NSRI_REV_SHFT 4 | 90 | #define NSRI_REV_SHFT 4 |
91 | #define NSRI_REV_MASK (UINT64_CAST 0xf << 4) /* Chip Revision */ | 91 | #define NSRI_REV_MASK (UINT64_CAST 0xf << 4) /* Chip Revision */ |
92 | #define NSRI_CHIPID_SHFT 0 | 92 | #define NSRI_CHIPID_SHFT 0 |
93 | #define NSRI_CHIPID_MASK (UINT64_CAST 0xf) /* Chip type ID */ | 93 | #define NSRI_CHIPID_MASK (UINT64_CAST 0xf) /* Chip type ID */ |
94 | 94 | ||
95 | /* | 95 | /* |
96 | * In fine mode, each node is a region. In coarse mode, there are | 96 | * In fine mode, each node is a region. In coarse mode, there are |
97 | * eight nodes per region. | 97 | * eight nodes per region. |
98 | */ | 98 | */ |
99 | #define NASID_TO_FINEREG_SHFT 0 | 99 | #define NASID_TO_FINEREG_SHFT 0 |
100 | #define NASID_TO_COARSEREG_SHFT 3 | 100 | #define NASID_TO_COARSEREG_SHFT 3 |
101 | 101 | ||
102 | /* NI_PORT_RESET mask definitions */ | 102 | /* NI_PORT_RESET mask definitions */ |
103 | 103 | ||
@@ -111,21 +111,21 @@ | |||
111 | 111 | ||
112 | /* NI_GLOBAL_PARMS mask and shift definitions */ | 112 | /* NI_GLOBAL_PARMS mask and shift definitions */ |
113 | 113 | ||
114 | #define NGP_MAXRETRY_SHFT 48 /* Maximum retries */ | 114 | #define NGP_MAXRETRY_SHFT 48 /* Maximum retries */ |
115 | #define NGP_MAXRETRY_MASK (UINT64_CAST 0x3ff << 48) | 115 | #define NGP_MAXRETRY_MASK (UINT64_CAST 0x3ff << 48) |
116 | #define NGP_TAILTOWRAP_SHFT 32 /* Tail timeout wrap */ | 116 | #define NGP_TAILTOWRAP_SHFT 32 /* Tail timeout wrap */ |
117 | #define NGP_TAILTOWRAP_MASK (UINT64_CAST 0xffff << 32) | 117 | #define NGP_TAILTOWRAP_MASK (UINT64_CAST 0xffff << 32) |
118 | 118 | ||
119 | #define NGP_CREDITTOVAL_SHFT 16 /* Tail timeout wrap */ | 119 | #define NGP_CREDITTOVAL_SHFT 16 /* Tail timeout wrap */ |
120 | #define NGP_CREDITTOVAL_MASK (UINT64_CAST 0xf << 16) | 120 | #define NGP_CREDITTOVAL_MASK (UINT64_CAST 0xf << 16) |
121 | #define NGP_TAILTOVAL_SHFT 4 /* Tail timeout value */ | 121 | #define NGP_TAILTOVAL_SHFT 4 /* Tail timeout value */ |
122 | #define NGP_TAILTOVAL_MASK (UINT64_CAST 0xf << 4) | 122 | #define NGP_TAILTOVAL_MASK (UINT64_CAST 0xf << 4) |
123 | 123 | ||
124 | /* NI_DIAG_PARMS mask and shift definitions */ | 124 | /* NI_DIAG_PARMS mask and shift definitions */ |
125 | 125 | ||
126 | #define NDP_PORTTORESET (UINT64_CAST 1 << 18) /* Port tmout reset */ | 126 | #define NDP_PORTTORESET (UINT64_CAST 1 << 18) /* Port tmout reset */ |
127 | #define NDP_LLP8BITMODE (UINT64_CAST 1 << 12) /* LLP 8-bit mode */ | 127 | #define NDP_LLP8BITMODE (UINT64_CAST 1 << 12) /* LLP 8-bit mode */ |
128 | #define NDP_PORTDISABLE (UINT64_CAST 1 << 6) /* Port disable */ | 128 | #define NDP_PORTDISABLE (UINT64_CAST 1 << 6) /* Port disable */ |
129 | #define NDP_SENDERROR (UINT64_CAST 1) /* Send data error */ | 129 | #define NDP_SENDERROR (UINT64_CAST 1) /* Send data error */ |
130 | 130 | ||
131 | /* | 131 | /* |
@@ -137,7 +137,7 @@ | |||
137 | #define NVP_PIOID_MASK (UINT64_CAST 0x3ff << 40) | 137 | #define NVP_PIOID_MASK (UINT64_CAST 0x3ff << 40) |
138 | #define NVP_WRITEID_SHFT 32 | 138 | #define NVP_WRITEID_SHFT 32 |
139 | #define NVP_WRITEID_MASK (UINT64_CAST 0xff << 32) | 139 | #define NVP_WRITEID_MASK (UINT64_CAST 0xff << 32) |
140 | #define NVP_ADDRESS_MASK (UINT64_CAST 0xffff8) /* Bits 19:3 */ | 140 | #define NVP_ADDRESS_MASK (UINT64_CAST 0xffff8) /* Bits 19:3 */ |
141 | #define NVP_TYPE_SHFT 0 | 141 | #define NVP_TYPE_SHFT 0 |
142 | #define NVP_TYPE_MASK (UINT64_CAST 0x3) | 142 | #define NVP_TYPE_MASK (UINT64_CAST 0x3) |
143 | 143 | ||
@@ -151,7 +151,7 @@ | |||
151 | #define NVS_PIOID_MASK (UINT64_CAST 0x3ff << 40) | 151 | #define NVS_PIOID_MASK (UINT64_CAST 0x3ff << 40) |
152 | #define NVS_WRITEID_SHFT 32 | 152 | #define NVS_WRITEID_SHFT 32 |
153 | #define NVS_WRITEID_MASK (UINT64_CAST 0xff << 32) | 153 | #define NVS_WRITEID_MASK (UINT64_CAST 0xff << 32) |
154 | #define NVS_ADDRESS_MASK (UINT64_CAST 0xfffffff8) /* Bits 31:3 */ | 154 | #define NVS_ADDRESS_MASK (UINT64_CAST 0xfffffff8) /* Bits 31:3 */ |
155 | #define NVS_TYPE_SHFT 0 | 155 | #define NVS_TYPE_SHFT 0 |
156 | #define NVS_TYPE_MASK (UINT64_CAST 0x7) | 156 | #define NVS_TYPE_MASK (UINT64_CAST 0x7) |
157 | #define NVS_ERROR_MASK (UINT64_CAST 0x4) /* bit set means error */ | 157 | #define NVS_ERROR_MASK (UINT64_CAST 0x4) /* bit set means error */ |
@@ -161,10 +161,10 @@ | |||
161 | #define PIOTYPE_WRITE 1 /* VECTOR_PARMS and VECTOR_STATUS */ | 161 | #define PIOTYPE_WRITE 1 /* VECTOR_PARMS and VECTOR_STATUS */ |
162 | #define PIOTYPE_UNDEFINED 2 /* VECTOR_PARMS and VECTOR_STATUS */ | 162 | #define PIOTYPE_UNDEFINED 2 /* VECTOR_PARMS and VECTOR_STATUS */ |
163 | #define PIOTYPE_EXCHANGE 3 /* VECTOR_PARMS and VECTOR_STATUS */ | 163 | #define PIOTYPE_EXCHANGE 3 /* VECTOR_PARMS and VECTOR_STATUS */ |
164 | #define PIOTYPE_ADDR_ERR 4 /* VECTOR_STATUS only */ | 164 | #define PIOTYPE_ADDR_ERR 4 /* VECTOR_STATUS only */ |
165 | #define PIOTYPE_CMD_ERR 5 /* VECTOR_STATUS only */ | 165 | #define PIOTYPE_CMD_ERR 5 /* VECTOR_STATUS only */ |
166 | #define PIOTYPE_PROT_ERR 6 /* VECTOR_STATUS only */ | 166 | #define PIOTYPE_PROT_ERR 6 /* VECTOR_STATUS only */ |
167 | #define PIOTYPE_UNKNOWN 7 /* VECTOR_STATUS only */ | 167 | #define PIOTYPE_UNKNOWN 7 /* VECTOR_STATUS only */ |
168 | 168 | ||
169 | /* NI_AGE_XXX mask and shift definitions */ | 169 | /* NI_AGE_XXX mask and shift definitions */ |
170 | 170 | ||
@@ -215,7 +215,7 @@ | |||
215 | 215 | ||
216 | #define NPE_FATAL_ERRORS (NPE_LINKRESET | NPE_INTERNALERROR | \ | 216 | #define NPE_FATAL_ERRORS (NPE_LINKRESET | NPE_INTERNALERROR | \ |
217 | NPE_BADMESSAGE | NPE_BADDEST | \ | 217 | NPE_BADMESSAGE | NPE_BADDEST | \ |
218 | NPE_FIFOOVERFLOW | NPE_CREDITTO_MASK | \ | 218 | NPE_FIFOOVERFLOW | NPE_CREDITTO_MASK | \ |
219 | NPE_TAILTO_MASK) | 219 | NPE_TAILTO_MASK) |
220 | 220 | ||
221 | /* NI_META_TABLE mask and shift definitions */ | 221 | /* NI_META_TABLE mask and shift definitions */ |
@@ -231,7 +231,7 @@ | |||
231 | typedef union hubni_port_error_u { | 231 | typedef union hubni_port_error_u { |
232 | u64 nipe_reg_value; | 232 | u64 nipe_reg_value; |
233 | struct { | 233 | struct { |
234 | u64 nipe_rsvd: 26, /* unused */ | 234 | u64 nipe_rsvd: 26, /* unused */ |
235 | nipe_lnk_reset: 1, /* link reset */ | 235 | nipe_lnk_reset: 1, /* link reset */ |
236 | nipe_intl_err: 1, /* internal error */ | 236 | nipe_intl_err: 1, /* internal error */ |
237 | nipe_bad_msg: 1, /* bad message */ | 237 | nipe_bad_msg: 1, /* bad message */ |
diff --git a/arch/mips/include/asm/sn/sn0/hubpi.h b/arch/mips/include/asm/sn/sn0/hubpi.h index e39f5f9da040..7b83655913c5 100644 --- a/arch/mips/include/asm/sn/sn0/hubpi.h +++ b/arch/mips/include/asm/sn/sn0/hubpi.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. | 8 | * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. |
9 | * Copyright (C) 1999 by Ralf Baechle | 9 | * Copyright (C) 1999 by Ralf Baechle |
10 | */ | 10 | */ |
11 | #ifndef _ASM_SN_SN0_HUBPI_H | 11 | #ifndef _ASM_SN_SN0_HUBPI_H |
12 | #define _ASM_SN_SN0_HUBPI_H | 12 | #define _ASM_SN_SN0_HUBPI_H |
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | 15 | ||
@@ -25,13 +25,13 @@ | |||
25 | 25 | ||
26 | /* General protection and control registers */ | 26 | /* General protection and control registers */ |
27 | 27 | ||
28 | #define PI_CPU_PROTECT 0x000000 /* CPU Protection */ | 28 | #define PI_CPU_PROTECT 0x000000 /* CPU Protection */ |
29 | #define PI_PROT_OVERRD 0x000008 /* Clear CPU Protection bit */ | 29 | #define PI_PROT_OVERRD 0x000008 /* Clear CPU Protection bit */ |
30 | #define PI_IO_PROTECT 0x000010 /* Interrupt Pending Protection */ | 30 | #define PI_IO_PROTECT 0x000010 /* Interrupt Pending Protection */ |
31 | #define PI_REGION_PRESENT 0x000018 /* Indicates whether region exists */ | 31 | #define PI_REGION_PRESENT 0x000018 /* Indicates whether region exists */ |
32 | #define PI_CPU_NUM 0x000020 /* CPU Number ID */ | 32 | #define PI_CPU_NUM 0x000020 /* CPU Number ID */ |
33 | #define PI_CALIAS_SIZE 0x000028 /* Cached Alias Size */ | 33 | #define PI_CALIAS_SIZE 0x000028 /* Cached Alias Size */ |
34 | #define PI_MAX_CRB_TIMEOUT 0x000030 /* Maximum Timeout for CRB */ | 34 | #define PI_MAX_CRB_TIMEOUT 0x000030 /* Maximum Timeout for CRB */ |
35 | #define PI_CRB_SFACTOR 0x000038 /* Scale factor for CRB timeout */ | 35 | #define PI_CRB_SFACTOR 0x000038 /* Scale factor for CRB timeout */ |
36 | 36 | ||
37 | /* CALIAS values */ | 37 | /* CALIAS values */ |
@@ -54,28 +54,28 @@ | |||
54 | 54 | ||
55 | /* Processor control and status checking */ | 55 | /* Processor control and status checking */ |
56 | 56 | ||
57 | #define PI_CPU_PRESENT_A 0x000040 /* CPU Present A */ | 57 | #define PI_CPU_PRESENT_A 0x000040 /* CPU Present A */ |
58 | #define PI_CPU_PRESENT_B 0x000048 /* CPU Present B */ | 58 | #define PI_CPU_PRESENT_B 0x000048 /* CPU Present B */ |
59 | #define PI_CPU_ENABLE_A 0x000050 /* CPU Enable A */ | 59 | #define PI_CPU_ENABLE_A 0x000050 /* CPU Enable A */ |
60 | #define PI_CPU_ENABLE_B 0x000058 /* CPU Enable B */ | 60 | #define PI_CPU_ENABLE_B 0x000058 /* CPU Enable B */ |
61 | #define PI_REPLY_LEVEL 0x000060 /* Reply Level */ | 61 | #define PI_REPLY_LEVEL 0x000060 /* Reply Level */ |
62 | #define PI_HARDRESET_BIT 0x020068 /* Bit cleared by s/w on SR */ | 62 | #define PI_HARDRESET_BIT 0x020068 /* Bit cleared by s/w on SR */ |
63 | #define PI_NMI_A 0x000070 /* NMI to CPU A */ | 63 | #define PI_NMI_A 0x000070 /* NMI to CPU A */ |
64 | #define PI_NMI_B 0x000078 /* NMI to CPU B */ | 64 | #define PI_NMI_B 0x000078 /* NMI to CPU B */ |
65 | #define PI_NMI_OFFSET (PI_NMI_B - PI_NMI_A) | 65 | #define PI_NMI_OFFSET (PI_NMI_B - PI_NMI_A) |
66 | #define PI_SOFTRESET 0x000080 /* Softreset (to both CPUs) */ | 66 | #define PI_SOFTRESET 0x000080 /* Softreset (to both CPUs) */ |
67 | 67 | ||
68 | /* Regular Interrupt register checking. */ | 68 | /* Regular Interrupt register checking. */ |
69 | 69 | ||
70 | #define PI_INT_PEND_MOD 0x000090 /* Write to set pending ints */ | 70 | #define PI_INT_PEND_MOD 0x000090 /* Write to set pending ints */ |
71 | #define PI_INT_PEND0 0x000098 /* Read to get pending ints */ | 71 | #define PI_INT_PEND0 0x000098 /* Read to get pending ints */ |
72 | #define PI_INT_PEND1 0x0000a0 /* Read to get pending ints */ | 72 | #define PI_INT_PEND1 0x0000a0 /* Read to get pending ints */ |
73 | #define PI_INT_MASK0_A 0x0000a8 /* Interrupt Mask 0 for CPU A */ | 73 | #define PI_INT_MASK0_A 0x0000a8 /* Interrupt Mask 0 for CPU A */ |
74 | #define PI_INT_MASK1_A 0x0000b0 /* Interrupt Mask 1 for CPU A */ | 74 | #define PI_INT_MASK1_A 0x0000b0 /* Interrupt Mask 1 for CPU A */ |
75 | #define PI_INT_MASK0_B 0x0000b8 /* Interrupt Mask 0 for CPU B */ | 75 | #define PI_INT_MASK0_B 0x0000b8 /* Interrupt Mask 0 for CPU B */ |
76 | #define PI_INT_MASK1_B 0x0000c0 /* Interrupt Mask 1 for CPU B */ | 76 | #define PI_INT_MASK1_B 0x0000c0 /* Interrupt Mask 1 for CPU B */ |
77 | 77 | ||
78 | #define PI_INT_MASK_OFFSET 0x10 /* Offset from A to B */ | 78 | #define PI_INT_MASK_OFFSET 0x10 /* Offset from A to B */ |
79 | 79 | ||
80 | /* Crosscall interrupts */ | 80 | /* Crosscall interrupts */ |
81 | 81 | ||
@@ -83,49 +83,49 @@ | |||
83 | #define PI_CC_PEND_SET_B 0x0000d0 /* CC Interrupt Pending Set, CPU B */ | 83 | #define PI_CC_PEND_SET_B 0x0000d0 /* CC Interrupt Pending Set, CPU B */ |
84 | #define PI_CC_PEND_CLR_A 0x0000d8 /* CC Interrupt Pending Clr, CPU A */ | 84 | #define PI_CC_PEND_CLR_A 0x0000d8 /* CC Interrupt Pending Clr, CPU A */ |
85 | #define PI_CC_PEND_CLR_B 0x0000e0 /* CC Interrupt Pending Clr, CPU B */ | 85 | #define PI_CC_PEND_CLR_B 0x0000e0 /* CC Interrupt Pending Clr, CPU B */ |
86 | #define PI_CC_MASK 0x0000e8 /* CC Interrupt mask */ | 86 | #define PI_CC_MASK 0x0000e8 /* CC Interrupt mask */ |
87 | 87 | ||
88 | #define PI_INT_SET_OFFSET 0x08 /* Offset from A to B */ | 88 | #define PI_INT_SET_OFFSET 0x08 /* Offset from A to B */ |
89 | 89 | ||
90 | /* Realtime Counter and Profiler control registers */ | 90 | /* Realtime Counter and Profiler control registers */ |
91 | 91 | ||
92 | #define PI_RT_COUNT 0x030100 /* Real Time Counter */ | 92 | #define PI_RT_COUNT 0x030100 /* Real Time Counter */ |
93 | #define PI_RT_COMPARE_A 0x000108 /* Real Time Compare A */ | 93 | #define PI_RT_COMPARE_A 0x000108 /* Real Time Compare A */ |
94 | #define PI_RT_COMPARE_B 0x000110 /* Real Time Compare B */ | 94 | #define PI_RT_COMPARE_B 0x000110 /* Real Time Compare B */ |
95 | #define PI_PROFILE_COMPARE 0x000118 /* L5 int to both cpus when == RTC */ | 95 | #define PI_PROFILE_COMPARE 0x000118 /* L5 int to both cpus when == RTC */ |
96 | #define PI_RT_PEND_A 0x000120 /* Set if RT int for A pending */ | 96 | #define PI_RT_PEND_A 0x000120 /* Set if RT int for A pending */ |
97 | #define PI_RT_PEND_B 0x000128 /* Set if RT int for B pending */ | 97 | #define PI_RT_PEND_B 0x000128 /* Set if RT int for B pending */ |
98 | #define PI_PROF_PEND_A 0x000130 /* Set if Prof int for A pending */ | 98 | #define PI_PROF_PEND_A 0x000130 /* Set if Prof int for A pending */ |
99 | #define PI_PROF_PEND_B 0x000138 /* Set if Prof int for B pending */ | 99 | #define PI_PROF_PEND_B 0x000138 /* Set if Prof int for B pending */ |
100 | #define PI_RT_EN_A 0x000140 /* RT int for CPU A enable */ | 100 | #define PI_RT_EN_A 0x000140 /* RT int for CPU A enable */ |
101 | #define PI_RT_EN_B 0x000148 /* RT int for CPU B enable */ | 101 | #define PI_RT_EN_B 0x000148 /* RT int for CPU B enable */ |
102 | #define PI_PROF_EN_A 0x000150 /* PROF int for CPU A enable */ | 102 | #define PI_PROF_EN_A 0x000150 /* PROF int for CPU A enable */ |
103 | #define PI_PROF_EN_B 0x000158 /* PROF int for CPU B enable */ | 103 | #define PI_PROF_EN_B 0x000158 /* PROF int for CPU B enable */ |
104 | #define PI_RT_LOCAL_CTRL 0x000160 /* RT control register */ | 104 | #define PI_RT_LOCAL_CTRL 0x000160 /* RT control register */ |
105 | #define PI_RT_FILTER_CTRL 0x000168 /* GCLK Filter control register */ | 105 | #define PI_RT_FILTER_CTRL 0x000168 /* GCLK Filter control register */ |
106 | 106 | ||
107 | #define PI_COUNT_OFFSET 0x08 /* A to B offset for all counts */ | 107 | #define PI_COUNT_OFFSET 0x08 /* A to B offset for all counts */ |
108 | 108 | ||
109 | /* Built-In Self Test support */ | 109 | /* Built-In Self Test support */ |
110 | 110 | ||
111 | #define PI_BIST_WRITE_DATA 0x000200 /* BIST write data */ | 111 | #define PI_BIST_WRITE_DATA 0x000200 /* BIST write data */ |
112 | #define PI_BIST_READ_DATA 0x000208 /* BIST read data */ | 112 | #define PI_BIST_READ_DATA 0x000208 /* BIST read data */ |
113 | #define PI_BIST_COUNT_TARG 0x000210 /* BIST Count and Target */ | 113 | #define PI_BIST_COUNT_TARG 0x000210 /* BIST Count and Target */ |
114 | #define PI_BIST_READY 0x000218 /* BIST Ready indicator */ | 114 | #define PI_BIST_READY 0x000218 /* BIST Ready indicator */ |
115 | #define PI_BIST_SHIFT_LOAD 0x000220 /* BIST control */ | 115 | #define PI_BIST_SHIFT_LOAD 0x000220 /* BIST control */ |
116 | #define PI_BIST_SHIFT_UNLOAD 0x000228 /* BIST control */ | 116 | #define PI_BIST_SHIFT_UNLOAD 0x000228 /* BIST control */ |
117 | #define PI_BIST_ENTER_RUN 0x000230 /* BIST control */ | 117 | #define PI_BIST_ENTER_RUN 0x000230 /* BIST control */ |
118 | 118 | ||
119 | /* Graphics control registers */ | 119 | /* Graphics control registers */ |
120 | 120 | ||
121 | #define PI_GFX_PAGE_A 0x000300 /* Graphics page A */ | 121 | #define PI_GFX_PAGE_A 0x000300 /* Graphics page A */ |
122 | #define PI_GFX_CREDIT_CNTR_A 0x000308 /* Graphics credit counter A */ | 122 | #define PI_GFX_CREDIT_CNTR_A 0x000308 /* Graphics credit counter A */ |
123 | #define PI_GFX_BIAS_A 0x000310 /* Graphics bias A */ | 123 | #define PI_GFX_BIAS_A 0x000310 /* Graphics bias A */ |
124 | #define PI_GFX_INT_CNTR_A 0x000318 /* Graphics interrupt counter A */ | 124 | #define PI_GFX_INT_CNTR_A 0x000318 /* Graphics interrupt counter A */ |
125 | #define PI_GFX_INT_CMP_A 0x000320 /* Graphics interrupt comparator A */ | 125 | #define PI_GFX_INT_CMP_A 0x000320 /* Graphics interrupt comparator A */ |
126 | #define PI_GFX_PAGE_B 0x000328 /* Graphics page B */ | 126 | #define PI_GFX_PAGE_B 0x000328 /* Graphics page B */ |
127 | #define PI_GFX_CREDIT_CNTR_B 0x000330 /* Graphics credit counter B */ | 127 | #define PI_GFX_CREDIT_CNTR_B 0x000330 /* Graphics credit counter B */ |
128 | #define PI_GFX_BIAS_B 0x000338 /* Graphics bias B */ | 128 | #define PI_GFX_BIAS_B 0x000338 /* Graphics bias B */ |
129 | #define PI_GFX_INT_CNTR_B 0x000340 /* Graphics interrupt counter B */ | 129 | #define PI_GFX_INT_CNTR_B 0x000340 /* Graphics interrupt counter B */ |
130 | #define PI_GFX_INT_CMP_B 0x000348 /* Graphics interrupt comparator B */ | 130 | #define PI_GFX_INT_CMP_B 0x000348 /* Graphics interrupt comparator B */ |
131 | 131 | ||
@@ -138,24 +138,24 @@ | |||
138 | #define PI_ERR_INT_MASK_B 0x000410 /* Error Interrupt mask for CPU B */ | 138 | #define PI_ERR_INT_MASK_B 0x000410 /* Error Interrupt mask for CPU B */ |
139 | #define PI_ERR_STACK_ADDR_A 0x000418 /* Error stack address for CPU A */ | 139 | #define PI_ERR_STACK_ADDR_A 0x000418 /* Error stack address for CPU A */ |
140 | #define PI_ERR_STACK_ADDR_B 0x000420 /* Error stack address for CPU B */ | 140 | #define PI_ERR_STACK_ADDR_B 0x000420 /* Error stack address for CPU B */ |
141 | #define PI_ERR_STACK_SIZE 0x000428 /* Error Stack Size */ | 141 | #define PI_ERR_STACK_SIZE 0x000428 /* Error Stack Size */ |
142 | #define PI_ERR_STATUS0_A 0x000430 /* Error Status 0A */ | 142 | #define PI_ERR_STATUS0_A 0x000430 /* Error Status 0A */ |
143 | #define PI_ERR_STATUS0_A_RCLR 0x000438 /* Error Status 0A clear on read */ | 143 | #define PI_ERR_STATUS0_A_RCLR 0x000438 /* Error Status 0A clear on read */ |
144 | #define PI_ERR_STATUS1_A 0x000440 /* Error Status 1A */ | 144 | #define PI_ERR_STATUS1_A 0x000440 /* Error Status 1A */ |
145 | #define PI_ERR_STATUS1_A_RCLR 0x000448 /* Error Status 1A clear on read */ | 145 | #define PI_ERR_STATUS1_A_RCLR 0x000448 /* Error Status 1A clear on read */ |
146 | #define PI_ERR_STATUS0_B 0x000450 /* Error Status 0B */ | 146 | #define PI_ERR_STATUS0_B 0x000450 /* Error Status 0B */ |
147 | #define PI_ERR_STATUS0_B_RCLR 0x000458 /* Error Status 0B clear on read */ | 147 | #define PI_ERR_STATUS0_B_RCLR 0x000458 /* Error Status 0B clear on read */ |
148 | #define PI_ERR_STATUS1_B 0x000460 /* Error Status 1B */ | 148 | #define PI_ERR_STATUS1_B 0x000460 /* Error Status 1B */ |
149 | #define PI_ERR_STATUS1_B_RCLR 0x000468 /* Error Status 1B clear on read */ | 149 | #define PI_ERR_STATUS1_B_RCLR 0x000468 /* Error Status 1B clear on read */ |
150 | #define PI_SPOOL_CMP_A 0x000470 /* Spool compare for CPU A */ | 150 | #define PI_SPOOL_CMP_A 0x000470 /* Spool compare for CPU A */ |
151 | #define PI_SPOOL_CMP_B 0x000478 /* Spool compare for CPU B */ | 151 | #define PI_SPOOL_CMP_B 0x000478 /* Spool compare for CPU B */ |
152 | #define PI_CRB_TIMEOUT_A 0x000480 /* Timed out CRB entries for A */ | 152 | #define PI_CRB_TIMEOUT_A 0x000480 /* Timed out CRB entries for A */ |
153 | #define PI_CRB_TIMEOUT_B 0x000488 /* Timed out CRB entries for B */ | 153 | #define PI_CRB_TIMEOUT_B 0x000488 /* Timed out CRB entries for B */ |
154 | #define PI_SYSAD_ERRCHK_EN 0x000490 /* Enables SYSAD error checking */ | 154 | #define PI_SYSAD_ERRCHK_EN 0x000490 /* Enables SYSAD error checking */ |
155 | #define PI_BAD_CHECK_BIT_A 0x000498 /* Force SYSAD check bit error */ | 155 | #define PI_BAD_CHECK_BIT_A 0x000498 /* Force SYSAD check bit error */ |
156 | #define PI_BAD_CHECK_BIT_B 0x0004a0 /* Force SYSAD check bit error */ | 156 | #define PI_BAD_CHECK_BIT_B 0x0004a0 /* Force SYSAD check bit error */ |
157 | #define PI_NACK_CNT_A 0x0004a8 /* Consecutive NACK counter */ | 157 | #define PI_NACK_CNT_A 0x0004a8 /* Consecutive NACK counter */ |
158 | #define PI_NACK_CNT_B 0x0004b0 /* " " for CPU B */ | 158 | #define PI_NACK_CNT_B 0x0004b0 /* " " for CPU B */ |
159 | #define PI_NACK_CMP 0x0004b8 /* NACK count compare */ | 159 | #define PI_NACK_CMP 0x0004b8 /* NACK count compare */ |
160 | #define PI_STACKADDR_OFFSET (PI_ERR_STACK_ADDR_B - PI_ERR_STACK_ADDR_A) | 160 | #define PI_STACKADDR_OFFSET (PI_ERR_STACK_ADDR_B - PI_ERR_STACK_ADDR_A) |
161 | #define PI_ERRSTAT_OFFSET (PI_ERR_STATUS0_B - PI_ERR_STATUS0_A) | 161 | #define PI_ERRSTAT_OFFSET (PI_ERR_STATUS0_B - PI_ERR_STATUS0_A) |
@@ -168,7 +168,7 @@ | |||
168 | #define PI_ERR_SPUR_MSG_A 0x00000008 | 168 | #define PI_ERR_SPUR_MSG_A 0x00000008 |
169 | #define PI_ERR_WRB_TERR_B 0x00000010 /* WRB TERR */ | 169 | #define PI_ERR_WRB_TERR_B 0x00000010 /* WRB TERR */ |
170 | #define PI_ERR_WRB_TERR_A 0x00000020 | 170 | #define PI_ERR_WRB_TERR_A 0x00000020 |
171 | #define PI_ERR_WRB_WERR_B 0x00000040 /* WRB WERR */ | 171 | #define PI_ERR_WRB_WERR_B 0x00000040 /* WRB WERR */ |
172 | #define PI_ERR_WRB_WERR_A 0x00000080 | 172 | #define PI_ERR_WRB_WERR_A 0x00000080 |
173 | #define PI_ERR_SYSSTATE_B 0x00000100 /* SysState parity error */ | 173 | #define PI_ERR_SYSSTATE_B 0x00000100 /* SysState parity error */ |
174 | #define PI_ERR_SYSSTATE_A 0x00000200 | 174 | #define PI_ERR_SYSSTATE_A 0x00000200 |
@@ -196,32 +196,32 @@ | |||
196 | * The following three macros define all possible error int pends. | 196 | * The following three macros define all possible error int pends. |
197 | */ | 197 | */ |
198 | 198 | ||
199 | #define PI_FATAL_ERR_CPU_A (PI_ERR_SYSSTATE_TAG_A | \ | 199 | #define PI_FATAL_ERR_CPU_A (PI_ERR_SYSSTATE_TAG_A | \ |
200 | PI_ERR_BAD_SPOOL_A | \ | 200 | PI_ERR_BAD_SPOOL_A | \ |
201 | PI_ERR_SYSCMD_ADDR_A | \ | 201 | PI_ERR_SYSCMD_ADDR_A | \ |
202 | PI_ERR_SYSCMD_DATA_A | \ | 202 | PI_ERR_SYSCMD_DATA_A | \ |
203 | PI_ERR_SYSAD_ADDR_A | \ | 203 | PI_ERR_SYSAD_ADDR_A | \ |
204 | PI_ERR_SYSAD_DATA_A | \ | 204 | PI_ERR_SYSAD_DATA_A | \ |
205 | PI_ERR_SYSSTATE_A) | 205 | PI_ERR_SYSSTATE_A) |
206 | 206 | ||
207 | #define PI_MISC_ERR_CPU_A (PI_ERR_UNCAC_UNCORR_A | \ | 207 | #define PI_MISC_ERR_CPU_A (PI_ERR_UNCAC_UNCORR_A | \ |
208 | PI_ERR_WRB_WERR_A | \ | 208 | PI_ERR_WRB_WERR_A | \ |
209 | PI_ERR_WRB_TERR_A | \ | 209 | PI_ERR_WRB_TERR_A | \ |
210 | PI_ERR_SPUR_MSG_A | \ | 210 | PI_ERR_SPUR_MSG_A | \ |
211 | PI_ERR_SPOOL_CMP_A) | 211 | PI_ERR_SPOOL_CMP_A) |
212 | 212 | ||
213 | #define PI_FATAL_ERR_CPU_B (PI_ERR_SYSSTATE_TAG_B | \ | 213 | #define PI_FATAL_ERR_CPU_B (PI_ERR_SYSSTATE_TAG_B | \ |
214 | PI_ERR_BAD_SPOOL_B | \ | 214 | PI_ERR_BAD_SPOOL_B | \ |
215 | PI_ERR_SYSCMD_ADDR_B | \ | 215 | PI_ERR_SYSCMD_ADDR_B | \ |
216 | PI_ERR_SYSCMD_DATA_B | \ | 216 | PI_ERR_SYSCMD_DATA_B | \ |
217 | PI_ERR_SYSAD_ADDR_B | \ | 217 | PI_ERR_SYSAD_ADDR_B | \ |
218 | PI_ERR_SYSAD_DATA_B | \ | 218 | PI_ERR_SYSAD_DATA_B | \ |
219 | PI_ERR_SYSSTATE_B) | 219 | PI_ERR_SYSSTATE_B) |
220 | 220 | ||
221 | #define PI_MISC_ERR_CPU_B (PI_ERR_UNCAC_UNCORR_B | \ | 221 | #define PI_MISC_ERR_CPU_B (PI_ERR_UNCAC_UNCORR_B | \ |
222 | PI_ERR_WRB_WERR_B | \ | 222 | PI_ERR_WRB_WERR_B | \ |
223 | PI_ERR_WRB_TERR_B | \ | 223 | PI_ERR_WRB_TERR_B | \ |
224 | PI_ERR_SPUR_MSG_B | \ | 224 | PI_ERR_SPUR_MSG_B | \ |
225 | PI_ERR_SPOOL_CMP_B) | 225 | PI_ERR_SPOOL_CMP_B) |
226 | 226 | ||
227 | #define PI_ERR_GENERIC (PI_ERR_MD_UNCORR) | 227 | #define PI_ERR_GENERIC (PI_ERR_MD_UNCORR) |
@@ -242,24 +242,24 @@ | |||
242 | #define PI_ERR_ST0_CMD_SHFT 17 | 242 | #define PI_ERR_ST0_CMD_SHFT 17 |
243 | #define PI_ERR_ST0_ADDR_MASK 0x3ffffffffe000000 | 243 | #define PI_ERR_ST0_ADDR_MASK 0x3ffffffffe000000 |
244 | #define PI_ERR_ST0_ADDR_SHFT 25 | 244 | #define PI_ERR_ST0_ADDR_SHFT 25 |
245 | #define PI_ERR_ST0_OVERRUN_MASK 0x4000000000000000 | 245 | #define PI_ERR_ST0_OVERRUN_MASK 0x4000000000000000 |
246 | #define PI_ERR_ST0_OVERRUN_SHFT 62 | 246 | #define PI_ERR_ST0_OVERRUN_SHFT 62 |
247 | #define PI_ERR_ST0_VALID_MASK 0x8000000000000000 | 247 | #define PI_ERR_ST0_VALID_MASK 0x8000000000000000 |
248 | #define PI_ERR_ST0_VALID_SHFT 63 | 248 | #define PI_ERR_ST0_VALID_SHFT 63 |
249 | 249 | ||
250 | /* Fields in PI_ERR_STATUS1_[AB] */ | 250 | /* Fields in PI_ERR_STATUS1_[AB] */ |
251 | #define PI_ERR_ST1_SPOOL_MASK 0x00000000001fffff | 251 | #define PI_ERR_ST1_SPOOL_MASK 0x00000000001fffff |
252 | #define PI_ERR_ST1_SPOOL_SHFT 0 | 252 | #define PI_ERR_ST1_SPOOL_SHFT 0 |
253 | #define PI_ERR_ST1_TOUTCNT_MASK 0x000000001fe00000 | 253 | #define PI_ERR_ST1_TOUTCNT_MASK 0x000000001fe00000 |
254 | #define PI_ERR_ST1_TOUTCNT_SHFT 21 | 254 | #define PI_ERR_ST1_TOUTCNT_SHFT 21 |
255 | #define PI_ERR_ST1_INVCNT_MASK 0x0000007fe0000000 | 255 | #define PI_ERR_ST1_INVCNT_MASK 0x0000007fe0000000 |
256 | #define PI_ERR_ST1_INVCNT_SHFT 29 | 256 | #define PI_ERR_ST1_INVCNT_SHFT 29 |
257 | #define PI_ERR_ST1_CRBNUM_MASK 0x0000038000000000 | 257 | #define PI_ERR_ST1_CRBNUM_MASK 0x0000038000000000 |
258 | #define PI_ERR_ST1_CRBNUM_SHFT 39 | 258 | #define PI_ERR_ST1_CRBNUM_SHFT 39 |
259 | #define PI_ERR_ST1_WRBRRB_MASK 0x0000040000000000 | 259 | #define PI_ERR_ST1_WRBRRB_MASK 0x0000040000000000 |
260 | #define PI_ERR_ST1_WRBRRB_SHFT 42 | 260 | #define PI_ERR_ST1_WRBRRB_SHFT 42 |
261 | #define PI_ERR_ST1_CRBSTAT_MASK 0x001ff80000000000 | 261 | #define PI_ERR_ST1_CRBSTAT_MASK 0x001ff80000000000 |
262 | #define PI_ERR_ST1_CRBSTAT_SHFT 43 | 262 | #define PI_ERR_ST1_CRBSTAT_SHFT 43 |
263 | #define PI_ERR_ST1_MSGSRC_MASK 0xffe0000000000000 | 263 | #define PI_ERR_ST1_MSGSRC_MASK 0xffe0000000000000 |
264 | #define PI_ERR_ST1_MSGSRC_SHFT 53 | 264 | #define PI_ERR_ST1_MSGSRC_SHFT 53 |
265 | 265 | ||
@@ -274,8 +274,8 @@ | |||
274 | #define PI_ERR_STK_CRBNUM_SHFT 9 | 274 | #define PI_ERR_STK_CRBNUM_SHFT 9 |
275 | #define PI_ERR_STK_WRBRRB_MASK 0x0000000000001000 | 275 | #define PI_ERR_STK_WRBRRB_MASK 0x0000000000001000 |
276 | #define PI_ERR_STK_WRBRRB_SHFT 12 | 276 | #define PI_ERR_STK_WRBRRB_SHFT 12 |
277 | #define PI_ERR_STK_CRBSTAT_MASK 0x00000000007fe000 | 277 | #define PI_ERR_STK_CRBSTAT_MASK 0x00000000007fe000 |
278 | #define PI_ERR_STK_CRBSTAT_SHFT 13 | 278 | #define PI_ERR_STK_CRBSTAT_SHFT 13 |
279 | #define PI_ERR_STK_CMD_MASK 0x000000007f800000 | 279 | #define PI_ERR_STK_CMD_MASK 0x000000007f800000 |
280 | #define PI_ERR_STK_CMD_SHFT 23 | 280 | #define PI_ERR_STK_CMD_SHFT 23 |
281 | #define PI_ERR_STK_ADDR_MASK 0xffffffff80000000 | 281 | #define PI_ERR_STK_ADDR_MASK 0xffffffff80000000 |
@@ -364,11 +364,11 @@ typedef u64 rtc_time_t; | |||
364 | 364 | ||
365 | /* Bits in PI_SYSAD_ERRCHK_EN */ | 365 | /* Bits in PI_SYSAD_ERRCHK_EN */ |
366 | #define PI_SYSAD_ERRCHK_ECCGEN 0x01 /* Enable ECC generation */ | 366 | #define PI_SYSAD_ERRCHK_ECCGEN 0x01 /* Enable ECC generation */ |
367 | #define PI_SYSAD_ERRCHK_QUALGEN 0x02 /* Enable data quality signal gen. */ | 367 | #define PI_SYSAD_ERRCHK_QUALGEN 0x02 /* Enable data quality signal gen. */ |
368 | #define PI_SYSAD_ERRCHK_SADP 0x04 /* Enable SysAD parity checking */ | 368 | #define PI_SYSAD_ERRCHK_SADP 0x04 /* Enable SysAD parity checking */ |
369 | #define PI_SYSAD_ERRCHK_CMDP 0x08 /* Enable SysCmd parity checking */ | 369 | #define PI_SYSAD_ERRCHK_CMDP 0x08 /* Enable SysCmd parity checking */ |
370 | #define PI_SYSAD_ERRCHK_STATE 0x10 /* Enable SysState parity checking */ | 370 | #define PI_SYSAD_ERRCHK_STATE 0x10 /* Enable SysState parity checking */ |
371 | #define PI_SYSAD_ERRCHK_QUAL 0x20 /* Enable data quality checking */ | 371 | #define PI_SYSAD_ERRCHK_QUAL 0x20 /* Enable data quality checking */ |
372 | #define PI_SYSAD_CHECK_ALL 0x3f /* Generate and check all signals. */ | 372 | #define PI_SYSAD_CHECK_ALL 0x3f /* Generate and check all signals. */ |
373 | 373 | ||
374 | /* Interrupt pending bits on R10000 */ | 374 | /* Interrupt pending bits on R10000 */ |
diff --git a/arch/mips/include/asm/sn/sn0/ip27.h b/arch/mips/include/asm/sn/sn0/ip27.h index 3c97e0855c8d..3b5efeefcc3f 100644 --- a/arch/mips/include/asm/sn/sn0/ip27.h +++ b/arch/mips/include/asm/sn/sn0/ip27.h | |||
@@ -21,14 +21,14 @@ | |||
21 | 21 | ||
22 | #ifndef __ASSEMBLY__ | 22 | #ifndef __ASSEMBLY__ |
23 | 23 | ||
24 | #define CAUSE_BERRINTR IE_IRQ5 | 24 | #define CAUSE_BERRINTR IE_IRQ5 |
25 | 25 | ||
26 | #define ECCF_CACHE_ERR 0 | 26 | #define ECCF_CACHE_ERR 0 |
27 | #define ECCF_TAGLO 1 | 27 | #define ECCF_TAGLO 1 |
28 | #define ECCF_ECC 2 | 28 | #define ECCF_ECC 2 |
29 | #define ECCF_ERROREPC 3 | 29 | #define ECCF_ERROREPC 3 |
30 | #define ECCF_PADDR 4 | 30 | #define ECCF_PADDR 4 |
31 | #define ECCF_SIZE (5 * sizeof(long)) | 31 | #define ECCF_SIZE (5 * sizeof(long)) |
32 | 32 | ||
33 | #endif /* !__ASSEMBLY__ */ | 33 | #endif /* !__ASSEMBLY__ */ |
34 | 34 | ||
@@ -39,8 +39,8 @@ | |||
39 | * the processor number of the calling processor. The proc parameters | 39 | * the processor number of the calling processor. The proc parameters |
40 | * must be a register. | 40 | * must be a register. |
41 | */ | 41 | */ |
42 | #define KL_GET_CPUNUM(proc) \ | 42 | #define KL_GET_CPUNUM(proc) \ |
43 | dli proc, LOCAL_HUB(0); \ | 43 | dli proc, LOCAL_HUB(0); \ |
44 | ld proc, PI_CPU_NUM(proc) | 44 | ld proc, PI_CPU_NUM(proc) |
45 | 45 | ||
46 | #endif /* __ASSEMBLY__ */ | 46 | #endif /* __ASSEMBLY__ */ |
@@ -71,15 +71,15 @@ | |||
71 | 71 | ||
72 | #define NUM_CAUSE_INTRS 8 | 72 | #define NUM_CAUSE_INTRS 8 |
73 | 73 | ||
74 | #define SCACHE_LINESIZE 128 | 74 | #define SCACHE_LINESIZE 128 |
75 | #define SCACHE_LINEMASK (SCACHE_LINESIZE - 1) | 75 | #define SCACHE_LINEMASK (SCACHE_LINESIZE - 1) |
76 | 76 | ||
77 | #include <asm/sn/addrs.h> | 77 | #include <asm/sn/addrs.h> |
78 | 78 | ||
79 | #define LED_CYCLE_MASK 0x0f | 79 | #define LED_CYCLE_MASK 0x0f |
80 | #define LED_CYCLE_SHFT 4 | 80 | #define LED_CYCLE_SHFT 4 |
81 | 81 | ||
82 | #define SEND_NMI(_nasid, _slice) \ | 82 | #define SEND_NMI(_nasid, _slice) \ |
83 | REMOTE_HUB_S((_nasid), (PI_NMI_A + ((_slice) * PI_NMI_OFFSET)), 1) | 83 | REMOTE_HUB_S((_nasid), (PI_NMI_A + ((_slice) * PI_NMI_OFFSET)), 1) |
84 | 84 | ||
85 | #endif /* _ASM_SN_SN0_IP27_H */ | 85 | #endif /* _ASM_SN_SN0_IP27_H */ |
diff --git a/arch/mips/include/asm/sn/types.h b/arch/mips/include/asm/sn/types.h index 74d0bb260b86..c4813d67aec3 100644 --- a/arch/mips/include/asm/sn/types.h +++ b/arch/mips/include/asm/sn/types.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | 13 | ||
14 | typedef unsigned long cpuid_t; | 14 | typedef unsigned long cpuid_t; |
15 | typedef unsigned long cnodemask_t; | 15 | typedef unsigned long cnodemask_t; |
16 | typedef signed short nasid_t; /* node id in numa-as-id space */ | 16 | typedef signed short nasid_t; /* node id in numa-as-id space */ |
17 | typedef signed short cnodeid_t; /* node id in compact-id space */ | 17 | typedef signed short cnodeid_t; /* node id in compact-id space */ |
@@ -19,7 +19,7 @@ typedef signed char partid_t; /* partition ID type */ | |||
19 | typedef signed short moduleid_t; /* user-visible module number type */ | 19 | typedef signed short moduleid_t; /* user-visible module number type */ |
20 | typedef signed short cmoduleid_t; /* kernel compact module id type */ | 20 | typedef signed short cmoduleid_t; /* kernel compact module id type */ |
21 | typedef unsigned char clusterid_t; /* Clusterid of the cell */ | 21 | typedef unsigned char clusterid_t; /* Clusterid of the cell */ |
22 | typedef unsigned long pfn_t; | 22 | typedef unsigned long pfn_t; |
23 | 23 | ||
24 | typedef dev_t vertex_hdl_t; /* hardware graph vertex handle */ | 24 | typedef dev_t vertex_hdl_t; /* hardware graph vertex handle */ |
25 | 25 | ||
diff --git a/arch/mips/include/asm/sni.h b/arch/mips/include/asm/sni.h index 8c1eb02c6d16..a107201a2e1e 100644 --- a/arch/mips/include/asm/sni.h +++ b/arch/mips/include/asm/sni.h | |||
@@ -13,27 +13,27 @@ | |||
13 | 13 | ||
14 | extern unsigned int sni_brd_type; | 14 | extern unsigned int sni_brd_type; |
15 | 15 | ||
16 | #define SNI_BRD_10 2 | 16 | #define SNI_BRD_10 2 |
17 | #define SNI_BRD_10NEW 3 | 17 | #define SNI_BRD_10NEW 3 |
18 | #define SNI_BRD_TOWER_OASIC 4 | 18 | #define SNI_BRD_TOWER_OASIC 4 |
19 | #define SNI_BRD_MINITOWER 5 | 19 | #define SNI_BRD_MINITOWER 5 |
20 | #define SNI_BRD_PCI_TOWER 6 | 20 | #define SNI_BRD_PCI_TOWER 6 |
21 | #define SNI_BRD_RM200 7 | 21 | #define SNI_BRD_RM200 7 |
22 | #define SNI_BRD_PCI_MTOWER 8 | 22 | #define SNI_BRD_PCI_MTOWER 8 |
23 | #define SNI_BRD_PCI_DESKTOP 9 | 23 | #define SNI_BRD_PCI_DESKTOP 9 |
24 | #define SNI_BRD_PCI_TOWER_CPLUS 10 | 24 | #define SNI_BRD_PCI_TOWER_CPLUS 10 |
25 | #define SNI_BRD_PCI_MTOWER_CPLUS 11 | 25 | #define SNI_BRD_PCI_MTOWER_CPLUS 11 |
26 | 26 | ||
27 | /* RM400 cpu types */ | 27 | /* RM400 cpu types */ |
28 | #define SNI_CPU_M8021 0x01 | 28 | #define SNI_CPU_M8021 0x01 |
29 | #define SNI_CPU_M8030 0x04 | 29 | #define SNI_CPU_M8030 0x04 |
30 | #define SNI_CPU_M8031 0x06 | 30 | #define SNI_CPU_M8031 0x06 |
31 | #define SNI_CPU_M8034 0x0f | 31 | #define SNI_CPU_M8034 0x0f |
32 | #define SNI_CPU_M8037 0x07 | 32 | #define SNI_CPU_M8037 0x07 |
33 | #define SNI_CPU_M8040 0x05 | 33 | #define SNI_CPU_M8040 0x05 |
34 | #define SNI_CPU_M8043 0x09 | 34 | #define SNI_CPU_M8043 0x09 |
35 | #define SNI_CPU_M8050 0x0b | 35 | #define SNI_CPU_M8050 0x0b |
36 | #define SNI_CPU_M8053 0x0d | 36 | #define SNI_CPU_M8053 0x0d |
37 | 37 | ||
38 | #define SNI_PORT_BASE CKSEG1ADDR(0xb4000000) | 38 | #define SNI_PORT_BASE CKSEG1ADDR(0xb4000000) |
39 | 39 | ||
@@ -52,14 +52,14 @@ extern unsigned int sni_brd_type; | |||
52 | #define PCIMT_ERRADDR CKSEG1ADDR(0xbfff0044) | 52 | #define PCIMT_ERRADDR CKSEG1ADDR(0xbfff0044) |
53 | #define PCIMT_SYNDROME CKSEG1ADDR(0xbfff004c) | 53 | #define PCIMT_SYNDROME CKSEG1ADDR(0xbfff004c) |
54 | #define PCIMT_ITPEND CKSEG1ADDR(0xbfff0054) | 54 | #define PCIMT_ITPEND CKSEG1ADDR(0xbfff0054) |
55 | #define IT_INT2 0x01 | 55 | #define IT_INT2 0x01 |
56 | #define IT_INTD 0x02 | 56 | #define IT_INTD 0x02 |
57 | #define IT_INTC 0x04 | 57 | #define IT_INTC 0x04 |
58 | #define IT_INTB 0x08 | 58 | #define IT_INTB 0x08 |
59 | #define IT_INTA 0x10 | 59 | #define IT_INTA 0x10 |
60 | #define IT_EISA 0x20 | 60 | #define IT_EISA 0x20 |
61 | #define IT_SCSI 0x40 | 61 | #define IT_SCSI 0x40 |
62 | #define IT_ETH 0x80 | 62 | #define IT_ETH 0x80 |
63 | #define PCIMT_IRQSEL CKSEG1ADDR(0xbfff005c) | 63 | #define PCIMT_IRQSEL CKSEG1ADDR(0xbfff005c) |
64 | #define PCIMT_TESTMEM CKSEG1ADDR(0xbfff0064) | 64 | #define PCIMT_TESTMEM CKSEG1ADDR(0xbfff0064) |
65 | #define PCIMT_ECCREG CKSEG1ADDR(0xbfff006c) | 65 | #define PCIMT_ECCREG CKSEG1ADDR(0xbfff006c) |
@@ -86,14 +86,14 @@ extern unsigned int sni_brd_type; | |||
86 | #define PCIMT_ERRADDR CKSEG1ADDR(0xbfff0040) | 86 | #define PCIMT_ERRADDR CKSEG1ADDR(0xbfff0040) |
87 | #define PCIMT_SYNDROME CKSEG1ADDR(0xbfff0048) | 87 | #define PCIMT_SYNDROME CKSEG1ADDR(0xbfff0048) |
88 | #define PCIMT_ITPEND CKSEG1ADDR(0xbfff0050) | 88 | #define PCIMT_ITPEND CKSEG1ADDR(0xbfff0050) |
89 | #define IT_INT2 0x01 | 89 | #define IT_INT2 0x01 |
90 | #define IT_INTD 0x02 | 90 | #define IT_INTD 0x02 |
91 | #define IT_INTC 0x04 | 91 | #define IT_INTC 0x04 |
92 | #define IT_INTB 0x08 | 92 | #define IT_INTB 0x08 |
93 | #define IT_INTA 0x10 | 93 | #define IT_INTA 0x10 |
94 | #define IT_EISA 0x20 | 94 | #define IT_EISA 0x20 |
95 | #define IT_SCSI 0x40 | 95 | #define IT_SCSI 0x40 |
96 | #define IT_ETH 0x80 | 96 | #define IT_ETH 0x80 |
97 | #define PCIMT_IRQSEL CKSEG1ADDR(0xbfff0058) | 97 | #define PCIMT_IRQSEL CKSEG1ADDR(0xbfff0058) |
98 | #define PCIMT_TESTMEM CKSEG1ADDR(0xbfff0060) | 98 | #define PCIMT_TESTMEM CKSEG1ADDR(0xbfff0060) |
99 | #define PCIMT_ECCREG CKSEG1ADDR(0xbfff0068) | 99 | #define PCIMT_ECCREG CKSEG1ADDR(0xbfff0068) |
@@ -137,29 +137,29 @@ extern unsigned int sni_brd_type; | |||
137 | /* | 137 | /* |
138 | * A20R based boards | 138 | * A20R based boards |
139 | */ | 139 | */ |
140 | #define A20R_PT_CLOCK_BASE CKSEG1ADDR(0xbc040000) | 140 | #define A20R_PT_CLOCK_BASE CKSEG1ADDR(0xbc040000) |
141 | #define A20R_PT_TIM0_ACK CKSEG1ADDR(0xbc050000) | 141 | #define A20R_PT_TIM0_ACK CKSEG1ADDR(0xbc050000) |
142 | #define A20R_PT_TIM1_ACK CKSEG1ADDR(0xbc060000) | 142 | #define A20R_PT_TIM1_ACK CKSEG1ADDR(0xbc060000) |
143 | 143 | ||
144 | #define SNI_A20R_IRQ_BASE MIPS_CPU_IRQ_BASE | 144 | #define SNI_A20R_IRQ_BASE MIPS_CPU_IRQ_BASE |
145 | #define SNI_A20R_IRQ_TIMER (SNI_A20R_IRQ_BASE+5) | 145 | #define SNI_A20R_IRQ_TIMER (SNI_A20R_IRQ_BASE+5) |
146 | 146 | ||
147 | #define SNI_PCIT_INT_REG CKSEG1ADDR(0xbfff000c) | 147 | #define SNI_PCIT_INT_REG CKSEG1ADDR(0xbfff000c) |
148 | 148 | ||
149 | #define SNI_PCIT_INT_START 24 | 149 | #define SNI_PCIT_INT_START 24 |
150 | #define SNI_PCIT_INT_END 30 | 150 | #define SNI_PCIT_INT_END 30 |
151 | 151 | ||
152 | #define PCIT_IRQ_ETHERNET (MIPS_CPU_IRQ_BASE + 5) | 152 | #define PCIT_IRQ_ETHERNET (MIPS_CPU_IRQ_BASE + 5) |
153 | #define PCIT_IRQ_INTA (SNI_PCIT_INT_START + 0) | 153 | #define PCIT_IRQ_INTA (SNI_PCIT_INT_START + 0) |
154 | #define PCIT_IRQ_INTB (SNI_PCIT_INT_START + 1) | 154 | #define PCIT_IRQ_INTB (SNI_PCIT_INT_START + 1) |
155 | #define PCIT_IRQ_INTC (SNI_PCIT_INT_START + 2) | 155 | #define PCIT_IRQ_INTC (SNI_PCIT_INT_START + 2) |
156 | #define PCIT_IRQ_INTD (SNI_PCIT_INT_START + 3) | 156 | #define PCIT_IRQ_INTD (SNI_PCIT_INT_START + 3) |
157 | #define PCIT_IRQ_SCSI0 (SNI_PCIT_INT_START + 4) | 157 | #define PCIT_IRQ_SCSI0 (SNI_PCIT_INT_START + 4) |
158 | #define PCIT_IRQ_SCSI1 (SNI_PCIT_INT_START + 5) | 158 | #define PCIT_IRQ_SCSI1 (SNI_PCIT_INT_START + 5) |
159 | 159 | ||
160 | 160 | ||
161 | /* | 161 | /* |
162 | * Interrupt 0-16 are EISA interrupts. Interrupts from 16 on are assigned | 162 | * Interrupt 0-16 are EISA interrupts. Interrupts from 16 on are assigned |
163 | * to the other interrupts generated by ASIC PCI. | 163 | * to the other interrupts generated by ASIC PCI. |
164 | * | 164 | * |
165 | * INT2 is a wired-or of the push button interrupt, high temperature interrupt | 165 | * INT2 is a wired-or of the push button interrupt, high temperature interrupt |
@@ -204,12 +204,12 @@ extern unsigned int sni_brd_type; | |||
204 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 204 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
205 | #define __SNI_END 3 | 205 | #define __SNI_END 3 |
206 | #endif | 206 | #endif |
207 | #define SNI_IDPROM_BASE CKSEG1ADDR(0x1ff00000) | 207 | #define SNI_IDPROM_BASE CKSEG1ADDR(0x1ff00000) |
208 | #define SNI_IDPROM_MEMSIZE (SNI_IDPROM_BASE + (0x28 ^ __SNI_END)) | 208 | #define SNI_IDPROM_MEMSIZE (SNI_IDPROM_BASE + (0x28 ^ __SNI_END)) |
209 | #define SNI_IDPROM_BRDTYPE (SNI_IDPROM_BASE + (0x29 ^ __SNI_END)) | 209 | #define SNI_IDPROM_BRDTYPE (SNI_IDPROM_BASE + (0x29 ^ __SNI_END)) |
210 | #define SNI_IDPROM_CPUTYPE (SNI_IDPROM_BASE + (0x30 ^ __SNI_END)) | 210 | #define SNI_IDPROM_CPUTYPE (SNI_IDPROM_BASE + (0x30 ^ __SNI_END)) |
211 | 211 | ||
212 | #define SNI_IDPROM_SIZE 0x1000 | 212 | #define SNI_IDPROM_SIZE 0x1000 |
213 | 213 | ||
214 | /* board specific init functions */ | 214 | /* board specific init functions */ |
215 | extern void sni_a20r_init(void); | 215 | extern void sni_a20r_init(void); |
diff --git a/arch/mips/include/asm/sparsemem.h b/arch/mips/include/asm/sparsemem.h index 65900dab3ad3..d2da53c2c2f8 100644 --- a/arch/mips/include/asm/sparsemem.h +++ b/arch/mips/include/asm/sparsemem.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #else | 11 | #else |
12 | # define SECTION_SIZE_BITS 28 | 12 | # define SECTION_SIZE_BITS 28 |
13 | #endif | 13 | #endif |
14 | #define MAX_PHYSMEM_BITS 35 | 14 | #define MAX_PHYSMEM_BITS 35 |
15 | 15 | ||
16 | #endif /* CONFIG_SPARSEMEM */ | 16 | #endif /* CONFIG_SPARSEMEM */ |
17 | #endif /* _MIPS_SPARSEMEM_H */ | 17 | #endif /* _MIPS_SPARSEMEM_H */ |
diff --git a/arch/mips/include/asm/spinlock.h b/arch/mips/include/asm/spinlock.h index ca61e846ab0f..5130c88d6420 100644 --- a/arch/mips/include/asm/spinlock.h +++ b/arch/mips/include/asm/spinlock.h | |||
@@ -17,7 +17,7 @@ | |||
17 | /* | 17 | /* |
18 | * Your basic SMP spinlocks, allowing only a single CPU anywhere | 18 | * Your basic SMP spinlocks, allowing only a single CPU anywhere |
19 | * | 19 | * |
20 | * Simple spin lock operations. There are two variants, one clears IRQ's | 20 | * Simple spin lock operations. There are two variants, one clears IRQ's |
21 | * on the local processor, one does not. | 21 | * on the local processor, one does not. |
22 | * | 22 | * |
23 | * These are fair FIFO ticket locks | 23 | * These are fair FIFO ticket locks |
@@ -222,7 +222,7 @@ static inline unsigned int arch_spin_trylock(arch_spinlock_t *lock) | |||
222 | * write_can_lock - would write_trylock() succeed? | 222 | * write_can_lock - would write_trylock() succeed? |
223 | * @lock: the rwlock in question. | 223 | * @lock: the rwlock in question. |
224 | */ | 224 | */ |
225 | #define arch_write_can_lock(rw) (!(rw)->lock) | 225 | #define arch_write_can_lock(rw) (!(rw)->lock) |
226 | 226 | ||
227 | static inline void arch_read_lock(arch_rwlock_t *rw) | 227 | static inline void arch_read_lock(arch_rwlock_t *rw) |
228 | { | 228 | { |
diff --git a/arch/mips/include/asm/spinlock_types.h b/arch/mips/include/asm/spinlock_types.h index c52f36013a9d..9b2528e612c0 100644 --- a/arch/mips/include/asm/spinlock_types.h +++ b/arch/mips/include/asm/spinlock_types.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | typedef union { | 12 | typedef union { |
13 | /* | 13 | /* |
14 | * bits 0..15 : serving_now | 14 | * bits 0..15 : serving_now |
15 | * bits 16..31 : ticket | 15 | * bits 16..31 : ticket |
16 | */ | 16 | */ |
17 | u32 lock; | 17 | u32 lock; |
diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h index cb41af5f3406..c99384018161 100644 --- a/arch/mips/include/asm/stackframe.h +++ b/arch/mips/include/asm/stackframe.h | |||
@@ -218,17 +218,17 @@ | |||
218 | ori $28, sp, _THREAD_MASK | 218 | ori $28, sp, _THREAD_MASK |
219 | xori $28, _THREAD_MASK | 219 | xori $28, _THREAD_MASK |
220 | #ifdef CONFIG_CPU_CAVIUM_OCTEON | 220 | #ifdef CONFIG_CPU_CAVIUM_OCTEON |
221 | .set mips64 | 221 | .set mips64 |
222 | pref 0, 0($28) /* Prefetch the current pointer */ | 222 | pref 0, 0($28) /* Prefetch the current pointer */ |
223 | pref 0, PT_R31(sp) /* Prefetch the $31(ra) */ | 223 | pref 0, PT_R31(sp) /* Prefetch the $31(ra) */ |
224 | /* The Octeon multiplier state is affected by general multiply | 224 | /* The Octeon multiplier state is affected by general multiply |
225 | instructions. It must be saved before and kernel code might | 225 | instructions. It must be saved before and kernel code might |
226 | corrupt it */ | 226 | corrupt it */ |
227 | jal octeon_mult_save | 227 | jal octeon_mult_save |
228 | LONG_L v1, 0($28) /* Load the current pointer */ | 228 | LONG_L v1, 0($28) /* Load the current pointer */ |
229 | /* Restore $31(ra) that was changed by the jal */ | 229 | /* Restore $31(ra) that was changed by the jal */ |
230 | LONG_L ra, PT_R31(sp) | 230 | LONG_L ra, PT_R31(sp) |
231 | pref 0, 0(v1) /* Prefetch the current thread */ | 231 | pref 0, 0(v1) /* Prefetch the current thread */ |
232 | #endif | 232 | #endif |
233 | .set pop | 233 | .set pop |
234 | .endm | 234 | .endm |
diff --git a/arch/mips/include/asm/string.h b/arch/mips/include/asm/string.h index 436e3ad352d9..29030cb398ee 100644 --- a/arch/mips/include/asm/string.h +++ b/arch/mips/include/asm/string.h | |||
@@ -35,7 +35,7 @@ static __inline__ char *strcpy(char *__dest, __const__ char *__src) | |||
35 | ".set\tat\n\t" | 35 | ".set\tat\n\t" |
36 | ".set\treorder" | 36 | ".set\treorder" |
37 | : "=r" (__dest), "=r" (__src) | 37 | : "=r" (__dest), "=r" (__src) |
38 | : "0" (__dest), "1" (__src) | 38 | : "0" (__dest), "1" (__src) |
39 | : "memory"); | 39 | : "memory"); |
40 | 40 | ||
41 | return __xdest; | 41 | return __xdest; |
@@ -62,9 +62,9 @@ static __inline__ char *strncpy(char *__dest, __const__ char *__src, size_t __n) | |||
62 | "2:\n\t" | 62 | "2:\n\t" |
63 | ".set\tat\n\t" | 63 | ".set\tat\n\t" |
64 | ".set\treorder" | 64 | ".set\treorder" |
65 | : "=r" (__dest), "=r" (__src), "=r" (__n) | 65 | : "=r" (__dest), "=r" (__src), "=r" (__n) |
66 | : "0" (__dest), "1" (__src), "2" (__n) | 66 | : "0" (__dest), "1" (__src), "2" (__n) |
67 | : "memory"); | 67 | : "memory"); |
68 | 68 | ||
69 | return __xdest; | 69 | return __xdest; |
70 | } | 70 | } |
diff --git a/arch/mips/include/asm/switch_to.h b/arch/mips/include/asm/switch_to.h index 4f8ddba8c360..fd16bcb6c311 100644 --- a/arch/mips/include/asm/switch_to.h +++ b/arch/mips/include/asm/switch_to.h | |||
@@ -30,7 +30,7 @@ extern struct task_struct *ll_task; | |||
30 | #ifdef CONFIG_MIPS_MT_FPAFF | 30 | #ifdef CONFIG_MIPS_MT_FPAFF |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * Handle the scheduler resume end of FPU affinity management. We do this | 33 | * Handle the scheduler resume end of FPU affinity management. We do this |
34 | * inline to try to keep the overhead down. If we have been forced to run on | 34 | * inline to try to keep the overhead down. If we have been forced to run on |
35 | * a "CPU" with an FPU because of a previous high level of FP computation, | 35 | * a "CPU" with an FPU because of a previous high level of FP computation, |
36 | * but did not actually use the FPU during the most recent time-slice (CU1 | 36 | * but did not actually use the FPU during the most recent time-slice (CU1 |
@@ -72,7 +72,7 @@ do { \ | |||
72 | __save_dsp(prev); \ | 72 | __save_dsp(prev); \ |
73 | __clear_software_ll_bit(); \ | 73 | __clear_software_ll_bit(); \ |
74 | __usedfpu = test_and_clear_tsk_thread_flag(prev, TIF_USEDFPU); \ | 74 | __usedfpu = test_and_clear_tsk_thread_flag(prev, TIF_USEDFPU); \ |
75 | (last) = resume(prev, next, task_thread_info(next), __usedfpu); \ | 75 | (last) = resume(prev, next, task_thread_info(next), __usedfpu); \ |
76 | } while (0) | 76 | } while (0) |
77 | 77 | ||
78 | #define finish_arch_switch(prev) \ | 78 | #define finish_arch_switch(prev) \ |
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index b2050b9e64b1..178f7924149a 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
@@ -44,7 +44,7 @@ struct thread_info { | |||
44 | #define INIT_THREAD_INFO(tsk) \ | 44 | #define INIT_THREAD_INFO(tsk) \ |
45 | { \ | 45 | { \ |
46 | .task = &tsk, \ | 46 | .task = &tsk, \ |
47 | .exec_domain = &default_exec_domain, \ | 47 | .exec_domain = &default_exec_domain, \ |
48 | .flags = _TIF_FIXADE, \ | 48 | .flags = _TIF_FIXADE, \ |
49 | .cpu = 0, \ | 49 | .cpu = 0, \ |
50 | .preempt_count = INIT_PREEMPT_COUNT, \ | 50 | .preempt_count = INIT_PREEMPT_COUNT, \ |
diff --git a/arch/mips/include/asm/time.h b/arch/mips/include/asm/time.h index 761f2e92119e..96353075cc60 100644 --- a/arch/mips/include/asm/time.h +++ b/arch/mips/include/asm/time.h | |||
@@ -6,8 +6,8 @@ | |||
6 | * include/asm-mips/time.h | 6 | * include/asm-mips/time.h |
7 | * header file for the new style time.c file and time services. | 7 | * header file for the new style time.c file and time services. |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify it | 9 | * This program is free software; you can redistribute it and/or modify it |
10 | * under the terms of the GNU General Public License as published by the | 10 | * under the terms of the GNU General Public License as published by the |
11 | * Free Software Foundation; either version 2 of the License, or (at your | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
12 | * option) any later version. | 12 | * option) any later version. |
13 | */ | 13 | */ |
diff --git a/arch/mips/include/asm/tlb.h b/arch/mips/include/asm/tlb.h index 80d9dfcf1e88..c67842bc8ef3 100644 --- a/arch/mips/include/asm/tlb.h +++ b/arch/mips/include/asm/tlb.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * MIPS doesn't need any special per-pte or per-vma handling, except | 5 | * MIPS doesn't need any special per-pte or per-vma handling, except |
6 | * we need to flush cache for area to be unmapped. | 6 | * we need to flush cache for area to be unmapped. |
7 | */ | 7 | */ |
8 | #define tlb_start_vma(tlb, vma) \ | 8 | #define tlb_start_vma(tlb, vma) \ |
9 | do { \ | 9 | do { \ |
10 | if (!tlb->fullmm) \ | 10 | if (!tlb->fullmm) \ |
11 | flush_cache_range(vma, vma->vm_start, vma->vm_end); \ | 11 | flush_cache_range(vma, vma->vm_start, vma->vm_end); \ |
diff --git a/arch/mips/include/asm/topology.h b/arch/mips/include/asm/topology.h index 259145e07e97..12609a17dc8b 100644 --- a/arch/mips/include/asm/topology.h +++ b/arch/mips/include/asm/topology.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <topology.h> | 11 | #include <topology.h> |
12 | 12 | ||
13 | #ifdef CONFIG_SMP | 13 | #ifdef CONFIG_SMP |
14 | #define smt_capable() (smp_num_siblings > 1) | 14 | #define smt_capable() (smp_num_siblings > 1) |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #endif /* __ASM_TOPOLOGY_H */ | 17 | #endif /* __ASM_TOPOLOGY_H */ |
diff --git a/arch/mips/include/asm/traps.h b/arch/mips/include/asm/traps.h index 420ca06b2f42..f41cf3ee82a7 100644 --- a/arch/mips/include/asm/traps.h +++ b/arch/mips/include/asm/traps.h | |||
@@ -14,7 +14,7 @@ | |||
14 | /* | 14 | /* |
15 | * Possible status responses for a board_be_handler backend. | 15 | * Possible status responses for a board_be_handler backend. |
16 | */ | 16 | */ |
17 | #define MIPS_BE_DISCARD 0 /* return with no action */ | 17 | #define MIPS_BE_DISCARD 0 /* return with no action */ |
18 | #define MIPS_BE_FIXUP 1 /* return to the fixup code */ | 18 | #define MIPS_BE_FIXUP 1 /* return to the fixup code */ |
19 | #define MIPS_BE_FATAL 2 /* treat as an unrecoverable error */ | 19 | #define MIPS_BE_FATAL 2 /* treat as an unrecoverable error */ |
20 | 20 | ||
diff --git a/arch/mips/include/asm/txx9/jmr3927.h b/arch/mips/include/asm/txx9/jmr3927.h index 8808d7f82da0..aab959dc30ba 100644 --- a/arch/mips/include/asm/txx9/jmr3927.h +++ b/arch/mips/include/asm/txx9/jmr3927.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #define JMR3927_PCIIO_BASE (KSEG1 + JMR3927_PCIIO) | 40 | #define JMR3927_PCIIO_BASE (KSEG1 + JMR3927_PCIIO) |
41 | 41 | ||
42 | #define JMR3927_IOC_REV_ADDR (JMR3927_IOC_BASE + 0x00000000) | 42 | #define JMR3927_IOC_REV_ADDR (JMR3927_IOC_BASE + 0x00000000) |
43 | #define JMR3927_IOC_NVRAMB_ADDR (JMR3927_IOC_BASE + 0x00010000) | 43 | #define JMR3927_IOC_NVRAMB_ADDR (JMR3927_IOC_BASE + 0x00010000) |
44 | #define JMR3927_IOC_LED_ADDR (JMR3927_IOC_BASE + 0x00020000) | 44 | #define JMR3927_IOC_LED_ADDR (JMR3927_IOC_BASE + 0x00020000) |
45 | #define JMR3927_IOC_DIPSW_ADDR (JMR3927_IOC_BASE + 0x00030000) | 45 | #define JMR3927_IOC_DIPSW_ADDR (JMR3927_IOC_BASE + 0x00030000) |
46 | #define JMR3927_IOC_BREV_ADDR (JMR3927_IOC_BASE + 0x00040000) | 46 | #define JMR3927_IOC_BREV_ADDR (JMR3927_IOC_BASE + 0x00040000) |
@@ -115,9 +115,9 @@ | |||
115 | #define JMR3927_NR_IRQ_IRC 16 /* On-Chip IRC */ | 115 | #define JMR3927_NR_IRQ_IRC 16 /* On-Chip IRC */ |
116 | #define JMR3927_NR_IRQ_IOC 8 /* PCI/MODEM/INT[6:7] */ | 116 | #define JMR3927_NR_IRQ_IOC 8 /* PCI/MODEM/INT[6:7] */ |
117 | 117 | ||
118 | #define JMR3927_IRQ_IRC TXX9_IRQ_BASE | 118 | #define JMR3927_IRQ_IRC TXX9_IRQ_BASE |
119 | #define JMR3927_IRQ_IOC (JMR3927_IRQ_IRC + JMR3927_NR_IRQ_IRC) | 119 | #define JMR3927_IRQ_IOC (JMR3927_IRQ_IRC + JMR3927_NR_IRQ_IRC) |
120 | #define JMR3927_IRQ_END (JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC) | 120 | #define JMR3927_IRQ_END (JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC) |
121 | 121 | ||
122 | #define JMR3927_IRQ_IRC_INT0 (JMR3927_IRQ_IRC + TX3927_IR_INT0) | 122 | #define JMR3927_IRQ_IRC_INT0 (JMR3927_IRQ_IRC + TX3927_IR_INT0) |
123 | #define JMR3927_IRQ_IRC_INT1 (JMR3927_IRQ_IRC + TX3927_IR_INT1) | 123 | #define JMR3927_IRQ_IRC_INT1 (JMR3927_IRQ_IRC + TX3927_IR_INT1) |
@@ -127,11 +127,11 @@ | |||
127 | #define JMR3927_IRQ_IRC_INT5 (JMR3927_IRQ_IRC + TX3927_IR_INT5) | 127 | #define JMR3927_IRQ_IRC_INT5 (JMR3927_IRQ_IRC + TX3927_IR_INT5) |
128 | #define JMR3927_IRQ_IRC_SIO0 (JMR3927_IRQ_IRC + TX3927_IR_SIO0) | 128 | #define JMR3927_IRQ_IRC_SIO0 (JMR3927_IRQ_IRC + TX3927_IR_SIO0) |
129 | #define JMR3927_IRQ_IRC_SIO1 (JMR3927_IRQ_IRC + TX3927_IR_SIO1) | 129 | #define JMR3927_IRQ_IRC_SIO1 (JMR3927_IRQ_IRC + TX3927_IR_SIO1) |
130 | #define JMR3927_IRQ_IRC_SIO(ch) (JMR3927_IRQ_IRC + TX3927_IR_SIO(ch)) | 130 | #define JMR3927_IRQ_IRC_SIO(ch) (JMR3927_IRQ_IRC + TX3927_IR_SIO(ch)) |
131 | #define JMR3927_IRQ_IRC_DMA (JMR3927_IRQ_IRC + TX3927_IR_DMA) | 131 | #define JMR3927_IRQ_IRC_DMA (JMR3927_IRQ_IRC + TX3927_IR_DMA) |
132 | #define JMR3927_IRQ_IRC_PIO (JMR3927_IRQ_IRC + TX3927_IR_PIO) | 132 | #define JMR3927_IRQ_IRC_PIO (JMR3927_IRQ_IRC + TX3927_IR_PIO) |
133 | #define JMR3927_IRQ_IRC_PCI (JMR3927_IRQ_IRC + TX3927_IR_PCI) | 133 | #define JMR3927_IRQ_IRC_PCI (JMR3927_IRQ_IRC + TX3927_IR_PCI) |
134 | #define JMR3927_IRQ_IRC_TMR(ch) (JMR3927_IRQ_IRC + TX3927_IR_TMR(ch)) | 134 | #define JMR3927_IRQ_IRC_TMR(ch) (JMR3927_IRQ_IRC + TX3927_IR_TMR(ch)) |
135 | #define JMR3927_IRQ_IOC_PCIA (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIA) | 135 | #define JMR3927_IRQ_IOC_PCIA (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIA) |
136 | #define JMR3927_IRQ_IOC_PCIB (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIB) | 136 | #define JMR3927_IRQ_IOC_PCIB (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIB) |
137 | #define JMR3927_IRQ_IOC_PCIC (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIC) | 137 | #define JMR3927_IRQ_IOC_PCIC (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIC) |
@@ -147,7 +147,7 @@ | |||
147 | #define JMR3927_IRQ_ETHER0 JMR3927_IRQ_IRC_INT3 | 147 | #define JMR3927_IRQ_ETHER0 JMR3927_IRQ_IRC_INT3 |
148 | 148 | ||
149 | /* Clocks */ | 149 | /* Clocks */ |
150 | #define JMR3927_CORECLK 132710400 /* 132.7MHz */ | 150 | #define JMR3927_CORECLK 132710400 /* 132.7MHz */ |
151 | 151 | ||
152 | /* | 152 | /* |
153 | * TX3927 Pin Configuration: | 153 | * TX3927 Pin Configuration: |
diff --git a/arch/mips/include/asm/txx9/rbtx4927.h b/arch/mips/include/asm/txx9/rbtx4927.h index b2adab3d1acc..4060ad26ca99 100644 --- a/arch/mips/include/asm/txx9/rbtx4927.h +++ b/arch/mips/include/asm/txx9/rbtx4927.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Author: MontaVista Software, Inc. | 2 | * Author: MontaVista Software, Inc. |
3 | * source@mvista.com | 3 | * source@mvista.com |
4 | * | 4 | * |
5 | * Copyright 2001-2002 MontaVista Software Inc. | 5 | * Copyright 2001-2002 MontaVista Software Inc. |
6 | * | 6 | * |
@@ -38,7 +38,7 @@ | |||
38 | #define RBTX4927_IMASK_ADDR (IO_BASE + TXX9_CE(2) + 0x00002000) | 38 | #define RBTX4927_IMASK_ADDR (IO_BASE + TXX9_CE(2) + 0x00002000) |
39 | #define RBTX4927_IMSTAT_ADDR (IO_BASE + TXX9_CE(2) + 0x00002006) | 39 | #define RBTX4927_IMSTAT_ADDR (IO_BASE + TXX9_CE(2) + 0x00002006) |
40 | #define RBTX4927_SOFTINT_ADDR (IO_BASE + TXX9_CE(2) + 0x00003000) | 40 | #define RBTX4927_SOFTINT_ADDR (IO_BASE + TXX9_CE(2) + 0x00003000) |
41 | #define RBTX4927_SOFTRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f000) | 41 | #define RBTX4927_SOFTRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f000) |
42 | #define RBTX4927_SOFTRESETLOCK_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f002) | 42 | #define RBTX4927_SOFTRESETLOCK_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f002) |
43 | #define RBTX4927_PCIRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f006) | 43 | #define RBTX4927_PCIRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f006) |
44 | #define RBTX4927_BRAMRTC_BASE (IO_BASE + TXX9_CE(2) + 0x00010000) | 44 | #define RBTX4927_BRAMRTC_BASE (IO_BASE + TXX9_CE(2) + 0x00010000) |
@@ -50,7 +50,7 @@ | |||
50 | #define rbtx4927_imask_addr ((__u8 __iomem *)RBTX4927_IMASK_ADDR) | 50 | #define rbtx4927_imask_addr ((__u8 __iomem *)RBTX4927_IMASK_ADDR) |
51 | #define rbtx4927_imstat_addr ((__u8 __iomem *)RBTX4927_IMSTAT_ADDR) | 51 | #define rbtx4927_imstat_addr ((__u8 __iomem *)RBTX4927_IMSTAT_ADDR) |
52 | #define rbtx4927_softint_addr ((__u8 __iomem *)RBTX4927_SOFTINT_ADDR) | 52 | #define rbtx4927_softint_addr ((__u8 __iomem *)RBTX4927_SOFTINT_ADDR) |
53 | #define rbtx4927_softreset_addr ((__u8 __iomem *)RBTX4927_SOFTRESET_ADDR) | 53 | #define rbtx4927_softreset_addr ((__u8 __iomem *)RBTX4927_SOFTRESET_ADDR) |
54 | #define rbtx4927_softresetlock_addr \ | 54 | #define rbtx4927_softresetlock_addr \ |
55 | ((__u8 __iomem *)RBTX4927_SOFTRESETLOCK_ADDR) | 55 | ((__u8 __iomem *)RBTX4927_SOFTRESETLOCK_ADDR) |
56 | #define rbtx4927_pcireset_addr ((__u8 __iomem *)RBTX4927_PCIRESET_ADDR) | 56 | #define rbtx4927_pcireset_addr ((__u8 __iomem *)RBTX4927_PCIRESET_ADDR) |
diff --git a/arch/mips/include/asm/txx9/rbtx4938.h b/arch/mips/include/asm/txx9/rbtx4938.h index 9f0441a28126..9c969dd3c6eb 100644 --- a/arch/mips/include/asm/txx9/rbtx4938.h +++ b/arch/mips/include/asm/txx9/rbtx4938.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define RBTX4938_SPICS_ADDR (IO_BASE + TXX9_CE(2) + 0x00005002) | 36 | #define RBTX4938_SPICS_ADDR (IO_BASE + TXX9_CE(2) + 0x00005002) |
37 | #define RBTX4938_SFPWR_ADDR (IO_BASE + TXX9_CE(2) + 0x00005008) | 37 | #define RBTX4938_SFPWR_ADDR (IO_BASE + TXX9_CE(2) + 0x00005008) |
38 | #define RBTX4938_SFVOL_ADDR (IO_BASE + TXX9_CE(2) + 0x0000500a) | 38 | #define RBTX4938_SFVOL_ADDR (IO_BASE + TXX9_CE(2) + 0x0000500a) |
39 | #define RBTX4938_SOFTRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x00007000) | 39 | #define RBTX4938_SOFTRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x00007000) |
40 | #define RBTX4938_SOFTRESETLOCK_ADDR (IO_BASE + TXX9_CE(2) + 0x00007002) | 40 | #define RBTX4938_SOFTRESETLOCK_ADDR (IO_BASE + TXX9_CE(2) + 0x00007002) |
41 | #define RBTX4938_PCIRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x00007004) | 41 | #define RBTX4938_PCIRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x00007004) |
42 | #define RBTX4938_ETHER_BASE (IO_BASE + TXX9_CE(2) + 0x00020000) | 42 | #define RBTX4938_ETHER_BASE (IO_BASE + TXX9_CE(2) + 0x00020000) |
@@ -78,7 +78,7 @@ | |||
78 | #define rbtx4938_spics_addr ((__u8 __iomem *)RBTX4938_SPICS_ADDR) | 78 | #define rbtx4938_spics_addr ((__u8 __iomem *)RBTX4938_SPICS_ADDR) |
79 | #define rbtx4938_sfpwr_addr ((__u8 __iomem *)RBTX4938_SFPWR_ADDR) | 79 | #define rbtx4938_sfpwr_addr ((__u8 __iomem *)RBTX4938_SFPWR_ADDR) |
80 | #define rbtx4938_sfvol_addr ((__u8 __iomem *)RBTX4938_SFVOL_ADDR) | 80 | #define rbtx4938_sfvol_addr ((__u8 __iomem *)RBTX4938_SFVOL_ADDR) |
81 | #define rbtx4938_softreset_addr ((__u8 __iomem *)RBTX4938_SOFTRESET_ADDR) | 81 | #define rbtx4938_softreset_addr ((__u8 __iomem *)RBTX4938_SOFTRESET_ADDR) |
82 | #define rbtx4938_softresetlock_addr \ | 82 | #define rbtx4938_softresetlock_addr \ |
83 | ((__u8 __iomem *)RBTX4938_SOFTRESETLOCK_ADDR) | 83 | ((__u8 __iomem *)RBTX4938_SOFTRESETLOCK_ADDR) |
84 | #define rbtx4938_pcireset_addr ((__u8 __iomem *)RBTX4938_PCIRESET_ADDR) | 84 | #define rbtx4938_pcireset_addr ((__u8 __iomem *)RBTX4938_PCIRESET_ADDR) |
@@ -94,7 +94,7 @@ | |||
94 | 94 | ||
95 | /* These are the virtual IRQ numbers, we divide all IRQ's into | 95 | /* These are the virtual IRQ numbers, we divide all IRQ's into |
96 | * 'spaces', the 'space' determines where and how to enable/disable | 96 | * 'spaces', the 'space' determines where and how to enable/disable |
97 | * that particular IRQ on an RBTX4938 machine. Add new 'spaces' as new | 97 | * that particular IRQ on an RBTX4938 machine. Add new 'spaces' as new |
98 | * IRQ hardware is supported. | 98 | * IRQ hardware is supported. |
99 | */ | 99 | */ |
100 | #define RBTX4938_NR_IRQ_IOC 8 | 100 | #define RBTX4938_NR_IRQ_IOC 8 |
@@ -103,18 +103,18 @@ | |||
103 | #define RBTX4938_IRQ_IOC (TXX9_IRQ_BASE + TX4938_NUM_IR) | 103 | #define RBTX4938_IRQ_IOC (TXX9_IRQ_BASE + TX4938_NUM_IR) |
104 | #define RBTX4938_IRQ_END (RBTX4938_IRQ_IOC + RBTX4938_NR_IRQ_IOC) | 104 | #define RBTX4938_IRQ_END (RBTX4938_IRQ_IOC + RBTX4938_NR_IRQ_IOC) |
105 | 105 | ||
106 | #define RBTX4938_IRQ_IRC_ECCERR (RBTX4938_IRQ_IRC + TX4938_IR_ECCERR) | 106 | #define RBTX4938_IRQ_IRC_ECCERR (RBTX4938_IRQ_IRC + TX4938_IR_ECCERR) |
107 | #define RBTX4938_IRQ_IRC_WTOERR (RBTX4938_IRQ_IRC + TX4938_IR_WTOERR) | 107 | #define RBTX4938_IRQ_IRC_WTOERR (RBTX4938_IRQ_IRC + TX4938_IR_WTOERR) |
108 | #define RBTX4938_IRQ_IRC_INT(n) (RBTX4938_IRQ_IRC + TX4938_IR_INT(n)) | 108 | #define RBTX4938_IRQ_IRC_INT(n) (RBTX4938_IRQ_IRC + TX4938_IR_INT(n)) |
109 | #define RBTX4938_IRQ_IRC_SIO(n) (RBTX4938_IRQ_IRC + TX4938_IR_SIO(n)) | 109 | #define RBTX4938_IRQ_IRC_SIO(n) (RBTX4938_IRQ_IRC + TX4938_IR_SIO(n)) |
110 | #define RBTX4938_IRQ_IRC_DMA(ch, n) (RBTX4938_IRQ_IRC + TX4938_IR_DMA(ch, n)) | 110 | #define RBTX4938_IRQ_IRC_DMA(ch, n) (RBTX4938_IRQ_IRC + TX4938_IR_DMA(ch, n)) |
111 | #define RBTX4938_IRQ_IRC_PIO (RBTX4938_IRQ_IRC + TX4938_IR_PIO) | 111 | #define RBTX4938_IRQ_IRC_PIO (RBTX4938_IRQ_IRC + TX4938_IR_PIO) |
112 | #define RBTX4938_IRQ_IRC_PDMAC (RBTX4938_IRQ_IRC + TX4938_IR_PDMAC) | 112 | #define RBTX4938_IRQ_IRC_PDMAC (RBTX4938_IRQ_IRC + TX4938_IR_PDMAC) |
113 | #define RBTX4938_IRQ_IRC_PCIC (RBTX4938_IRQ_IRC + TX4938_IR_PCIC) | 113 | #define RBTX4938_IRQ_IRC_PCIC (RBTX4938_IRQ_IRC + TX4938_IR_PCIC) |
114 | #define RBTX4938_IRQ_IRC_TMR(n) (RBTX4938_IRQ_IRC + TX4938_IR_TMR(n)) | 114 | #define RBTX4938_IRQ_IRC_TMR(n) (RBTX4938_IRQ_IRC + TX4938_IR_TMR(n)) |
115 | #define RBTX4938_IRQ_IRC_NDFMC (RBTX4938_IRQ_IRC + TX4938_IR_NDFMC) | 115 | #define RBTX4938_IRQ_IRC_NDFMC (RBTX4938_IRQ_IRC + TX4938_IR_NDFMC) |
116 | #define RBTX4938_IRQ_IRC_PCIERR (RBTX4938_IRQ_IRC + TX4938_IR_PCIERR) | 116 | #define RBTX4938_IRQ_IRC_PCIERR (RBTX4938_IRQ_IRC + TX4938_IR_PCIERR) |
117 | #define RBTX4938_IRQ_IRC_PCIPME (RBTX4938_IRQ_IRC + TX4938_IR_PCIPME) | 117 | #define RBTX4938_IRQ_IRC_PCIPME (RBTX4938_IRQ_IRC + TX4938_IR_PCIPME) |
118 | #define RBTX4938_IRQ_IRC_ACLC (RBTX4938_IRQ_IRC + TX4938_IR_ACLC) | 118 | #define RBTX4938_IRQ_IRC_ACLC (RBTX4938_IRQ_IRC + TX4938_IR_ACLC) |
119 | #define RBTX4938_IRQ_IRC_ACLCPME (RBTX4938_IRQ_IRC + TX4938_IR_ACLCPME) | 119 | #define RBTX4938_IRQ_IRC_ACLCPME (RBTX4938_IRQ_IRC + TX4938_IR_ACLCPME) |
120 | #define RBTX4938_IRQ_IRC_PCIC1 (RBTX4938_IRQ_IRC + TX4938_IR_PCIC1) | 120 | #define RBTX4938_IRQ_IRC_PCIC1 (RBTX4938_IRQ_IRC + TX4938_IR_PCIC1) |
diff --git a/arch/mips/include/asm/txx9/rbtx4939.h b/arch/mips/include/asm/txx9/rbtx4939.h index e517899794a8..6157bfd90848 100644 --- a/arch/mips/include/asm/txx9/rbtx4939.h +++ b/arch/mips/include/asm/txx9/rbtx4939.h | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | /* Address map */ | 18 | /* Address map */ |
19 | #define RBTX4939_IOC_REG_ADDR (IO_BASE + TXX9_CE(1) + 0x00000000) | 19 | #define RBTX4939_IOC_REG_ADDR (IO_BASE + TXX9_CE(1) + 0x00000000) |
20 | #define RBTX4939_BOARD_REV_ADDR (IO_BASE + TXX9_CE(1) + 0x00000000) | 20 | #define RBTX4939_BOARD_REV_ADDR (IO_BASE + TXX9_CE(1) + 0x00000000) |
21 | #define RBTX4939_IOC_REV_ADDR (IO_BASE + TXX9_CE(1) + 0x00000002) | 21 | #define RBTX4939_IOC_REV_ADDR (IO_BASE + TXX9_CE(1) + 0x00000002) |
22 | #define RBTX4939_CONFIG1_ADDR (IO_BASE + TXX9_CE(1) + 0x00000004) | 22 | #define RBTX4939_CONFIG1_ADDR (IO_BASE + TXX9_CE(1) + 0x00000004) |
23 | #define RBTX4939_CONFIG2_ADDR (IO_BASE + TXX9_CE(1) + 0x00000006) | 23 | #define RBTX4939_CONFIG2_ADDR (IO_BASE + TXX9_CE(1) + 0x00000006) |
@@ -46,9 +46,9 @@ | |||
46 | #define RBTX4939_VPSIN_ADDR (IO_BASE + TXX9_CE(1) + 0x0000500c) | 46 | #define RBTX4939_VPSIN_ADDR (IO_BASE + TXX9_CE(1) + 0x0000500c) |
47 | #define RBTX4939_7SEG_ADDR(s, ch) \ | 47 | #define RBTX4939_7SEG_ADDR(s, ch) \ |
48 | (IO_BASE + TXX9_CE(1) + 0x00006000 + (s) * 16 + ((ch) & 3) * 2) | 48 | (IO_BASE + TXX9_CE(1) + 0x00006000 + (s) * 16 + ((ch) & 3) * 2) |
49 | #define RBTX4939_SOFTRESET_ADDR (IO_BASE + TXX9_CE(1) + 0x00007000) | 49 | #define RBTX4939_SOFTRESET_ADDR (IO_BASE + TXX9_CE(1) + 0x00007000) |
50 | #define RBTX4939_RESETEN_ADDR (IO_BASE + TXX9_CE(1) + 0x00007002) | 50 | #define RBTX4939_RESETEN_ADDR (IO_BASE + TXX9_CE(1) + 0x00007002) |
51 | #define RBTX4939_RESETSTAT_ADDR (IO_BASE + TXX9_CE(1) + 0x00007004) | 51 | #define RBTX4939_RESETSTAT_ADDR (IO_BASE + TXX9_CE(1) + 0x00007004) |
52 | #define RBTX4939_ETHER_BASE (IO_BASE + TXX9_CE(1) + 0x00020000) | 52 | #define RBTX4939_ETHER_BASE (IO_BASE + TXX9_CE(1) + 0x00020000) |
53 | 53 | ||
54 | /* Ethernet port address */ | 54 | /* Ethernet port address */ |
@@ -77,11 +77,11 @@ | |||
77 | #define RBTX4939_PE2_CIR 0x08 | 77 | #define RBTX4939_PE2_CIR 0x08 |
78 | #define RBTX4939_PE2_SPI 0x10 | 78 | #define RBTX4939_PE2_SPI 0x10 |
79 | #define RBTX4939_PE2_GPIO 0x20 | 79 | #define RBTX4939_PE2_GPIO 0x20 |
80 | #define RBTX4939_PE3_VP 0x01 | 80 | #define RBTX4939_PE3_VP 0x01 |
81 | #define RBTX4939_PE3_VP_P 0x02 | 81 | #define RBTX4939_PE3_VP_P 0x02 |
82 | #define RBTX4939_PE3_VP_S 0x04 | 82 | #define RBTX4939_PE3_VP_S 0x04 |
83 | 83 | ||
84 | #define rbtx4939_board_rev_addr ((u8 __iomem *)RBTX4939_BOARD_REV_ADDR) | 84 | #define rbtx4939_board_rev_addr ((u8 __iomem *)RBTX4939_BOARD_REV_ADDR) |
85 | #define rbtx4939_ioc_rev_addr ((u8 __iomem *)RBTX4939_IOC_REV_ADDR) | 85 | #define rbtx4939_ioc_rev_addr ((u8 __iomem *)RBTX4939_IOC_REV_ADDR) |
86 | #define rbtx4939_config1_addr ((u8 __iomem *)RBTX4939_CONFIG1_ADDR) | 86 | #define rbtx4939_config1_addr ((u8 __iomem *)RBTX4939_CONFIG1_ADDR) |
87 | #define rbtx4939_config2_addr ((u8 __iomem *)RBTX4939_CONFIG2_ADDR) | 87 | #define rbtx4939_config2_addr ((u8 __iomem *)RBTX4939_CONFIG2_ADDR) |
@@ -110,9 +110,9 @@ | |||
110 | #define rbtx4939_vpsin_addr ((u8 __iomem *)RBTX4939_VPSIN_ADDR) | 110 | #define rbtx4939_vpsin_addr ((u8 __iomem *)RBTX4939_VPSIN_ADDR) |
111 | #define rbtx4939_7seg_addr(s, ch) \ | 111 | #define rbtx4939_7seg_addr(s, ch) \ |
112 | ((u8 __iomem *)RBTX4939_7SEG_ADDR(s, ch)) | 112 | ((u8 __iomem *)RBTX4939_7SEG_ADDR(s, ch)) |
113 | #define rbtx4939_softreset_addr ((u8 __iomem *)RBTX4939_SOFTRESET_ADDR) | 113 | #define rbtx4939_softreset_addr ((u8 __iomem *)RBTX4939_SOFTRESET_ADDR) |
114 | #define rbtx4939_reseten_addr ((u8 __iomem *)RBTX4939_RESETEN_ADDR) | 114 | #define rbtx4939_reseten_addr ((u8 __iomem *)RBTX4939_RESETEN_ADDR) |
115 | #define rbtx4939_resetstat_addr ((u8 __iomem *)RBTX4939_RESETSTAT_ADDR) | 115 | #define rbtx4939_resetstat_addr ((u8 __iomem *)RBTX4939_RESETSTAT_ADDR) |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * IRQ mappings | 118 | * IRQ mappings |
diff --git a/arch/mips/include/asm/txx9/smsc_fdc37m81x.h b/arch/mips/include/asm/txx9/smsc_fdc37m81x.h index d1d6332b4ca6..926d08f18463 100644 --- a/arch/mips/include/asm/txx9/smsc_fdc37m81x.h +++ b/arch/mips/include/asm/txx9/smsc_fdc37m81x.h | |||
@@ -18,43 +18,43 @@ | |||
18 | /* Common Registers */ | 18 | /* Common Registers */ |
19 | #define SMSC_FDC37M81X_CONFIG_INDEX 0x00 | 19 | #define SMSC_FDC37M81X_CONFIG_INDEX 0x00 |
20 | #define SMSC_FDC37M81X_CONFIG_DATA 0x01 | 20 | #define SMSC_FDC37M81X_CONFIG_DATA 0x01 |
21 | #define SMSC_FDC37M81X_CONF 0x02 | 21 | #define SMSC_FDC37M81X_CONF 0x02 |
22 | #define SMSC_FDC37M81X_INDEX 0x03 | 22 | #define SMSC_FDC37M81X_INDEX 0x03 |
23 | #define SMSC_FDC37M81X_DNUM 0x07 | 23 | #define SMSC_FDC37M81X_DNUM 0x07 |
24 | #define SMSC_FDC37M81X_DID 0x20 | 24 | #define SMSC_FDC37M81X_DID 0x20 |
25 | #define SMSC_FDC37M81X_DREV 0x21 | 25 | #define SMSC_FDC37M81X_DREV 0x21 |
26 | #define SMSC_FDC37M81X_PCNT 0x22 | 26 | #define SMSC_FDC37M81X_PCNT 0x22 |
27 | #define SMSC_FDC37M81X_PMGT 0x23 | 27 | #define SMSC_FDC37M81X_PMGT 0x23 |
28 | #define SMSC_FDC37M81X_OSC 0x24 | 28 | #define SMSC_FDC37M81X_OSC 0x24 |
29 | #define SMSC_FDC37M81X_CONFPA0 0x26 | 29 | #define SMSC_FDC37M81X_CONFPA0 0x26 |
30 | #define SMSC_FDC37M81X_CONFPA1 0x27 | 30 | #define SMSC_FDC37M81X_CONFPA1 0x27 |
31 | #define SMSC_FDC37M81X_TEST4 0x2B | 31 | #define SMSC_FDC37M81X_TEST4 0x2B |
32 | #define SMSC_FDC37M81X_TEST5 0x2C | 32 | #define SMSC_FDC37M81X_TEST5 0x2C |
33 | #define SMSC_FDC37M81X_TEST1 0x2D | 33 | #define SMSC_FDC37M81X_TEST1 0x2D |
34 | #define SMSC_FDC37M81X_TEST2 0x2E | 34 | #define SMSC_FDC37M81X_TEST2 0x2E |
35 | #define SMSC_FDC37M81X_TEST3 0x2F | 35 | #define SMSC_FDC37M81X_TEST3 0x2F |
36 | 36 | ||
37 | /* Logical device numbers */ | 37 | /* Logical device numbers */ |
38 | #define SMSC_FDC37M81X_FDD 0x00 | 38 | #define SMSC_FDC37M81X_FDD 0x00 |
39 | #define SMSC_FDC37M81X_PARALLEL 0x03 | 39 | #define SMSC_FDC37M81X_PARALLEL 0x03 |
40 | #define SMSC_FDC37M81X_SERIAL1 0x04 | 40 | #define SMSC_FDC37M81X_SERIAL1 0x04 |
41 | #define SMSC_FDC37M81X_SERIAL2 0x05 | 41 | #define SMSC_FDC37M81X_SERIAL2 0x05 |
42 | #define SMSC_FDC37M81X_KBD 0x07 | 42 | #define SMSC_FDC37M81X_KBD 0x07 |
43 | #define SMSC_FDC37M81X_AUXIO 0x08 | 43 | #define SMSC_FDC37M81X_AUXIO 0x08 |
44 | #define SMSC_FDC37M81X_NONE 0xff | 44 | #define SMSC_FDC37M81X_NONE 0xff |
45 | 45 | ||
46 | /* Logical device Config Registers */ | 46 | /* Logical device Config Registers */ |
47 | #define SMSC_FDC37M81X_ACTIVE 0x30 | 47 | #define SMSC_FDC37M81X_ACTIVE 0x30 |
48 | #define SMSC_FDC37M81X_BASEADDR0 0x60 | 48 | #define SMSC_FDC37M81X_BASEADDR0 0x60 |
49 | #define SMSC_FDC37M81X_BASEADDR1 0x61 | 49 | #define SMSC_FDC37M81X_BASEADDR1 0x61 |
50 | #define SMSC_FDC37M81X_INT 0x70 | 50 | #define SMSC_FDC37M81X_INT 0x70 |
51 | #define SMSC_FDC37M81X_INT2 0x72 | 51 | #define SMSC_FDC37M81X_INT2 0x72 |
52 | #define SMSC_FDC37M81X_LDCR_F0 0xF0 | 52 | #define SMSC_FDC37M81X_LDCR_F0 0xF0 |
53 | 53 | ||
54 | /* Chip Config Values */ | 54 | /* Chip Config Values */ |
55 | #define SMSC_FDC37M81X_CONFIG_ENTER 0x55 | 55 | #define SMSC_FDC37M81X_CONFIG_ENTER 0x55 |
56 | #define SMSC_FDC37M81X_CONFIG_EXIT 0xaa | 56 | #define SMSC_FDC37M81X_CONFIG_EXIT 0xaa |
57 | #define SMSC_FDC37M81X_CHIP_ID 0x4d | 57 | #define SMSC_FDC37M81X_CHIP_ID 0x4d |
58 | 58 | ||
59 | unsigned long smsc_fdc37m81x_init(unsigned long port); | 59 | unsigned long smsc_fdc37m81x_init(unsigned long port); |
60 | 60 | ||
diff --git a/arch/mips/include/asm/txx9/tx3927.h b/arch/mips/include/asm/txx9/tx3927.h index dc30c8d42061..149fab4f8327 100644 --- a/arch/mips/include/asm/txx9/tx3927.h +++ b/arch/mips/include/asm/txx9/tx3927.h | |||
@@ -8,8 +8,8 @@ | |||
8 | #ifndef __ASM_TXX9_TX3927_H | 8 | #ifndef __ASM_TXX9_TX3927_H |
9 | #define __ASM_TXX9_TX3927_H | 9 | #define __ASM_TXX9_TX3927_H |
10 | 10 | ||
11 | #define TX3927_REG_BASE 0xfffe0000UL | 11 | #define TX3927_REG_BASE 0xfffe0000UL |
12 | #define TX3927_REG_SIZE 0x00010000 | 12 | #define TX3927_REG_SIZE 0x00010000 |
13 | #define TX3927_SDRAMC_REG (TX3927_REG_BASE + 0x8000) | 13 | #define TX3927_SDRAMC_REG (TX3927_REG_BASE + 0x8000) |
14 | #define TX3927_ROMC_REG (TX3927_REG_BASE + 0x9000) | 14 | #define TX3927_ROMC_REG (TX3927_REG_BASE + 0x9000) |
15 | #define TX3927_DMA_REG (TX3927_REG_BASE + 0xb000) | 15 | #define TX3927_DMA_REG (TX3927_REG_BASE + 0xb000) |
@@ -191,8 +191,8 @@ struct tx3927_ccfg_reg { | |||
191 | #define TX3927_DMA_CCR_XFSZ_1W TX3927_DMA_CCR_XFSZ(2) | 191 | #define TX3927_DMA_CCR_XFSZ_1W TX3927_DMA_CCR_XFSZ(2) |
192 | #define TX3927_DMA_CCR_XFSZ_4W TX3927_DMA_CCR_XFSZ(4) | 192 | #define TX3927_DMA_CCR_XFSZ_4W TX3927_DMA_CCR_XFSZ(4) |
193 | #define TX3927_DMA_CCR_XFSZ_8W TX3927_DMA_CCR_XFSZ(5) | 193 | #define TX3927_DMA_CCR_XFSZ_8W TX3927_DMA_CCR_XFSZ(5) |
194 | #define TX3927_DMA_CCR_XFSZ_16W TX3927_DMA_CCR_XFSZ(6) | 194 | #define TX3927_DMA_CCR_XFSZ_16W TX3927_DMA_CCR_XFSZ(6) |
195 | #define TX3927_DMA_CCR_XFSZ_32W TX3927_DMA_CCR_XFSZ(7) | 195 | #define TX3927_DMA_CCR_XFSZ_32W TX3927_DMA_CCR_XFSZ(7) |
196 | #define TX3927_DMA_CCR_MEMIO 0x00000002 | 196 | #define TX3927_DMA_CCR_MEMIO 0x00000002 |
197 | #define TX3927_DMA_CCR_ONEAD 0x00000001 | 197 | #define TX3927_DMA_CCR_ONEAD 0x00000001 |
198 | 198 | ||
@@ -250,7 +250,7 @@ struct tx3927_ccfg_reg { | |||
250 | /* see PCI_BASE_ADDRESS_XXX in linux/pci.h */ | 250 | /* see PCI_BASE_ADDRESS_XXX in linux/pci.h */ |
251 | 251 | ||
252 | /* bits for PBAPMC */ | 252 | /* bits for PBAPMC */ |
253 | #define TX3927_PCIC_PBAPMC_RPBA 0x00000004 | 253 | #define TX3927_PCIC_PBAPMC_RPBA 0x00000004 |
254 | #define TX3927_PCIC_PBAPMC_PBAEN 0x00000002 | 254 | #define TX3927_PCIC_PBAPMC_PBAEN 0x00000002 |
255 | #define TX3927_PCIC_PBAPMC_BMCEN 0x00000001 | 255 | #define TX3927_PCIC_PBAPMC_BMCEN 0x00000001 |
256 | 256 | ||
@@ -282,7 +282,7 @@ struct tx3927_ccfg_reg { | |||
282 | #define TX3927_CCFG_TLBOFF 0x00020000 | 282 | #define TX3927_CCFG_TLBOFF 0x00020000 |
283 | #define TX3927_CCFG_BEOW 0x00010000 | 283 | #define TX3927_CCFG_BEOW 0x00010000 |
284 | #define TX3927_CCFG_WR 0x00008000 | 284 | #define TX3927_CCFG_WR 0x00008000 |
285 | #define TX3927_CCFG_TOE 0x00004000 | 285 | #define TX3927_CCFG_TOE 0x00004000 |
286 | #define TX3927_CCFG_PCIXARB 0x00002000 | 286 | #define TX3927_CCFG_PCIXARB 0x00002000 |
287 | #define TX3927_CCFG_PCI3 0x00001000 | 287 | #define TX3927_CCFG_PCI3 0x00001000 |
288 | #define TX3927_CCFG_PSNP 0x00000800 | 288 | #define TX3927_CCFG_PSNP 0x00000800 |
@@ -301,8 +301,8 @@ struct tx3927_ccfg_reg { | |||
301 | #define TX3927_PCFG_SELALL 0x0003ffff | 301 | #define TX3927_PCFG_SELALL 0x0003ffff |
302 | #define TX3927_PCFG_SELCS 0x00020000 | 302 | #define TX3927_PCFG_SELCS 0x00020000 |
303 | #define TX3927_PCFG_SELDSF 0x00010000 | 303 | #define TX3927_PCFG_SELDSF 0x00010000 |
304 | #define TX3927_PCFG_SELSIOC_ALL 0x0000c000 | 304 | #define TX3927_PCFG_SELSIOC_ALL 0x0000c000 |
305 | #define TX3927_PCFG_SELSIOC(ch) (0x00004000<<(ch)) | 305 | #define TX3927_PCFG_SELSIOC(ch) (0x00004000<<(ch)) |
306 | #define TX3927_PCFG_SELSIO_ALL 0x00003000 | 306 | #define TX3927_PCFG_SELSIO_ALL 0x00003000 |
307 | #define TX3927_PCFG_SELSIO(ch) (0x00001000<<(ch)) | 307 | #define TX3927_PCFG_SELSIO(ch) (0x00001000<<(ch)) |
308 | #define TX3927_PCFG_SELTMR_ALL 0x00000e00 | 308 | #define TX3927_PCFG_SELTMR_ALL 0x00000e00 |
diff --git a/arch/mips/include/asm/txx9/tx4927.h b/arch/mips/include/asm/txx9/tx4927.h index 18c98c52afdb..284eea752d55 100644 --- a/arch/mips/include/asm/txx9/tx4927.h +++ b/arch/mips/include/asm/txx9/tx4927.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Author: MontaVista Software, Inc. | 2 | * Author: MontaVista Software, Inc. |
3 | * source@mvista.com | 3 | * source@mvista.com |
4 | * | 4 | * |
5 | * Copyright 2001-2006 MontaVista Software Inc. | 5 | * Copyright 2001-2006 MontaVista Software Inc. |
6 | * | 6 | * |
@@ -33,11 +33,11 @@ | |||
33 | #include <asm/txx9/tx4927pcic.h> | 33 | #include <asm/txx9/tx4927pcic.h> |
34 | 34 | ||
35 | #ifdef CONFIG_64BIT | 35 | #ifdef CONFIG_64BIT |
36 | #define TX4927_REG_BASE 0xffffffffff1f0000UL | 36 | #define TX4927_REG_BASE 0xffffffffff1f0000UL |
37 | #else | 37 | #else |
38 | #define TX4927_REG_BASE 0xff1f0000UL | 38 | #define TX4927_REG_BASE 0xff1f0000UL |
39 | #endif | 39 | #endif |
40 | #define TX4927_REG_SIZE 0x00010000 | 40 | #define TX4927_REG_SIZE 0x00010000 |
41 | 41 | ||
42 | #define TX4927_SDRAMC_REG (TX4927_REG_BASE + 0x8000) | 42 | #define TX4927_SDRAMC_REG (TX4927_REG_BASE + 0x8000) |
43 | #define TX4927_EBUSC_REG (TX4927_REG_BASE + 0x9000) | 43 | #define TX4927_EBUSC_REG (TX4927_REG_BASE + 0x9000) |
@@ -118,10 +118,10 @@ struct tx4927_ccfg_reg { | |||
118 | #define TX4927_CCFG_DIVMODE_2 (0x4 << 17) | 118 | #define TX4927_CCFG_DIVMODE_2 (0x4 << 17) |
119 | #define TX4927_CCFG_DIVMODE_3 (0x5 << 17) | 119 | #define TX4927_CCFG_DIVMODE_3 (0x5 << 17) |
120 | #define TX4927_CCFG_DIVMODE_4 (0x6 << 17) | 120 | #define TX4927_CCFG_DIVMODE_4 (0x6 << 17) |
121 | #define TX4927_CCFG_DIVMODE_2_5 (0x7 << 17) | 121 | #define TX4927_CCFG_DIVMODE_2_5 (0x7 << 17) |
122 | #define TX4927_CCFG_BEOW 0x00010000 | 122 | #define TX4927_CCFG_BEOW 0x00010000 |
123 | #define TX4927_CCFG_WR 0x00008000 | 123 | #define TX4927_CCFG_WR 0x00008000 |
124 | #define TX4927_CCFG_TOE 0x00004000 | 124 | #define TX4927_CCFG_TOE 0x00004000 |
125 | #define TX4927_CCFG_PCIARB 0x00002000 | 125 | #define TX4927_CCFG_PCIARB 0x00002000 |
126 | #define TX4927_CCFG_PCIDIVMODE_MASK 0x00001800 | 126 | #define TX4927_CCFG_PCIDIVMODE_MASK 0x00001800 |
127 | #define TX4927_CCFG_PCIDIVMODE_2_5 0x00000000 | 127 | #define TX4927_CCFG_PCIDIVMODE_2_5 0x00000000 |
@@ -136,10 +136,10 @@ struct tx4927_ccfg_reg { | |||
136 | 136 | ||
137 | /* PCFG : Pin Configuration */ | 137 | /* PCFG : Pin Configuration */ |
138 | #define TX4927_PCFG_SDCLKDLY_MASK 0x30000000 | 138 | #define TX4927_PCFG_SDCLKDLY_MASK 0x30000000 |
139 | #define TX4927_PCFG_SDCLKDLY(d) ((d)<<28) | 139 | #define TX4927_PCFG_SDCLKDLY(d) ((d)<<28) |
140 | #define TX4927_PCFG_SYSCLKEN 0x08000000 | 140 | #define TX4927_PCFG_SYSCLKEN 0x08000000 |
141 | #define TX4927_PCFG_SDCLKEN_ALL 0x07800000 | 141 | #define TX4927_PCFG_SDCLKEN_ALL 0x07800000 |
142 | #define TX4927_PCFG_SDCLKEN(ch) (0x00800000<<(ch)) | 142 | #define TX4927_PCFG_SDCLKEN(ch) (0x00800000<<(ch)) |
143 | #define TX4927_PCFG_PCICLKEN_ALL 0x003f0000 | 143 | #define TX4927_PCFG_PCICLKEN_ALL 0x003f0000 |
144 | #define TX4927_PCFG_PCICLKEN(ch) (0x00010000<<(ch)) | 144 | #define TX4927_PCFG_PCICLKEN(ch) (0x00010000<<(ch)) |
145 | #define TX4927_PCFG_SEL2 0x00000200 | 145 | #define TX4927_PCFG_SEL2 0x00000200 |
diff --git a/arch/mips/include/asm/txx9/tx4927pcic.h b/arch/mips/include/asm/txx9/tx4927pcic.h index c470b8a5fe57..9eab2698caec 100644 --- a/arch/mips/include/asm/txx9/tx4927pcic.h +++ b/arch/mips/include/asm/txx9/tx4927pcic.h | |||
@@ -93,7 +93,7 @@ struct tx4927_pcic_reg { | |||
93 | 93 | ||
94 | /* bits for PBACFG */ | 94 | /* bits for PBACFG */ |
95 | #define TX4927_PCIC_PBACFG_FIXPA 0x00000008 | 95 | #define TX4927_PCIC_PBACFG_FIXPA 0x00000008 |
96 | #define TX4927_PCIC_PBACFG_RPBA 0x00000004 | 96 | #define TX4927_PCIC_PBACFG_RPBA 0x00000004 |
97 | #define TX4927_PCIC_PBACFG_PBAEN 0x00000002 | 97 | #define TX4927_PCIC_PBACFG_PBAEN 0x00000002 |
98 | #define TX4927_PCIC_PBACFG_BMCEN 0x00000001 | 98 | #define TX4927_PCIC_PBACFG_BMCEN 0x00000001 |
99 | 99 | ||
@@ -165,7 +165,7 @@ struct tx4927_pcic_reg { | |||
165 | #define TX4927_PCIC_PDMCFG_CHNEN 0x00000080 | 165 | #define TX4927_PCIC_PDMCFG_CHNEN 0x00000080 |
166 | #define TX4927_PCIC_PDMCFG_XFRACT 0x00000040 | 166 | #define TX4927_PCIC_PDMCFG_XFRACT 0x00000040 |
167 | #define TX4927_PCIC_PDMCFG_BSWAP 0x00000020 | 167 | #define TX4927_PCIC_PDMCFG_BSWAP 0x00000020 |
168 | #define TX4927_PCIC_PDMCFG_XFRSIZE_MASK 0x0000000c | 168 | #define TX4927_PCIC_PDMCFG_XFRSIZE_MASK 0x0000000c |
169 | #define TX4927_PCIC_PDMCFG_XFRSIZE_1DW 0x00000000 | 169 | #define TX4927_PCIC_PDMCFG_XFRSIZE_1DW 0x00000000 |
170 | #define TX4927_PCIC_PDMCFG_XFRSIZE_1QW 0x00000004 | 170 | #define TX4927_PCIC_PDMCFG_XFRSIZE_1QW 0x00000004 |
171 | #define TX4927_PCIC_PDMCFG_XFRSIZE_4QW 0x00000008 | 171 | #define TX4927_PCIC_PDMCFG_XFRSIZE_4QW 0x00000008 |
@@ -174,7 +174,7 @@ struct tx4927_pcic_reg { | |||
174 | 174 | ||
175 | /* bits for PDMSTS */ | 175 | /* bits for PDMSTS */ |
176 | #define TX4927_PCIC_PDMSTS_REQCNT_MASK 0x3f000000 | 176 | #define TX4927_PCIC_PDMSTS_REQCNT_MASK 0x3f000000 |
177 | #define TX4927_PCIC_PDMSTS_FIFOCNT_MASK 0x00f00000 | 177 | #define TX4927_PCIC_PDMSTS_FIFOCNT_MASK 0x00f00000 |
178 | #define TX4927_PCIC_PDMSTS_FIFOWP_MASK 0x000c0000 | 178 | #define TX4927_PCIC_PDMSTS_FIFOWP_MASK 0x000c0000 |
179 | #define TX4927_PCIC_PDMSTS_FIFORP_MASK 0x00030000 | 179 | #define TX4927_PCIC_PDMSTS_FIFORP_MASK 0x00030000 |
180 | #define TX4927_PCIC_PDMSTS_ERRINT 0x00000800 | 180 | #define TX4927_PCIC_PDMSTS_ERRINT 0x00000800 |
diff --git a/arch/mips/include/asm/txx9/tx4938.h b/arch/mips/include/asm/txx9/tx4938.h index 8a178f186f7d..6ca767ee6467 100644 --- a/arch/mips/include/asm/txx9/tx4938.h +++ b/arch/mips/include/asm/txx9/tx4938.h | |||
@@ -16,11 +16,11 @@ | |||
16 | #include <asm/txx9/tx4927.h> | 16 | #include <asm/txx9/tx4927.h> |
17 | 17 | ||
18 | #ifdef CONFIG_64BIT | 18 | #ifdef CONFIG_64BIT |
19 | #define TX4938_REG_BASE 0xffffffffff1f0000UL /* == TX4937_REG_BASE */ | 19 | #define TX4938_REG_BASE 0xffffffffff1f0000UL /* == TX4937_REG_BASE */ |
20 | #else | 20 | #else |
21 | #define TX4938_REG_BASE 0xff1f0000UL /* == TX4937_REG_BASE */ | 21 | #define TX4938_REG_BASE 0xff1f0000UL /* == TX4937_REG_BASE */ |
22 | #endif | 22 | #endif |
23 | #define TX4938_REG_SIZE 0x00010000 /* == TX4937_REG_SIZE */ | 23 | #define TX4938_REG_SIZE 0x00010000 /* == TX4937_REG_SIZE */ |
24 | 24 | ||
25 | /* NDFMC, SRAMC, PCIC1, SPIC: TX4938 only */ | 25 | /* NDFMC, SRAMC, PCIC1, SPIC: TX4938 only */ |
26 | #define TX4938_NDFMC_REG (TX4938_REG_BASE + 0x5000) | 26 | #define TX4938_NDFMC_REG (TX4938_REG_BASE + 0x5000) |
@@ -72,16 +72,16 @@ struct tx4938_ccfg_reg { | |||
72 | #define TX4938_NUM_IR_DMA 4 | 72 | #define TX4938_NUM_IR_DMA 4 |
73 | #define TX4938_IR_DMA(ch, n) ((ch ? 27 : 10) + (n)) /* 10-13, 27-30 */ | 73 | #define TX4938_IR_DMA(ch, n) ((ch ? 27 : 10) + (n)) /* 10-13, 27-30 */ |
74 | #define TX4938_IR_PIO 14 | 74 | #define TX4938_IR_PIO 14 |
75 | #define TX4938_IR_PDMAC 15 | 75 | #define TX4938_IR_PDMAC 15 |
76 | #define TX4938_IR_PCIC 16 | 76 | #define TX4938_IR_PCIC 16 |
77 | #define TX4938_NUM_IR_TMR 3 | 77 | #define TX4938_NUM_IR_TMR 3 |
78 | #define TX4938_IR_TMR(n) (17 + (n)) | 78 | #define TX4938_IR_TMR(n) (17 + (n)) |
79 | #define TX4938_IR_NDFMC 21 | 79 | #define TX4938_IR_NDFMC 21 |
80 | #define TX4938_IR_PCIERR 22 | 80 | #define TX4938_IR_PCIERR 22 |
81 | #define TX4938_IR_PCIPME 23 | 81 | #define TX4938_IR_PCIPME 23 |
82 | #define TX4938_IR_ACLC 24 | 82 | #define TX4938_IR_ACLC 24 |
83 | #define TX4938_IR_ACLCPME 25 | 83 | #define TX4938_IR_ACLCPME 25 |
84 | #define TX4938_IR_PCIC1 26 | 84 | #define TX4938_IR_PCIC1 26 |
85 | #define TX4938_IR_SPI 31 | 85 | #define TX4938_IR_SPI 31 |
86 | #define TX4938_NUM_IR 32 | 86 | #define TX4938_NUM_IR 32 |
87 | /* multiplex */ | 87 | /* multiplex */ |
@@ -105,10 +105,10 @@ struct tx4938_ccfg_reg { | |||
105 | #define TX4938_CCFG_PCI1_66 0x00200000 | 105 | #define TX4938_CCFG_PCI1_66 0x00200000 |
106 | #define TX4938_CCFG_DIVMODE_MASK 0x001e0000 | 106 | #define TX4938_CCFG_DIVMODE_MASK 0x001e0000 |
107 | #define TX4938_CCFG_DIVMODE_2 (0x4 << 17) | 107 | #define TX4938_CCFG_DIVMODE_2 (0x4 << 17) |
108 | #define TX4938_CCFG_DIVMODE_2_5 (0xf << 17) | 108 | #define TX4938_CCFG_DIVMODE_2_5 (0xf << 17) |
109 | #define TX4938_CCFG_DIVMODE_3 (0x5 << 17) | 109 | #define TX4938_CCFG_DIVMODE_3 (0x5 << 17) |
110 | #define TX4938_CCFG_DIVMODE_4 (0x6 << 17) | 110 | #define TX4938_CCFG_DIVMODE_4 (0x6 << 17) |
111 | #define TX4938_CCFG_DIVMODE_4_5 (0xd << 17) | 111 | #define TX4938_CCFG_DIVMODE_4_5 (0xd << 17) |
112 | #define TX4938_CCFG_DIVMODE_8 (0x0 << 17) | 112 | #define TX4938_CCFG_DIVMODE_8 (0x0 << 17) |
113 | #define TX4938_CCFG_DIVMODE_10 (0xb << 17) | 113 | #define TX4938_CCFG_DIVMODE_10 (0xb << 17) |
114 | #define TX4938_CCFG_DIVMODE_12 (0x1 << 17) | 114 | #define TX4938_CCFG_DIVMODE_12 (0x1 << 17) |
@@ -116,7 +116,7 @@ struct tx4938_ccfg_reg { | |||
116 | #define TX4938_CCFG_DIVMODE_18 (0x9 << 17) | 116 | #define TX4938_CCFG_DIVMODE_18 (0x9 << 17) |
117 | #define TX4938_CCFG_BEOW 0x00010000 | 117 | #define TX4938_CCFG_BEOW 0x00010000 |
118 | #define TX4938_CCFG_WR 0x00008000 | 118 | #define TX4938_CCFG_WR 0x00008000 |
119 | #define TX4938_CCFG_TOE 0x00004000 | 119 | #define TX4938_CCFG_TOE 0x00004000 |
120 | #define TX4938_CCFG_PCIARB 0x00002000 | 120 | #define TX4938_CCFG_PCIARB 0x00002000 |
121 | #define TX4938_CCFG_PCIDIVMODE_MASK 0x00001c00 | 121 | #define TX4938_CCFG_PCIDIVMODE_MASK 0x00001c00 |
122 | #define TX4938_CCFG_PCIDIVMODE_4 (0x1 << 10) | 122 | #define TX4938_CCFG_PCIDIVMODE_4 (0x1 << 10) |
@@ -141,10 +141,10 @@ struct tx4938_ccfg_reg { | |||
141 | #define TX4938_PCFG_SPI_SEL 0x0800000000000000ULL | 141 | #define TX4938_PCFG_SPI_SEL 0x0800000000000000ULL |
142 | #define TX4938_PCFG_NDF_SEL 0x0400000000000000ULL | 142 | #define TX4938_PCFG_NDF_SEL 0x0400000000000000ULL |
143 | #define TX4938_PCFG_SDCLKDLY_MASK 0x30000000 | 143 | #define TX4938_PCFG_SDCLKDLY_MASK 0x30000000 |
144 | #define TX4938_PCFG_SDCLKDLY(d) ((d)<<28) | 144 | #define TX4938_PCFG_SDCLKDLY(d) ((d)<<28) |
145 | #define TX4938_PCFG_SYSCLKEN 0x08000000 | 145 | #define TX4938_PCFG_SYSCLKEN 0x08000000 |
146 | #define TX4938_PCFG_SDCLKEN_ALL 0x07800000 | 146 | #define TX4938_PCFG_SDCLKEN_ALL 0x07800000 |
147 | #define TX4938_PCFG_SDCLKEN(ch) (0x00800000<<(ch)) | 147 | #define TX4938_PCFG_SDCLKEN(ch) (0x00800000<<(ch)) |
148 | #define TX4938_PCFG_PCICLKEN_ALL 0x003f0000 | 148 | #define TX4938_PCFG_PCICLKEN_ALL 0x003f0000 |
149 | #define TX4938_PCFG_PCICLKEN(ch) (0x00010000<<(ch)) | 149 | #define TX4938_PCFG_PCICLKEN(ch) (0x00010000<<(ch)) |
150 | #define TX4938_PCFG_SEL2 0x00000200 | 150 | #define TX4938_PCFG_SEL2 0x00000200 |
@@ -230,8 +230,8 @@ struct tx4938_ccfg_reg { | |||
230 | #define TX4938_DMA_CCR_XFSZ_2W TX4938_DMA_CCR_XFSZ(3) | 230 | #define TX4938_DMA_CCR_XFSZ_2W TX4938_DMA_CCR_XFSZ(3) |
231 | #define TX4938_DMA_CCR_XFSZ_4W TX4938_DMA_CCR_XFSZ(4) | 231 | #define TX4938_DMA_CCR_XFSZ_4W TX4938_DMA_CCR_XFSZ(4) |
232 | #define TX4938_DMA_CCR_XFSZ_8W TX4938_DMA_CCR_XFSZ(5) | 232 | #define TX4938_DMA_CCR_XFSZ_8W TX4938_DMA_CCR_XFSZ(5) |
233 | #define TX4938_DMA_CCR_XFSZ_16W TX4938_DMA_CCR_XFSZ(6) | 233 | #define TX4938_DMA_CCR_XFSZ_16W TX4938_DMA_CCR_XFSZ(6) |
234 | #define TX4938_DMA_CCR_XFSZ_32W TX4938_DMA_CCR_XFSZ(7) | 234 | #define TX4938_DMA_CCR_XFSZ_32W TX4938_DMA_CCR_XFSZ(7) |
235 | #define TX4938_DMA_CCR_MEMIO 0x00000002 | 235 | #define TX4938_DMA_CCR_MEMIO 0x00000002 |
236 | #define TX4938_DMA_CCR_SNGAD 0x00000001 | 236 | #define TX4938_DMA_CCR_SNGAD 0x00000001 |
237 | 237 | ||
@@ -263,9 +263,9 @@ struct tx4938_ccfg_reg { | |||
263 | #define TX4938_REV_PCODE() \ | 263 | #define TX4938_REV_PCODE() \ |
264 | ((__u32)__raw_readq(&tx4938_ccfgptr->crir) >> 16) | 264 | ((__u32)__raw_readq(&tx4938_ccfgptr->crir) >> 16) |
265 | 265 | ||
266 | #define tx4938_ccfg_clear(bits) tx4927_ccfg_clear(bits) | 266 | #define tx4938_ccfg_clear(bits) tx4927_ccfg_clear(bits) |
267 | #define tx4938_ccfg_set(bits) tx4927_ccfg_set(bits) | 267 | #define tx4938_ccfg_set(bits) tx4927_ccfg_set(bits) |
268 | #define tx4938_ccfg_change(change, new) tx4927_ccfg_change(change, new) | 268 | #define tx4938_ccfg_change(change, new) tx4927_ccfg_change(change, new) |
269 | 269 | ||
270 | #define TX4938_SDRAMC_CR(ch) TX4927_SDRAMC_CR(ch) | 270 | #define TX4938_SDRAMC_CR(ch) TX4927_SDRAMC_CR(ch) |
271 | #define TX4938_SDRAMC_BA(ch) TX4927_SDRAMC_BA(ch) | 271 | #define TX4938_SDRAMC_BA(ch) TX4927_SDRAMC_BA(ch) |
diff --git a/arch/mips/include/asm/txx9/tx4939.h b/arch/mips/include/asm/txx9/tx4939.h index d4f342cd5939..6d667087f2aa 100644 --- a/arch/mips/include/asm/txx9/tx4939.h +++ b/arch/mips/include/asm/txx9/tx4939.h | |||
@@ -14,11 +14,11 @@ | |||
14 | #include <asm/txx9/tx4938.h> | 14 | #include <asm/txx9/tx4938.h> |
15 | 15 | ||
16 | #ifdef CONFIG_64BIT | 16 | #ifdef CONFIG_64BIT |
17 | #define TX4939_REG_BASE 0xffffffffff1f0000UL /* == TX4938_REG_BASE */ | 17 | #define TX4939_REG_BASE 0xffffffffff1f0000UL /* == TX4938_REG_BASE */ |
18 | #else | 18 | #else |
19 | #define TX4939_REG_BASE 0xff1f0000UL /* == TX4938_REG_BASE */ | 19 | #define TX4939_REG_BASE 0xff1f0000UL /* == TX4938_REG_BASE */ |
20 | #endif | 20 | #endif |
21 | #define TX4939_REG_SIZE 0x00010000 /* == TX4938_REG_SIZE */ | 21 | #define TX4939_REG_SIZE 0x00010000 /* == TX4938_REG_SIZE */ |
22 | 22 | ||
23 | #define TX4939_ATA_REG(ch) (TX4939_REG_BASE + 0x3000 + (ch) * 0x1000) | 23 | #define TX4939_ATA_REG(ch) (TX4939_REG_BASE + 0x3000 + (ch) * 0x1000) |
24 | #define TX4939_NDFMC_REG (TX4939_REG_BASE + 0x5000) | 24 | #define TX4939_NDFMC_REG (TX4939_REG_BASE + 0x5000) |
@@ -189,14 +189,14 @@ struct tx4939_vpc_desc { | |||
189 | #define TX4939_IR_INT(n) (3 + (n)) | 189 | #define TX4939_IR_INT(n) (3 + (n)) |
190 | #define TX4939_NUM_IR_ETH 2 | 190 | #define TX4939_NUM_IR_ETH 2 |
191 | #define TX4939_IR_ETH(n) ((n) ? 43 : 6) | 191 | #define TX4939_IR_ETH(n) ((n) ? 43 : 6) |
192 | #define TX4939_IR_VIDEO 7 | 192 | #define TX4939_IR_VIDEO 7 |
193 | #define TX4939_IR_CIR 8 | 193 | #define TX4939_IR_CIR 8 |
194 | #define TX4939_NUM_IR_SIO 4 | 194 | #define TX4939_NUM_IR_SIO 4 |
195 | #define TX4939_IR_SIO(n) ((n) ? 43 + (n) : 9) /* 9,44-46 */ | 195 | #define TX4939_IR_SIO(n) ((n) ? 43 + (n) : 9) /* 9,44-46 */ |
196 | #define TX4939_NUM_IR_DMA 4 | 196 | #define TX4939_NUM_IR_DMA 4 |
197 | #define TX4939_IR_DMA(ch, n) (((ch) ? 22 : 10) + (n)) /* 10-13,22-25 */ | 197 | #define TX4939_IR_DMA(ch, n) (((ch) ? 22 : 10) + (n)) /* 10-13,22-25 */ |
198 | #define TX4939_IR_IRC 14 | 198 | #define TX4939_IR_IRC 14 |
199 | #define TX4939_IR_PDMAC 15 | 199 | #define TX4939_IR_PDMAC 15 |
200 | #define TX4939_NUM_IR_TMR 6 | 200 | #define TX4939_NUM_IR_TMR 6 |
201 | #define TX4939_IR_TMR(n) (((n) >= 3 ? 45 : 16) + (n)) /* 16-18,48-50 */ | 201 | #define TX4939_IR_TMR(n) (((n) >= 3 ? 45 : 16) + (n)) /* 16-18,48-50 */ |
202 | #define TX4939_NUM_IR_ATA 2 | 202 | #define TX4939_NUM_IR_ATA 2 |
@@ -210,10 +210,10 @@ struct tx4939_vpc_desc { | |||
210 | #define TX4939_IR_I2C 33 | 210 | #define TX4939_IR_I2C 33 |
211 | #define TX4939_IR_SPI 34 | 211 | #define TX4939_IR_SPI 34 |
212 | #define TX4939_IR_PCIC 35 | 212 | #define TX4939_IR_PCIC 35 |
213 | #define TX4939_IR_PCIC1 36 | 213 | #define TX4939_IR_PCIC1 36 |
214 | #define TX4939_IR_PCIERR 37 | 214 | #define TX4939_IR_PCIERR 37 |
215 | #define TX4939_IR_PCIPME 38 | 215 | #define TX4939_IR_PCIPME 38 |
216 | #define TX4939_IR_NDFMC 39 | 216 | #define TX4939_IR_NDFMC 39 |
217 | #define TX4939_IR_ACLCPME 40 | 217 | #define TX4939_IR_ACLCPME 40 |
218 | #define TX4939_IR_RTC 41 | 218 | #define TX4939_IR_RTC 41 |
219 | #define TX4939_IR_RND 42 | 219 | #define TX4939_IR_RND 42 |
@@ -239,7 +239,7 @@ struct tx4939_vpc_desc { | |||
239 | #define TX4939_CCFG_PCI66 0x00800000 | 239 | #define TX4939_CCFG_PCI66 0x00800000 |
240 | #define TX4939_CCFG_PCIMODE 0x00400000 | 240 | #define TX4939_CCFG_PCIMODE 0x00400000 |
241 | #define TX4939_CCFG_SSCG 0x00100000 | 241 | #define TX4939_CCFG_SSCG 0x00100000 |
242 | #define TX4939_CCFG_MULCLK_MASK 0x000e0000 | 242 | #define TX4939_CCFG_MULCLK_MASK 0x000e0000 |
243 | #define TX4939_CCFG_MULCLK_8 (0x7 << 17) | 243 | #define TX4939_CCFG_MULCLK_8 (0x7 << 17) |
244 | #define TX4939_CCFG_MULCLK_9 (0x0 << 17) | 244 | #define TX4939_CCFG_MULCLK_9 (0x0 << 17) |
245 | #define TX4939_CCFG_MULCLK_10 (0x1 << 17) | 245 | #define TX4939_CCFG_MULCLK_10 (0x1 << 17) |
@@ -250,7 +250,7 @@ struct tx4939_vpc_desc { | |||
250 | #define TX4939_CCFG_MULCLK_15 (0x6 << 17) | 250 | #define TX4939_CCFG_MULCLK_15 (0x6 << 17) |
251 | #define TX4939_CCFG_BEOW 0x00010000 | 251 | #define TX4939_CCFG_BEOW 0x00010000 |
252 | #define TX4939_CCFG_WR 0x00008000 | 252 | #define TX4939_CCFG_WR 0x00008000 |
253 | #define TX4939_CCFG_TOE 0x00004000 | 253 | #define TX4939_CCFG_TOE 0x00004000 |
254 | #define TX4939_CCFG_PCIARB 0x00002000 | 254 | #define TX4939_CCFG_PCIARB 0x00002000 |
255 | #define TX4939_CCFG_YDIVMODE_MASK 0x00001c00 | 255 | #define TX4939_CCFG_YDIVMODE_MASK 0x00001c00 |
256 | #define TX4939_CCFG_YDIVMODE_2 (0x0 << 10) | 256 | #define TX4939_CCFG_YDIVMODE_2 (0x0 << 10) |
@@ -275,7 +275,7 @@ struct tx4939_vpc_desc { | |||
275 | #define TX4939_PCFG_I2CMODE 0x1000000000000000ULL | 275 | #define TX4939_PCFG_I2CMODE 0x1000000000000000ULL |
276 | #define TX4939_PCFG_I2SMODE_MASK 0x0c00000000000000ULL | 276 | #define TX4939_PCFG_I2SMODE_MASK 0x0c00000000000000ULL |
277 | #define TX4939_PCFG_I2SMODE_GPIO 0x0c00000000000000ULL | 277 | #define TX4939_PCFG_I2SMODE_GPIO 0x0c00000000000000ULL |
278 | #define TX4939_PCFG_I2SMODE_I2S 0x0800000000000000ULL | 278 | #define TX4939_PCFG_I2SMODE_I2S 0x0800000000000000ULL |
279 | #define TX4939_PCFG_I2SMODE_I2S_ALT 0x0400000000000000ULL | 279 | #define TX4939_PCFG_I2SMODE_I2S_ALT 0x0400000000000000ULL |
280 | #define TX4939_PCFG_I2SMODE_ACLC 0x0000000000000000ULL | 280 | #define TX4939_PCFG_I2SMODE_ACLC 0x0000000000000000ULL |
281 | #define TX4939_PCFG_SIO3MODE 0x0200000000000000ULL | 281 | #define TX4939_PCFG_SIO3MODE 0x0200000000000000ULL |
@@ -392,15 +392,15 @@ struct tx4939_vpc_desc { | |||
392 | /* | 392 | /* |
393 | * CRYPTO | 393 | * CRYPTO |
394 | */ | 394 | */ |
395 | #define TX4939_CRYPTO_CSR_SAESO 0x08000000 | 395 | #define TX4939_CRYPTO_CSR_SAESO 0x08000000 |
396 | #define TX4939_CRYPTO_CSR_SAESI 0x04000000 | 396 | #define TX4939_CRYPTO_CSR_SAESI 0x04000000 |
397 | #define TX4939_CRYPTO_CSR_SDESO 0x02000000 | 397 | #define TX4939_CRYPTO_CSR_SDESO 0x02000000 |
398 | #define TX4939_CRYPTO_CSR_SDESI 0x01000000 | 398 | #define TX4939_CRYPTO_CSR_SDESI 0x01000000 |
399 | #define TX4939_CRYPTO_CSR_INDXBST_MASK 0x00700000 | 399 | #define TX4939_CRYPTO_CSR_INDXBST_MASK 0x00700000 |
400 | #define TX4939_CRYPTO_CSR_INDXBST(n) ((n) << 20) | 400 | #define TX4939_CRYPTO_CSR_INDXBST(n) ((n) << 20) |
401 | #define TX4939_CRYPTO_CSR_TOINT 0x00080000 | 401 | #define TX4939_CRYPTO_CSR_TOINT 0x00080000 |
402 | #define TX4939_CRYPTO_CSR_DCINT 0x00040000 | 402 | #define TX4939_CRYPTO_CSR_DCINT 0x00040000 |
403 | #define TX4939_CRYPTO_CSR_GBINT 0x00010000 | 403 | #define TX4939_CRYPTO_CSR_GBINT 0x00010000 |
404 | #define TX4939_CRYPTO_CSR_INDXAST_MASK 0x0000e000 | 404 | #define TX4939_CRYPTO_CSR_INDXAST_MASK 0x0000e000 |
405 | #define TX4939_CRYPTO_CSR_INDXAST(n) ((n) << 13) | 405 | #define TX4939_CRYPTO_CSR_INDXAST(n) ((n) << 13) |
406 | #define TX4939_CRYPTO_CSR_CSWAP_MASK 0x00001800 | 406 | #define TX4939_CRYPTO_CSR_CSWAP_MASK 0x00001800 |
@@ -418,7 +418,7 @@ struct tx4939_vpc_desc { | |||
418 | #define TX4939_CRYPTO_CSR_PDINT_END 0x00000040 | 418 | #define TX4939_CRYPTO_CSR_PDINT_END 0x00000040 |
419 | #define TX4939_CRYPTO_CSR_PDINT_NEXT 0x00000080 | 419 | #define TX4939_CRYPTO_CSR_PDINT_NEXT 0x00000080 |
420 | #define TX4939_CRYPTO_CSR_PDINT_NONE 0x000000c0 | 420 | #define TX4939_CRYPTO_CSR_PDINT_NONE 0x000000c0 |
421 | #define TX4939_CRYPTO_CSR_GINTE 0x00000008 | 421 | #define TX4939_CRYPTO_CSR_GINTE 0x00000008 |
422 | #define TX4939_CRYPTO_CSR_RSTD 0x00000004 | 422 | #define TX4939_CRYPTO_CSR_RSTD 0x00000004 |
423 | #define TX4939_CRYPTO_CSR_RSTC 0x00000002 | 423 | #define TX4939_CRYPTO_CSR_RSTC 0x00000002 |
424 | #define TX4939_CRYPTO_CSR_ENCR 0x00000001 | 424 | #define TX4939_CRYPTO_CSR_ENCR 0x00000001 |
@@ -442,7 +442,7 @@ struct tx4939_vpc_desc { | |||
442 | #define TX4939_CRYPTO_DESC_START 0x00000200 | 442 | #define TX4939_CRYPTO_DESC_START 0x00000200 |
443 | #define TX4939_CRYPTO_DESC_END 0x00000100 | 443 | #define TX4939_CRYPTO_DESC_END 0x00000100 |
444 | #define TX4939_CRYPTO_DESC_XOR 0x00000010 | 444 | #define TX4939_CRYPTO_DESC_XOR 0x00000010 |
445 | #define TX4939_CRYPTO_DESC_LAST 0x00000008 | 445 | #define TX4939_CRYPTO_DESC_LAST 0x00000008 |
446 | #define TX4939_CRYPTO_DESC_ERR_MASK 0x00000006 | 446 | #define TX4939_CRYPTO_DESC_ERR_MASK 0x00000006 |
447 | #define TX4939_CRYPTO_DESC_ERR_NONE 0x00000000 | 447 | #define TX4939_CRYPTO_DESC_ERR_NONE 0x00000000 |
448 | #define TX4939_CRYPTO_DESC_ERR_TOUT 0x00000002 | 448 | #define TX4939_CRYPTO_DESC_ERR_TOUT 0x00000002 |
@@ -457,7 +457,7 @@ struct tx4939_vpc_desc { | |||
457 | 457 | ||
458 | #define TX4939_CRYPTO_NR_SET 6 | 458 | #define TX4939_CRYPTO_NR_SET 6 |
459 | 459 | ||
460 | #define TX4939_CRYPTO_RCSR_INTE 0x00000008 | 460 | #define TX4939_CRYPTO_RCSR_INTE 0x00000008 |
461 | #define TX4939_CRYPTO_RCSR_RST 0x00000004 | 461 | #define TX4939_CRYPTO_RCSR_RST 0x00000004 |
462 | #define TX4939_CRYPTO_RCSR_FIN 0x00000002 | 462 | #define TX4939_CRYPTO_RCSR_FIN 0x00000002 |
463 | #define TX4939_CRYPTO_RCSR_ST 0x00000001 | 463 | #define TX4939_CRYPTO_RCSR_ST 0x00000001 |
@@ -480,8 +480,8 @@ struct tx4939_vpc_desc { | |||
480 | #define TX4939_VPC_CTRLA_PDINT_ALL 0x00000000 | 480 | #define TX4939_VPC_CTRLA_PDINT_ALL 0x00000000 |
481 | #define TX4939_VPC_CTRLA_PDINT_NEXT 0x00000010 | 481 | #define TX4939_VPC_CTRLA_PDINT_NEXT 0x00000010 |
482 | #define TX4939_VPC_CTRLA_PDINT_NONE 0x00000030 | 482 | #define TX4939_VPC_CTRLA_PDINT_NONE 0x00000030 |
483 | #define TX4939_VPC_CTRLA_VDVLDP 0x00000008 | 483 | #define TX4939_VPC_CTRLA_VDVLDP 0x00000008 |
484 | #define TX4939_VPC_CTRLA_VDMODE 0x00000004 | 484 | #define TX4939_VPC_CTRLA_VDMODE 0x00000004 |
485 | #define TX4939_VPC_CTRLA_VDFOR 0x00000002 | 485 | #define TX4939_VPC_CTRLA_VDFOR 0x00000002 |
486 | #define TX4939_VPC_CTRLA_ENVPC 0x00000001 | 486 | #define TX4939_VPC_CTRLA_ENVPC 0x00000001 |
487 | 487 | ||
@@ -512,9 +512,9 @@ struct tx4939_vpc_desc { | |||
512 | ((__u32)((__raw_readq(&tx4939_ccfgptr->ccfg) & TX4939_CCFG_BCFG_MASK) \ | 512 | ((__u32)((__raw_readq(&tx4939_ccfgptr->ccfg) & TX4939_CCFG_BCFG_MASK) \ |
513 | >> 32)) | 513 | >> 32)) |
514 | 514 | ||
515 | #define tx4939_ccfg_clear(bits) tx4938_ccfg_clear(bits) | 515 | #define tx4939_ccfg_clear(bits) tx4938_ccfg_clear(bits) |
516 | #define tx4939_ccfg_set(bits) tx4938_ccfg_set(bits) | 516 | #define tx4939_ccfg_set(bits) tx4938_ccfg_set(bits) |
517 | #define tx4939_ccfg_change(change, new) tx4938_ccfg_change(change, new) | 517 | #define tx4939_ccfg_change(change, new) tx4938_ccfg_change(change, new) |
518 | 518 | ||
519 | #define TX4939_EBUSC_CR(ch) TX4927_EBUSC_CR(ch) | 519 | #define TX4939_EBUSC_CR(ch) TX4927_EBUSC_CR(ch) |
520 | #define TX4939_EBUSC_BA(ch) TX4927_EBUSC_BA(ch) | 520 | #define TX4939_EBUSC_BA(ch) TX4927_EBUSC_BA(ch) |
@@ -522,7 +522,7 @@ struct tx4939_vpc_desc { | |||
522 | #define TX4939_EBUSC_WIDTH(ch) \ | 522 | #define TX4939_EBUSC_WIDTH(ch) \ |
523 | (16 >> ((__u32)(TX4939_EBUSC_CR(ch) >> 20) & 0x1)) | 523 | (16 >> ((__u32)(TX4939_EBUSC_CR(ch) >> 20) & 0x1)) |
524 | 524 | ||
525 | /* SCLK0 = MSTCLK * 429/19 * 16/245 / 2 (14.745MHz for MST 20MHz) */ | 525 | /* SCLK0 = MSTCLK * 429/19 * 16/245 / 2 (14.745MHz for MST 20MHz) */ |
526 | #define TX4939_SCLK0(mst) \ | 526 | #define TX4939_SCLK0(mst) \ |
527 | ((((mst) + 245/2) / 245UL * 429 * 16 + 19) / 19 / 2) | 527 | ((((mst) + 245/2) / 245UL * 429 * 16 + 19) / 19 / 2) |
528 | 528 | ||
diff --git a/arch/mips/include/asm/txx9tmr.h b/arch/mips/include/asm/txx9tmr.h index 67f70a8f09bd..466a3def3866 100644 --- a/arch/mips/include/asm/txx9tmr.h +++ b/arch/mips/include/asm/txx9tmr.h | |||
@@ -59,9 +59,9 @@ void txx9_clockevent_init(unsigned long baseaddr, int irq, | |||
59 | void txx9_tmr_init(unsigned long baseaddr); | 59 | void txx9_tmr_init(unsigned long baseaddr); |
60 | 60 | ||
61 | #ifdef CONFIG_CPU_TX39XX | 61 | #ifdef CONFIG_CPU_TX39XX |
62 | #define TXX9_TIMER_BITS 24 | 62 | #define TXX9_TIMER_BITS 24 |
63 | #else | 63 | #else |
64 | #define TXX9_TIMER_BITS 32 | 64 | #define TXX9_TIMER_BITS 32 |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | #endif /* __ASM_TXX9TMR_H */ | 67 | #endif /* __ASM_TXX9TMR_H */ |
diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h index 3b92efef56d3..bd87e36bf26a 100644 --- a/arch/mips/include/asm/uaccess.h +++ b/arch/mips/include/asm/uaccess.h | |||
@@ -87,12 +87,12 @@ extern u64 __ua_limit; | |||
87 | /* | 87 | /* |
88 | * access_ok: - Checks if a user space pointer is valid | 88 | * access_ok: - Checks if a user space pointer is valid |
89 | * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE. Note that | 89 | * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE. Note that |
90 | * %VERIFY_WRITE is a superset of %VERIFY_READ - if it is safe | 90 | * %VERIFY_WRITE is a superset of %VERIFY_READ - if it is safe |
91 | * to write to a block, it is always safe to read from it. | 91 | * to write to a block, it is always safe to read from it. |
92 | * @addr: User space pointer to start of block to check | 92 | * @addr: User space pointer to start of block to check |
93 | * @size: Size of block to check | 93 | * @size: Size of block to check |
94 | * | 94 | * |
95 | * Context: User context only. This function may sleep. | 95 | * Context: User context only. This function may sleep. |
96 | * | 96 | * |
97 | * Checks if a pointer to a block of memory in user space is valid. | 97 | * Checks if a pointer to a block of memory in user space is valid. |
98 | * | 98 | * |
@@ -124,10 +124,10 @@ extern u64 __ua_limit; | |||
124 | 124 | ||
125 | /* | 125 | /* |
126 | * put_user: - Write a simple value into user space. | 126 | * put_user: - Write a simple value into user space. |
127 | * @x: Value to copy to user space. | 127 | * @x: Value to copy to user space. |
128 | * @ptr: Destination address, in user space. | 128 | * @ptr: Destination address, in user space. |
129 | * | 129 | * |
130 | * Context: User context only. This function may sleep. | 130 | * Context: User context only. This function may sleep. |
131 | * | 131 | * |
132 | * This macro copies a single simple value from kernel space to user | 132 | * This macro copies a single simple value from kernel space to user |
133 | * space. It supports simple types like char and int, but not larger | 133 | * space. It supports simple types like char and int, but not larger |
@@ -138,15 +138,15 @@ extern u64 __ua_limit; | |||
138 | * | 138 | * |
139 | * Returns zero on success, or -EFAULT on error. | 139 | * Returns zero on success, or -EFAULT on error. |
140 | */ | 140 | */ |
141 | #define put_user(x,ptr) \ | 141 | #define put_user(x,ptr) \ |
142 | __put_user_check((x), (ptr), sizeof(*(ptr))) | 142 | __put_user_check((x), (ptr), sizeof(*(ptr))) |
143 | 143 | ||
144 | /* | 144 | /* |
145 | * get_user: - Get a simple variable from user space. | 145 | * get_user: - Get a simple variable from user space. |
146 | * @x: Variable to store result. | 146 | * @x: Variable to store result. |
147 | * @ptr: Source address, in user space. | 147 | * @ptr: Source address, in user space. |
148 | * | 148 | * |
149 | * Context: User context only. This function may sleep. | 149 | * Context: User context only. This function may sleep. |
150 | * | 150 | * |
151 | * This macro copies a single simple variable from user space to kernel | 151 | * This macro copies a single simple variable from user space to kernel |
152 | * space. It supports simple types like char and int, but not larger | 152 | * space. It supports simple types like char and int, but not larger |
@@ -163,10 +163,10 @@ extern u64 __ua_limit; | |||
163 | 163 | ||
164 | /* | 164 | /* |
165 | * __put_user: - Write a simple value into user space, with less checking. | 165 | * __put_user: - Write a simple value into user space, with less checking. |
166 | * @x: Value to copy to user space. | 166 | * @x: Value to copy to user space. |
167 | * @ptr: Destination address, in user space. | 167 | * @ptr: Destination address, in user space. |
168 | * | 168 | * |
169 | * Context: User context only. This function may sleep. | 169 | * Context: User context only. This function may sleep. |
170 | * | 170 | * |
171 | * This macro copies a single simple value from kernel space to user | 171 | * This macro copies a single simple value from kernel space to user |
172 | * space. It supports simple types like char and int, but not larger | 172 | * space. It supports simple types like char and int, but not larger |
@@ -185,10 +185,10 @@ extern u64 __ua_limit; | |||
185 | 185 | ||
186 | /* | 186 | /* |
187 | * __get_user: - Get a simple variable from user space, with less checking. | 187 | * __get_user: - Get a simple variable from user space, with less checking. |
188 | * @x: Variable to store result. | 188 | * @x: Variable to store result. |
189 | * @ptr: Source address, in user space. | 189 | * @ptr: Source address, in user space. |
190 | * | 190 | * |
191 | * Context: User context only. This function may sleep. | 191 | * Context: User context only. This function may sleep. |
192 | * | 192 | * |
193 | * This macro copies a single simple variable from user space to kernel | 193 | * This macro copies a single simple variable from user space to kernel |
194 | * space. It supports simple types like char and int, but not larger | 194 | * space. It supports simple types like char and int, but not larger |
@@ -390,10 +390,10 @@ extern void __put_user_unknown(void); | |||
390 | 390 | ||
391 | /* | 391 | /* |
392 | * put_user_unaligned: - Write a simple value into user space. | 392 | * put_user_unaligned: - Write a simple value into user space. |
393 | * @x: Value to copy to user space. | 393 | * @x: Value to copy to user space. |
394 | * @ptr: Destination address, in user space. | 394 | * @ptr: Destination address, in user space. |
395 | * | 395 | * |
396 | * Context: User context only. This function may sleep. | 396 | * Context: User context only. This function may sleep. |
397 | * | 397 | * |
398 | * This macro copies a single simple value from kernel space to user | 398 | * This macro copies a single simple value from kernel space to user |
399 | * space. It supports simple types like char and int, but not larger | 399 | * space. It supports simple types like char and int, but not larger |
@@ -409,10 +409,10 @@ extern void __put_user_unknown(void); | |||
409 | 409 | ||
410 | /* | 410 | /* |
411 | * get_user_unaligned: - Get a simple variable from user space. | 411 | * get_user_unaligned: - Get a simple variable from user space. |
412 | * @x: Variable to store result. | 412 | * @x: Variable to store result. |
413 | * @ptr: Source address, in user space. | 413 | * @ptr: Source address, in user space. |
414 | * | 414 | * |
415 | * Context: User context only. This function may sleep. | 415 | * Context: User context only. This function may sleep. |
416 | * | 416 | * |
417 | * This macro copies a single simple variable from user space to kernel | 417 | * This macro copies a single simple variable from user space to kernel |
418 | * space. It supports simple types like char and int, but not larger | 418 | * space. It supports simple types like char and int, but not larger |
@@ -429,10 +429,10 @@ extern void __put_user_unknown(void); | |||
429 | 429 | ||
430 | /* | 430 | /* |
431 | * __put_user_unaligned: - Write a simple value into user space, with less checking. | 431 | * __put_user_unaligned: - Write a simple value into user space, with less checking. |
432 | * @x: Value to copy to user space. | 432 | * @x: Value to copy to user space. |
433 | * @ptr: Destination address, in user space. | 433 | * @ptr: Destination address, in user space. |
434 | * | 434 | * |
435 | * Context: User context only. This function may sleep. | 435 | * Context: User context only. This function may sleep. |
436 | * | 436 | * |
437 | * This macro copies a single simple value from kernel space to user | 437 | * This macro copies a single simple value from kernel space to user |
438 | * space. It supports simple types like char and int, but not larger | 438 | * space. It supports simple types like char and int, but not larger |
@@ -451,10 +451,10 @@ extern void __put_user_unknown(void); | |||
451 | 451 | ||
452 | /* | 452 | /* |
453 | * __get_user_unaligned: - Get a simple variable from user space, with less checking. | 453 | * __get_user_unaligned: - Get a simple variable from user space, with less checking. |
454 | * @x: Variable to store result. | 454 | * @x: Variable to store result. |
455 | * @ptr: Source address, in user space. | 455 | * @ptr: Source address, in user space. |
456 | * | 456 | * |
457 | * Context: User context only. This function may sleep. | 457 | * Context: User context only. This function may sleep. |
458 | * | 458 | * |
459 | * This macro copies a single simple variable from user space to kernel | 459 | * This macro copies a single simple variable from user space to kernel |
460 | * space. It supports simple types like char and int, but not larger | 460 | * space. It supports simple types like char and int, but not larger |
@@ -543,7 +543,7 @@ do { \ | |||
543 | */ | 543 | */ |
544 | #define __get_user_unaligned_asm_ll32(val, addr) \ | 544 | #define __get_user_unaligned_asm_ll32(val, addr) \ |
545 | { \ | 545 | { \ |
546 | unsigned long long __gu_tmp; \ | 546 | unsigned long long __gu_tmp; \ |
547 | \ | 547 | \ |
548 | __asm__ __volatile__( \ | 548 | __asm__ __volatile__( \ |
549 | "1: ulw %1, (%3) \n" \ | 549 | "1: ulw %1, (%3) \n" \ |
@@ -631,7 +631,7 @@ do { \ | |||
631 | #define __put_user_unaligned_asm_ll32(ptr) \ | 631 | #define __put_user_unaligned_asm_ll32(ptr) \ |
632 | { \ | 632 | { \ |
633 | __asm__ __volatile__( \ | 633 | __asm__ __volatile__( \ |
634 | "1: sw %2, (%3) # __put_user_unaligned_asm_ll32 \n" \ | 634 | "1: sw %2, (%3) # __put_user_unaligned_asm_ll32 \n" \ |
635 | "2: sw %D2, 4(%3) \n" \ | 635 | "2: sw %D2, 4(%3) \n" \ |
636 | "3: \n" \ | 636 | "3: \n" \ |
637 | " .section .fixup,\"ax\" \n" \ | 637 | " .section .fixup,\"ax\" \n" \ |
@@ -658,7 +658,7 @@ extern void __put_user_unaligned_unknown(void); | |||
658 | #ifdef MODULE | 658 | #ifdef MODULE |
659 | #define __MODULE_JAL(destination) \ | 659 | #define __MODULE_JAL(destination) \ |
660 | ".set\tnoat\n\t" \ | 660 | ".set\tnoat\n\t" \ |
661 | __UA_LA "\t$1, " #destination "\n\t" \ | 661 | __UA_LA "\t$1, " #destination "\n\t" \ |
662 | "jalr\t$1\n\t" \ | 662 | "jalr\t$1\n\t" \ |
663 | ".set\tat\n\t" | 663 | ".set\tat\n\t" |
664 | #else | 664 | #else |
@@ -694,11 +694,11 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n); | |||
694 | 694 | ||
695 | /* | 695 | /* |
696 | * __copy_to_user: - Copy a block of data into user space, with less checking. | 696 | * __copy_to_user: - Copy a block of data into user space, with less checking. |
697 | * @to: Destination address, in user space. | 697 | * @to: Destination address, in user space. |
698 | * @from: Source address, in kernel space. | 698 | * @from: Source address, in kernel space. |
699 | * @n: Number of bytes to copy. | 699 | * @n: Number of bytes to copy. |
700 | * | 700 | * |
701 | * Context: User context only. This function may sleep. | 701 | * Context: User context only. This function may sleep. |
702 | * | 702 | * |
703 | * Copy data from kernel space to user space. Caller must check | 703 | * Copy data from kernel space to user space. Caller must check |
704 | * the specified block with access_ok() before calling this function. | 704 | * the specified block with access_ok() before calling this function. |
@@ -716,7 +716,7 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n); | |||
716 | __cu_from = (from); \ | 716 | __cu_from = (from); \ |
717 | __cu_len = (n); \ | 717 | __cu_len = (n); \ |
718 | might_fault(); \ | 718 | might_fault(); \ |
719 | __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \ | 719 | __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \ |
720 | __cu_len; \ | 720 | __cu_len; \ |
721 | }) | 721 | }) |
722 | 722 | ||
@@ -731,7 +731,7 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
731 | __cu_to = (to); \ | 731 | __cu_to = (to); \ |
732 | __cu_from = (from); \ | 732 | __cu_from = (from); \ |
733 | __cu_len = (n); \ | 733 | __cu_len = (n); \ |
734 | __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \ | 734 | __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \ |
735 | __cu_len; \ | 735 | __cu_len; \ |
736 | }) | 736 | }) |
737 | 737 | ||
@@ -744,18 +744,18 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
744 | __cu_to = (to); \ | 744 | __cu_to = (to); \ |
745 | __cu_from = (from); \ | 745 | __cu_from = (from); \ |
746 | __cu_len = (n); \ | 746 | __cu_len = (n); \ |
747 | __cu_len = __invoke_copy_from_user_inatomic(__cu_to, __cu_from, \ | 747 | __cu_len = __invoke_copy_from_user_inatomic(__cu_to, __cu_from, \ |
748 | __cu_len); \ | 748 | __cu_len); \ |
749 | __cu_len; \ | 749 | __cu_len; \ |
750 | }) | 750 | }) |
751 | 751 | ||
752 | /* | 752 | /* |
753 | * copy_to_user: - Copy a block of data into user space. | 753 | * copy_to_user: - Copy a block of data into user space. |
754 | * @to: Destination address, in user space. | 754 | * @to: Destination address, in user space. |
755 | * @from: Source address, in kernel space. | 755 | * @from: Source address, in kernel space. |
756 | * @n: Number of bytes to copy. | 756 | * @n: Number of bytes to copy. |
757 | * | 757 | * |
758 | * Context: User context only. This function may sleep. | 758 | * Context: User context only. This function may sleep. |
759 | * | 759 | * |
760 | * Copy data from kernel space to user space. | 760 | * Copy data from kernel space to user space. |
761 | * | 761 | * |
@@ -774,7 +774,7 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
774 | if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) { \ | 774 | if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) { \ |
775 | might_fault(); \ | 775 | might_fault(); \ |
776 | __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, \ | 776 | __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, \ |
777 | __cu_len); \ | 777 | __cu_len); \ |
778 | } \ | 778 | } \ |
779 | __cu_len; \ | 779 | __cu_len; \ |
780 | }) | 780 | }) |
@@ -827,11 +827,11 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
827 | 827 | ||
828 | /* | 828 | /* |
829 | * __copy_from_user: - Copy a block of data from user space, with less checking. | 829 | * __copy_from_user: - Copy a block of data from user space, with less checking. |
830 | * @to: Destination address, in kernel space. | 830 | * @to: Destination address, in kernel space. |
831 | * @from: Source address, in user space. | 831 | * @from: Source address, in user space. |
832 | * @n: Number of bytes to copy. | 832 | * @n: Number of bytes to copy. |
833 | * | 833 | * |
834 | * Context: User context only. This function may sleep. | 834 | * Context: User context only. This function may sleep. |
835 | * | 835 | * |
836 | * Copy data from user space to kernel space. Caller must check | 836 | * Copy data from user space to kernel space. Caller must check |
837 | * the specified block with access_ok() before calling this function. | 837 | * the specified block with access_ok() before calling this function. |
@@ -853,17 +853,17 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
853 | __cu_len = (n); \ | 853 | __cu_len = (n); \ |
854 | might_fault(); \ | 854 | might_fault(); \ |
855 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ | 855 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ |
856 | __cu_len); \ | 856 | __cu_len); \ |
857 | __cu_len; \ | 857 | __cu_len; \ |
858 | }) | 858 | }) |
859 | 859 | ||
860 | /* | 860 | /* |
861 | * copy_from_user: - Copy a block of data from user space. | 861 | * copy_from_user: - Copy a block of data from user space. |
862 | * @to: Destination address, in kernel space. | 862 | * @to: Destination address, in kernel space. |
863 | * @from: Source address, in user space. | 863 | * @from: Source address, in user space. |
864 | * @n: Number of bytes to copy. | 864 | * @n: Number of bytes to copy. |
865 | * | 865 | * |
866 | * Context: User context only. This function may sleep. | 866 | * Context: User context only. This function may sleep. |
867 | * | 867 | * |
868 | * Copy data from user space to kernel space. | 868 | * Copy data from user space to kernel space. |
869 | * | 869 | * |
@@ -885,7 +885,7 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
885 | if (access_ok(VERIFY_READ, __cu_from, __cu_len)) { \ | 885 | if (access_ok(VERIFY_READ, __cu_from, __cu_len)) { \ |
886 | might_fault(); \ | 886 | might_fault(); \ |
887 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ | 887 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ |
888 | __cu_len); \ | 888 | __cu_len); \ |
889 | } \ | 889 | } \ |
890 | __cu_len; \ | 890 | __cu_len; \ |
891 | }) | 891 | }) |
@@ -901,7 +901,7 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
901 | __cu_len = (n); \ | 901 | __cu_len = (n); \ |
902 | might_fault(); \ | 902 | might_fault(); \ |
903 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ | 903 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ |
904 | __cu_len); \ | 904 | __cu_len); \ |
905 | __cu_len; \ | 905 | __cu_len; \ |
906 | }) | 906 | }) |
907 | 907 | ||
@@ -915,18 +915,18 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
915 | __cu_from = (from); \ | 915 | __cu_from = (from); \ |
916 | __cu_len = (n); \ | 916 | __cu_len = (n); \ |
917 | if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && \ | 917 | if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && \ |
918 | access_ok(VERIFY_WRITE, __cu_to, __cu_len))) { \ | 918 | access_ok(VERIFY_WRITE, __cu_to, __cu_len))) { \ |
919 | might_fault(); \ | 919 | might_fault(); \ |
920 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ | 920 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ |
921 | __cu_len); \ | 921 | __cu_len); \ |
922 | } \ | 922 | } \ |
923 | __cu_len; \ | 923 | __cu_len; \ |
924 | }) | 924 | }) |
925 | 925 | ||
926 | /* | 926 | /* |
927 | * __clear_user: - Zero a block of memory in user space, with less checking. | 927 | * __clear_user: - Zero a block of memory in user space, with less checking. |
928 | * @to: Destination address, in user space. | 928 | * @to: Destination address, in user space. |
929 | * @n: Number of bytes to zero. | 929 | * @n: Number of bytes to zero. |
930 | * | 930 | * |
931 | * Zero a block of memory in user space. Caller must check | 931 | * Zero a block of memory in user space. Caller must check |
932 | * the specified block with access_ok() before calling this function. | 932 | * the specified block with access_ok() before calling this function. |
@@ -966,7 +966,7 @@ __clear_user(void __user *addr, __kernel_size_t size) | |||
966 | /* | 966 | /* |
967 | * __strncpy_from_user: - Copy a NUL terminated string from userspace, with less checking. | 967 | * __strncpy_from_user: - Copy a NUL terminated string from userspace, with less checking. |
968 | * @dst: Destination address, in kernel space. This buffer must be at | 968 | * @dst: Destination address, in kernel space. This buffer must be at |
969 | * least @count bytes long. | 969 | * least @count bytes long. |
970 | * @src: Source address, in user space. | 970 | * @src: Source address, in user space. |
971 | * @count: Maximum number of bytes to copy, including the trailing NUL. | 971 | * @count: Maximum number of bytes to copy, including the trailing NUL. |
972 | * | 972 | * |
@@ -1005,7 +1005,7 @@ __strncpy_from_user(char *__to, const char __user *__from, long __len) | |||
1005 | /* | 1005 | /* |
1006 | * strncpy_from_user: - Copy a NUL terminated string from userspace. | 1006 | * strncpy_from_user: - Copy a NUL terminated string from userspace. |
1007 | * @dst: Destination address, in kernel space. This buffer must be at | 1007 | * @dst: Destination address, in kernel space. This buffer must be at |
1008 | * least @count bytes long. | 1008 | * least @count bytes long. |
1009 | * @src: Source address, in user space. | 1009 | * @src: Source address, in user space. |
1010 | * @count: Maximum number of bytes to copy, including the trailing NUL. | 1010 | * @count: Maximum number of bytes to copy, including the trailing NUL. |
1011 | * | 1011 | * |
@@ -1060,7 +1060,7 @@ static inline long __strlen_user(const char __user *s) | |||
1060 | * strlen_user: - Get the size of a string in user space. | 1060 | * strlen_user: - Get the size of a string in user space. |
1061 | * @str: The string to measure. | 1061 | * @str: The string to measure. |
1062 | * | 1062 | * |
1063 | * Context: User context only. This function may sleep. | 1063 | * Context: User context only. This function may sleep. |
1064 | * | 1064 | * |
1065 | * Get the size of a NUL-terminated string in user space. | 1065 | * Get the size of a NUL-terminated string in user space. |
1066 | * | 1066 | * |
@@ -1108,7 +1108,7 @@ static inline long __strnlen_user(const char __user *s, long n) | |||
1108 | * strlen_user: - Get the size of a string in user space. | 1108 | * strlen_user: - Get the size of a string in user space. |
1109 | * @str: The string to measure. | 1109 | * @str: The string to measure. |
1110 | * | 1110 | * |
1111 | * Context: User context only. This function may sleep. | 1111 | * Context: User context only. This function may sleep. |
1112 | * | 1112 | * |
1113 | * Get the size of a NUL-terminated string in user space. | 1113 | * Get the size of a NUL-terminated string in user space. |
1114 | * | 1114 | * |
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h index 7e0bf17c9324..058e941626a6 100644 --- a/arch/mips/include/asm/uasm.h +++ b/arch/mips/include/asm/uasm.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2004, 2005, 2006, 2008 Thiemo Seufer | 6 | * Copyright (C) 2004, 2005, 2006, 2008 Thiemo Seufer |
7 | * Copyright (C) 2005 Maciej W. Rozycki | 7 | * Copyright (C) 2005 Maciej W. Rozycki |
8 | * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) | 8 | * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) |
9 | * Copyright (C) 2012 MIPS Technologies, Inc. | 9 | * Copyright (C) 2012 MIPS Technologies, Inc. |
diff --git a/arch/mips/include/asm/user.h b/arch/mips/include/asm/user.h index afa83a4c1888..6bad61b0a53a 100644 --- a/arch/mips/include/asm/user.h +++ b/arch/mips/include/asm/user.h | |||
@@ -20,7 +20,7 @@ | |||
20 | * upage: 1 page consisting of a user struct that tells gdb | 20 | * upage: 1 page consisting of a user struct that tells gdb |
21 | * what is present in the file. Directly after this is a | 21 | * what is present in the file. Directly after this is a |
22 | * copy of the task_struct, which is currently not used by gdb, | 22 | * copy of the task_struct, which is currently not used by gdb, |
23 | * but it may come in handy at some point. All of the registers | 23 | * but it may come in handy at some point. All of the registers |
24 | * are stored as part of the upage. The upage should always be | 24 | * are stored as part of the upage. The upage should always be |
25 | * only one page long. | 25 | * only one page long. |
26 | * data: The data segment follows next. We use current->end_text to | 26 | * data: The data segment follows next. We use current->end_text to |
diff --git a/arch/mips/include/asm/vr41xx/pci.h b/arch/mips/include/asm/vr41xx/pci.h index c231a3d6cfd8..a866918cfea5 100644 --- a/arch/mips/include/asm/vr41xx/pci.h +++ b/arch/mips/include/asm/vr41xx/pci.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #ifndef __NEC_VR41XX_PCI_H | 20 | #ifndef __NEC_VR41XX_PCI_H |
21 | #define __NEC_VR41XX_PCI_H | 21 | #define __NEC_VR41XX_PCI_H |
22 | 22 | ||
23 | #define PCI_MASTER_ADDRESS_MASK 0x7fffffffU | 23 | #define PCI_MASTER_ADDRESS_MASK 0x7fffffffU |
24 | 24 | ||
25 | struct pci_master_address_conversion { | 25 | struct pci_master_address_conversion { |
26 | uint32_t bus_base_address; | 26 | uint32_t bus_base_address; |
diff --git a/arch/mips/include/asm/vr41xx/tb0287.h b/arch/mips/include/asm/vr41xx/tb0287.h index 61bead68abf0..d58b5678f243 100644 --- a/arch/mips/include/asm/vr41xx/tb0287.h +++ b/arch/mips/include/asm/vr41xx/tb0287.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * tb0287.h, Include file for TANBAC TB0287 mini-ITX board. | 2 | * tb0287.h, Include file for TANBAC TB0287 mini-ITX board. |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Media Lab Inc. <ito@mlb.co.jp> | 4 | * Copyright (C) 2005 Media Lab Inc. <ito@mlb.co.jp> |
5 | * | 5 | * |
6 | * This code is largely based on tb0219.h. | 6 | * This code is largely based on tb0219.h. |
7 | * | 7 | * |
diff --git a/arch/mips/include/asm/war.h b/arch/mips/include/asm/war.h index 65e344532ded..9344e247a6c8 100644 --- a/arch/mips/include/asm/war.h +++ b/arch/mips/include/asm/war.h | |||
@@ -83,30 +83,30 @@ | |||
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | /* | 85 | /* |
86 | * Pleasures of the R4600 V1.x. Cite from the IDT R4600 V1.7 errata: | 86 | * Pleasures of the R4600 V1.x. Cite from the IDT R4600 V1.7 errata: |
87 | * | 87 | * |
88 | * 18. The CACHE instructions Hit_Writeback_Invalidate_D, Hit_Writeback_D, | 88 | * 18. The CACHE instructions Hit_Writeback_Invalidate_D, Hit_Writeback_D, |
89 | * Hit_Invalidate_D and Create_Dirty_Excl_D should only be | 89 | * Hit_Invalidate_D and Create_Dirty_Excl_D should only be |
90 | * executed if there is no other dcache activity. If the dcache is | 90 | * executed if there is no other dcache activity. If the dcache is |
91 | * accessed for another instruction immeidately preceding when these | 91 | * accessed for another instruction immeidately preceding when these |
92 | * cache instructions are executing, it is possible that the dcache | 92 | * cache instructions are executing, it is possible that the dcache |
93 | * tag match outputs used by these cache instructions will be | 93 | * tag match outputs used by these cache instructions will be |
94 | * incorrect. These cache instructions should be preceded by at least | 94 | * incorrect. These cache instructions should be preceded by at least |
95 | * four instructions that are not any kind of load or store | 95 | * four instructions that are not any kind of load or store |
96 | * instruction. | 96 | * instruction. |
97 | * | 97 | * |
98 | * This is not allowed: lw | 98 | * This is not allowed: lw |
99 | * nop | 99 | * nop |
100 | * nop | 100 | * nop |
101 | * nop | 101 | * nop |
102 | * cache Hit_Writeback_Invalidate_D | 102 | * cache Hit_Writeback_Invalidate_D |
103 | * | 103 | * |
104 | * This is allowed: lw | 104 | * This is allowed: lw |
105 | * nop | 105 | * nop |
106 | * nop | 106 | * nop |
107 | * nop | 107 | * nop |
108 | * nop | 108 | * nop |
109 | * cache Hit_Writeback_Invalidate_D | 109 | * cache Hit_Writeback_Invalidate_D |
110 | */ | 110 | */ |
111 | #ifndef R4600_V1_HIT_CACHEOP_WAR | 111 | #ifndef R4600_V1_HIT_CACHEOP_WAR |
112 | #error Check setting of R4600_V1_HIT_CACHEOP_WAR for your platform | 112 | #error Check setting of R4600_V1_HIT_CACHEOP_WAR for your platform |
@@ -118,7 +118,7 @@ | |||
118 | * | 118 | * |
119 | * R4600 v2.0 bug: "The CACHE instructions Hit_Writeback_Inv_D, | 119 | * R4600 v2.0 bug: "The CACHE instructions Hit_Writeback_Inv_D, |
120 | * Hit_Writeback_D, Hit_Invalidate_D and Create_Dirty_Exclusive_D will only | 120 | * Hit_Writeback_D, Hit_Invalidate_D and Create_Dirty_Exclusive_D will only |
121 | * operate correctly if the internal data cache refill buffer is empty. These | 121 | * operate correctly if the internal data cache refill buffer is empty. These |
122 | * CACHE instructions should be separated from any potential data cache miss | 122 | * CACHE instructions should be separated from any potential data cache miss |
123 | * by a load instruction to an uncached address to empty the response buffer." | 123 | * by a load instruction to an uncached address to empty the response buffer." |
124 | * (Revision 2.0 device errata from IDT available on http://www.idt.com/ | 124 | * (Revision 2.0 device errata from IDT available on http://www.idt.com/ |
diff --git a/arch/mips/include/asm/xtalk/xtalk.h b/arch/mips/include/asm/xtalk/xtalk.h index 79bac882a739..680e7efebbaf 100644 --- a/arch/mips/include/asm/xtalk/xtalk.h +++ b/arch/mips/include/asm/xtalk/xtalk.h | |||
@@ -16,15 +16,15 @@ | |||
16 | /* | 16 | /* |
17 | * User-level device driver visible types | 17 | * User-level device driver visible types |
18 | */ | 18 | */ |
19 | typedef char xwidgetnum_t; /* xtalk widget number (0..15) */ | 19 | typedef char xwidgetnum_t; /* xtalk widget number (0..15) */ |
20 | 20 | ||
21 | #define XWIDGET_NONE -1 | 21 | #define XWIDGET_NONE -1 |
22 | 22 | ||
23 | typedef int xwidget_part_num_t; /* xtalk widget part number */ | 23 | typedef int xwidget_part_num_t; /* xtalk widget part number */ |
24 | 24 | ||
25 | #define XWIDGET_PART_NUM_NONE -1 | 25 | #define XWIDGET_PART_NUM_NONE -1 |
26 | 26 | ||
27 | typedef int xwidget_rev_num_t; /* xtalk widget revision number */ | 27 | typedef int xwidget_rev_num_t; /* xtalk widget revision number */ |
28 | 28 | ||
29 | #define XWIDGET_REV_NUM_NONE -1 | 29 | #define XWIDGET_REV_NUM_NONE -1 |
30 | 30 | ||
@@ -37,15 +37,15 @@ typedef struct xtalk_piomap_s *xtalk_piomap_t; | |||
37 | /* It is often convenient to fold the XIO target port | 37 | /* It is often convenient to fold the XIO target port |
38 | * number into the XIO address. | 38 | * number into the XIO address. |
39 | */ | 39 | */ |
40 | #define XIO_NOWHERE (0xFFFFFFFFFFFFFFFFull) | 40 | #define XIO_NOWHERE (0xFFFFFFFFFFFFFFFFull) |
41 | #define XIO_ADDR_BITS (0x0000FFFFFFFFFFFFull) | 41 | #define XIO_ADDR_BITS (0x0000FFFFFFFFFFFFull) |
42 | #define XIO_PORT_BITS (0xF000000000000000ull) | 42 | #define XIO_PORT_BITS (0xF000000000000000ull) |
43 | #define XIO_PORT_SHIFT (60) | 43 | #define XIO_PORT_SHIFT (60) |
44 | 44 | ||
45 | #define XIO_PACKED(x) (((x)&XIO_PORT_BITS) != 0) | 45 | #define XIO_PACKED(x) (((x)&XIO_PORT_BITS) != 0) |
46 | #define XIO_ADDR(x) ((x)&XIO_ADDR_BITS) | 46 | #define XIO_ADDR(x) ((x)&XIO_ADDR_BITS) |
47 | #define XIO_PORT(x) ((xwidgetnum_t)(((x)&XIO_PORT_BITS) >> XIO_PORT_SHIFT)) | 47 | #define XIO_PORT(x) ((xwidgetnum_t)(((x)&XIO_PORT_BITS) >> XIO_PORT_SHIFT)) |
48 | #define XIO_PACK(p, o) ((((uint64_t)(p))<<XIO_PORT_SHIFT) | ((o)&XIO_ADDR_BITS)) | 48 | #define XIO_PACK(p, o) ((((uint64_t)(p))<<XIO_PORT_SHIFT) | ((o)&XIO_ADDR_BITS)) |
49 | 49 | ||
50 | #endif /* !__ASSEMBLY__ */ | 50 | #endif /* !__ASSEMBLY__ */ |
51 | 51 | ||
diff --git a/arch/mips/include/asm/xtalk/xwidget.h b/arch/mips/include/asm/xtalk/xwidget.h index b4a13d7405ee..32e4e884f9b9 100644 --- a/arch/mips/include/asm/xtalk/xwidget.h +++ b/arch/mips/include/asm/xtalk/xwidget.h | |||
@@ -45,12 +45,12 @@ | |||
45 | #define WIDGET_PENDING 0x0000001f | 45 | #define WIDGET_PENDING 0x0000001f |
46 | 46 | ||
47 | /* WIDGET_ERR_UPPER_ADDR */ | 47 | /* WIDGET_ERR_UPPER_ADDR */ |
48 | #define WIDGET_ERR_UPPER_ADDR_ONLY 0x0000ffff | 48 | #define WIDGET_ERR_UPPER_ADDR_ONLY 0x0000ffff |
49 | 49 | ||
50 | /* WIDGET_CONTROL */ | 50 | /* WIDGET_CONTROL */ |
51 | #define WIDGET_F_BAD_PKT 0x00010000 | 51 | #define WIDGET_F_BAD_PKT 0x00010000 |
52 | #define WIDGET_LLP_XBAR_CRD 0x0000f000 | 52 | #define WIDGET_LLP_XBAR_CRD 0x0000f000 |
53 | #define WIDGET_LLP_XBAR_CRD_SHFT 12 | 53 | #define WIDGET_LLP_XBAR_CRD_SHFT 12 |
54 | #define WIDGET_CLR_RLLP_CNT 0x00000800 | 54 | #define WIDGET_CLR_RLLP_CNT 0x00000800 |
55 | #define WIDGET_CLR_TLLP_CNT 0x00000400 | 55 | #define WIDGET_CLR_TLLP_CNT 0x00000400 |
56 | #define WIDGET_SYS_END 0x00000200 | 56 | #define WIDGET_SYS_END 0x00000200 |
@@ -86,8 +86,8 @@ | |||
86 | 86 | ||
87 | /* | 87 | /* |
88 | * according to the crosstalk spec, only 32-bits access to the widget | 88 | * according to the crosstalk spec, only 32-bits access to the widget |
89 | * configuration registers is allowed. some widgets may allow 64-bits | 89 | * configuration registers is allowed. some widgets may allow 64-bits |
90 | * access but software should not depend on it. registers beyond the | 90 | * access but software should not depend on it. registers beyond the |
91 | * widget target flush register are widget dependent thus will not be | 91 | * widget target flush register are widget dependent thus will not be |
92 | * defined here | 92 | * defined here |
93 | */ | 93 | */ |