summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2016-03-22 13:59:56 +0100
committerDaniel Hellstrom <daniel@gaisler.com>2016-03-22 15:57:43 +0100
commit868cd534e247fc90740f4d7dbb55bc1208648688 (patch)
tree959b4372523e036cf2525676921fa2f5fbfca96f
parent0d043bed2f52e32abc4588545b09172d208bcf84 (diff)
leon, grspw_pkt: added grspw_link_status_clr() to API
-rw-r--r--c/src/lib/libbsp/sparc/shared/include/grspw_pkt.h2
-rw-r--r--c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c8
2 files changed, 10 insertions, 0 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 7ff20708bf..f1d7dee9f7 100644
--- a/c/src/lib/libbsp/sparc/shared/include/grspw_pkt.h
+++ b/c/src/lib/libbsp/sparc/shared/include/grspw_pkt.h
@@ -310,6 +310,8 @@ extern spw_link_state_t grspw_link_state(void *d);
extern void grspw_link_ctrl(void *d, int *options, int *clkdiv);
/* Read the current value of the status register */
extern unsigned int grspw_link_status(void *d);
+/* Clear bits in the status register */
+extern void grspw_link_status_clr(void *d, unsigned int clearmask);
/*** Time Code Interface ***/
/* Generate Tick-In (increment Time Counter, Send Time Code) */
diff --git a/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c b/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c
index 0e7d2548e7..6a00f3e35e 100644
--- a/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c
+++ b/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c
@@ -719,6 +719,14 @@ unsigned int grspw_link_status(void *d)
return REG_READ(&priv->regs->status);
}
+/* Clear Status Register bits */
+void grspw_link_status_clr(void *d, unsigned int mask)
+{
+ struct grspw_priv *priv = d;
+
+ REG_WRITE(&priv->regs->status, mask);
+}
+
/* Return Current Link State */
spw_link_state_t grspw_link_state(void *d)
{