Home | History | Annotate | Download | only in dev

Lines Matching refs:tp

129 	struct tty *tp;
150 tp = tty_alloc();
151 tp->t_oproc = uart_start;
152 tp->t_param = uart_param;
153 sc->sc_tty = tp;
154 tp->t_dev = makedev(maj, minor);
155 tty_attach(tp);
158 cn_tab->cn_dev = tp->t_dev;
203 struct tty *tp = sc->sc_tty;
208 tp->t_dev = dev;
209 if ((tp->t_state & TS_ISOPEN) == 0) {
210 tp->t_state |= TS_CARR_ON;
211 ttychars(tp);
212 tp->t_iflag = TTYDEF_IFLAG;
213 tp->t_oflag = TTYDEF_OFLAG;
214 tp->t_cflag = TTYDEF_CFLAG | CLOCAL;
215 tp->t_lflag = TTYDEF_LFLAG;
216 tp->t_ispeed = tp->t_ospeed = 115200;
217 ttsetwater(tp);
219 tp) != 0) {
226 error = (*tp->t_linesw->l_open)(dev, tp);
235 struct tty *tp = sc->sc_tty;
237 (*tp->t_linesw->l_close)(tp, flag);
238 ttyclose(tp);
247 struct tty *tp = sc->sc_tty;
249 return ((*tp->t_linesw->l_read)(tp, uio, flag));
256 struct tty *tp = sc->sc_tty;
258 return ((*tp->t_linesw->l_write)(tp, uio, flag));
265 struct tty *tp = sc->sc_tty;
267 return ((*tp->t_linesw->l_poll)(tp, events, l));
274 struct tty *tp = sc->sc_tty;
277 error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, l);
280 return (ttioctl(tp, cmd, data, flag, l));
284 uart_param(struct tty *tp, struct termios *t)
300 uart_start(struct tty *tp)
305 if (tp->t_state & (TS_TTSTOP | TS_BUSY))
307 ttypull(tp);
308 tp->t_state |= TS_BUSY;
309 while (tp->t_outq.c_cc != 0) {
310 cnt = ndqb(&tp->t_outq, 0);
312 uart_cnputc(0,tp->t_outq.c_cf[i]);
313 ndflush(&tp->t_outq, cnt);
315 tp->t_state &= ~TS_BUSY;
321 uart_stop(struct tty *tp, int flag)
326 if (tp->t_state & TS_BUSY)
327 if ((tp->t_state & TS_TTSTOP) == 0)
328 tp->t_state |= TS_FLUSH;
336 struct tty *tp = sc->sc_tty;
346 if (tp->t_state & TS_ISOPEN)
347 (*tp->t_linesw->l_rint)(c, tp);