From patchwork Wed Jun 26 14:11:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Organov X-Patchwork-Id: 11017957 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 876F5924 for ; Wed, 26 Jun 2019 14:17:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75FE9286F3 for ; Wed, 26 Jun 2019 14:17:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A7EF288B2; Wed, 26 Jun 2019 14:17:10 +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 DC74B286F3 for ; Wed, 26 Jun 2019 14:17:09 +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=9QjjjJBhVvxEOusCEBcXtmTTTScCP+z68IpwtETfuu0=; b=mVr5W4+vucOtRUJTPZ/W264O71 SCcoyOVjOpy56BzNjp33Rqmp7GOdM2Dkw48bvJsa2tlwGCubnvumc6ShJTayBPiQKdGZcst1qy+kB agZ/yXqN+VKucU1GLZiXYh1ATpfqXQ8MMaVklk5jODxTDQbZA+/ZssBWEboZuId7IkMAWszXs9x5G IVtbM4s07qIy+io3NGmG4eSRIITbbDpgQyicmj/E3/8HU+Z+/2Nc0u/EU1q4+kQokBIN55B2efri+ B6loMh3AK76GA6fm0XP9E+XYqyI0k4fWZNeSqwKve1qCcqq2T9dMVdo2sezXpWRGmCh8rM9FqK0wD biREXydg==; 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 1hg8jO-0006rc-Ch; Wed, 26 Jun 2019 14:17:02 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hg8gp-00040Y-Rq for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2019 14:14:25 +0000 Received: by mail-lj1-x241.google.com with SMTP id m23so2356754lje.12 for ; Wed, 26 Jun 2019 07:14:22 -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=disSROzqfUTYpKBNgu+W39ygIWnnZb5HbJrhGeUkuwI=; b=BZj8H7g+wSJU3LS7Okj/+Un4KL2iGuLBDqcdcEdVq5R5tg43lDh8RHDvP8Sjk1tgAg EGPnu5JOWBCXeBM4+Fa6IUVYWxIowJrKn+Y1CXKRDUpeDChs/B1CkGmVDXZakNdU3NIG igwQWHWYjAOErhpFJF7lMMWIDcPk11H10UoxW7atwM3x2CyXcqzaCpndkP1qQZiOcke+ uUtA5tj/61A5V/YvQ12mM2yVqkYxtSN5JST2LKGOf+HX7KnWw5ycCmFylwdhAuLPEpQ8 WrlIQTH3X3fJ924sImugV+iwxzEoqwZ7m82jaLI9XAQd/ZXS7I+8A/0zCvFAhXHSelQ9 ncdw== 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=disSROzqfUTYpKBNgu+W39ygIWnnZb5HbJrhGeUkuwI=; b=IhiZFnjBW3muPpMWoEfdDAJuraxthZ6ShzqMB0AkmbHUVC/QZ4stD7xq5/GPbIKijy k4izOdvS/9gE8IzVor4IxF5+ZVFENMeMQGYUKDYWKGp//KAD9KEbasAbIxW0AdKBbc2o LslBykXZmk3/oxZTMlikj80ZKKIhOOKzALR3FdBpmKh3+IVgUBH6HtPLv9Gow7qwkvO9 5LZL5RNSXsBFiI9QNJ+l251ZX0PnLfD7Qr1un+dm0fv8h/IdzU3kIG6BuU0RER2rkbLl RhLWHq7IeWI0Qf+exmnqAXU/wA1aIaPjmBLCT091a6CSioKuQyxdMY4z2KfacVgU9iPi NYaQ== X-Gm-Message-State: APjAAAWZo3BkGYSLHFMe8FoEBz/q41wP7Gwq1ck1dQKiJv75qluPx3sf RKaMwadBeD7YwRzaURMFEqM= X-Google-Smtp-Source: APXvYqzQ3GQSF/ngOsv3mi41ox5k13SoEkk3vZAxzYGrp0VMn7mMceHw0FTkyiuSkMxqLHYFdZ3q9Q== X-Received: by 2002:a2e:988b:: with SMTP id b11mr3080348ljj.110.1561558461628; Wed, 26 Jun 2019 07:14:21 -0700 (PDT) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id 25sm2863825ljn.62.2019.06.26.07.14.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Jun 2019 07:14:21 -0700 (PDT) From: Sergey Organov To: Sascha Hauer Subject: [PATCH v2 7/7] serial: imx: get rid of imx_uart_rts_auto() Date: Wed, 26 Jun 2019 17:11:33 +0300 Message-Id: <1561558293-7683-8-git-send-email-sorganov@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1561558293-7683-1-git-send-email-sorganov@gmail.com> References: <20190614072801.3187-1-s.hauer@pengutronix.de> <1561558293-7683-1-git-send-email-sorganov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190626_071423_931282_FE60C212 X-CRM114-Status: GOOD ( 12.05 ) 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: Pengutronix Kernel Team , NXP Linux Team , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= 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 171347d..a5e80a0 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) { @@ -1598,8 +1591,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;