serial: sh-sci: Add DT support for dedicated RTS/CTS
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 3 Jun 2016 10:00:11 +0000 (12:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jun 2016 16:07:51 +0000 (09:07 -0700)
Add support for indicating the availability of dedicated lines for
RTS/CTS hardware flow control, using the standard "uart-has-rtscts" DT
property.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c

index 02b240a..d9cb0d7 100644 (file)
@@ -2999,6 +2999,9 @@ sci_parse_dt(struct platform_device *pdev, unsigned int *dev_id)
        p->regtype = SCI_OF_REGTYPE(match->data);
        p->scscr = SCSCR_RE | SCSCR_TE;
 
+       if (of_find_property(np, "uart-has-rtscts", NULL))
+               p->capabilities |= SCIx_HAVE_RTSCTS;
+
        return p;
 }