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: 147753 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp158955lji; Thu, 27 Sep 2018 19:06:38 -0700 (PDT) X-Google-Smtp-Source: ACcGV62S7drGsiySVBS6VKD3BVSFPiLNe4zuZIvBRCY86AjiMyot1LZIA42ECzDIwK9PPyqnC/kg X-Received: by 2002:a17:902:7796:: with SMTP id o22-v6mr13832374pll.5.1538100398046; Thu, 27 Sep 2018 19:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538100398; cv=none; d=google.com; s=arc-20160816; b=oWrEW438FTZnLx4CNLu4qHwu03vScVPWkVnaz7uIaUWcHeH8aJ87jGg7sKnymlEvK7 Qt2uIM2zzFOKaQVDfDKVZOltqMhP1S6Q0yQ74GDVJsN5+u0CG0yckiVv9qd3PRVcMBdC 1WUS9Fk6upIfNDxEXw0IosgWRAOQU7Y17+rE8B4/pHOW9264gj7FOnUS/QazxoRp80xr a2+BTx6r2q9shGoVh/mk1SX3SPzf33LFa86vCHYIVsSFx3QlDiHFlevOhj/8h4aPHRiZ dNgbqD4lZA9DvvECnF4N39KMnBxyqv40yFpPieDMZHKETYpllbV1XtFAd4lhBwQ5EJbJ Z0gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=XGojrsnwjAgD51xEtjfEzPRhMtXDHakaoCtK5KRPciE=; b=yz92Az7JcxTlHhV45Hrsdy/PWMX5er0HnXak8nMIr46sPm5u+mDiPRc1KTsbLKxX+P hemyVq2zcHW2oStW1jMgpuX3LZA5z0qbJt8Y6+1NQci7NW4tu+c6LQFswpHndhRxflLq 2HgAsep+nqt8kKyD7lnzTE8yfdOgLriLskNVGLUDdAVTKPMiA2L7ZVDPmKpKX0ZRBD0C gjFCden0P3uox2NeSumdRERSldvDHumzSHbzvrMI+UfBQS9PjW4NOSRASzu2tbncWh35 uCKJwX0CguPpEYv3D/SgE8pLSwfgRKAMqfqHHtYZrWDlJVqQDkjkmTMGxk4dUbgfKQn0 lXkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=PMvvxtX2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z63-v6si3558764pfi.214.2018.09.27.19.06.37; Thu, 27 Sep 2018 19:06:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=PMvvxtX2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728805AbeI1I1x (ORCPT + 32 others); Fri, 28 Sep 2018 04:27:53 -0400 Received: from conuserg-11.nifty.com ([210.131.2.78]:52925 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728640AbeI1I1w (ORCPT ); Fri, 28 Sep 2018 04:27:52 -0400 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 Cc: Dai Okamura , Masahiro Yamada , devicetree@vger.kernel.org, Jiri Slaby , linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland , linux-arm-kernel@lists.infradead.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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 2.7.4 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;