Lines Matching full:up
213 struct uart_port *up;
439 static void brcmuart_rx_buf_done_isr(struct uart_port *up, int index)
441 struct brcmuart_priv *priv = up->private_data;
442 struct tty_port *tty_port = &up->state->port;
452 dev_err(up->dev, "RX done interrupt but DATA_RDY not found\n");
459 up->icount.overrun++;
460 dev_warn(up->dev, "RX OVERRUN Error\n");
463 up->icount.frame++;
464 dev_warn(up->dev, "RX FRAMING Error\n");
467 up->icount.parity++;
468 dev_warn(up->dev, "RX PARITY Error\n");
476 dev_warn(up->dev, "Flip buffer overrun of %d bytes\n",
478 up->icount.overrun += length - copied;
480 up->icount.rx += length;
495 static void brcmuart_rx_isr(struct uart_port *up, u32 rx_isr)
497 struct brcmuart_priv *priv = up->private_data;
498 struct device *dev = up->dev;
506 brcmuart_rx_buf_done_isr(up, priv->rx_next_buf);
510 start_rx_dma(up_to_u8250p(up));
536 static void brcmuart_tx_isr(struct uart_port *up, u32 isr)
538 struct brcmuart_priv *priv = up->private_data;
539 struct device *dev = up->dev;
540 struct uart_8250_port *port_8250 = up_to_u8250p(up);
549 if (!kfifo_is_empty(&tport->xmit_fifo) && !uart_tx_stopped(up))
555 struct uart_port *up = dev_id;
556 struct device *dev = up->dev;
557 struct brcmuart_priv *priv = up->private_data;
567 uart_port_lock_irqsave(up, &flags);
574 brcmuart_rx_isr(up, rval);
577 brcmuart_tx_isr(up, tval);
581 uart_port_unlock_irqrestore(up, flags);
588 struct uart_8250_port *up = up_to_u8250p(port);
589 struct brcmuart_priv *priv = up->port.private_data;
597 up->dma = NULL;
609 up->ier &= ~UART_IER_RDI;
610 serial_port_out(port, UART_IER, up->ier);
616 up->dma = &priv->dma;
619 start_rx_dma(up);
625 struct uart_8250_port *up = up_to_u8250p(port);
626 struct brcmuart_priv *priv = up->port.private_data;
632 stop_rx_dma(up);
633 stop_tx_dma(up);
643 up->dma = NULL;
707 static void set_clock_mux(struct uart_port *up, struct brcmuart_priv *priv,
725 quot = find_quot(up->dev, priv->default_mux_rate, baud, &percent);
737 quot = find_quot(up->dev, freq, baud, &percent);
749 dev_err(up->dev, "Error, %d BAUD rate is too fast.\n", baud);
754 dev_err(up->dev, "Error selecting BAUD MUX clock\n");
758 dev_err(up->dev, "Error, baud: %d has %u.%u%% error\n",
762 dev_dbg(up->dev, "Selecting BAUD MUX rate: %u\n", best_freq);
763 dev_dbg(up->dev, "Requested baud: %u, Actual baud: %u\n",
771 up->uartclk = best_freq;
774 static void brcmstb_set_termios(struct uart_port *up,
778 struct uart_8250_port *p8250 = up_to_u8250p(up);
779 struct brcmuart_priv *priv = up->private_data;
783 set_clock_mux(up, priv, tty_termios_baud_rate(termios));
784 serial8250_do_set_termios(up, termios, old);
795 struct uart_8250_port *up = up_to_u8250p(p);
818 if ((ier & UART_IER_RDI) && (up->mcr & UART_MCR_AFE)) {
842 struct uart_port *p = priv->up;
843 struct uart_8250_port *up = up_to_u8250p(p);
865 if ((up->ier & (UART_IER_RLSI | UART_IER_RDI)) ==
960 struct uart_8250_port up;
1027 memset(&up, 0, sizeof(up));
1028 up.port.type = PORT_BCM7271;
1029 up.port.dev = dev;
1030 up.port.mapbase = mapbase;
1031 up.port.membase = membase;
1032 up.port.handle_irq = brcmuart_handle_irq;
1033 up.port.flags = UPF_BOOT_AUTOCONF | UPF_FIXED_PORT | UPF_FIXED_TYPE;
1034 up.port.private_data = priv;
1036 ret = uart_read_port_properties(&up.port);
1040 up.port.regshift = 2;
1041 up.port.iotype = device_is_big_endian(dev) ? UPIO_MEM32BE : UPIO_MEM32;
1053 up.port.uartclk = priv->default_mux_rate;
1061 up.port.shutdown = brcmuart_shutdown;
1062 up.port.startup = brcmuart_startup;
1063 up.port.throttle = brcmuart_throttle;
1064 up.port.unthrottle = brcmuart_unthrottle;
1065 up.port.set_termios = brcmstb_set_termios;
1086 ret = serial8250_register_8250_port(&up);
1093 priv->up = &new_port->port;
1136 struct uart_8250_port *up = serial8250_get_port(priv->line);
1137 struct uart_port *port = &up->port;
1158 struct uart_8250_port *up = serial8250_get_port(priv->line);
1159 struct uart_port *port = &up->port;