static void __init pl010_console_get_options(struct uart_port *port, int *baud, int *parity, int *bits) { if (UART_GET_CR(port) & UART01x_CR_UARTEN) { unsigned int lcr_h, quot; lcr_h = UART_GET_LCRH(port); *parity = 'n'; if (lcr_h & UART01x_LCRH_PEN) { if (lcr_h & UART01x_LCRH_EPS) *parity = 'e'; else *parity = 'o'; } if ((lcr_h & 0x60) == UART01x_LCRH_WLEN_7) *bits = 7; else *bits = 8; quot = UART_GET_LCRL(port) | UART_GET_LCRM(port) << 8; *baud = port->uartclk / (16 * (quot + 1)); } }
static void ambauart_break_ctl(struct uart_port *port, int break_state) { unsigned int lcr_h; lcr_h = UART_GET_LCRH(port); if (break_state == -1) lcr_h |= AMBA_UARTLCR_H_BRK; else lcr_h &= ~AMBA_UARTLCR_H_BRK; UART_PUT_LCRH(port, lcr_h); }
static void pl010_break_ctl(struct uart_port *port, int break_state) { unsigned long flags; unsigned int lcr_h; spin_lock_irqsave(&port->lock, flags); lcr_h = UART_GET_LCRH(port); if (break_state == -1) lcr_h |= UART01x_LCRH_BRK; else lcr_h &= ~UART01x_LCRH_BRK; UART_PUT_LCRH(port, lcr_h); spin_unlock_irqrestore(&port->lock, flags); }
static void pl010_shutdown(struct uart_port *port) { /* * Free the interrupt */ free_irq(port->irq, port); /* * disable all interrupts, disable the port */ UART_PUT_CR(port, 0); /* disable break condition and fifos */ UART_PUT_LCRH(port, UART_GET_LCRH(port) & ~(UART01x_LCRH_BRK | UART01x_LCRH_FEN)); }
static void ambauart_shutdown(struct uart_port *port, struct uart_info *info) { /* * Free the interrupt */ free_irq(port->irq, info); /* * disable all interrupts, disable the port */ UART_PUT_CR(port, 0); /* disable break condition and fifos */ UART_PUT_LCRH(port, UART_GET_LCRH(port) & ~(AMBA_UARTLCR_H_BRK | AMBA_UARTLCR_H_FEN)); }