From patchwork Mon Sep 15 14:00:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frans Klaver X-Patchwork-Id: 4905951 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5A1EE9F2EC for ; Mon, 15 Sep 2014 14:05:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 529F5201B4 for ; Mon, 15 Sep 2014 14:07:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 56D3120274 for ; Mon, 15 Sep 2014 14:07:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XTWuS-0000VB-VE; Mon, 15 Sep 2014 14:05:41 +0000 Received: from filter1.ibarracuda.nl ([83.247.7.10]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XTWsW-00048j-BZ for linux-arm-kernel@lists.infradead.org; Mon, 15 Sep 2014 14:03:40 +0000 X-ASG-Debug-ID: 1410789675-0759e746c032500002-tbGyMd Received: from XSMCASSVR01.xsens-tech.local (rev-215.116.249.87.virtu.nl [87.249.116.215]) by filter1.ibarracuda.nl with ESMTP id W1EpNmaOKEKSJ1WB (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO); Mon, 15 Sep 2014 16:01:16 +0200 (CEST) X-Barracuda-Envelope-From: Frans.Klaver@xsens.com X-Barracuda-AUTH-User: xsenscom X-Barracuda-Apparent-Source-IP: 87.249.116.215 Received: from ci00147.xsens-tech.local (172.16.11.160) by XSMCASSVR01.xsens-tech.local (192.168.0.248) with Microsoft SMTP Server id 14.3.195.1; Mon, 15 Sep 2014 16:01:16 +0200 From: Frans Klaver To: Tony Lindgren Subject: [PATCH 4/4] tty: omap-serial: support setting of hardware flow control in dts Date: Mon, 15 Sep 2014 16:00:10 +0200 X-ASG-Orig-Subj: [PATCH 4/4] tty: omap-serial: support setting of hardware flow control in dts Message-ID: <1410789610-23059-5-git-send-email-frans.klaver@xsens.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1410789610-23059-1-git-send-email-frans.klaver@xsens.com> References: <1410789610-23059-1-git-send-email-frans.klaver@xsens.com> MIME-Version: 1.0 X-Originating-IP: [172.16.11.160] X-Barracuda-Connect: rev-215.116.249.87.virtu.nl[87.249.116.215] X-Barracuda-Start-Time: 1410789676 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: http://filter1.ibarracuda.nl:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at ibarracuda.nl X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.9505 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140915_070340_555600_A9EDBAFB X-CRM114-Status: UNSURE ( 7.91 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) Cc: Mark Rutland , Frans Klaver , Alexey Pelykh , Pawel Moll , Ian Campbell , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Felipe Balbi , devicetree@vger.kernel.org, Rob Herring , linux-serial@vger.kernel.org, Kumar Gala , linux-omap@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This makes hardware flow control availability configurable from the device tree. Signed-off-by: Frans Klaver --- Documentation/devicetree/bindings/serial/omap_serial.txt | 1 + drivers/tty/serial/omap-serial.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/omap_serial.txt b/Documentation/devicetree/bindings/serial/omap_serial.txt index 342eedd..1b629e9 100644 --- a/Documentation/devicetree/bindings/serial/omap_serial.txt +++ b/Documentation/devicetree/bindings/serial/omap_serial.txt @@ -8,3 +8,4 @@ Required properties: Optional properties: - clock-frequency : frequency of the clock input to the UART +- has-hw-flow-control : the hardware has flow control capability diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 398139a..bff6874 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1597,6 +1597,10 @@ static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev) of_property_read_u32(dev->of_node, "clock-frequency", &omap_up_info->uartclk); + + if (of_property_read_bool(dev->of_node, "has-hw-flow-control")) + omap_up_info->flags |= UPF_HARD_FLOW; + return omap_up_info; }