From patchwork Wed Sep 19 05:28:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10605265 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 7CC225A4 for ; Wed, 19 Sep 2018 05:30:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6806A2B5C6 for ; Wed, 19 Sep 2018 05:30:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65BA62BA05; Wed, 19 Sep 2018 05:30:16 +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 D9C7B2B5C6 for ; Wed, 19 Sep 2018 05:30:15 +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=HJ/RyJH/G4V8eWVz4HaZmCHLRNkhcePswgl1SeleMiI=; b=FjrP6bDEqMSMxBgszY0iNeL84l H5Mym2GdeiQVs/mbkGTS7Jm+ehajg1XZf651Ax+miFM/EU2F683+gxrvV4R4XtoN7JdekaUaLjSiG gGMCR5xLhEcvojx6crA0L9lBRxx/1zARUogubX+sfJ5AkVCIVU+V8Pa0vebZHoiXCRB/enQV659YN EYKoG0Q9uXahM+qluylAP7AM5r2Sw+43Xi1Y7tctLiE3b248HeyrTe05KbFZae2OpL0dR+f3ZDDCw E7lRbBC97zYGToJtIZ8yjrgUlCwwlRcJc/HDFkZzTVJoo+5V2TikqC+kkx664/lRWt5s1rhAeXnzS 8BsuddYA==; 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 1g2V3y-0004dG-8X; Wed, 19 Sep 2018 05:30:10 +0000 Received: from conuserg-09.nifty.com ([210.131.2.76]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g2V3I-0004GL-6F for linux-arm-kernel@lists.infradead.org; Wed, 19 Sep 2018 05:29:30 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id w8J5Sefc016652; Wed, 19 Sep 2018 14:28:43 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w8J5Sefc016652 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1537334923; bh=aj2NTGH4awcML9Bzx/x5Rd2Hsn7+iuu3rhlxtSTWjQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dl0af6H393me43YBwvD4cutxwf5MyhpKTu89gFd/n82ntifDSTARdBaH3CVBMFfVv X2TgQ9+eIZh6Hur1PQreJRuC0D6gt5BNtiwltSDF304NcfZxNqM28nHCmBh0mONhhp zpz2S1hGznFtadgcrQG4u4apQzqGqlonO4D2bFh6RJ3NR0H54hF9ngRtwf7R0zPX2w teOvUHlP8fKDhFQScLxxKG48r2DTxaP4DyHpcXhOWrklw+8xl8pLRJmhR/AQ3Hhyqm s7x1lYel3S3lJcWv9w9p+ixDL0xbcaNvOEKyOHUG7c4AJgm3qn6gbfJlNCTczmurQa BIYMDkJowRbSA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Greg KH , linux-serial@vger.kernel.org Subject: [PATCH 3/3] serial: 8250_uniphier: add auto-flow-control support Date: Wed, 19 Sep 2018 14:28:13 +0900 Message-Id: <1537334893-26079-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537334893-26079-1-git-send-email-yamada.masahiro@socionext.com> References: <1537334893-26079-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180918_222928_521761_01B31E88 X-CRM114-Status: UNSURE ( 9.92 ) 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 --- 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;