Lines Matching full:uart

3  * NI 16550 UART Driver
5 * The National Instruments (NI) 16550 is a UART that is compatible with the
258 static u8 ni16550_read_fifo_size(struct uart_8250_port *uart, int reg) in ni16550_read_fifo_size() argument
260 u8 value = serial_in(uart, reg); in ni16550_read_fifo_size()
278 struct uart_8250_port *uart __free(kfree) = NULL; in ni16550_probe()
288 uart = kzalloc(sizeof(*uart), GFP_KERNEL); in ni16550_probe()
289 if (!uart) in ni16550_probe()
296 spin_lock_init(&uart->port.lock); in ni16550_probe()
298 ret = ni16550_get_regs(pdev, &uart->port); in ni16550_probe()
303 serial8250_set_defaults(uart); in ni16550_probe()
307 uart->port.dev = dev; in ni16550_probe()
308 uart->port.flags = UPF_BOOT_AUTOCONF | UPF_FIXED_PORT | UPF_FIXED_TYPE; in ni16550_probe()
309 uart->port.startup = ni16550_port_startup; in ni16550_probe()
310 uart->port.shutdown = ni16550_port_shutdown; in ni16550_probe()
315 txfifosz = ni16550_read_fifo_size(uart, NI16550_TFS_OFFSET); in ni16550_probe()
316 rxfifosz = ni16550_read_fifo_size(uart, NI16550_RFS_OFFSET); in ni16550_probe()
321 uart->port.type = PORT_16550A; in ni16550_probe()
322 uart->port.fifosize = txfifosz; in ni16550_probe()
323 uart->tx_loadsz = txfifosz; in ni16550_probe()
324 uart->fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10; in ni16550_probe()
325 uart->capabilities = UART_CAP_FIFO | UART_CAP_AFE | UART_CAP_EFR; in ni16550_probe()
332 uart->port.uartclk = info->uartclk; in ni16550_probe()
334 ret = uart_read_port_properties(&uart->port); in ni16550_probe()
338 if (!uart->port.uartclk) { in ni16550_probe()
341 uart->port.uartclk = clk_get_rate(data->clk); in ni16550_probe()
344 if (!uart->port.uartclk) in ni16550_probe()
350 uart->port.set_mctrl = ni16550_set_mctrl; in ni16550_probe()
351 ni16550_config_prescaler(uart, (u8)prescaler); in ni16550_probe()
369 rs232_property = is_pmr_rs232_mode(uart); in ni16550_probe()
384 ni16550_rs485_setup(&uart->port); in ni16550_probe()
387 ret = serial8250_register_8250_port(uart); in ni16550_probe()
416 /* Sets UART clock rate to 22.222 MHz with 1.125 prescale */
423 /* Set UART clock rate to 29.629 MHz with 1.125 prescale */