Lines Matching refs:bas
60 static int lowrisc_uart_probe(struct uart_bas *bas);
61 static void lowrisc_uart_init(struct uart_bas *bas, int, int, int, int);
62 static void lowrisc_uart_term(struct uart_bas *bas);
63 static void lowrisc_uart_putc(struct uart_bas *bas, int);
64 static int lowrisc_uart_rxready(struct uart_bas *bas);
65 static int lowrisc_uart_getc(struct uart_bas *bas, struct mtx *);
77 lowrisc_uart_probe(struct uart_bas *bas) in lowrisc_uart_probe() argument
84 lowrisc_uart_getbaud(struct uart_bas *bas) in lowrisc_uart_getbaud() argument
91 lowrisc_uart_init(struct uart_bas *bas, int baudrate, int databits, in lowrisc_uart_init() argument
99 lowrisc_uart_term(struct uart_bas *bas) in lowrisc_uart_term() argument
106 lowrisc_uart_putc(struct uart_bas *bas, int c) in lowrisc_uart_putc() argument
109 while (GETREG(bas, UART_DR) & DR_TX_FIFO_FULL) in lowrisc_uart_putc()
112 SETREG(bas, UART_DR, c); in lowrisc_uart_putc()
116 lowrisc_uart_rxready(struct uart_bas *bas) in lowrisc_uart_rxready() argument
119 if (GETREG(bas, UART_DR) & DR_RX_FIFO_EMPTY) in lowrisc_uart_rxready()
126 lowrisc_uart_getc(struct uart_bas *bas, struct mtx *hwmtx) in lowrisc_uart_getc() argument
131 SETREG(bas, UART_INT_STATUS, INT_STATUS_ACK); in lowrisc_uart_getc()
132 reg = GETREG(bas, UART_DR); in lowrisc_uart_getc()
195 struct uart_bas *bas; in lowrisc_uart_bus_attach() local
198 bas = &sc->sc_bas; in lowrisc_uart_bus_attach()
201 lowrisc_uart_init(bas, di->baudrate, di->databits, di->stopbits, in lowrisc_uart_bus_attach()
204 lowrisc_uart_init(bas, DEFAULT_BAUD_RATE, 8, 1, 0); in lowrisc_uart_bus_attach()
243 struct uart_bas *bas; in lowrisc_uart_bus_ioctl() local
246 bas = &sc->sc_bas; in lowrisc_uart_bus_ioctl()
254 *(u_int*)data = lowrisc_uart_getbaud(bas); in lowrisc_uart_bus_ioctl()
268 struct uart_bas *bas; in lowrisc_uart_bus_ipend() local
271 bas = &sc->sc_bas; in lowrisc_uart_bus_ipend()
276 if ((GETREG(bas, UART_DR) & DR_RX_FIFO_EMPTY) == 0) in lowrisc_uart_bus_ipend()
278 SETREG(bas, UART_INT_STATUS, INT_STATUS_ACK); in lowrisc_uart_bus_ipend()
322 struct uart_bas *bas; in lowrisc_uart_bus_receive() local
325 bas = &sc->sc_bas; in lowrisc_uart_bus_receive()
335 reg = GETREG(bas, UART_DR); in lowrisc_uart_bus_receive()
336 SETREG(bas, UART_INT_STATUS, INT_STATUS_ACK); in lowrisc_uart_bus_receive()
355 struct uart_bas *bas; in lowrisc_uart_bus_transmit() local
358 bas = &sc->sc_bas; in lowrisc_uart_bus_transmit()
362 while (GETREG(bas, UART_DR) & DR_TX_FIFO_FULL) in lowrisc_uart_bus_transmit()
364 SETREG(bas, UART_DR, sc->sc_txbuf[i] & 0xff); in lowrisc_uart_bus_transmit()
374 struct uart_bas *bas; in lowrisc_uart_bus_grab() local
376 bas = &sc->sc_bas; in lowrisc_uart_bus_grab()
386 struct uart_bas *bas; in lowrisc_uart_bus_ungrab() local
388 bas = &sc->sc_bas; in lowrisc_uart_bus_ungrab()