Lines Matching refs:port

55 	struct uart_port port;  member
112 static unsigned int mux_tx_empty(struct uart_port *port) in mux_tx_empty() argument
114 return UART_GET_FIFO_CNT(port) ? 0 : TIOCSER_TEMT; in mux_tx_empty()
125 static void mux_set_mctrl(struct uart_port *port, unsigned int mctrl) in mux_set_mctrl() argument
136 static unsigned int mux_get_mctrl(struct uart_port *port) in mux_get_mctrl() argument
147 static void mux_stop_tx(struct uart_port *port) in mux_stop_tx() argument
157 static void mux_start_tx(struct uart_port *port) in mux_start_tx() argument
167 static void mux_stop_rx(struct uart_port *port) in mux_stop_rx() argument
178 static void mux_break_ctl(struct uart_port *port, int break_state) in mux_break_ctl() argument
189 static void mux_write(struct uart_port *port) in mux_write() argument
192 struct circ_buf *xmit = &port->state->xmit; in mux_write()
194 if(port->x_char) { in mux_write()
195 UART_PUT_CHAR(port, port->x_char); in mux_write()
196 port->icount.tx++; in mux_write()
197 port->x_char = 0; in mux_write()
201 if(uart_circ_empty(xmit) || uart_tx_stopped(port)) { in mux_write()
202 mux_stop_tx(port); in mux_write()
206 count = (port->fifosize) - UART_GET_FIFO_CNT(port); in mux_write()
208 UART_PUT_CHAR(port, xmit->buf[xmit->tail]); in mux_write()
210 port->icount.tx++; in mux_write()
216 while(UART_GET_FIFO_CNT(port)) in mux_write()
220 uart_write_wakeup(port); in mux_write()
223 mux_stop_tx(port); in mux_write()
233 static void mux_read(struct uart_port *port) in mux_read() argument
235 struct tty_port *tport = &port->state->port; in mux_read()
237 __u32 start_count = port->icount.rx; in mux_read()
240 data = __raw_readl(port->membase + IO_DATA_REG_OFFSET); in mux_read()
248 port->icount.rx++; in mux_read()
251 port->icount.brk++; in mux_read()
252 if(uart_handle_break(port)) in mux_read()
256 if (uart_handle_sysrq_char(port, data & 0xffu)) in mux_read()
262 if (start_count != port->icount.rx) in mux_read()
273 static int mux_startup(struct uart_port *port) in mux_startup() argument
275 mux_ports[port->line].enabled = 1; in mux_startup()
285 static void mux_shutdown(struct uart_port *port) in mux_shutdown() argument
287 mux_ports[port->line].enabled = 0; in mux_shutdown()
299 mux_set_termios(struct uart_port *port, struct ktermios *termios, in mux_set_termios() argument
311 static const char *mux_type(struct uart_port *port) in mux_type() argument
323 static void mux_release_port(struct uart_port *port) in mux_release_port() argument
335 static int mux_request_port(struct uart_port *port) in mux_request_port() argument
351 static void mux_config_port(struct uart_port *port, int type) in mux_config_port() argument
353 port->type = PORT_MUX; in mux_config_port()
364 static int mux_verify_port(struct uart_port *port, struct serial_struct *ser) in mux_verify_port() argument
366 if(port->membase == NULL) in mux_verify_port()
386 mux_read(&mux_ports[i].port); in mux_poll()
387 mux_write(&mux_ports[i].port); in mux_poll()
398 while(UART_GET_FIFO_CNT(&mux_ports[0].port)) in mux_console_write()
403 UART_PUT_CHAR(&mux_ports[0].port, '\r'); in mux_console_write()
405 UART_PUT_CHAR(&mux_ports[0].port, *s++); in mux_console_write()
482 struct uart_port *port = &mux_ports[port_cnt].port; in mux_probe() local
483 port->iobase = 0; in mux_probe()
484 port->mapbase = dev->hpa.start + MUX_OFFSET + in mux_probe()
486 port->membase = ioremap_nocache(port->mapbase, MUX_LINE_OFFSET); in mux_probe()
487 port->iotype = UPIO_MEM; in mux_probe()
488 port->type = PORT_MUX; in mux_probe()
489 port->irq = 0; in mux_probe()
490 port->uartclk = 0; in mux_probe()
491 port->fifosize = MUX_FIFO_SIZE; in mux_probe()
492 port->ops = &mux_pops; in mux_probe()
493 port->flags = UPF_BOOT_AUTOCONF; in mux_probe()
494 port->line = port_cnt; in mux_probe()
501 port->timeout = HZ / 50; in mux_probe()
502 spin_lock_init(&port->lock); in mux_probe()
504 status = uart_add_one_port(&mux_driver, port); in mux_probe()
518 if(mux_ports[i].port.mapbase == dev->hpa.start + MUX_OFFSET) in mux_remove()
525 struct uart_port *port = &mux_ports[i].port; in mux_remove() local
527 uart_remove_one_port(&mux_driver, port); in mux_remove()
528 if(port->membase) in mux_remove()
529 iounmap(port->membase); in mux_remove()