summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/shared/include
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2016-03-22 15:51:13 +0100
committerDaniel Hellstrom <daniel@gaisler.com>2017-03-06 07:54:55 +0100
commitac7da5bcb00abcd2f424118fdabe231cf5520d00 (patch)
tree8f6b3008788381807f958f1891f411bd14632bce /c/src/lib/libbsp/sparc/shared/include
parentleon, grspw_pkt: added link_ctrl options (diff)
downloadrtems-ac7da5bcb00abcd2f424118fdabe231cf5520d00.tar.bz2
leon, grspw_pkt: Manual handling of link status events
Added functionality for manual handling of link status events, configurable via grspw_link_ctrl. Added statistics counter for disconnect error.
Diffstat (limited to 'c/src/lib/libbsp/sparc/shared/include')
-rw-r--r--c/src/lib/libbsp/sparc/shared/include/grspw_pkt.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/include/grspw_pkt.h b/c/src/lib/libbsp/sparc/shared/include/grspw_pkt.h
index ea0ae9ae40..17bbee8038 100644
--- a/c/src/lib/libbsp/sparc/shared/include/grspw_pkt.h
+++ b/c/src/lib/libbsp/sparc/shared/include/grspw_pkt.h
@@ -184,6 +184,7 @@ struct grspw_core_stats {
int err_eeop;
int err_addr;
int err_parity;
+ int err_disconnect;
int err_escape;
int err_wsync; /* only in GRSPW1 */
};
@@ -216,6 +217,15 @@ struct grspw_core_stats {
* channels.
*/
+#define LINKSTS_CE 0x002 /* Credit error */
+#define LINKSTS_ER 0x004 /* Escape error */
+#define LINKSTS_DE 0x008 /* Disconnect error */
+#define LINKSTS_PE 0x010 /* Parity error */
+#define LINKSTS_WE 0x040 /* Write synchonization error (GRSPW1 only) */
+#define LINKSTS_IA 0x080 /* Invalid address */
+#define LINKSTS_EE 0x100 /* Early EOP/EEP */
+#define LINKSTS_MASK 0x1de
+
/* grspw_tc_ctrl() options */
#define TCOPTS_EN_RXIRQ 0x0001 /* Tick-Out IRQ */
@@ -325,7 +335,7 @@ extern spw_link_state_t grspw_link_state(void *d);
* bits 7..0 : Clock Div RUN (only run-state)
* bits 15..8 : Clock Div During Startup (all link states except run-state)
*/
-extern void grspw_link_ctrl(void *d, int *options, int *clkdiv);
+extern void grspw_link_ctrl(void *d, int *options, int *stscfg, int *clkdiv);
/* Read the current value of the status register */
extern unsigned int grspw_link_status(void *d);
/* Clear bits in the status register */