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: 147755 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp159031lji; Thu, 27 Sep 2018 19:06:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV60fIolkepc8rgsSZt0mcYeHyiMZhhQWSr9U+ThDXSNZLCWjuySa0NBcK9pzEbhCbnVBUYXM X-Received: by 2002:a62:3942:: with SMTP id g63-v6mr14423061pfa.170.1538100404237; Thu, 27 Sep 2018 19:06:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538100404; cv=none; d=google.com; s=arc-20160816; b=E5+Sf/fz2ybGyoc/hzMVdmXIp9isgdMVpW3UFIGnIHXJsXUcerhHKjtYsfUdPC1UkQ SnokbSuBrPZDHGllzJWi8uco90/bAOPC1e9DxqVBelwKH73n/s0ciOxruZaUHJuC9F1n +V7Ov9eUUgKpAQO39kPbosOIkMlDC6xXUgfwl5bHzwdzPgvntiHirJ/h34OYTCDDvJ/3 UUp9r0KJu/ZYyoQr1DlXsMNfFpnyZrHsmKy07Z2EddUw56G7qkivDgbujjRVOxtd+B4o UABc0irufs7HpOphoD3fSWMMU/7s8jNNBr9G6U4YIPXcBEJ99Z8HuMXcKMd2OdQIIR+B B6WQ== 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=qrMl6WEtjLnR57tbyGnjTHcU0qOzQwOlqOxyoz9Z1G8=; b=k4fczgEgWEGXD1+tQSAToZLyyfW/Plda7Gmyx1//lLZ44iSCk5xRuKve27urovTHN8 pBuTNsJNgfiXdtZ9W2vICRf3H9vg7WDGTv0su5HV/vUT0ZQKpLg60c5+VDzS6AzkI9gJ clYzw4AshzdeFAuXzfAn9pwbrLQABs9g/Eh2xx3l5M1Xt5ies3zZu01RWywYq7UuSAaG gxR2sVTddI01e8XHvRnO/Km+j2NAhVHBN/9Ga8Y9YDLvo98kmD6dxduBfJy3N1HSvWQI 20uiRUPo2KGKn5+SXIW3IOekd1BMzKmgrwOn2X+WUqn3g4RyfCxLTFeQYWtmuw6s8V2c 8NXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=kw0tkYeK; 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 h36-v6si3275175pgm.125.2018.09.27.19.06.43; Thu, 27 Sep 2018 19:06:44 -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=kw0tkYeK; 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 S1728830AbeI1I2B (ORCPT + 32 others); Fri, 28 Sep 2018 04:28:01 -0400 Received: from conuserg-11.nifty.com ([210.131.2.78]:52955 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728665AbeI1I1x (ORCPT ); Fri, 28 Sep 2018 04:27:53 -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 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 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 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.4 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: 147754 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp159027lji; Thu, 27 Sep 2018 19:06:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV60vOaJsiEo6CiFMRjq37u9+cDcD3GoQGLauuV9t0+SuxORAV6/fQtch9FQvp+5rSySP4u7z X-Received: by 2002:a62:4dc1:: with SMTP id a184-v6mr14217415pfb.5.1538100403885; Thu, 27 Sep 2018 19:06:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538100403; cv=none; d=google.com; s=arc-20160816; b=pViuBR2UCGNAl7isqDdnDLWugZyOUHAJo5zdJ9z8IpKxpP2f5S443HOYG/FoU3fMwz ib37g2QRJRrZhI7Lqne7Z4iNQqMCgF6/CqR1pgD4TrwlPNqxnvaln7PZFIdg2Lzuc5lp FolsYV8XGEwnmU+e1Q6zYGP84yrIWZtouXNpLpj9Vt5Fz/SFvKKlprO9Y4BN7bkvy0aV hILsqp9byRS88PoG+zFgfhsQoP5U++QB6RsdpyfoHE/a6b8ovM6B1Ljz4sGA8ulEVfqS 6nbltCZ2IYZg8ESp3X6BCmG1nBdpk2nMFtgc0K9OA+eQJP9XpYtV9lFS0e4lKidqB0b4 M3ZQ== 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=EqRd+5cNk7+zWbyynhC051ZQ8Ujg1qu2ddHKUFsjyCw=; b=hM08XdKlkNOnC0jg+Kc7ZXLSYzeZnA3R+DFPcl7hKb9bsS/i/3hGM0qxzfWyRaoPMy Txs+JhbomN1YjPrOTztgQjR82knV6bDIHW5olH/uF9OJtWiaL3o9X7l6g8w0Sqbg+NwD rQodY56oIDwlC4dZ73WaC1pUaam/HTfqE1H0mXzWLosFyGKBHlcpjllIaCHhMdYpVcsO ABo4mKnpFGsxsVzBc+1d14Ns5AXUWd3ZcUT3UzOekItnGnzzlqEltkGsbNRLNyw+PsPy e9mSLpUt4k4dnsTC3uFNdXvkv/kTCygoTzE8/pppQyKLQ+/E8vhtYfXBL3JJOHtxK9vo 7K3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=XR3d8tCh; 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 h36-v6si3275175pgm.125.2018.09.27.19.06.43; Thu, 27 Sep 2018 19:06:43 -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=XR3d8tCh; 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 S1728767AbeI1I1x (ORCPT + 32 others); Fri, 28 Sep 2018 04:27:53 -0400 Received: from conuserg-11.nifty.com ([210.131.2.78]:52928 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728643AbeI1I1w (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 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 Cc: Dai Okamura , Masahiro Yamada , Jiri Slaby , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.4 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: 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;