Go to the documentation of this file.
9 #ifndef _ASM_IA64_SN_XTALK_XBOW_H
10 #define _ASM_IA64_SN_XTALK_XBOW_H
12 #define XBOW_PORT_8 0x8
13 #define XBOW_PORT_C 0xc
14 #define XBOW_PORT_F 0xf
16 #define MAX_XBOW_PORTS 8
17 #define BASE_XBOW_PORT XBOW_PORT_8
21 #define MAX_XBOW_NAME 16
54 #define xb_wid_id xb_widget.w_id
55 #define xb_wid_stat xb_widget.w_status
56 #define xb_wid_err_upper xb_widget.w_err_upper_addr
57 #define xb_wid_err_lower xb_widget.w_err_lower_addr
58 #define xb_wid_control xb_widget.w_control
59 #define xb_wid_req_timeout xb_widget.w_req_timeout
60 #define xb_wid_int_upper xb_widget.w_intdest_upper_addr
61 #define xb_wid_int_lower xb_widget.w_intdest_lower_addr
62 #define xb_wid_err_cmdword xb_widget.w_err_cmd_word
63 #define xb_wid_llp xb_widget.w_llp_cfg
64 #define xb_wid_stat_clr xb_widget.w_tflush
111 #define xb_link(p) xb_link_raw[(p) & (MAX_XBOW_PORTS - 1)]
113 #define XB_FLAGS_EXISTS 0x1
114 #define XB_FLAGS_MASTER 0x2
115 #define XB_FLAGS_SLAVE 0x0
116 #define XB_FLAGS_GBR 0x4
117 #define XB_FLAGS_16BIT 0x8
118 #define XB_FLAGS_8BIT 0x0
121 #define XBOW_WIDGET_IS_VALID(wid) ((wid) >= XBOW_PORT_8 && (wid) <= XBOW_PORT_F)
124 #define XBOW_ARB_IS_UPPER(wid) ((wid) >= XBOW_PORT_8 && (wid) <= XBOW_PORT_B)
125 #define XBOW_ARB_IS_LOWER(wid) ((wid) >= XBOW_PORT_C && (wid) <= XBOW_PORT_F)
128 #define XBOW_ARB_OFF(wid) (XBOW_ARB_IS_UPPER(wid) ? 0x1c : 0x24)
130 #define XBOW_WID_ID WIDGET_ID
131 #define XBOW_WID_STAT WIDGET_STATUS
132 #define XBOW_WID_ERR_UPPER WIDGET_ERR_UPPER_ADDR
133 #define XBOW_WID_ERR_LOWER WIDGET_ERR_LOWER_ADDR
134 #define XBOW_WID_CONTROL WIDGET_CONTROL
135 #define XBOW_WID_REQ_TO WIDGET_REQ_TIMEOUT
136 #define XBOW_WID_INT_UPPER WIDGET_INTDEST_UPPER_ADDR
137 #define XBOW_WID_INT_LOWER WIDGET_INTDEST_LOWER_ADDR
138 #define XBOW_WID_ERR_CMDWORD WIDGET_ERR_CMD_WORD
139 #define XBOW_WID_LLP WIDGET_LLP_CFG
140 #define XBOW_WID_STAT_CLR WIDGET_TFLUSH
141 #define XBOW_WID_ARB_RELOAD 0x5c
142 #define XBOW_WID_PERF_CTR_A 0x64
143 #define XBOW_WID_PERF_CTR_B 0x6c
144 #define XBOW_WID_NIC 0x74
147 #define XBOW_W0_RST_FNC 0x00007C
148 #define XBOW_L8_RST_FNC 0x000084
149 #define XBOW_L9_RST_FNC 0x00008c
150 #define XBOW_LA_RST_FNC 0x000094
151 #define XBOW_LB_RST_FNC 0x00009c
152 #define XBOW_LC_RST_FNC 0x0000a4
153 #define XBOW_LD_RST_FNC 0x0000ac
154 #define XBOW_LE_RST_FNC 0x0000b4
155 #define XBOW_LF_RST_FNC 0x0000bc
156 #define XBOW_RESET_FENCE(x) ((x) > 7 && (x) < 16) ? \
157 (XBOW_W0_RST_FNC + ((x) - 7) * 8) : \
158 ((x) == 0) ? XBOW_W0_RST_FNC : 0
159 #define XBOW_LOCK 0x0000c4
160 #define XBOW_LOCK_CLR 0x0000cc
165 #define XBOW_WID_UNDEF 0xe4
168 #define XB_LINK_BASE 0x100
169 #define XB_LINK_OFFSET 0x40
170 #define XB_LINK_REG_BASE(x) (XB_LINK_BASE + ((x) & (MAX_XBOW_PORTS - 1)) * XB_LINK_OFFSET)
172 #define XB_LINK_IBUF_FLUSH(x) (XB_LINK_REG_BASE(x) + 0x4)
173 #define XB_LINK_CTRL(x) (XB_LINK_REG_BASE(x) + 0xc)
174 #define XB_LINK_STATUS(x) (XB_LINK_REG_BASE(x) + 0x14)
175 #define XB_LINK_ARB_UPPER(x) (XB_LINK_REG_BASE(x) + 0x1c)
176 #define XB_LINK_ARB_LOWER(x) (XB_LINK_REG_BASE(x) + 0x24)
177 #define XB_LINK_STATUS_CLR(x) (XB_LINK_REG_BASE(x) + 0x2c)
178 #define XB_LINK_RESET(x) (XB_LINK_REG_BASE(x) + 0x34)
179 #define XB_LINK_AUX_STATUS(x) (XB_LINK_REG_BASE(x) + 0x3c)
182 #define XB_CTRL_LINKALIVE_IE 0x80000000
184 #define XB_CTRL_PERF_CTR_MODE_MSK 0x30000000
185 #define XB_CTRL_IBUF_LEVEL_MSK 0x0e000000
187 #define XB_CTRL_8BIT_MODE 0x01000000
189 #define XB_CTRL_BAD_LLP_PKT 0x00800000
191 #define XB_CTRL_WIDGET_CR_MSK 0x007c0000
193 #define XB_CTRL_WIDGET_CR_SHFT 18
195 #define XB_CTRL_ILLEGAL_DST_IE 0x00020000
197 #define XB_CTRL_OALLOC_IBUF_IE 0x00010000
200 #define XB_CTRL_BNDWDTH_ALLOC_IE 0x00000100
201 #define XB_CTRL_RCV_CNT_OFLOW_IE 0x00000080
202 #define XB_CTRL_XMT_CNT_OFLOW_IE 0x00000040
203 #define XB_CTRL_XMT_MAX_RTRY_IE 0x00000020
204 #define XB_CTRL_RCV_IE 0x00000010
205 #define XB_CTRL_XMT_RTRY_IE 0x00000008
207 #define XB_CTRL_MAXREQ_TOUT_IE 0x00000002
209 #define XB_CTRL_SRC_TOUT_IE 0x00000001
212 #define XB_STAT_LINKALIVE XB_CTRL_LINKALIVE_IE
214 #define XB_STAT_MULTI_ERR 0x00040000
215 #define XB_STAT_ILLEGAL_DST_ERR XB_CTRL_ILLEGAL_DST_IE
216 #define XB_STAT_OALLOC_IBUF_ERR XB_CTRL_OALLOC_IBUF_IE
217 #define XB_STAT_BNDWDTH_ALLOC_ID_MSK 0x0000ff00
218 #define XB_STAT_RCV_CNT_OFLOW_ERR XB_CTRL_RCV_CNT_OFLOW_IE
219 #define XB_STAT_XMT_CNT_OFLOW_ERR XB_CTRL_XMT_CNT_OFLOW_IE
220 #define XB_STAT_XMT_MAX_RTRY_ERR XB_CTRL_XMT_MAX_RTRY_IE
221 #define XB_STAT_RCV_ERR XB_CTRL_RCV_IE
222 #define XB_STAT_XMT_RTRY_ERR XB_CTRL_XMT_RTRY_IE
224 #define XB_STAT_MAXREQ_TOUT_ERR XB_CTRL_MAXREQ_TOUT_IE
225 #define XB_STAT_SRC_TOUT_ERR XB_CTRL_SRC_TOUT_IE
228 #define XB_AUX_STAT_RCV_CNT 0xff000000
229 #define XB_AUX_STAT_XMT_CNT 0x00ff0000
230 #define XB_AUX_STAT_TOUT_DST 0x0000ff00
231 #define XB_AUX_LINKFAIL_RST_BAD 0x00000040
232 #define XB_AUX_STAT_PRESENT 0x00000020
233 #define XB_AUX_STAT_PORT_WIDTH 0x00000010
240 #define XB_ARB_GBR_MSK 0x1f
241 #define XB_ARB_RR_MSK 0x7
242 #define XB_ARB_GBR_SHFT(x) (((x) & 0x3) * 8)
243 #define XB_ARB_RR_SHFT(x) (((x) & 0x3) * 8 + 5)
244 #define XB_ARB_GBR_CNT(reg,x) ((reg) >> XB_ARB_GBR_SHFT(x) & XB_ARB_GBR_MSK)
245 #define XB_ARB_RR_CNT(reg,x) ((reg) >> XB_ARB_RR_SHFT(x) & XB_ARB_RR_MSK)
248 #define XB_WID_STAT_LINK_INTR_SHFT (24)
249 #define XB_WID_STAT_LINK_INTR_MASK (0xFF << XB_WID_STAT_LINK_INTR_SHFT)
250 #define XB_WID_STAT_LINK_INTR(x) \
251 (0x1 << (((x)&7) + XB_WID_STAT_LINK_INTR_SHFT))
252 #define XB_WID_STAT_WIDGET0_INTR 0x00800000
253 #define XB_WID_STAT_SRCID_MASK 0x000003c0
254 #define XB_WID_STAT_REG_ACC_ERR 0x00000020
255 #define XB_WID_STAT_RECV_TOUT 0x00000010
256 #define XB_WID_STAT_ARB_TOUT 0x00000008
257 #define XB_WID_STAT_XTALK_ERR 0x00000004
258 #define XB_WID_STAT_DST_TOUT 0x00000002
259 #define XB_WID_STAT_MULTI_ERR 0x00000001
261 #define XB_WID_STAT_SRCID_SHFT 6
264 #define XB_WID_CTRL_REG_ACC_IE XB_WID_STAT_REG_ACC_ERR
265 #define XB_WID_CTRL_RECV_TOUT XB_WID_STAT_RECV_TOUT
266 #define XB_WID_CTRL_ARB_TOUT XB_WID_STAT_ARB_TOUT
267 #define XB_WID_CTRL_XTALK_IE XB_WID_STAT_XTALK_ERR
273 #define XBOW_WIDGET_PART_NUM 0x0
274 #define XXBOW_WIDGET_PART_NUM 0xd000
275 #define XBOW_WIDGET_MFGR_NUM 0x0
276 #define XXBOW_WIDGET_MFGR_NUM 0x0
277 #define PXBOW_WIDGET_PART_NUM 0xd100
279 #define XBOW_REV_1_0 0x1
280 #define XBOW_REV_1_1 0x2
281 #define XBOW_REV_1_2 0x3
282 #define XBOW_REV_1_3 0x4
283 #define XBOW_REV_2_0 0x5
285 #define XXBOW_PART_REV_1_0 (XXBOW_WIDGET_PART_NUM << 4 | 0x1 )
286 #define XXBOW_PART_REV_2_0 (XXBOW_WIDGET_PART_NUM << 4 | 0x2 )
289 #define XBOW_WID_ARB_RELOAD_INT 0x3f
291 #define IS_XBRIDGE_XBOW(wid) \
292 (XWIDGET_PART_NUM(wid) == XXBOW_WIDGET_PART_NUM && \
293 XWIDGET_MFG_NUM(wid) == XXBOW_WIDGET_MFGR_NUM)
295 #define IS_PIC_XBOW(wid) \
296 (XWIDGET_PART_NUM(wid) == PXBOW_WIDGET_PART_NUM && \
297 XWIDGET_MFG_NUM(wid) == XXBOW_WIDGET_MFGR_NUM)
299 #define XBOW_WAR_ENABLED(pv, widid) ((1 << XWIDGET_REV_NUM(widid)) & pv)