Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jan 2014 21:32:54 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r260287 - in stable: 10/sys/dev/scc 7/sys/dev/scc 8/sys/dev/scc 9/sys/dev/scc
Message-ID:  <201401042132.s04LWs3s012786@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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/9/sys/dev/scc/scc_dev_z8530.c
Directory Properties:
  stable/9/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/8/sys/dev/scc/scc_dev_z8530.c
Directory Properties:
  stable/10/   (props changed)
  stable/7/sys/   (props changed)
  stable/8/sys/   (props changed)

Modified: stable/9/sys/dev/scc/scc_dev_z8530.c
==============================================================================
--- stable/9/sys/dev/scc/scc_dev_z8530.c	Sat Jan  4 21:23:49 2014	(r260286)
+++ stable/9/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)
 {
@@ -146,9 +137,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;
@@ -164,9 +153,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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401042132.s04LWs3s012786>