Lines Matching refs:owl_port
321 static void owl_uart_change_baudrate(struct owl_uart_port *owl_port, in owl_uart_change_baudrate() argument
324 clk_set_rate(owl_port->clk, baud * 8); in owl_uart_change_baudrate()
331 struct owl_uart_port *owl_port = to_owl_uart_port(port); in owl_uart_set_termios() local
384 owl_uart_change_baudrate(owl_port, baud); in owl_uart_set_termios()
540 struct owl_uart_port *owl_port; in owl_uart_console_write() local
542 owl_port = owl_uart_ports[co->index]; in owl_uart_console_write()
543 if (!owl_port) in owl_uart_console_write()
546 owl_uart_port_write(&owl_port->port, s, count); in owl_uart_console_write()
551 struct owl_uart_port *owl_port; in owl_uart_console_setup() local
560 owl_port = owl_uart_ports[co->index]; in owl_uart_console_setup()
561 if (!owl_port || !owl_port->port.membase) in owl_uart_console_setup()
567 return uart_set_options(&owl_port->port, co, baud, parity, bits, flow); in owl_uart_console_setup()
643 struct owl_uart_port *owl_port; in owl_uart_probe() local
673 owl_port = devm_kzalloc(&pdev->dev, sizeof(*owl_port), GFP_KERNEL); in owl_uart_probe()
674 if (!owl_port) in owl_uart_probe()
677 owl_port->clk = devm_clk_get(&pdev->dev, NULL); in owl_uart_probe()
678 if (IS_ERR(owl_port->clk)) { in owl_uart_probe()
680 return PTR_ERR(owl_port->clk); in owl_uart_probe()
683 ret = clk_prepare_enable(owl_port->clk); in owl_uart_probe()
689 owl_port->port.dev = &pdev->dev; in owl_uart_probe()
690 owl_port->port.line = pdev->id; in owl_uart_probe()
691 owl_port->port.type = PORT_OWL; in owl_uart_probe()
692 owl_port->port.iotype = UPIO_MEM; in owl_uart_probe()
693 owl_port->port.mapbase = res_mem->start; in owl_uart_probe()
694 owl_port->port.irq = irq; in owl_uart_probe()
695 owl_port->port.uartclk = clk_get_rate(owl_port->clk); in owl_uart_probe()
696 if (owl_port->port.uartclk == 0) { in owl_uart_probe()
698 clk_disable_unprepare(owl_port->clk); in owl_uart_probe()
701 owl_port->port.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_LOW_LATENCY; in owl_uart_probe()
702 owl_port->port.x_char = 0; in owl_uart_probe()
703 owl_port->port.fifosize = (info) ? info->tx_fifosize : 16; in owl_uart_probe()
704 owl_port->port.ops = &owl_uart_ops; in owl_uart_probe()
706 owl_uart_ports[pdev->id] = owl_port; in owl_uart_probe()
707 platform_set_drvdata(pdev, owl_port); in owl_uart_probe()
709 ret = uart_add_one_port(&owl_uart_driver, &owl_port->port); in owl_uart_probe()
718 struct owl_uart_port *owl_port = platform_get_drvdata(pdev); in owl_uart_remove() local
720 uart_remove_one_port(&owl_uart_driver, &owl_port->port); in owl_uart_remove()
722 clk_disable_unprepare(owl_port->clk); in owl_uart_remove()