From 14ae9188fdda548bd66511ca7a3cb43db9f0954b Mon Sep 17 00:00:00 2001 From: Heikki Krogerus Date: Mon, 25 Mar 2013 15:51:15 +0200 Subject: [PATCH] --- yaml --- r: 364285 b: refs/heads/master c: b0b8c84cf58d2486d48f486b5c47af7a7a33a497 h: refs/heads/master i: 364283: aec54461108dec738ff3d6de9c0d7c02990153a3 v: v3 --- [refs] | 2 +- .../devicetree/bindings/tty/serial/of-serial.txt | 3 +++ trunk/drivers/tty/serial/of_serial.c | 13 ++++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index e2d2cacb5039..34b02bfd390e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 44a459fd83376d08b0dea776354761ebb1bacde1 +refs/heads/master: b0b8c84cf58d2486d48f486b5c47af7a7a33a497 diff --git a/trunk/Documentation/devicetree/bindings/tty/serial/of-serial.txt b/trunk/Documentation/devicetree/bindings/tty/serial/of-serial.txt index c13f0ce74da6..1928a3e83cd0 100644 --- a/trunk/Documentation/devicetree/bindings/tty/serial/of-serial.txt +++ b/trunk/Documentation/devicetree/bindings/tty/serial/of-serial.txt @@ -34,6 +34,9 @@ Optional properties: - no-loopback-test: set to indicate that the port does not implements loopback test mode - fifo-size: the fifo size of the UART. +- auto-flow-control: one way to enable automatic flow control support. The + driver is allowed to detect support for the capability even without this + property. Example: diff --git a/trunk/drivers/tty/serial/of_serial.c b/trunk/drivers/tty/serial/of_serial.c index 267711b5cb4d..39c7ea4cb14f 100644 --- a/trunk/drivers/tty/serial/of_serial.c +++ b/trunk/drivers/tty/serial/of_serial.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -22,6 +21,8 @@ #include #include +#include "8250/8250.h" + struct of_serial_info { struct clk *clk; int type; @@ -171,11 +172,17 @@ static int of_platform_serial_probe(struct platform_device *ofdev) #ifdef CONFIG_SERIAL_8250 case PORT_8250 ... PORT_MAX_8250: { - /* For now the of bindings don't support the extra - 8250 specific bits */ struct uart_8250_port port8250; memset(&port8250, 0, sizeof(port8250)); port8250.port = port; + + if (port.fifosize) + port8250.capabilities = UART_CAP_FIFO; + + if (of_property_read_bool(ofdev->dev.of_node, + "auto-flow-control")) + port8250.capabilities |= UART_CAP_AFE; + ret = serial8250_register_8250_port(&port8250); break; }