mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
serial: 8250_pxa: Switch to use uart_read_port_properties()
Since we have now a common helper to read port properties use it instead of sparse home grown solution. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240304123035.758700-13-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
664f5d035f
commit
cc6628f07e
@ -92,11 +92,7 @@ static int serial_pxa_probe(struct platform_device *pdev)
|
||||
struct uart_8250_port uart = {};
|
||||
struct pxa8250_data *data;
|
||||
struct resource *mmres;
|
||||
int irq, ret;
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
int ret;
|
||||
|
||||
mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!mmres)
|
||||
@ -114,21 +110,21 @@ static int serial_pxa_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = of_alias_get_id(pdev->dev.of_node, "serial");
|
||||
if (ret >= 0)
|
||||
uart.port.line = ret;
|
||||
|
||||
uart.port.type = PORT_XSCALE;
|
||||
uart.port.iotype = UPIO_MEM32;
|
||||
uart.port.mapbase = mmres->start;
|
||||
uart.port.regshift = 2;
|
||||
uart.port.irq = irq;
|
||||
uart.port.fifosize = 64;
|
||||
uart.port.flags = UPF_IOREMAP | UPF_SKIP_TEST | UPF_FIXED_TYPE;
|
||||
uart.port.dev = &pdev->dev;
|
||||
uart.port.uartclk = clk_get_rate(data->clk);
|
||||
uart.port.pm = serial_pxa_pm;
|
||||
uart.port.private_data = data;
|
||||
|
||||
ret = uart_read_port_properties(&uart.port);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
uart.port.iotype = UPIO_MEM32;
|
||||
uart.port.regshift = 2;
|
||||
uart.port.fifosize = 64;
|
||||
uart.dl_write = serial_pxa_dl_write;
|
||||
|
||||
ret = serial8250_register_8250_port(&uart);
|
||||
|
Loading…
Reference in New Issue
Block a user