From patchwork Fri Sep 28 02:05:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10618873 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BAF1C16B1 for ; Fri, 28 Sep 2018 02:08:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A743B2A597 for ; Fri, 28 Sep 2018 02:08:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BC1A2A6FD; Fri, 28 Sep 2018 02:08:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D91C72A597 for ; Fri, 28 Sep 2018 02:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=pQh30Acz9KsI353nvgopPOjrgJqCisai8L73dV2V/0Q=; b=pOv00NAQH2pD+HaccqsNZu8Rer UKhDRDBxznNoETor0JKiYpOuEHFFfO0YVc09EX6aF9m2qAv6lQ8b4sqFGyGvBvyXb4fw2JP0iMkQr TkSy3am+D8o96Zk4v+wzEmQX3YubWPmRrhZoU04KDkN5+2HcOftslRqitkOCbKayIo1U/FW0mf7Pw N6f7/uAPU7SZU+0MSNqhKemhz66b71Srd7DyT12S1Y36QE/k37QBmlEGhbPje9hrXxPh/TtfmdwkW NMY3GUuxs3T0+qjmbWUhEXTnDTtMdhjl5dmx2PpSu5fSyy8TyfOHfbcp66B4pUrnrBaUuk3c3Ew8Y t6YndogA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5iCK-0007NL-KZ; Fri, 28 Sep 2018 02:08:04 +0000 Received: from conuserg-11.nifty.com ([210.131.2.78]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5iAg-0006nq-4v for linux-arm-kernel@lists.infradead.org; Fri, 28 Sep 2018 02:06:26 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id w8S25FOh028340; Fri, 28 Sep 2018 11:05:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w8S25FOh028340 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1538100317; bh=qrMl6WEtjLnR57tbyGnjTHcU0qOzQwOlqOxyoz9Z1G8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kw0tkYeKZoLQhNC4UPqrgHnswyDQ41sQrfkYanwisfO2q5GXgHb5K9RgKh7AGr9WK kKRxTJZJXdrzR4S3MlzO7IeNNnrhhpF/tcCDNs+PcSyv+N98rH+UskFZ0HjXsFu+YO YOrsUHlJM563wgDMa81wdQdsQ5jR48RFVceZDK9vK6QH6NcUf28Cy0iIZXUC9/sP/S MThGsWVwG47gdIfUVKEegIUKHUXEpOwMqwoCr65KBOGZAiyIw3eriyax5doNRAJtXW EHMga9BgaB3U0Jpk53O5BoGOgRmh4FeGTcwC9fxStz/Ou+n5qs+xq79HU7yZxBl9Ug xs2facKDqC8Yg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Greg KH , linux-serial@vger.kernel.org Subject: [PATCH v2 1/3] serial: 8250_uniphier: remove unused "fifo-size" property Date: Fri, 28 Sep 2018 11:05:07 +0900 Message-Id: <1538100309-24323-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538100309-24323-1-git-send-email-yamada.masahiro@socionext.com> References: <1538100309-24323-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_190622_574734_2976EBEE X-CRM114-Status: GOOD ( 12.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dai Okamura , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Rob Herring , Jiri Slaby , Mark Rutland , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The FIFO size of the UART devices is 64 on almost all UniPhier SoCs with the exception Pro4TV SoC (MN2WS0235), which used 128 FIFO size. However, Pro4TV SoC was never upstreamed, and out of production. So, this property has never been used in a useful way. Let's remove old unused code. Signed-off-by: Masahiro Yamada Reviewed-by: Rob Herring --- Changes in v2: - Fix the product code in git-log: MN2WS0230 -> MN2WS0235 Documentation/devicetree/bindings/serial/uniphier-uart.txt | 4 ---- drivers/tty/serial/8250/8250_uniphier.c | 10 +--------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Documentation/devicetree/bindings/serial/uniphier-uart.txt b/Documentation/devicetree/bindings/serial/uniphier-uart.txt index 0b3892a..811c479 100644 --- a/Documentation/devicetree/bindings/serial/uniphier-uart.txt +++ b/Documentation/devicetree/bindings/serial/uniphier-uart.txt @@ -6,9 +6,6 @@ Required properties: - interrupts: a single interrupt specifier. - clocks: phandle to the input clock. -Optional properties: -- fifo-size: the RX/TX FIFO size. Defaults to 64 if not specified. - Example: aliases { serial0 = &serial0; @@ -19,5 +16,4 @@ Example: reg = <0x54006800 0x40>; interrupts = <0 33 4>; clocks = <&uart_clk>; - fifo-size = <64>; }; diff --git a/drivers/tty/serial/8250/8250_uniphier.c b/drivers/tty/serial/8250/8250_uniphier.c index 28d88ccf..d292654 100644 --- a/drivers/tty/serial/8250/8250_uniphier.c +++ b/drivers/tty/serial/8250/8250_uniphier.c @@ -12,9 +12,6 @@ #include "8250.h" -/* Most (but not all) of UniPhier UART devices have 64-depth FIFO. */ -#define UNIPHIER_UART_DEFAULT_FIFO_SIZE 64 - /* * This hardware is similar to 8250, but its register map is a bit different: * - MMIO32 (regshift = 2) @@ -185,12 +182,6 @@ static int uniphier_of_serial_setup(struct device *dev, struct uart_port *port, port->uartclk = clk_get_rate(priv->clk); - /* Check for fifo size */ - if (of_property_read_u32(np, "fifo-size", &prop) == 0) - port->fifosize = prop; - else - port->fifosize = UNIPHIER_UART_DEFAULT_FIFO_SIZE; - return 0; } @@ -241,6 +232,7 @@ static int uniphier_uart_probe(struct platform_device *pdev) up.port.type = PORT_16550A; up.port.iotype = UPIO_MEM32; + up.port.fifosize = 64; up.port.regshift = UNIPHIER_UART_REGSHIFT; up.port.flags = UPF_FIXED_PORT | UPF_FIXED_TYPE; up.capabilities = UART_CAP_FIFO; From patchwork Fri Sep 28 02:05:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10618893 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 21C6C15E8 for ; Fri, 28 Sep 2018 02:24:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E7A02B2B2 for ; Fri, 28 Sep 2018 02:24:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 021F32B2C5; Fri, 28 Sep 2018 02:23:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A85D72B2B2 for ; Fri, 28 Sep 2018 02:23:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=n4pH0jJWb0ScRBwCBjpxUybDDiMAj0jmGZtWNFPYUAI=; b=lscfZ7mMcDJt9k3dIOZT0kw8Ck CR9lNDf1D5qcJrzu7j28DRcbLi6+WpgSlMdvXciSN3UDS4JMvafd1OfwdfEvWV74BjSbNIbI2vXMM QojJ30ZS25V5xSif6KUkNXrcvM2UyEqCkqr3nxAGWZHD3P2hYGjX6zpds3xHf7dlPwu3u8kkpuOVz xkdaO8FyCwNsP3HG/VBrEyvxkyh+E8GvSko5sqjvJ0fmKkiCNZjiRDrmnbt7jzN6iIoh088m3nZMh nk7t1i8PMxz7G8nSFZxJRBkPColO+X6bVS7cS0bXlXMXKzzzWnE80pOJKRNKGete6UlbUKXCg6zqT 6MlcEmIA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5iRY-0004vb-Hn; Fri, 28 Sep 2018 02:23:48 +0000 Received: from conuserg-11.nifty.com ([210.131.2.78]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5iAh-0006nE-7o for linux-arm-kernel@lists.infradead.org; Fri, 28 Sep 2018 02:06:26 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id w8S25FOi028340; Fri, 28 Sep 2018 11:05:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w8S25FOi028340 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1538100318; bh=EqRd+5cNk7+zWbyynhC051ZQ8Ujg1qu2ddHKUFsjyCw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XR3d8tChezqibpT4U9CJDIOLWdsJu1U9Ln9/lSMWkywsG332w807gZURAEEABpKak aQIkKD5QAtQ6cYydan6wUR+UY8JDsQj6VtQGT/exQAWOFv+45ixXl0Ru06sUtNRqj9 M7t5jtRWjN+/GAfppNRtNnsF1w+k3C81nn1EhMNNgwvCWqVP5s4F4o6Lvgeo8mvbFF 3NwdIOR8JiiQOgwypsfZRXIJaGX7b2oP+qWHmQtSoM+p5R37+KqYSVgLFvajagWoWs 5lojyAofueRj9Qwobz/AJ7F8Uu9JmczT7e+AtLCcGEMJTs9B0FychgtVc5eHg7rduZ 4FiKDMe8GTEHg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Greg KH , linux-serial@vger.kernel.org Subject: [PATCH v2 2/3] serial: 8250_uniphier: flatten probe function Date: Fri, 28 Sep 2018 11:05:08 +0900 Message-Id: <1538100309-24323-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538100309-24323-1-git-send-email-yamada.masahiro@socionext.com> References: <1538100309-24323-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_190623_517869_ED820725 X-CRM114-Status: GOOD ( 13.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dai Okamura , Masahiro Yamada , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jiri Slaby MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, the DT-related settings are split out to uniphier_of_serial_setup(), but it turned out to be not nice. The next commit will add a DT property, but it will not fit in the helper. Merge the helper into the probe function. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/tty/serial/8250/8250_uniphier.c | 49 ++++++++++++--------------------- 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/drivers/tty/serial/8250/8250_uniphier.c b/drivers/tty/serial/8250/8250_uniphier.c index d292654..1028c02 100644 --- a/drivers/tty/serial/8250/8250_uniphier.c +++ b/drivers/tty/serial/8250/8250_uniphier.c @@ -155,36 +155,6 @@ static void uniphier_serial_dl_write(struct uart_8250_port *up, int value) writel(value, up->port.membase + UNIPHIER_UART_DLR); } -static int uniphier_of_serial_setup(struct device *dev, struct uart_port *port, - struct uniphier8250_priv *priv) -{ - int ret; - u32 prop; - struct device_node *np = dev->of_node; - - ret = of_alias_get_id(np, "serial"); - if (ret < 0) { - dev_err(dev, "failed to get alias id\n"); - return ret; - } - port->line = ret; - - /* Get clk rate through clk driver */ - priv->clk = devm_clk_get(dev, NULL); - if (IS_ERR(priv->clk)) { - dev_err(dev, "failed to get clock\n"); - return PTR_ERR(priv->clk); - } - - ret = clk_prepare_enable(priv->clk); - if (ret < 0) - return ret; - - port->uartclk = clk_get_rate(priv->clk); - - return 0; -} - static int uniphier_uart_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -217,9 +187,24 @@ static int uniphier_uart_probe(struct platform_device *pdev) memset(&up, 0, sizeof(up)); - ret = uniphier_of_serial_setup(dev, &up.port, priv); - if (ret < 0) + ret = of_alias_get_id(dev->of_node, "serial"); + if (ret < 0) { + dev_err(dev, "failed to get alias id\n"); return ret; + } + up.port.line = ret; + + priv->clk = devm_clk_get(dev, NULL); + if (IS_ERR(priv->clk)) { + dev_err(dev, "failed to get clock\n"); + return PTR_ERR(priv->clk); + } + + ret = clk_prepare_enable(priv->clk); + if (ret) + return ret; + + up.port.uartclk = clk_get_rate(priv->clk); spin_lock_init(&priv->atomic_write_lock); From patchwork Fri Sep 28 02:05:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10618869 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DC10416B1 for ; Fri, 28 Sep 2018 02:07:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9F7D2B592 for ; Fri, 28 Sep 2018 02:07:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDC962B599; Fri, 28 Sep 2018 02:07:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1B9E32B592 for ; Fri, 28 Sep 2018 02:07:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=9d/Pgr5T+D/gUCQ1tAIHdyCgz6ogdk6ZJla1/lD3D5M=; b=egEBpYREVinhan68kLYeKhdzSy gswcKV0gn4Xil9AjIPdbvLkOkaDq7/1EBSGrMlwMiEY/dZyOcJdDmQuwhSuviJs5zJzyuUJ9jmoF+ kEtNFgS5u6t9DwMdf1gY/KppWKryy6MKNf4rmffpY/MGLrgf0G9DRE5vQj2FI1SWGzBFfV0mRreFU FEsInJne+j8um/eShBKT1YwzYyuK6sJlyg3p2BZecpszU+eGQ/2funZxCm2DH4FrXRto1t4421ZM9 RhKjrk3mjaSTwHxYk9BGRSq/HtQYs34W1zxoMry6XgYqkzIyr+/3RqjxAyxSrB6X2zsHF9EgW5/rq dMqkn9Pw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5iBe-000731-S7; Fri, 28 Sep 2018 02:07:22 +0000 Received: from conuserg-11.nifty.com ([210.131.2.78]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5iAg-0006no-6w for linux-arm-kernel@lists.infradead.org; Fri, 28 Sep 2018 02:06:24 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id w8S25FOj028340; Fri, 28 Sep 2018 11:05:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w8S25FOj028340 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1538100319; bh=XGojrsnwjAgD51xEtjfEzPRhMtXDHakaoCtK5KRPciE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PMvvxtX2zfqvSn4GuMotZUyjSUP6Yl+KPKnBx4fSAaW8vu5tNNNW91TeEZfv5iD1g 3G/nF17QbN2LmjADjlA1EdGsECT4mRWA9lSSVfXR0ev4iOM0/grwCnfzp21yhilHY4 kCo0vak6PhGA8ib66d05UIKlFAP8qXudND27ugo4PqtMEcF9//RCNhunxpo4UYUezj Jf+3lEobltnT+SxLyMmQq4ZBsLHTc8f3Cx5KGorFoXlXVE+9F72Z71qy5yetN8Oani wgefCxh2tvNKQ4HM7OStThdt3pFs02bNcKnkTE1s2yuNrRhnjqkMnMWrwgSYflXBw0 rDtVN8E0xTXsw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Greg KH , linux-serial@vger.kernel.org Subject: [PATCH v2 3/3] serial: 8250_uniphier: add auto-flow-control support Date: Fri, 28 Sep 2018 11:05:09 +0900 Message-Id: <1538100309-24323-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538100309-24323-1-git-send-email-yamada.masahiro@socionext.com> References: <1538100309-24323-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_190622_571512_535D5DAC X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dai Okamura , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Rob Herring , Jiri Slaby , Mark Rutland , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dai Okamura Add selective auto-flow-control support for UniPhier serial driver. Signed-off-by: Dai Okamura Signed-off-by: Masahiro Yamada Reviewed-by: Rob Herring --- Changes in v2: None Documentation/devicetree/bindings/serial/uniphier-uart.txt | 3 +++ drivers/tty/serial/8250/8250_uniphier.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/uniphier-uart.txt b/Documentation/devicetree/bindings/serial/uniphier-uart.txt index 811c479..7a1bf02 100644 --- a/Documentation/devicetree/bindings/serial/uniphier-uart.txt +++ b/Documentation/devicetree/bindings/serial/uniphier-uart.txt @@ -6,6 +6,9 @@ Required properties: - interrupts: a single interrupt specifier. - clocks: phandle to the input clock. +Optional properties: +-auto-flow-control: enable automatic flow control support. + Example: aliases { serial0 = &serial0; diff --git a/drivers/tty/serial/8250/8250_uniphier.c b/drivers/tty/serial/8250/8250_uniphier.c index 1028c02..164ba13 100644 --- a/drivers/tty/serial/8250/8250_uniphier.c +++ b/drivers/tty/serial/8250/8250_uniphier.c @@ -222,6 +222,9 @@ static int uniphier_uart_probe(struct platform_device *pdev) up.port.flags = UPF_FIXED_PORT | UPF_FIXED_TYPE; up.capabilities = UART_CAP_FIFO; + if (of_property_read_bool(dev->of_node, "auto-flow-control")) + up.capabilities |= UART_CAP_AFE; + up.port.serial_in = uniphier_serial_in; up.port.serial_out = uniphier_serial_out; up.dl_read = uniphier_serial_dl_read;