xbow.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:33k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /* $Id$
  2.  *
  3.  * This file is subject to the terms and conditions of the GNU General Public
  4.  * License.  See the file "COPYING" in the main directory of this archive
  5.  * for more details.
  6.  *
  7.  * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc.
  8.  * Copyright (C) 2000 by Colin Ngam
  9.  */
  10. #ifndef _ASM_SN_SN_XTALK_XBOW_H
  11. #define _ASM_SN_SN_XTALK_XBOW_H
  12. /*
  13.  * xbow.h - header file for crossbow chip and xbow section of xbridge
  14.  */
  15. #include <asm/sn/xtalk/xtalk.h>
  16. #include <asm/sn/xtalk/xwidget.h>
  17. #include <asm/sn/xtalk/xswitch.h>
  18. #ifdef LANGUAGE_C
  19. #include <asm/sn/xtalk/xbow_info.h>
  20. #endif
  21. #define XBOW_DRV_PREFIX "xbow_"
  22. /* The crossbow chip supports 8 8/16 bits I/O ports, numbered 0x8 through 0xf.
  23.  * It also implements the widget 0 address space and register set.
  24.  */
  25. #define XBOW_PORT_0 0x0
  26. #define XBOW_PORT_8 0x8
  27. #define XBOW_PORT_9 0x9
  28. #define XBOW_PORT_A 0xa
  29. #define XBOW_PORT_B 0xb
  30. #define XBOW_PORT_C 0xc
  31. #define XBOW_PORT_D 0xd
  32. #define XBOW_PORT_E 0xe
  33. #define XBOW_PORT_F 0xf
  34. #define MAX_XBOW_PORTS 8 /* number of ports on xbow chip */
  35. #define BASE_XBOW_PORT XBOW_PORT_8 /* Lowest external port */
  36. #define MAX_PORT_NUM 0x10 /* maximum port number + 1 */
  37. #define XBOW_WIDGET_ID 0 /* xbow is itself widget 0 */
  38. #define XBOW_CREDIT 4
  39. #define MAX_XBOW_NAME  16
  40. #if LANGUAGE_C
  41. typedef uint32_t      xbowreg_t;
  42. #define XBOWCONST (xbowreg_t)
  43. /* Generic xbow register, given base and offset */
  44. #define XBOW_REG_PTR(base, offset) ((volatile xbowreg_t*) 
  45. ((__psunsigned_t)(base) + (__psunsigned_t)(offset)))
  46. /* Register set for each xbow link */
  47. typedef volatile struct xb_linkregs_s {
  48. #ifdef LITTLE_ENDIAN
  49. /* 
  50.  * we access these through synergy unswizzled space, so the address
  51.  * gets twiddled (i.e. references to 0x4 actually go to 0x0 and vv.)
  52.  * That's why we put the register first and filler second.
  53.  */
  54.     xbowreg_t               link_ibf;
  55.     xbowreg_t               filler0; /* filler for proper alignment */
  56.     xbowreg_t               link_control;
  57.     xbowreg_t               filler1;
  58.     xbowreg_t               link_status;
  59.     xbowreg_t               filler2;
  60.     xbowreg_t               link_arb_upper;
  61.     xbowreg_t               filler3;
  62.     xbowreg_t               link_arb_lower;
  63.     xbowreg_t               filler4;
  64.     xbowreg_t               link_status_clr;
  65.     xbowreg_t               filler5;
  66.     xbowreg_t               link_reset;
  67.     xbowreg_t               filler6;
  68.     xbowreg_t               link_aux_status;
  69.     xbowreg_t               filler7;
  70. #else
  71.     xbowreg_t               filler0; /* filler for proper alignment */
  72.     xbowreg_t               link_ibf;
  73.     xbowreg_t               filler1;
  74.     xbowreg_t               link_control;
  75.     xbowreg_t               filler2;
  76.     xbowreg_t               link_status;
  77.     xbowreg_t               filler3;
  78.     xbowreg_t               link_arb_upper;
  79.     xbowreg_t               filler4;
  80.     xbowreg_t               link_arb_lower;
  81.     xbowreg_t               filler5;
  82.     xbowreg_t               link_status_clr;
  83.     xbowreg_t               filler6;
  84.     xbowreg_t               link_reset;
  85.     xbowreg_t               filler7;
  86.     xbowreg_t               link_aux_status;
  87. #endif /* LITTLE_ENDIAN */
  88. } xb_linkregs_t;
  89. typedef volatile struct xbow_s {
  90.     /* standard widget configuration                       0x000000-0x000057 */
  91.     widget_cfg_t            xb_widget;  /* 0x000000 */
  92.     /* helper fieldnames for accessing bridge widget */
  93. #define xb_wid_id                       xb_widget.w_id
  94. #define xb_wid_stat                     xb_widget.w_status
  95. #define xb_wid_err_upper                xb_widget.w_err_upper_addr
  96. #define xb_wid_err_lower                xb_widget.w_err_lower_addr
  97. #define xb_wid_control                  xb_widget.w_control
  98. #define xb_wid_req_timeout              xb_widget.w_req_timeout
  99. #define xb_wid_int_upper                xb_widget.w_intdest_upper_addr
  100. #define xb_wid_int_lower                xb_widget.w_intdest_lower_addr
  101. #define xb_wid_err_cmdword              xb_widget.w_err_cmd_word
  102. #define xb_wid_llp                      xb_widget.w_llp_cfg
  103. #define xb_wid_stat_clr                 xb_widget.w_tflush
  104. #ifdef LITTLE_ENDIAN
  105. /* 
  106.  * we access these through synergy unswizzled space, so the address
  107.  * gets twiddled (i.e. references to 0x4 actually go to 0x0 and vv.)
  108.  * That's why we put the register first and filler second.
  109.  */
  110.     /* xbow-specific widget configuration                  0x000058-0x0000FF */
  111.     xbowreg_t               xb_wid_arb_reload;  /* 0x00005C */
  112.     xbowreg_t               _pad_000058;
  113.     xbowreg_t               xb_perf_ctr_a;      /* 0x000064 */
  114.     xbowreg_t               _pad_000060;
  115.     xbowreg_t               xb_perf_ctr_b;      /* 0x00006c */
  116.     xbowreg_t               _pad_000068;
  117.     xbowreg_t               xb_nic;     /* 0x000074 */
  118.     xbowreg_t               _pad_000070;
  119.     /* Xbridge only */
  120.     xbowreg_t               xb_w0_rst_fnc;      /* 0x00007C */
  121.     xbowreg_t               _pad_000078;
  122.     xbowreg_t               xb_l8_rst_fnc;      /* 0x000084 */
  123.     xbowreg_t               _pad_000080;
  124.     xbowreg_t               xb_l9_rst_fnc;      /* 0x00008c */
  125.     xbowreg_t               _pad_000088;
  126.     xbowreg_t               xb_la_rst_fnc;      /* 0x000094 */
  127.     xbowreg_t               _pad_000090;
  128.     xbowreg_t               xb_lb_rst_fnc;      /* 0x00009c */
  129.     xbowreg_t               _pad_000098;
  130.     xbowreg_t               xb_lc_rst_fnc;      /* 0x0000a4 */
  131.     xbowreg_t               _pad_0000a0;
  132.     xbowreg_t               xb_ld_rst_fnc;      /* 0x0000ac */
  133.     xbowreg_t               _pad_0000a8;
  134.     xbowreg_t               xb_le_rst_fnc;      /* 0x0000b4 */
  135.     xbowreg_t               _pad_0000b0;
  136.     xbowreg_t               xb_lf_rst_fnc;      /* 0x0000bc */
  137.     xbowreg_t               _pad_0000b8;
  138.     xbowreg_t               xb_lock;            /* 0x0000c4 */
  139.     xbowreg_t               _pad_0000c0;
  140.     xbowreg_t               xb_lock_clr;        /* 0x0000cc */
  141.     xbowreg_t               _pad_0000c8;
  142.     /* end of Xbridge only */
  143.     xbowreg_t               _pad_0000d0[12];
  144. #else
  145.     /* xbow-specific widget configuration                  0x000058-0x0000FF */
  146.     xbowreg_t               _pad_000058;
  147.     xbowreg_t               xb_wid_arb_reload;  /* 0x00005C */
  148.     xbowreg_t               _pad_000060;
  149.     xbowreg_t               xb_perf_ctr_a;      /* 0x000064 */
  150.     xbowreg_t               _pad_000068;
  151.     xbowreg_t               xb_perf_ctr_b;      /* 0x00006c */
  152.     xbowreg_t               _pad_000070;
  153.     xbowreg_t               xb_nic;     /* 0x000074 */
  154.     /* Xbridge only */
  155.     xbowreg_t               _pad_000078;
  156.     xbowreg_t               xb_w0_rst_fnc;      /* 0x00007C */
  157.     xbowreg_t               _pad_000080;
  158.     xbowreg_t               xb_l8_rst_fnc;      /* 0x000084 */
  159.     xbowreg_t               _pad_000088;
  160.     xbowreg_t               xb_l9_rst_fnc;      /* 0x00008c */
  161.     xbowreg_t               _pad_000090;
  162.     xbowreg_t               xb_la_rst_fnc;      /* 0x000094 */
  163.     xbowreg_t               _pad_000098;
  164.     xbowreg_t               xb_lb_rst_fnc;      /* 0x00009c */
  165.     xbowreg_t               _pad_0000a0;
  166.     xbowreg_t               xb_lc_rst_fnc;      /* 0x0000a4 */
  167.     xbowreg_t               _pad_0000a8;
  168.     xbowreg_t               xb_ld_rst_fnc;      /* 0x0000ac */
  169.     xbowreg_t               _pad_0000b0;
  170.     xbowreg_t               xb_le_rst_fnc;      /* 0x0000b4 */
  171.     xbowreg_t               _pad_0000b8;
  172.     xbowreg_t               xb_lf_rst_fnc;      /* 0x0000bc */
  173.     xbowreg_t               _pad_0000c0;
  174.     xbowreg_t               xb_lock;            /* 0x0000c4 */
  175.     xbowreg_t               _pad_0000c8;
  176.     xbowreg_t               xb_lock_clr;        /* 0x0000cc */
  177.     /* end of Xbridge only */
  178.     xbowreg_t               _pad_0000d0[12];
  179. #endif /* LITTLE_ENDIAN */
  180.     /* Link Specific Registers, port 8..15                 0x000100-0x000300 */
  181.     xb_linkregs_t           xb_link_raw[MAX_XBOW_PORTS];
  182. #define xb_link(p)      xb_link_raw[(p) & (MAX_XBOW_PORTS - 1)]
  183. } xbow_t;
  184. /* Configuration structure which describes each xbow link */
  185. typedef struct xbow_cfg_s {
  186.     int     xb_port; /* port number (0-15) */
  187.     int     xb_flags; /* port software flags */
  188.     short     xb_shift; /* shift for arb reg (mask is 0xff) */
  189.     short     xb_ul; /* upper or lower arb reg */
  190.     int     xb_pad; /* use this later (pad to ptr align) */
  191.     xb_linkregs_t    *xb_linkregs; /* pointer to link registers */
  192.     widget_cfg_t    *xb_widget; /* pointer to widget registers */
  193.     char     xb_name[MAX_XBOW_NAME]; /* port name */
  194.     xbowreg_t     xb_sh_arb_upper; /* shadow upper arb register */
  195.     xbowreg_t     xb_sh_arb_lower; /* shadow lower arb register */
  196. } xbow_cfg_t;
  197. #define XB_FLAGS_EXISTS 0x1 /* device exists */
  198. #define XB_FLAGS_MASTER 0x2
  199. #define XB_FLAGS_SLAVE 0x0
  200. #define XB_FLAGS_GBR 0x4
  201. #define XB_FLAGS_16BIT 0x8
  202. #define XB_FLAGS_8BIT 0x0
  203. /* get xbow config information for port p */
  204. #define XB_CONFIG(p) xbow_cfg[xb_ports[p]]
  205. /* is widget port number valid?  (based on version 7.0 of xbow spec) */
  206. #define XBOW_WIDGET_IS_VALID(wid) ((wid) >= XBOW_PORT_8 && (wid) <= XBOW_PORT_F)
  207. /* whether to use upper or lower arbitration register, given source widget id */
  208. #define XBOW_ARB_IS_UPPER(wid)  ((wid) >= XBOW_PORT_8 && (wid) <= XBOW_PORT_B)
  209. #define XBOW_ARB_IS_LOWER(wid)  ((wid) >= XBOW_PORT_C && (wid) <= XBOW_PORT_F)
  210. /* offset of arbitration register, given source widget id */
  211. #define XBOW_ARB_OFF(wid)  (XBOW_ARB_IS_UPPER(wid) ? 0x1c : 0x24)
  212. #endif /* LANGUAGE_C */
  213. #define XBOW_WID_ID WIDGET_ID
  214. #define XBOW_WID_STAT WIDGET_STATUS
  215. #define XBOW_WID_ERR_UPPER WIDGET_ERR_UPPER_ADDR
  216. #define XBOW_WID_ERR_LOWER WIDGET_ERR_LOWER_ADDR
  217. #define XBOW_WID_CONTROL WIDGET_CONTROL
  218. #define XBOW_WID_REQ_TO WIDGET_REQ_TIMEOUT
  219. #define XBOW_WID_INT_UPPER WIDGET_INTDEST_UPPER_ADDR
  220. #define XBOW_WID_INT_LOWER WIDGET_INTDEST_LOWER_ADDR
  221. #define XBOW_WID_ERR_CMDWORD WIDGET_ERR_CMD_WORD
  222. #define XBOW_WID_LLP WIDGET_LLP_CFG
  223. #define XBOW_WID_STAT_CLR WIDGET_TFLUSH
  224. #define XBOW_WID_ARB_RELOAD  0x5c
  225. #define XBOW_WID_PERF_CTR_A  0x64
  226. #define XBOW_WID_PERF_CTR_B  0x6c
  227. #define XBOW_WID_NIC  0x74
  228. /* Xbridge only */
  229. #define XBOW_W0_RST_FNC 0x00007C
  230. #define XBOW_L8_RST_FNC 0x000084
  231. #define XBOW_L9_RST_FNC 0x00008c
  232. #define XBOW_LA_RST_FNC 0x000094
  233. #define XBOW_LB_RST_FNC 0x00009c
  234. #define XBOW_LC_RST_FNC 0x0000a4
  235. #define XBOW_LD_RST_FNC 0x0000ac
  236. #define XBOW_LE_RST_FNC 0x0000b4
  237. #define XBOW_LF_RST_FNC 0x0000bc
  238. #define XBOW_RESET_FENCE(x) ((x) > 7 && (x) < 16) ? 
  239. (XBOW_W0_RST_FNC + ((x) - 7) * 8) : 
  240. ((x) == 0) ? XBOW_W0_RST_FNC : 0
  241. #define XBOW_LOCK 0x0000c4
  242. #define XBOW_LOCK_CLR 0x0000cc
  243. /* End of Xbridge only */
  244. /* used only in ide, but defined here within the reserved portion */
  245. /*              of the widget0 address space (before 0xf4) */
  246. #define XBOW_WID_UNDEF 0xe4
  247. /* pointer to link arbitration register, given xbow base, dst and src widget id */
  248. #define XBOW_PRIO_ARBREG_PTR(base, dst_wid, src_wid) 
  249. XBOW_REG_PTR(XBOW_PRIO_LINKREGS_PTR(base, dst_wid), XBOW_ARB_OFF(src_wid))
  250. /* pointer to link registers base, given xbow base and destination widget id */
  251. #define XBOW_PRIO_LINKREGS_PTR(base, dst_wid) (xb_linkregs_t*) 
  252. XBOW_REG_PTR(base, XB_LINK_REG_BASE(dst_wid))
  253. /* xbow link register set base, legal value for x is 0x8..0xf */
  254. #define XB_LINK_BASE 0x100
  255. #define XB_LINK_OFFSET 0x40
  256. #define XB_LINK_REG_BASE(x) (XB_LINK_BASE + ((x) & (MAX_XBOW_PORTS - 1)) * XB_LINK_OFFSET)
  257. #define XB_LINK_IBUF_FLUSH(x) (XB_LINK_REG_BASE(x) + 0x4)
  258. #define XB_LINK_CTRL(x) (XB_LINK_REG_BASE(x) + 0xc)
  259. #define XB_LINK_STATUS(x) (XB_LINK_REG_BASE(x) + 0x14)
  260. #define XB_LINK_ARB_UPPER(x) (XB_LINK_REG_BASE(x) + 0x1c)
  261. #define XB_LINK_ARB_LOWER(x) (XB_LINK_REG_BASE(x) + 0x24)
  262. #define XB_LINK_STATUS_CLR(x) (XB_LINK_REG_BASE(x) + 0x2c)
  263. #define XB_LINK_RESET(x) (XB_LINK_REG_BASE(x) + 0x34)
  264. #define XB_LINK_AUX_STATUS(x) (XB_LINK_REG_BASE(x) + 0x3c)
  265. /* link_control(x) */
  266. #define XB_CTRL_LINKALIVE_IE 0x80000000 /* link comes alive */
  267.      /* reserved: 0x40000000 */
  268. #define XB_CTRL_PERF_CTR_MODE_MSK 0x30000000 /* perf counter mode */
  269. #define XB_CTRL_IBUF_LEVEL_MSK 0x0e000000 /* input packet buffer level */
  270. #define XB_CTRL_8BIT_MODE 0x01000000 /* force link into 8 bit mode */
  271. #define XB_CTRL_BAD_LLP_PKT 0x00800000 /* force bad LLP packet */
  272. #define XB_CTRL_WIDGET_CR_MSK 0x007c0000 /* LLP widget credit mask */
  273. #define XB_CTRL_WIDGET_CR_SHFT 18 /* LLP widget credit shift */
  274. #define XB_CTRL_ILLEGAL_DST_IE 0x00020000 /* illegal destination */
  275. #define XB_CTRL_OALLOC_IBUF_IE 0x00010000 /* overallocated input buffer */
  276.      /* reserved: 0x0000fe00 */
  277. #define XB_CTRL_BNDWDTH_ALLOC_IE 0x00000100 /* bandwidth alloc */
  278. #define XB_CTRL_RCV_CNT_OFLOW_IE 0x00000080 /* rcv retry overflow */
  279. #define XB_CTRL_XMT_CNT_OFLOW_IE 0x00000040 /* xmt retry overflow */
  280. #define XB_CTRL_XMT_MAX_RTRY_IE 0x00000020 /* max transmit retry */
  281. #define XB_CTRL_RCV_IE 0x00000010 /* receive */
  282. #define XB_CTRL_XMT_RTRY_IE 0x00000008 /* transmit retry */
  283.      /* reserved: 0x00000004 */
  284. #define XB_CTRL_MAXREQ_TOUT_IE 0x00000002 /* maximum request timeout */
  285. #define XB_CTRL_SRC_TOUT_IE 0x00000001 /* source timeout */
  286. /* link_status(x) */
  287. #define XB_STAT_LINKALIVE XB_CTRL_LINKALIVE_IE
  288.      /* reserved: 0x7ff80000 */
  289. #define XB_STAT_MULTI_ERR 0x00040000 /* multi error */
  290. #define XB_STAT_ILLEGAL_DST_ERR XB_CTRL_ILLEGAL_DST_IE
  291. #define XB_STAT_OALLOC_IBUF_ERR XB_CTRL_OALLOC_IBUF_IE
  292. #define XB_STAT_BNDWDTH_ALLOC_ID_MSK 0x0000ff00 /* port bitmask */
  293. #define XB_STAT_RCV_CNT_OFLOW_ERR XB_CTRL_RCV_CNT_OFLOW_IE
  294. #define XB_STAT_XMT_CNT_OFLOW_ERR XB_CTRL_XMT_CNT_OFLOW_IE
  295. #define XB_STAT_XMT_MAX_RTRY_ERR XB_CTRL_XMT_MAX_RTRY_IE
  296. #define XB_STAT_RCV_ERR XB_CTRL_RCV_IE
  297. #define XB_STAT_XMT_RTRY_ERR XB_CTRL_XMT_RTRY_IE
  298.      /* reserved: 0x00000004 */
  299. #define XB_STAT_MAXREQ_TOUT_ERR XB_CTRL_MAXREQ_TOUT_IE
  300. #define XB_STAT_SRC_TOUT_ERR XB_CTRL_SRC_TOUT_IE
  301. /* link_aux_status(x) */
  302. #define XB_AUX_STAT_RCV_CNT 0xff000000
  303. #define XB_AUX_STAT_XMT_CNT 0x00ff0000
  304. #define XB_AUX_STAT_TOUT_DST 0x0000ff00
  305. #define XB_AUX_LINKFAIL_RST_BAD 0x00000040
  306. #define XB_AUX_STAT_PRESENT 0x00000020
  307. #define XB_AUX_STAT_PORT_WIDTH 0x00000010
  308.      /* reserved: 0x0000000f */
  309. /*
  310.  * link_arb_upper/link_arb_lower(x), (reg) should be the link_arb_upper
  311.  * register if (x) is 0x8..0xb, link_arb_lower if (x) is 0xc..0xf
  312.  */
  313. #define XB_ARB_GBR_MSK 0x1f
  314. #define XB_ARB_RR_MSK 0x7
  315. #define XB_ARB_GBR_SHFT(x) (((x) & 0x3) * 8)
  316. #define XB_ARB_RR_SHFT(x) (((x) & 0x3) * 8 + 5)
  317. #define XB_ARB_GBR_CNT(reg,x) ((reg) >> XB_ARB_GBR_SHFT(x) & XB_ARB_GBR_MSK)
  318. #define XB_ARB_RR_CNT(reg,x) ((reg) >> XB_ARB_RR_SHFT(x) & XB_ARB_RR_MSK)
  319. /* XBOW_WID_STAT */
  320. #define XB_WID_STAT_LINK_INTR_SHFT (24)
  321. #define XB_WID_STAT_LINK_INTR_MASK (0xFF << XB_WID_STAT_LINK_INTR_SHFT)
  322. #define XB_WID_STAT_LINK_INTR(x) (0x1 << (((x)&7) + XB_WID_STAT_LINK_INTR_SHFT))
  323. #define XB_WID_STAT_WIDGET0_INTR 0x00800000
  324. #define XB_WID_STAT_SRCID_MASK 0x000003c0 /* Xbridge only */
  325. #define XB_WID_STAT_REG_ACC_ERR 0x00000020
  326. #define XB_WID_STAT_RECV_TOUT 0x00000010 /* Xbridge only */
  327. #define XB_WID_STAT_ARB_TOUT 0x00000008 /* Xbridge only */
  328. #define XB_WID_STAT_XTALK_ERR 0x00000004
  329. #define XB_WID_STAT_DST_TOUT 0x00000002 /* Xbridge only */
  330. #define XB_WID_STAT_MULTI_ERR 0x00000001
  331. #define XB_WID_STAT_SRCID_SHFT 6
  332. /* XBOW_WID_CONTROL */
  333. #define XB_WID_CTRL_REG_ACC_IE XB_WID_STAT_REG_ACC_ERR
  334. #define XB_WID_CTRL_RECV_TOUT XB_WID_STAT_RECV_TOUT
  335. #define XB_WID_CTRL_ARB_TOUT XB_WID_STAT_ARB_TOUT
  336. #define XB_WID_CTRL_XTALK_IE XB_WID_STAT_XTALK_ERR
  337. /* XBOW_WID_INT_UPPER */
  338. /* defined in xwidget.h for WIDGET_INTDEST_UPPER_ADDR */
  339. /* XBOW WIDGET part number, in the ID register */
  340. #define XBOW_WIDGET_PART_NUM 0x0 /* crossbow */
  341. #define XXBOW_WIDGET_PART_NUM 0xd000 /* Xbridge */
  342. #define XBOW_WIDGET_MFGR_NUM 0x0
  343. #define XXBOW_WIDGET_MFGR_NUM 0x0
  344. #define XBOW_REV_1_0 0x1 /* xbow rev 1.0 is "1" */
  345. #define XBOW_REV_1_1 0x2 /* xbow rev 1.1 is "2" */
  346. #define XBOW_REV_1_2 0x3 /* xbow rev 1.2 is "3" */
  347. #define XBOW_REV_1_3 0x4 /* xbow rev 1.3 is "4" */
  348. #define XBOW_REV_2_0 0x5 /* xbow rev 2.0 is "5" */
  349. #define XXBOW_PART_REV_1_0 (XXBOW_WIDGET_PART_NUM << 4 | 0x1 )
  350. #define XXBOW_PART_REV_2_0 (XXBOW_WIDGET_PART_NUM << 4 | 0x2 )
  351. /* XBOW_WID_ARB_RELOAD */
  352. #define XBOW_WID_ARB_RELOAD_INT 0x3f /* GBR reload interval */
  353. #define nasid_has_xbridge(nasid)
  354. (XWIDGET_PART_NUM(XWIDGET_ID_READ(nasid, 0)) == XXBOW_WIDGET_PART_NUM)
  355. #ifdef _LANGUAGE_C
  356. /*
  357.  * XBOW Widget 0 Register formats.
  358.  * Format for many of these registers are similar to the standard
  359.  * widget register format described as part of xtalk specification
  360.  * Standard widget register field format description is available in
  361.  * xwidget.h
  362.  * Following structures define the format for xbow widget 0 registers
  363.  */
  364. /*
  365.  * Xbow Widget 0 Command error word
  366.  */
  367. #ifdef LITTLE_ENDIAN
  368. typedef union xbw0_cmdword_u {
  369.     xbowreg_t               cmdword;
  370.     struct {
  371. uint32_t              rsvd:8, /* Reserved */
  372.                                 barr:1,         /* Barrier operation */
  373.                                 error:1,        /* Error Occured */
  374.                                 vbpm:1,         /* Virtual Backplane message */
  375.                                 gbr:1,  /* GBR enable ?                 */
  376.                                 ds:2,   /* Data size                    */
  377.                                 ct:1,   /* Is it a coherent transaction */
  378.                                 tnum:5,         /* Transaction Number */
  379.                                 pactyp:4,       /* Packet type: */
  380.                                 srcid:4,        /* Source ID number */
  381.                                 destid:4;       /* Desination ID number */
  382.     } xbw0_cmdfield;
  383. } xbw0_cmdword_t;
  384. #else
  385. typedef union xbw0_cmdword_u {
  386.     xbowreg_t     cmdword;
  387.     struct {
  388. uint32_t destid:4, /* Desination ID number */
  389. srcid:4, /* Source ID number */
  390. pactyp:4, /* Packet type: */
  391. tnum:5, /* Transaction Number */
  392. ct:1, /* Is it a coherent transaction */
  393. ds:2, /* Data size */
  394. gbr:1, /* GBR enable ? */
  395. vbpm:1, /* Virtual Backplane message */
  396. error:1, /* Error Occured */
  397. barr:1, /* Barrier operation */
  398. rsvd:8; /* Reserved */
  399.     } xbw0_cmdfield;
  400. } xbw0_cmdword_t;
  401. #endif
  402. #define xbcmd_destid xbw0_cmdfield.destid
  403. #define xbcmd_srcid xbw0_cmdfield.srcid
  404. #define xbcmd_pactyp xbw0_cmdfield.pactyp
  405. #define xbcmd_tnum xbw0_cmdfield.tnum
  406. #define xbcmd_ct xbw0_cmdfield.ct
  407. #define xbcmd_ds xbw0_cmdfield.ds
  408. #define xbcmd_gbr xbw0_cmdfield.gbr
  409. #define xbcmd_vbpm xbw0_cmdfield.vbpm
  410. #define xbcmd_error xbw0_cmdfield.error
  411. #define xbcmd_barr xbw0_cmdfield.barr
  412. /*
  413.  * Values for field PACTYP in xbow error command word
  414.  */
  415. #define XBCMDTYP_READREQ 0 /* Read Request   packet  */
  416. #define XBCMDTYP_READRESP 1 /* Read Response packet   */
  417. #define XBCMDTYP_WRREQ_RESP 2 /* Write Request with response    */
  418. #define XBCMDTYP_WRRESP 3 /* Write Response */
  419. #define XBCMDTYP_WRREQ_NORESP 4 /* Write request with  No Response */
  420. #define XBCMDTYP_FETCHOP 6 /* Fetch & Op packet      */
  421. #define XBCMDTYP_STOREOP 8 /* Store & Op packet      */
  422. #define XBCMDTYP_SPLPKT_REQ 0xE /* Special packet request */
  423. #define XBCMDTYP_SPLPKT_RESP 0xF /* Special packet response        */
  424. /*
  425.  * Values for field ds (datasize) in xbow error command word
  426.  */
  427. #define XBCMDSZ_DOUBLEWORD 0
  428. #define XBCMDSZ_QUARTRCACHE 1
  429. #define XBCMDSZ_FULLCACHE 2
  430. /*
  431.  * Xbow widget 0 Status register format.
  432.  */
  433. #ifdef LITTLE_ENDIAN
  434. typedef union xbw0_status_u {
  435.     xbowreg_t               statusword;
  436.     struct {
  437.        uint32_t mult_err:1, /* Multiple error occurred */
  438.                                 connect_tout:1, /* Connection timeout   */
  439.                                 xtalk_err:1,    /* Xtalk pkt with error bit */
  440.                                 /* End of Xbridge only */
  441.                                 w0_arb_tout,    /* arbiter timeout err */
  442.                                 w0_recv_tout,   /* receive timeout err */
  443.                                 /* Xbridge only */
  444.                                 regacc_err:1,   /* Reg Access error     */
  445.                                 src_id:4,       /* source id. Xbridge only */
  446.                                 resvd1:13,
  447.                                 wid0intr:1;     /* Widget 0 err intr */
  448.     } xbw0_stfield;
  449. } xbw0_status_t;
  450. #else
  451. typedef union xbw0_status_u {
  452.     xbowreg_t     statusword;
  453.     struct {
  454. uint32_t linkXintr:8, /* link(x) error intr */
  455. wid0intr:1, /* Widget 0 err intr */
  456. resvd1:13,
  457. src_id:4, /* source id. Xbridge only */
  458. regacc_err:1, /* Reg Access error */
  459. /* Xbridge only */
  460. w0_recv_tout, /* receive timeout err */
  461. w0_arb_tout, /* arbiter timeout err */
  462. /* End of Xbridge only */
  463. xtalk_err:1, /* Xtalk pkt with error bit */
  464. connect_tout:1, /* Connection timeout */
  465. mult_err:1; /* Multiple error occurred */
  466.     } xbw0_stfield;
  467. } xbw0_status_t;
  468. #endif
  469. #define xbst_linkXintr xbw0_stfield.linkXintr
  470. #define xbst_w0intr xbw0_stfield.wid0intr
  471. #define xbst_regacc_err xbw0_stfield.regacc_err
  472. #define xbst_xtalk_err xbw0_stfield.xtalk_err
  473. #define xbst_connect_tout xbw0_stfield.connect_tout
  474. #define xbst_mult_err xbw0_stfield.mult_err
  475. #define xbst_src_id xbw0_stfield.src_id     /* Xbridge only */
  476. #define xbst_w0_recv_tout xbw0_stfield.w0_recv_tout   /* Xbridge only */
  477. #define xbst_w0_arb_tout xbw0_stfield.w0_arb_tout    /* Xbridge only */
  478. /*
  479.  * Xbow widget 0 Control register format
  480.  */
  481. #ifdef LITTLE_ENDIAN
  482. typedef union xbw0_ctrl_u {
  483.     xbowreg_t               ctrlword;
  484.     struct {
  485. uint32_t              
  486. resvd3:1,
  487.                                 conntout_intr:1,
  488.                                 xtalkerr_intr:1,
  489.                                 w0_arg_tout_intr:1,     /* Xbridge only */
  490.                                 w0_recv_tout_intr:1,    /* Xbridge only */
  491.                                 accerr_intr:1,
  492.                                 enable_w0_tout_cntr:1,  /* Xbridge only */
  493.                                 enable_watchdog:1,      /* Xbridge only */
  494.                                 resvd1:24;
  495.     } xbw0_ctrlfield;
  496. } xbw0_ctrl_t;
  497. #else
  498. typedef union xbw0_ctrl_u {
  499.     xbowreg_t     ctrlword;
  500.     struct {
  501. uint32_t
  502. resvd1:24,
  503. enable_watchdog:1, /* Xbridge only */
  504. enable_w0_tout_cntr:1, /* Xbridge only */
  505. accerr_intr:1,
  506. w0_recv_tout_intr:1, /* Xbridge only */
  507. w0_arg_tout_intr:1, /* Xbridge only */
  508. xtalkerr_intr:1,
  509. conntout_intr:1,
  510. resvd3:1;
  511.     } xbw0_ctrlfield;
  512. } xbw0_ctrl_t;
  513. #endif
  514. #ifdef LITTLE_ENDIAN
  515. typedef union xbow_linkctrl_u {
  516.     xbowreg_t               xbl_ctrlword;
  517.     struct {
  518. uint32_t  srcto_intr:1,
  519.                                 maxto_intr:1, 
  520.                                 rsvd3:1,
  521.                                 trx_retry_intr:1, 
  522.                                 rcv_err_intr:1, 
  523.                                 trx_max_retry_intr:1,
  524.                                 trxov_intr:1, 
  525.                                 rcvov_intr:1,
  526.                                 bwalloc_intr:1, 
  527.                                 rsvd2:7, 
  528.                                 obuf_intr:1,
  529.                                 idest_intr:1, 
  530.                                 llp_credit:5, 
  531.                                 force_badllp:1,
  532.                                 send_bm8:1, 
  533.                                 inbuf_level:3, 
  534.                                 perf_mode:2,
  535.                                 rsvd1:1, 
  536.                         alive_intr:1;
  537.     } xb_linkcontrol;
  538. } xbow_linkctrl_t;
  539. #else
  540. typedef union xbow_linkctrl_u {
  541.     xbowreg_t     xbl_ctrlword;
  542.     struct {
  543. uint32_t alive_intr:1, 
  544. rsvd1:1, 
  545. perf_mode:2,
  546. inbuf_level:3, 
  547. send_bm8:1, 
  548. force_badllp:1,
  549. llp_credit:5, 
  550. idest_intr:1, 
  551. obuf_intr:1,
  552. rsvd2:7, 
  553. bwalloc_intr:1, 
  554. rcvov_intr:1,
  555. trxov_intr:1, 
  556. trx_max_retry_intr:1,
  557. rcv_err_intr:1, 
  558. trx_retry_intr:1, 
  559. rsvd3:1,
  560. maxto_intr:1, 
  561. srcto_intr:1;
  562.     } xb_linkcontrol;
  563. } xbow_linkctrl_t;
  564. #endif
  565. #define xbctl_accerr_intr (xbw0_ctrlfield.accerr_intr)
  566. #define xbctl_xtalkerr_intr (xbw0_ctrlfield.xtalkerr_intr)
  567. #define xbctl_cnntout_intr (xbw0_ctrlfield.conntout_intr)
  568. #define XBW0_CTRL_ACCERR_INTR (1 << 5)
  569. #define XBW0_CTRL_XTERR_INTR (1 << 2)
  570. #define XBW0_CTRL_CONNTOUT_INTR (1 << 1)
  571. /*
  572.  * Xbow Link specific Registers structure definitions.
  573.  */
  574. #ifdef LITTLE_ENDIAN
  575. typedef union xbow_linkX_status_u {
  576.     xbowreg_t               linkstatus;
  577.     struct {
  578. uint32_t               pkt_toutsrc:1,
  579.                                 pkt_toutconn:1, /* max_req_tout in Xbridge */
  580.                                 pkt_toutdest:1, /* reserved in Xbridge */
  581.                                 llp_xmitretry:1,
  582.                                 llp_rcverror:1,
  583.                                 llp_maxtxretry:1,
  584.                                 llp_txovflow:1,
  585.                                 llp_rxovflow:1,
  586.                                 bw_errport:8,   /* BW allocation error port   */
  587.                                 ioe:1,          /* Input overallocation error */
  588.                                 illdest:1,
  589.                                 merror:1,
  590.                                 resvd1:12,
  591. alive:1;
  592.     } xb_linkstatus;
  593. } xbwX_stat_t;
  594. #else
  595. typedef union xbow_linkX_status_u {
  596.     xbowreg_t     linkstatus;
  597.     struct {
  598. uint32_t alive:1,
  599. resvd1:12,
  600. merror:1,
  601. illdest:1,
  602. ioe:1, /* Input overallocation error */
  603. bw_errport:8, /* BW allocation error port   */
  604. llp_rxovflow:1,
  605. llp_txovflow:1,
  606. llp_maxtxretry:1,
  607. llp_rcverror:1,
  608. llp_xmitretry:1,
  609. pkt_toutdest:1, /* reserved in Xbridge */
  610. pkt_toutconn:1, /* max_req_tout in Xbridge */
  611. pkt_toutsrc:1;
  612.     } xb_linkstatus;
  613. } xbwX_stat_t;
  614. #endif
  615. #define link_alive xb_linkstatus.alive
  616. #define link_multierror xb_linkstatus.merror
  617. #define link_illegal_dest xb_linkstatus.illdest
  618. #define link_ioe xb_linkstatus.ioe
  619. #define link_max_req_tout xb_linkstatus.pkt_toutconn  /* Xbridge */
  620. #define link_pkt_toutconn xb_linkstatus.pkt_toutconn  /* Xbow */
  621. #define link_pkt_toutdest xb_linkstatus.pkt_toutdest
  622. #define link_pkt_toutsrc xb_linkstatus.pkt_toutsrc
  623. #ifdef LITTLE_ENDIAN
  624. typedef union xbow_aux_linkX_status_u {
  625.     xbowreg_t               aux_linkstatus;
  626.     struct {
  627. uint32_t  rsvd2:4,
  628.                                 bit_mode_8:1,
  629.                                 wid_present:1,
  630.                                 fail_mode:1,
  631.                                 rsvd1:1,
  632.                                 to_src_loc:8,
  633.                                 tx_retry_cnt:8,
  634. rx_err_cnt:8;
  635.     } xb_aux_linkstatus;
  636. } xbow_aux_link_status_t;
  637. #else
  638. typedef union xbow_aux_linkX_status_u {
  639.     xbowreg_t     aux_linkstatus;
  640.     struct {
  641. uint32_t rx_err_cnt:8,
  642. tx_retry_cnt:8,
  643. to_src_loc:8,
  644. rsvd1:1,
  645. fail_mode:1,
  646. wid_present:1,
  647. bit_mode_8:1,
  648. rsvd2:4;
  649.     } xb_aux_linkstatus;
  650. } xbow_aux_link_status_t;
  651. #endif
  652. #ifdef LITTLE_ENDIAN
  653. typedef union xbow_perf_count_u {
  654.     xbowreg_t               xb_counter_val;
  655.     struct {
  656.         uint32_t  count:20,
  657.                                 link_select:3,
  658. rsvd:9;
  659.     } xb_perf;
  660. } xbow_perfcount_t;
  661. #else
  662. typedef union xbow_perf_count_u {
  663.     xbowreg_t               xb_counter_val;
  664.     struct {
  665. uint32_t              rsvd:9, 
  666. link_select:3, 
  667. count:20;
  668.     } xb_perf;
  669. } xbow_perfcount_t;
  670. #endif
  671. #define XBOW_COUNTER_MASK 0xFFFFF
  672. extern int              xbow_widget_present(xbow_t * xbow, int port);
  673. extern xwidget_intr_preset_f xbow_intr_preset;
  674. extern xswitch_reset_link_f xbow_reset_link;
  675. void                    xbow_mlreset(xbow_t *);
  676. /* ========================================================================
  677.  */
  678. #ifdef MACROFIELD_LINE
  679. /*
  680.  * This table forms a relation between the byte offset macros normally
  681.  * used for ASM coding and the calculated byte offsets of the fields
  682.  * in the C structure.
  683.  *
  684.  * See xbow_check.c xbow_html.c for further details.
  685.  */
  686. #ifndef MACROFIELD_LINE_BITFIELD
  687. #define MACROFIELD_LINE_BITFIELD(m) /* ignored */
  688. #endif
  689. struct macrofield_s     xbow_macrofield[] =
  690. {
  691.     MACROFIELD_LINE(XBOW_WID_ID, xb_wid_id)
  692.     MACROFIELD_LINE(XBOW_WID_STAT, xb_wid_stat)
  693.     MACROFIELD_LINE_BITFIELD(XB_WID_STAT_LINK_INTR(0xF))
  694.     MACROFIELD_LINE_BITFIELD(XB_WID_STAT_LINK_INTR(0xE))
  695.     MACROFIELD_LINE_BITFIELD(XB_WID_STAT_LINK_INTR(0xD))
  696.     MACROFIELD_LINE_BITFIELD(XB_WID_STAT_LINK_INTR(0xC))
  697.     MACROFIELD_LINE_BITFIELD(XB_WID_STAT_LINK_INTR(0xB))
  698.     MACROFIELD_LINE_BITFIELD(XB_WID_STAT_LINK_INTR(0xA))
  699.     MACROFIELD_LINE_BITFIELD(XB_WID_STAT_LINK_INTR(0x9))
  700.     MACROFIELD_LINE_BITFIELD(XB_WID_STAT_LINK_INTR(0x8))
  701.     MACROFIELD_LINE_BITFIELD(XB_WID_STAT_WIDGET0_INTR)
  702.     MACROFIELD_LINE_BITFIELD(XB_WID_STAT_REG_ACC_ERR)
  703.     MACROFIELD_LINE_BITFIELD(XB_WID_STAT_XTALK_ERR)
  704.     MACROFIELD_LINE_BITFIELD(XB_WID_STAT_MULTI_ERR)
  705.     MACROFIELD_LINE(XBOW_WID_ERR_UPPER, xb_wid_err_upper)
  706.     MACROFIELD_LINE(XBOW_WID_ERR_LOWER, xb_wid_err_lower)
  707.     MACROFIELD_LINE(XBOW_WID_CONTROL, xb_wid_control)
  708.     MACROFIELD_LINE_BITFIELD(XB_WID_CTRL_REG_ACC_IE)
  709.     MACROFIELD_LINE_BITFIELD(XB_WID_CTRL_XTALK_IE)
  710.     MACROFIELD_LINE(XBOW_WID_REQ_TO, xb_wid_req_timeout)
  711.     MACROFIELD_LINE(XBOW_WID_INT_UPPER, xb_wid_int_upper)
  712.     MACROFIELD_LINE(XBOW_WID_INT_LOWER, xb_wid_int_lower)
  713.     MACROFIELD_LINE(XBOW_WID_ERR_CMDWORD, xb_wid_err_cmdword)
  714.     MACROFIELD_LINE(XBOW_WID_LLP, xb_wid_llp)
  715.     MACROFIELD_LINE(XBOW_WID_STAT_CLR, xb_wid_stat_clr)
  716.     MACROFIELD_LINE(XBOW_WID_ARB_RELOAD, xb_wid_arb_reload)
  717.     MACROFIELD_LINE(XBOW_WID_PERF_CTR_A, xb_perf_ctr_a)
  718.     MACROFIELD_LINE(XBOW_WID_PERF_CTR_B, xb_perf_ctr_b)
  719.     MACROFIELD_LINE(XBOW_WID_NIC, xb_nic)
  720.     MACROFIELD_LINE(XB_LINK_REG_BASE(8), xb_link(8))
  721.     MACROFIELD_LINE(XB_LINK_IBUF_FLUSH(8), xb_link(8).link_ibf)
  722.     MACROFIELD_LINE(XB_LINK_CTRL(8), xb_link(8).link_control)
  723.     MACROFIELD_LINE_BITFIELD(XB_CTRL_LINKALIVE_IE)
  724.     MACROFIELD_LINE_BITFIELD(XB_CTRL_PERF_CTR_MODE_MSK)
  725.     MACROFIELD_LINE_BITFIELD(XB_CTRL_IBUF_LEVEL_MSK)
  726.     MACROFIELD_LINE_BITFIELD(XB_CTRL_8BIT_MODE)
  727.     MACROFIELD_LINE_BITFIELD(XB_CTRL_BAD_LLP_PKT)
  728.     MACROFIELD_LINE_BITFIELD(XB_CTRL_WIDGET_CR_MSK)
  729.     MACROFIELD_LINE_BITFIELD(XB_CTRL_ILLEGAL_DST_IE)
  730.     MACROFIELD_LINE_BITFIELD(XB_CTRL_OALLOC_IBUF_IE)
  731.     MACROFIELD_LINE_BITFIELD(XB_CTRL_BNDWDTH_ALLOC_IE)
  732.     MACROFIELD_LINE_BITFIELD(XB_CTRL_RCV_CNT_OFLOW_IE)
  733.     MACROFIELD_LINE_BITFIELD(XB_CTRL_XMT_CNT_OFLOW_IE)
  734.     MACROFIELD_LINE_BITFIELD(XB_CTRL_XMT_MAX_RTRY_IE)
  735.     MACROFIELD_LINE_BITFIELD(XB_CTRL_RCV_IE)
  736.     MACROFIELD_LINE_BITFIELD(XB_CTRL_XMT_RTRY_IE)
  737.     MACROFIELD_LINE_BITFIELD(XB_CTRL_MAXREQ_TOUT_IE)
  738.     MACROFIELD_LINE_BITFIELD(XB_CTRL_SRC_TOUT_IE)
  739.     MACROFIELD_LINE(XB_LINK_STATUS(8), xb_link(8).link_status)
  740.     MACROFIELD_LINE_BITFIELD(XB_STAT_LINKALIVE)
  741.     MACROFIELD_LINE_BITFIELD(XB_STAT_MULTI_ERR)
  742.     MACROFIELD_LINE_BITFIELD(XB_STAT_ILLEGAL_DST_ERR)
  743.     MACROFIELD_LINE_BITFIELD(XB_STAT_OALLOC_IBUF_ERR)
  744.     MACROFIELD_LINE_BITFIELD(XB_STAT_BNDWDTH_ALLOC_ID_MSK)
  745.     MACROFIELD_LINE_BITFIELD(XB_STAT_RCV_CNT_OFLOW_ERR)
  746.     MACROFIELD_LINE_BITFIELD(XB_STAT_XMT_CNT_OFLOW_ERR)
  747.     MACROFIELD_LINE_BITFIELD(XB_STAT_XMT_MAX_RTRY_ERR)
  748.     MACROFIELD_LINE_BITFIELD(XB_STAT_RCV_ERR)
  749.     MACROFIELD_LINE_BITFIELD(XB_STAT_XMT_RTRY_ERR)
  750.     MACROFIELD_LINE_BITFIELD(XB_STAT_MAXREQ_TOUT_ERR)
  751.     MACROFIELD_LINE_BITFIELD(XB_STAT_SRC_TOUT_ERR)
  752.     MACROFIELD_LINE(XB_LINK_ARB_UPPER(8), xb_link(8).link_arb_upper)
  753.     MACROFIELD_LINE_BITFIELD(XB_ARB_RR_MSK << XB_ARB_RR_SHFT(0xb))
  754.     MACROFIELD_LINE_BITFIELD(XB_ARB_GBR_MSK << XB_ARB_GBR_SHFT(0xb))
  755.     MACROFIELD_LINE_BITFIELD(XB_ARB_RR_MSK << XB_ARB_RR_SHFT(0xa))
  756.     MACROFIELD_LINE_BITFIELD(XB_ARB_GBR_MSK << XB_ARB_GBR_SHFT(0xa))
  757.     MACROFIELD_LINE_BITFIELD(XB_ARB_RR_MSK << XB_ARB_RR_SHFT(0x9))
  758.     MACROFIELD_LINE_BITFIELD(XB_ARB_GBR_MSK << XB_ARB_GBR_SHFT(0x9))
  759.     MACROFIELD_LINE_BITFIELD(XB_ARB_RR_MSK << XB_ARB_RR_SHFT(0x8))
  760.     MACROFIELD_LINE_BITFIELD(XB_ARB_GBR_MSK << XB_ARB_GBR_SHFT(0x8))
  761.     MACROFIELD_LINE(XB_LINK_ARB_LOWER(8), xb_link(8).link_arb_lower)
  762.     MACROFIELD_LINE_BITFIELD(XB_ARB_RR_MSK << XB_ARB_RR_SHFT(0xf))
  763.     MACROFIELD_LINE_BITFIELD(XB_ARB_GBR_MSK << XB_ARB_GBR_SHFT(0xf))
  764.     MACROFIELD_LINE_BITFIELD(XB_ARB_RR_MSK << XB_ARB_RR_SHFT(0xe))
  765.     MACROFIELD_LINE_BITFIELD(XB_ARB_GBR_MSK << XB_ARB_GBR_SHFT(0xe))
  766.     MACROFIELD_LINE_BITFIELD(XB_ARB_RR_MSK << XB_ARB_RR_SHFT(0xd))
  767.     MACROFIELD_LINE_BITFIELD(XB_ARB_GBR_MSK << XB_ARB_GBR_SHFT(0xd))
  768.     MACROFIELD_LINE_BITFIELD(XB_ARB_RR_MSK << XB_ARB_RR_SHFT(0xc))
  769.     MACROFIELD_LINE_BITFIELD(XB_ARB_GBR_MSK << XB_ARB_GBR_SHFT(0xc))
  770.     MACROFIELD_LINE(XB_LINK_STATUS_CLR(8), xb_link(8).link_status_clr)
  771.     MACROFIELD_LINE(XB_LINK_RESET(8), xb_link(8).link_reset)
  772.     MACROFIELD_LINE(XB_LINK_AUX_STATUS(8), xb_link(8).link_aux_status)
  773.     MACROFIELD_LINE_BITFIELD(XB_AUX_STAT_RCV_CNT)
  774.     MACROFIELD_LINE_BITFIELD(XB_AUX_STAT_XMT_CNT)
  775.     MACROFIELD_LINE_BITFIELD(XB_AUX_LINKFAIL_RST_BAD)
  776.     MACROFIELD_LINE_BITFIELD(XB_AUX_STAT_PRESENT)
  777.     MACROFIELD_LINE_BITFIELD(XB_AUX_STAT_PORT_WIDTH)
  778.     MACROFIELD_LINE_BITFIELD(XB_AUX_STAT_TOUT_DST)
  779.     MACROFIELD_LINE(XB_LINK_REG_BASE(0x8), xb_link(0x8))
  780.     MACROFIELD_LINE(XB_LINK_REG_BASE(0x9), xb_link(0x9))
  781.     MACROFIELD_LINE(XB_LINK_REG_BASE(0xA), xb_link(0xA))
  782.     MACROFIELD_LINE(XB_LINK_REG_BASE(0xB), xb_link(0xB))
  783.     MACROFIELD_LINE(XB_LINK_REG_BASE(0xC), xb_link(0xC))
  784.     MACROFIELD_LINE(XB_LINK_REG_BASE(0xD), xb_link(0xD))
  785.     MACROFIELD_LINE(XB_LINK_REG_BASE(0xE), xb_link(0xE))
  786.     MACROFIELD_LINE(XB_LINK_REG_BASE(0xF), xb_link(0xF))
  787. }; /* xbow_macrofield[] */
  788. #endif /* MACROFIELD_LINE */
  789. #endif /* _LANGUAGE_C */
  790. #endif                          /* _ASM_SN_SN_XTALK_XBOW_H */