Lines Matching refs:cs
201 struct zs_chanstate *cs; in zsms_attach() local
206 cs = zsc->zsc_cs[channel]; in zsms_attach()
207 cs->cs_private = sc; in zsms_attach()
208 cs->cs_ops = &zsops_ms; in zsms_attach()
209 sc->sc_cs = cs; in zsms_attach()
213 zs_write_reg(cs, 9, channel == 0 ? ZSWR9_A_RESET : ZSWR9_B_RESET); in zsms_attach()
215 CLR(cs->cs_preg[1], ZSWR1_RIE | ZSWR1_SIE | ZSWR1_TIE); in zsms_attach()
218 CLR(cs->cs_preg[4], ZSWR4_SBMASK | ZSWR4_PARMASK); in zsms_attach()
219 SET(cs->cs_preg[4], ZSWR4_TWOSB); in zsms_attach()
220 (void)zs_set_speed(cs, INIT_SPEED); in zsms_attach()
221 zs_loadchannelregs(cs); in zsms_attach()
237 struct zs_chanstate *cs = sc->sc_cs; in zsms_disable() local
242 CLR(cs->cs_preg[1], ZSWR1_RIE | ZSWR1_SIE); in zsms_disable()
243 zs_loadchannelregs(cs); in zsms_disable()
251 struct zs_chanstate *cs = sc->sc_cs; in zsms_enable() local
256 SET(cs->cs_preg[1], ZSWR1_RIE | ZSWR1_SIE); in zsms_enable()
257 zs_loadchannelregs(cs); in zsms_enable()
268 zsms_rxint(struct zs_chanstate *cs) in zsms_rxint() argument
270 struct zsms_softc *sc = cs->cs_private; in zsms_rxint()
281 rr1 = zs_read_reg(cs, 1); in zsms_rxint()
282 c = zs_read_data(cs); in zsms_rxint()
290 zs_write_csr(cs, ZSWR0_RESET_ERRORS); in zsms_rxint()
307 rr0 = zs_read_csr(cs); in zsms_rxint()
315 cs->cs_softreq = 1; in zsms_rxint()
319 zsms_txint(struct zs_chanstate *cs) in zsms_txint() argument
326 zs_write_csr(cs, ZSWR0_RESET_TXINT); in zsms_txint()
329 CLR(cs->cs_preg[1], ZSWR1_TIE); in zsms_txint()
330 zs_loadchannelregs(cs); in zsms_txint()
334 zsms_stint(struct zs_chanstate *cs, int force) in zsms_stint() argument
336 struct zsms_softc *sc = cs->cs_private; in zsms_stint()
339 rr0 = zs_read_csr(cs); in zsms_stint()
340 zs_write_csr(cs, ZSWR0_RESET_STATUS); in zsms_stint()
354 cs->cs_softreq = 1; in zsms_stint()
363 delta = rr0 ^ cs->cs_rr0; in zsms_stint()
365 delta = cs->cs_rr0_mask; in zsms_stint()
366 cs->cs_rr0 = rr0; in zsms_stint()
368 if (ISSET(delta, cs->cs_rr0_mask)) { in zsms_stint()
369 SET(cs->cs_rr0_delta, delta); in zsms_stint()
372 cs->cs_softreq = 1; in zsms_stint()
377 zsms_softint(struct zs_chanstate *cs) in zsms_softint() argument
384 sc = cs->cs_private; in zsms_softint()
429 cs->cs_rr0_delta = 0; in zsms_softint()
442 struct zs_chanstate *cs = sc->sc_cs; in zsms_speed_change() local
452 rr0 = zs_read_csr(cs); in zsms_speed_change()
455 (void)zs_read_data(cs); in zsms_speed_change()
458 (void)zs_set_speed(cs, sc->sc_base.sc_bps); in zsms_speed_change()
459 zs_loadchannelregs(cs); in zsms_speed_change()
460 zsms_stint(cs, 1); in zsms_speed_change()