You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
tty: serial: meson: retrieve port FIFO size from DT
[ Upstream commit 27d44e05d7 ]
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>
Stable-dep-of: 2a1d728f20ed ("tty: serial: meson: fix hard LOCKUP on crtscts mode")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1e66cd4083
commit
980c3135f1
@@ -728,6 +728,7 @@ static int meson_uart_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct resource *res_mem, *res_irq;
|
||||
struct uart_port *port;
|
||||
u32 fifosize = 64; /* Default is 64, 128 for EE UART_0 */
|
||||
int ret = 0;
|
||||
|
||||
if (pdev->dev.of_node)
|
||||
@@ -755,6 +756,8 @@ static int meson_uart_probe(struct platform_device *pdev)
|
||||
if (!res_irq)
|
||||
return -ENODEV;
|
||||
|
||||
of_property_read_u32(pdev->dev.of_node, "fifo-size", &fifosize);
|
||||
|
||||
if (meson_ports[pdev->id]) {
|
||||
dev_err(&pdev->dev, "port %d already allocated\n", pdev->id);
|
||||
return -EBUSY;
|
||||
@@ -784,7 +787,7 @@ static int meson_uart_probe(struct platform_device *pdev)
|
||||
port->type = PORT_MESON;
|
||||
port->x_char = 0;
|
||||
port->ops = &meson_uart_ops;
|
||||
port->fifosize = 64;
|
||||
port->fifosize = fifosize;
|
||||
|
||||
meson_ports[pdev->id] = port;
|
||||
platform_set_drvdata(pdev, port);
|
||||
|
||||
Reference in New Issue
Block a user