[PATCH 19/32] leon, grcan: removed unused txerror, rxerror

Daniel Hellstrom daniel at gaisler.com
Thu May 11 14:26:04 UTC 2017


From: Martin Aberg <maberg at gaisler.com>

---
 c/src/lib/libbsp/sparc/shared/can/grcan.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/c/src/lib/libbsp/sparc/shared/can/grcan.c b/c/src/lib/libbsp/sparc/shared/can/grcan.c
index b1eacc0..da236ef 100644
--- a/c/src/lib/libbsp/sparc/shared/can/grcan.c
+++ b/c/src/lib/libbsp/sparc/shared/can/grcan.c
@@ -149,7 +149,6 @@ struct grcan_priv {
 
 	int txblock, rxblock;
 	int txcomplete, rxcomplete;
-	int txerror, rxerror;
 
 	struct grcan_filter sfilter;
 	struct grcan_filter afilter;
@@ -458,10 +457,6 @@ static rtems_device_driver grcan_hw_start(struct grcan_priv *pDev)
 	IRQ_UNMASK(pDev->irq + GRCAN_IRQ_IRQ);
 	SPIN_UNLOCK_IRQ(&pDev->devlock, oldLevel);
 
-	/* Reset some software data */
-	/*pDev->txerror = 0;
-	   pDev->rxerror = 0; */
-
 	/* Enable receiver/transmitter */
 	pDev->regs->rx0ctrl = GRCAN_RXCTRL_ENABLE;
 	pDev->regs->tx0ctrl = GRCAN_TXCTRL_ENABLE;
@@ -1519,14 +1514,6 @@ int grcan_write(void *d, CANMsg *msg, size_t ucount)
 			return nwritten;
 		}
 
-		if ( pDev->txerror ){
-			/* Return number of bytes sent, compare write pointers */
-			pDev->txerror = 0;
-#if 0 
-#error HANDLE AMBA error
-#endif
-		}
-
 		/* Try read bytes from circular buffer */
 		nwritten = grcan_hw_write_try(
 			pDev,
-- 
2.7.4




More information about the devel mailing list