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
MFC after:	3 days
This commit is contained in:
Dimitry Andric 2013-12-29 20:23:08 +00:00
parent d421cae017
commit 6ba26efcb5

View File

@ -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;