Lines Matching refs:owl_port

301 static void owl_uart_change_baudrate(struct owl_uart_port *owl_port,  in owl_uart_change_baudrate()  argument
304 clk_set_rate(owl_port->clk, baud * 8); in owl_uart_change_baudrate()
311 struct owl_uart_port *owl_port = to_owl_uart_port(port); in owl_uart_set_termios() local
364 owl_uart_change_baudrate(owl_port, baud); in owl_uart_set_termios()
546 struct owl_uart_port *owl_port; in owl_uart_console_write() local
548 owl_port = owl_uart_ports[co->index]; in owl_uart_console_write()
549 if (!owl_port) in owl_uart_console_write()
552 owl_uart_port_write(&owl_port->port, s, count); in owl_uart_console_write()
557 struct owl_uart_port *owl_port; in owl_uart_console_setup() local
566 owl_port = owl_uart_ports[co->index]; in owl_uart_console_setup()
567 if (!owl_port || !owl_port->port.membase) in owl_uart_console_setup()
573 return uart_set_options(&owl_port->port, co, baud, parity, bits, flow); in owl_uart_console_setup()
649 struct owl_uart_port *owl_port; in owl_uart_probe() local
679 owl_port = devm_kzalloc(&pdev->dev, sizeof(*owl_port), GFP_KERNEL); in owl_uart_probe()
680 if (!owl_port) in owl_uart_probe()
683 owl_port->clk = devm_clk_get(&pdev->dev, NULL); in owl_uart_probe()
684 if (IS_ERR(owl_port->clk)) { in owl_uart_probe()
686 return PTR_ERR(owl_port->clk); in owl_uart_probe()
689 ret = clk_prepare_enable(owl_port->clk); in owl_uart_probe()
695 owl_port->port.dev = &pdev->dev; in owl_uart_probe()
696 owl_port->port.line = pdev->id; in owl_uart_probe()
697 owl_port->port.type = PORT_OWL; in owl_uart_probe()
698 owl_port->port.iotype = UPIO_MEM; in owl_uart_probe()
699 owl_port->port.mapbase = res_mem->start; in owl_uart_probe()
700 owl_port->port.irq = irq; in owl_uart_probe()
701 owl_port->port.uartclk = clk_get_rate(owl_port->clk); in owl_uart_probe()
702 if (owl_port->port.uartclk == 0) { in owl_uart_probe()
704 clk_disable_unprepare(owl_port->clk); in owl_uart_probe()
707 owl_port->port.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_LOW_LATENCY; in owl_uart_probe()
708 owl_port->port.x_char = 0; in owl_uart_probe()
709 owl_port->port.fifosize = (info) ? info->tx_fifosize : 16; in owl_uart_probe()
710 owl_port->port.ops = &owl_uart_ops; in owl_uart_probe()
712 owl_uart_ports[pdev->id] = owl_port; in owl_uart_probe()
713 platform_set_drvdata(pdev, owl_port); in owl_uart_probe()
715 ret = uart_add_one_port(&owl_uart_driver, &owl_port->port); in owl_uart_probe()
724 struct owl_uart_port *owl_port = platform_get_drvdata(pdev); in owl_uart_remove() local
726 uart_remove_one_port(&owl_uart_driver, &owl_port->port); in owl_uart_remove()
728 clk_disable_unprepare(owl_port->clk); in owl_uart_remove()