Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: serial: meson: retrieve port FIFO size from DT

Now the DT bindings has a property to get the FIFO size for a particular port,
retrieve it and use to setup the FIFO interrupts threshold.

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20210518075833.3736038-3-narmstrong@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Neil Armstrong and committed by
Greg Kroah-Hartman
27d44e05 f985b0b6

+4 -1
+4 -1
drivers/tty/serial/meson_uart.c
··· 715 715 { 716 716 struct resource *res_mem, *res_irq; 717 717 struct uart_port *port; 718 + u32 fifosize = 64; /* Default is 64, 128 for EE UART_0 */ 718 719 int ret = 0; 719 720 720 721 if (pdev->dev.of_node) ··· 742 741 res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 743 742 if (!res_irq) 744 743 return -ENODEV; 744 + 745 + of_property_read_u32(pdev->dev.of_node, "fifo-size", &fifosize); 745 746 746 747 if (meson_ports[pdev->id]) { 747 748 dev_err(&pdev->dev, "port %d already allocated\n", pdev->id); ··· 774 771 port->type = PORT_MESON; 775 772 port->x_char = 0; 776 773 port->ops = &meson_uart_ops; 777 - port->fifosize = 64; 774 + port->fifosize = fifosize; 778 775 779 776 meson_ports[pdev->id] = port; 780 777 platform_set_drvdata(pdev, port);