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/sn | |
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/sn')
22 files changed, 939 insertions, 939 deletions
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 | ||