aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/sibyte/sb1250_scd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips/sibyte/sb1250_scd.h')
-rw-r--r--include/asm-mips/sibyte/sb1250_scd.h100
1 files changed, 82 insertions, 18 deletions
diff --git a/include/asm-mips/sibyte/sb1250_scd.h b/include/asm-mips/sibyte/sb1250_scd.h
index dbbd682fb47e..14c1d5e54a04 100644
--- a/include/asm-mips/sibyte/sb1250_scd.h
+++ b/include/asm-mips/sibyte/sb1250_scd.h
@@ -51,26 +51,70 @@
51#define V_SYS_REVISION(x) _SB_MAKEVALUE(x,S_SYS_REVISION) 51#define V_SYS_REVISION(x) _SB_MAKEVALUE(x,S_SYS_REVISION)
52#define G_SYS_REVISION(x) _SB_GETVALUE(x,S_SYS_REVISION,M_SYS_REVISION) 52#define G_SYS_REVISION(x) _SB_GETVALUE(x,S_SYS_REVISION,M_SYS_REVISION)
53 53
54#if SIBYTE_HDR_FEATURE_CHIP(1250) 54#define K_SYS_REVISION_BCM1250_PASS1 0x01
55#define K_SYS_REVISION_BCM1250_PASS1 1 55
56#define K_SYS_REVISION_BCM1250_PASS2 3 56#define K_SYS_REVISION_BCM1250_PASS2 0x03
57#define K_SYS_REVISION_BCM1250_A10 11 57#define K_SYS_REVISION_BCM1250_A1 0x03 /* Pass 2.0 WB */
58#define K_SYS_REVISION_BCM1250_PASS2_2 16 58#define K_SYS_REVISION_BCM1250_A2 0x04 /* Pass 2.0 FC */
59#define K_SYS_REVISION_BCM1250_B2 17 59#define K_SYS_REVISION_BCM1250_A3 0x05 /* Pass 2.1 FC */
60#define K_SYS_REVISION_BCM1250_PASS3 32 60#define K_SYS_REVISION_BCM1250_A4 0x06 /* Pass 2.1 WB */
61#define K_SYS_REVISION_BCM1250_C1 33 61#define K_SYS_REVISION_BCM1250_A6 0x07 /* OR 0x04 (A2) w/WID != 0 */
62#define K_SYS_REVISION_BCM1250_A8 0x0b /* A8/A10 */
63#define K_SYS_REVISION_BCM1250_A9 0x08
64#define K_SYS_REVISION_BCM1250_A10 K_SYS_REVISION_BCM1250_A8
65
66#define K_SYS_REVISION_BCM1250_PASS2_2 0x10
67#define K_SYS_REVISION_BCM1250_B0 K_SYS_REVISION_BCM1250_B1
68#define K_SYS_REVISION_BCM1250_B1 0x10
69#define K_SYS_REVISION_BCM1250_B2 0x11
70
71#define K_SYS_REVISION_BCM1250_C0 0x20
72#define K_SYS_REVISION_BCM1250_C1 0x21
73#define K_SYS_REVISION_BCM1250_C2 0x22
74#define K_SYS_REVISION_BCM1250_C3 0x23
62 75
76#if SIBYTE_HDR_FEATURE_CHIP(1250)
63/* XXX: discourage people from using these constants. */ 77/* XXX: discourage people from using these constants. */
64#define K_SYS_REVISION_PASS1 K_SYS_REVISION_BCM1250_PASS1 78#define K_SYS_REVISION_PASS1 K_SYS_REVISION_BCM1250_PASS1
65#define K_SYS_REVISION_PASS2 K_SYS_REVISION_BCM1250_PASS2 79#define K_SYS_REVISION_PASS2 K_SYS_REVISION_BCM1250_PASS2
66#define K_SYS_REVISION_PASS2_2 K_SYS_REVISION_BCM1250_PASS2_2 80#define K_SYS_REVISION_PASS2_2 K_SYS_REVISION_BCM1250_PASS2_2
67#define K_SYS_REVISION_PASS3 K_SYS_REVISION_BCM1250_PASS3 81#define K_SYS_REVISION_PASS3 K_SYS_REVISION_BCM1250_PASS3
82#define K_SYS_REVISION_BCM1250_PASS3 K_SYS_REVISION_BCM1250_C0
68#endif /* 1250 */ 83#endif /* 1250 */
69 84
70#if SIBYTE_HDR_FEATURE_CHIP(112x) 85#define K_SYS_REVISION_BCM112x_A1 0x20
71#define K_SYS_REVISION_BCM112x_A1 32 86#define K_SYS_REVISION_BCM112x_A2 0x21
72#define K_SYS_REVISION_BCM112x_A2 33 87#define K_SYS_REVISION_BCM112x_A3 0x22
73#endif /* 112x */ 88#define K_SYS_REVISION_BCM112x_A4 0x23
89
90#define K_SYS_REVISION_BCM1480_S0 0x01
91#define K_SYS_REVISION_BCM1480_A1 0x02
92#define K_SYS_REVISION_BCM1480_A2 0x03
93#define K_SYS_REVISION_BCM1480_A3 0x04
94#define K_SYS_REVISION_BCM1480_B0 0x11
95
96/*Cache size - 23:20 of revision register*/
97#define S_SYS_L2C_SIZE _SB_MAKE64(20)
98#define M_SYS_L2C_SIZE _SB_MAKEMASK(4,S_SYS_L2C_SIZE)
99#define V_SYS_L2C_SIZE(x) _SB_MAKEVALUE(x,S_SYS_L2C_SIZE)
100#define G_SYS_L2C_SIZE(x) _SB_GETVALUE(x,S_SYS_L2C_SIZE,M_SYS_L2C_SIZE)
101
102#define K_SYS_L2C_SIZE_1MB 0
103#define K_SYS_L2C_SIZE_512KB 5
104#define K_SYS_L2C_SIZE_256KB 2
105#define K_SYS_L2C_SIZE_128KB 1
106
107#define K_SYS_L2C_SIZE_BCM1250 K_SYS_L2C_SIZE_512KB
108#define K_SYS_L2C_SIZE_BCM1125 K_SYS_L2C_SIZE_256KB
109#define K_SYS_L2C_SIZE_BCM1122 K_SYS_L2C_SIZE_128KB
110
111
112/* Number of CPU cores, bits 27:24 of revision register*/
113#define S_SYS_NUM_CPUS _SB_MAKE64(24)
114#define M_SYS_NUM_CPUS _SB_MAKEMASK(4,S_SYS_NUM_CPUS)
115#define V_SYS_NUM_CPUS(x) _SB_MAKEVALUE(x,S_SYS_NUM_CPUS)
116#define G_SYS_NUM_CPUS(x) _SB_GETVALUE(x,S_SYS_NUM_CPUS,M_SYS_NUM_CPUS)
117
74 118
75/* XXX: discourage people from using these constants. */ 119/* XXX: discourage people from using these constants. */
76#define S_SYS_PART _SB_MAKE64(16) 120#define S_SYS_PART _SB_MAKE64(16)
@@ -83,6 +127,8 @@
83#define K_SYS_PART_BCM1120 0x1121 127#define K_SYS_PART_BCM1120 0x1121
84#define K_SYS_PART_BCM1125 0x1123 128#define K_SYS_PART_BCM1125 0x1123
85#define K_SYS_PART_BCM1125H 0x1124 129#define K_SYS_PART_BCM1125H 0x1124
130#define K_SYS_PART_BCM1122 0x1113
131
86 132
87/* The "peripheral set" (SOC type) is the low 4 bits of the "part" field. */ 133/* The "peripheral set" (SOC type) is the low 4 bits of the "part" field. */
88#define S_SYS_SOC_TYPE _SB_MAKE64(16) 134#define S_SYS_SOC_TYPE _SB_MAKE64(16)
@@ -96,6 +142,8 @@
96#define K_SYS_SOC_TYPE_BCM1125 0x3 142#define K_SYS_SOC_TYPE_BCM1125 0x3
97#define K_SYS_SOC_TYPE_BCM1125H 0x4 143#define K_SYS_SOC_TYPE_BCM1125H 0x4
98#define K_SYS_SOC_TYPE_BCM1250_ALT2 0x5 /* 1250pass2 w/ 1/2 L2. */ 144#define K_SYS_SOC_TYPE_BCM1250_ALT2 0x5 /* 1250pass2 w/ 1/2 L2. */
145#define K_SYS_SOC_TYPE_BCM1x80 0x6
146#define K_SYS_SOC_TYPE_BCM1x55 0x7
99 147
100/* 148/*
101 * Calculate correct SOC type given a copy of system revision register. 149 * Calculate correct SOC type given a copy of system revision register.
@@ -127,10 +175,12 @@
127#define V_SYS_WID(x) _SB_MAKEVALUE(x,S_SYS_WID) 175#define V_SYS_WID(x) _SB_MAKEVALUE(x,S_SYS_WID)
128#define G_SYS_WID(x) _SB_GETVALUE(x,S_SYS_WID,M_SYS_WID) 176#define G_SYS_WID(x) _SB_GETVALUE(x,S_SYS_WID,M_SYS_WID)
129 177
130/* System Manufacturing Register 178/*
131* Register: SCD_SYSTEM_MANUF 179 * System Manufacturing Register
132*/ 180 * Register: SCD_SYSTEM_MANUF
181 */
133 182
183#if SIBYTE_HDR_FEATURE_1250_112x
134/* Wafer ID: bits 31:0 */ 184/* Wafer ID: bits 31:0 */
135#define S_SYS_WAFERID1_200 _SB_MAKE64(0) 185#define S_SYS_WAFERID1_200 _SB_MAKE64(0)
136#define M_SYS_WAFERID1_200 _SB_MAKEMASK(32,S_SYS_WAFERID1_200) 186#define M_SYS_WAFERID1_200 _SB_MAKEMASK(32,S_SYS_WAFERID1_200)
@@ -139,8 +189,8 @@
139 189
140#define S_SYS_BIN _SB_MAKE64(32) 190#define S_SYS_BIN _SB_MAKE64(32)
141#define M_SYS_BIN _SB_MAKEMASK(4,S_SYS_BIN) 191#define M_SYS_BIN _SB_MAKEMASK(4,S_SYS_BIN)
142#define V_SYS_BIN _SB_MAKEVALUE(x,S_SYS_BIN) 192#define V_SYS_BIN(x) _SB_MAKEVALUE(x,S_SYS_BIN)
143#define G_SYS_BIN _SB_GETVALUE(x,S_SYS_BIN,M_SYS_BIN) 193#define G_SYS_BIN(x) _SB_GETVALUE(x,S_SYS_BIN,M_SYS_BIN)
144 194
145/* Wafer ID: bits 39:36 */ 195/* Wafer ID: bits 39:36 */
146#define S_SYS_WAFERID2_200 _SB_MAKE64(36) 196#define S_SYS_WAFERID2_200 _SB_MAKE64(36)
@@ -163,12 +213,14 @@
163#define M_SYS_YPOS _SB_MAKEMASK(6,S_SYS_YPOS) 213#define M_SYS_YPOS _SB_MAKEMASK(6,S_SYS_YPOS)
164#define V_SYS_YPOS(x) _SB_MAKEVALUE(x,S_SYS_YPOS) 214#define V_SYS_YPOS(x) _SB_MAKEVALUE(x,S_SYS_YPOS)
165#define G_SYS_YPOS(x) _SB_GETVALUE(x,S_SYS_YPOS,M_SYS_YPOS) 215#define G_SYS_YPOS(x) _SB_GETVALUE(x,S_SYS_YPOS,M_SYS_YPOS)
216#endif
166 217
167/* 218/*
168 * System Config Register (Table 4-2) 219 * System Config Register (Table 4-2)
169 * Register: SCD_SYSTEM_CFG 220 * Register: SCD_SYSTEM_CFG
170 */ 221 */
171 222
223#if SIBYTE_HDR_FEATURE_1250_112x
172#define M_SYS_LDT_PLL_BYP _SB_MAKEMASK1(3) 224#define M_SYS_LDT_PLL_BYP _SB_MAKEMASK1(3)
173#define M_SYS_PCI_SYNC_TEST_MODE _SB_MAKEMASK1(4) 225#define M_SYS_PCI_SYNC_TEST_MODE _SB_MAKEMASK1(4)
174#define M_SYS_IOB0_DIV _SB_MAKEMASK1(5) 226#define M_SYS_IOB0_DIV _SB_MAKEMASK1(5)
@@ -253,6 +305,8 @@
253#define M_SYS_SW_FLAG _SB_MAKEMASK1(63) 305#define M_SYS_SW_FLAG _SB_MAKEMASK1(63)
254#endif /* 1250 PASS2 || 112x PASS1 */ 306#endif /* 1250 PASS2 || 112x PASS1 */
255 307
308#endif
309
256 310
257/* 311/*
258 * Mailbox Registers (Table 4-3) 312 * Mailbox Registers (Table 4-3)
@@ -326,6 +380,7 @@
326 * System Performance Counters 380 * System Performance Counters
327 */ 381 */
328 382
383#if SIBYTE_HDR_FEATURE_1250_112x
329#define S_SPC_CFG_SRC0 0 384#define S_SPC_CFG_SRC0 0
330#define M_SPC_CFG_SRC0 _SB_MAKEMASK(8,S_SPC_CFG_SRC0) 385#define M_SPC_CFG_SRC0 _SB_MAKEMASK(8,S_SPC_CFG_SRC0)
331#define V_SPC_CFG_SRC0(x) _SB_MAKEVALUE(x,S_SPC_CFG_SRC0) 386#define V_SPC_CFG_SRC0(x) _SB_MAKEVALUE(x,S_SPC_CFG_SRC0)
@@ -348,6 +403,7 @@
348 403
349#define M_SPC_CFG_CLEAR _SB_MAKEMASK1(32) 404#define M_SPC_CFG_CLEAR _SB_MAKEMASK1(32)
350#define M_SPC_CFG_ENABLE _SB_MAKEMASK1(33) 405#define M_SPC_CFG_ENABLE _SB_MAKEMASK1(33)
406#endif
351 407
352 408
353/* 409/*
@@ -412,6 +468,7 @@
412 * Address Trap Registers 468 * Address Trap Registers
413 */ 469 */
414 470
471#if SIBYTE_HDR_FEATURE_1250_112x
415#define M_ATRAP_INDEX _SB_MAKEMASK(4,0) 472#define M_ATRAP_INDEX _SB_MAKEMASK(4,0)
416#define M_ATRAP_ADDRESS _SB_MAKEMASK(40,0) 473#define M_ATRAP_ADDRESS _SB_MAKEMASK(40,0)
417 474
@@ -436,7 +493,6 @@
436#define K_BUS_AGENT_IOB0 2 493#define K_BUS_AGENT_IOB0 2
437#define K_BUS_AGENT_IOB1 3 494#define K_BUS_AGENT_IOB1 3
438#define K_BUS_AGENT_SCD 4 495#define K_BUS_AGENT_SCD 4
439#define K_BUS_AGENT_RESERVED 5
440#define K_BUS_AGENT_L2C 6 496#define K_BUS_AGENT_L2C 6
441#define K_BUS_AGENT_MC 7 497#define K_BUS_AGENT_MC 7
442 498
@@ -454,10 +510,14 @@
454#define K_ATRAP_CFG_CATTR_NOTNONCOH 6 510#define K_ATRAP_CFG_CATTR_NOTNONCOH 6
455#define K_ATRAP_CFG_CATTR_NOTCOHERENT 7 511#define K_ATRAP_CFG_CATTR_NOTCOHERENT 7
456 512
513#endif /* 1250/112x */
514
457/* 515/*
458 * Trace Buffer Config register 516 * Trace Buffer Config register
459 */ 517 */
460 518
519#if SIBYTE_HDR_FEATURE_1250_112x
520
461#define M_SCD_TRACE_CFG_RESET _SB_MAKEMASK1(0) 521#define M_SCD_TRACE_CFG_RESET _SB_MAKEMASK1(0)
462#define M_SCD_TRACE_CFG_START_READ _SB_MAKEMASK1(1) 522#define M_SCD_TRACE_CFG_START_READ _SB_MAKEMASK1(1)
463#define M_SCD_TRACE_CFG_START _SB_MAKEMASK1(2) 523#define M_SCD_TRACE_CFG_START _SB_MAKEMASK1(2)
@@ -475,6 +535,8 @@
475#define V_SCD_TRACE_CFG_CUR_ADDR(x) _SB_MAKEVALUE(x,S_SCD_TRACE_CFG_CUR_ADDR) 535#define V_SCD_TRACE_CFG_CUR_ADDR(x) _SB_MAKEVALUE(x,S_SCD_TRACE_CFG_CUR_ADDR)
476#define G_SCD_TRACE_CFG_CUR_ADDR(x) _SB_GETVALUE(x,S_SCD_TRACE_CFG_CUR_ADDR,M_SCD_TRACE_CFG_CUR_ADDR) 536#define G_SCD_TRACE_CFG_CUR_ADDR(x) _SB_GETVALUE(x,S_SCD_TRACE_CFG_CUR_ADDR,M_SCD_TRACE_CFG_CUR_ADDR)
477 537
538#endif /* 1250/112x */
539
478/* 540/*
479 * Trace Event registers 541 * Trace Event registers
480 */ 542 */
@@ -578,5 +640,7 @@
578#define M_SCD_TRSEQ_DEBUGPIN _SB_MAKEMASK1(20) 640#define M_SCD_TRSEQ_DEBUGPIN _SB_MAKEMASK1(20)
579#define M_SCD_TRSEQ_DEBUGCPU _SB_MAKEMASK1(21) 641#define M_SCD_TRSEQ_DEBUGCPU _SB_MAKEMASK1(21)
580#define M_SCD_TRSEQ_CLEARUSE _SB_MAKEMASK1(22) 642#define M_SCD_TRSEQ_CLEARUSE _SB_MAKEMASK1(22)
643#define M_SCD_TRSEQ_ALLD_A _SB_MAKEMASK1(23)
644#define M_SCD_TRSEQ_ALL_A _SB_MAKEMASK1(24)
581 645
582#endif 646#endif