[PATCH 11/44] leon, grspw_pkt: added grspw_link_status_clr() to API

Daniel Hellstrom daniel at gaisler.com
Fri Mar 3 14:56:44 UTC 2017


---
 c/src/lib/libbsp/sparc/shared/include/grspw_pkt.h | 2 ++
 c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c     | 8 ++++++++
 2 files changed, 10 insertions(+)

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 c014b37..f16ec20 100644
--- a/c/src/lib/libbsp/sparc/shared/include/grspw_pkt.h
+++ b/c/src/lib/libbsp/sparc/shared/include/grspw_pkt.h
@@ -309,6 +309,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 e23410a..cee6dcc 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)
 {
-- 
2.7.4




More information about the devel mailing list