Lines Matching +full:- +full:uart

1 // SPDX-License-Identifier: GPL-2.0+
3 * drivers/tty/serial/8250/8250_pxa.c -- driver for PXA on-board UARTS
38 serial8250_suspend_port(data->line); in serial_pxa_suspend()
47 serial8250_resume_port(data->line); in serial_pxa_resume()
57 { .compatible = "mrvl,pxa-uart", },
58 { .compatible = "mrvl,mmp-uart", },
63 /* Uart divisor latch write */
83 struct pxa8250_data *data = port->private_data; in serial_pxa_pm()
86 clk_prepare_enable(data->clk); in serial_pxa_pm()
88 clk_disable_unprepare(data->clk); in serial_pxa_pm()
93 struct uart_8250_port uart = {}; in serial_pxa_probe() local
104 return -ENODEV; in serial_pxa_probe()
106 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); in serial_pxa_probe()
108 return -ENOMEM; in serial_pxa_probe()
110 data->clk = devm_clk_get(&pdev->dev, NULL); in serial_pxa_probe()
111 if (IS_ERR(data->clk)) in serial_pxa_probe()
112 return PTR_ERR(data->clk); in serial_pxa_probe()
114 ret = clk_prepare(data->clk); in serial_pxa_probe()
118 ret = of_alias_get_id(pdev->dev.of_node, "serial"); in serial_pxa_probe()
120 uart.port.line = ret; in serial_pxa_probe()
122 uart.port.type = PORT_XSCALE; in serial_pxa_probe()
123 uart.port.iotype = UPIO_MEM32; in serial_pxa_probe()
124 uart.port.mapbase = mmres->start; in serial_pxa_probe()
125 uart.port.regshift = 2; in serial_pxa_probe()
126 uart.port.irq = irq; in serial_pxa_probe()
127 uart.port.fifosize = 64; in serial_pxa_probe()
128 uart.port.flags = UPF_IOREMAP | UPF_SKIP_TEST | UPF_FIXED_TYPE; in serial_pxa_probe()
129 uart.port.dev = &pdev->dev; in serial_pxa_probe()
130 uart.port.uartclk = clk_get_rate(data->clk); in serial_pxa_probe()
131 uart.port.pm = serial_pxa_pm; in serial_pxa_probe()
132 uart.port.private_data = data; in serial_pxa_probe()
133 uart.dl_write = serial_pxa_dl_write; in serial_pxa_probe()
135 ret = serial8250_register_8250_port(&uart); in serial_pxa_probe()
139 data->line = ret; in serial_pxa_probe()
146 clk_unprepare(data->clk); in serial_pxa_probe()
154 serial8250_unregister_port(data->line); in serial_pxa_remove()
156 clk_unprepare(data->clk); in serial_pxa_remove()
166 .name = "pxa2xx-uart",
178 struct uart_port *port = &device->port; in early_serial_pxa_setup()
180 if (!(device->port.membase || device->port.iobase)) in early_serial_pxa_setup()
181 return -ENODEV; in early_serial_pxa_setup()
183 port->regshift = 2; in early_serial_pxa_setup()
186 OF_EARLYCON_DECLARE(early_pxa, "mrvl,pxa-uart", early_serial_pxa_setup);
191 MODULE_ALIAS("platform:pxa2xx-uart");