From patchwork Fri Jul 19 08:47:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Organov X-Patchwork-Id: 11049879 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 3CD4C13AC for ; Fri, 19 Jul 2019 08:49:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 288D128884 for ; Fri, 19 Jul 2019 08:49:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1910628891; Fri, 19 Jul 2019 08:49:17 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 B4F7128884 for ; Fri, 19 Jul 2019 08:49:16 +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=K81xGfiIu15nDH2adAXukXkKeKseHA2U5zmTYJgaxrE=; b=HGVY9LAv+h2hPOBHy5z/LDkBvW C2dlxmHJhc2vN/rzwjEgO2+ZAxKg6zQ4wJxij1vIHxeBROX7NDkw1avsuqs6tAmXuZemTCMXXpuEH eyQWyPTe6XEzJlTpZWzTvjFvwp9z73V8K1NDTLENgsuCuSnPYEDqsD63o8NgqLiuKooOfzLvcxpDL lTOj7LjIoUdzU2ORcFKeCEuvCgdhF/rR1eP5uPNvnK8G1qqD8r0iYZB7WZq91/UFaK85inTG7BWf+ vgIqeesFTBKluGLQYMMdDr/YXp+EvVloltgjWcD9NJCC81rtF/XbJkz0vLP4XPdl86YR2wnlls/pL ejCHb4wg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hoOZo-0001By-CW; Fri, 19 Jul 2019 08:49:16 +0000 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hoOYq-0000GT-2P for linux-arm-kernel@lists.infradead.org; Fri, 19 Jul 2019 08:48:17 +0000 Received: by mail-lf1-x142.google.com with SMTP id x3so21271762lfc.0 for ; Fri, 19 Jul 2019 01:48:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vPaPaQoPXlJZwdHwp0bhNLbGscClA6YVVkEeKURmVW4=; b=smbmTh1A6Yw9XjULzYo/FESKMEByPHQNYky63gTE1YuUnHHbhD9hNK4Ekf/uIWsq01 3PdPDMS5BLoy7w1hValHSCBbolbM8c0LSZ8eNKyk5scGe7jf7+nQqgIUx1EORHSc1yab f+UEFPHgjH3BPfJIT62ueFbe1zYxxfdu639p60AUB/wCs8PUBzVwiEIeBfwOFtW9i28M 99ZUgOkSOoa6k+ADPR2omVa7HgkQBHJ0Y7lFVM5T2jKVEjwCVIwDaGSnOjMKZHzY3wPk 5/eNOltdhzZvSlWA8TbA74udGsdr6cy7UKgjSloAqCzAsOmjMaeSO7D+lpg2ZwLYBfrF ykZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vPaPaQoPXlJZwdHwp0bhNLbGscClA6YVVkEeKURmVW4=; b=qWBYj+ssFgKkXcn9y5FdAqo+XyhvlvVAzGJP8AF6b6tXXNPpYR97ee5LyJ0PLG/nlR Zw4MN21Jg2xtINmTLcMjOVnNhxXhnUZjAfg5e8iBT8hHmweSQ4SN8pwRx2695CUm8e7w RjR+Y6kVD2oN4eJAX5Ji3ExPuqEwGxiLQZN51OVk7rsFNNGivpzJEhVLBFLCEtv8DZmf LZJP+jhE8nVOG0cSEKM8xNPhWD5ba9a7Y2MBxwYSDlIGDxQmxtWi4iIcO46ZeGqZLxub QPeOHE16VzW8gf63snZYXv8ILopMBYZgQssfQJ9iCr5v5C9tTEHGG6CY2RSDoFYx0za6 mu4Q== X-Gm-Message-State: APjAAAXbbk1RzlWckQRtOCUfI6BO+ZJx6ayxW4Dalb6FiXjmNtTwuKRX 1OiopLp+rou7qVAmZJhvhNU= X-Google-Smtp-Source: APXvYqzJc9wKIhSihgDlx/Cxa8rzGW8B2MmBHeLQNzEdeSH3A4tyY90LTregA77XzXRjsX1TLmoyqQ== X-Received: by 2002:a19:80c4:: with SMTP id b187mr22607365lfd.122.1563526094479; Fri, 19 Jul 2019 01:48:14 -0700 (PDT) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id s21sm5588742ljm.28.2019.07.19.01.48.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Jul 2019 01:48:13 -0700 (PDT) From: Sergey Organov To: linux-serial@vger.kernel.org Subject: [PATCH v4 3/3] serial: imx: get rid of imx_uart_rts_auto() Date: Fri, 19 Jul 2019 11:47:54 +0300 Message-Id: <1563526074-20399-4-git-send-email-sorganov@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1563526074-20399-1-git-send-email-sorganov@gmail.com> References: <20190614072801.3187-1-s.hauer@pengutronix.de> <1563526074-20399-1-git-send-email-sorganov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190719_014816_123422_FBA99645 X-CRM114-Status: GOOD ( 12.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , Sascha Hauer , Sergey Organov , NXP Linux Team , Pengutronix Kernel Team , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , 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 Called in only one place, for RS232, it only obscures things, as it doesn't go well with 2 similar named functions, imx_uart_rts_inactive() and imx_uart_rts_active(), that both are RS485-specific. Reviewed-by: Sascha Hauer Tested-by: Sascha Hauer Signed-off-by: Sergey Organov --- drivers/tty/serial/imx.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 34d61c4..971055b 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -402,13 +402,6 @@ static void imx_uart_rts_inactive(struct imx_port *sport, u32 *ucr2) mctrl_gpio_set(sport->gpios, sport->port.mctrl); } -/* called with port.lock taken and irqs caller dependent */ -static void imx_uart_rts_auto(struct imx_port *sport, u32 *ucr2) -{ - if (*ucr2 & UCR2_CTS) - *ucr2 |= UCR2_CTSC; -} - /* called with port.lock taken and irqs off */ static void imx_uart_start_rx(struct uart_port *port) { @@ -1600,8 +1593,10 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, else imx_uart_rts_inactive(sport, &ucr2); - } else if (termios->c_cflag & CRTSCTS) - imx_uart_rts_auto(sport, &ucr2); + } else if (termios->c_cflag & CRTSCTS) { + if (ucr2 & UCR2_CTS) + ucr2 |= UCR2_CTSC; + } if (termios->c_cflag & CRTSCTS) ucr2 &= ~UCR2_IRTS;