svn commit: r260287 - in stable: 10/sys/dev/scc 7/sys/dev/scc 8/sys/dev/scc 9/sys/dev/scc

Dimitry Andric dim at FreeBSD.org
Sat Jan 4 21:32:55 UTC 2014


Author: dim
Date: Sat Jan  4 21:32:53 2014
New Revision: 260287
URL: http://svnweb.freebsd.org/changeset/base/260287

Log:
  MFC r260057:
  
  In sys/dev/scc, remove unused static function scc_setmreg().  While
  here, invoke scc_getmreg() in two more places where it can be used.
  
  Reviewed by:	marcel

Modified:
  stable/8/sys/dev/scc/scc_dev_z8530.c
Directory Properties:
  stable/8/sys/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/scc/scc_dev_z8530.c
  stable/7/sys/dev/scc/scc_dev_z8530.c
  stable/9/sys/dev/scc/scc_dev_z8530.c
Directory Properties:
  stable/10/   (props changed)
  stable/7/sys/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/8/sys/dev/scc/scc_dev_z8530.c
==============================================================================
--- stable/8/sys/dev/scc/scc_dev_z8530.c	Sat Jan  4 21:23:49 2014	(r260286)
+++ stable/8/sys/dev/scc/scc_dev_z8530.c	Sat Jan  4 21:32:53 2014	(r260287)
@@ -66,15 +66,6 @@ struct scc_class scc_z8530_class = {
 };
 
 /* Multiplexed I/O. */
-static __inline void
-scc_setmreg(struct scc_bas *bas, int ch, int reg, int val)
-{
-
-	scc_setreg(bas, ch + REG_CTRL, reg);
-	scc_barrier(bas);
-	scc_setreg(bas, ch + REG_CTRL, val);
-}
-
 static __inline uint8_t
 scc_getmreg(struct scc_bas *bas, int ch, int reg)
 {
@@ -148,9 +139,7 @@ z8530_bfe_ipend(struct scc_softc *sc)
 	if (ip & IP_TIB)
 		ch[1]->ch_ipend |= SER_INT_TXIDLE;
 	if (ip & IP_SIA) {
-		scc_setreg(bas, CHAN_A + REG_CTRL, CR_RSTXSI);
-		scc_barrier(bas);
-		bes = scc_getreg(bas, CHAN_A + REG_CTRL);
+		bes = scc_getmreg(bas, CHAN_A, CR_RSTXSI);
 		if (bes & BES_BRK)
 			ch[0]->ch_ipend |= SER_INT_BREAK;
 		sig = ch[0]->ch_hwsig;
@@ -166,9 +155,7 @@ z8530_bfe_ipend(struct scc_softc *sc)
 			ch[0]->ch_ipend |= SER_INT_OVERRUN;
 	}
 	if (ip & IP_SIB) {
-		scc_setreg(bas, CHAN_B + REG_CTRL, CR_RSTXSI);
-		scc_barrier(bas);
-		bes = scc_getreg(bas, CHAN_B + REG_CTRL);
+		bes = scc_getmreg(bas, CHAN_B, CR_RSTXSI);
 		if (bes & BES_BRK)
 			ch[1]->ch_ipend |= SER_INT_BREAK;
 		sig = ch[1]->ch_hwsig;


More information about the svn-src-stable-8 mailing list