From patchwork Wed Jun 28 13:59:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 9814363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3804860365 for ; Wed, 28 Jun 2017 14:00:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 273C328569 for ; Wed, 28 Jun 2017 14:00:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A9B32856B; Wed, 28 Jun 2017 14:00:23 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 84B1328569 for ; Wed, 28 Jun 2017 14:00:22 +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: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:In-Reply-To: References:List-Owner; bh=ajuOZk3hDwMml2PbuYIgWlzPTjy91b8osffc2AbV8dE=; b=iet 1cTsDul4wWSTKJiZiCBNSzS3Bbcj05K8iv7Z7o9QQyhjN2L4ZTyFdbPonk5cZnhfzevE4eOtWN4gu JS3wuNez2IafS1y4vXBA4QXQ6HXMIrq3M/Y9uCEXSRKQ9rSNg5385FkyGpw7V1QKTssG3kQMbbPZP dxOyjfd5eoXE0WPAzLe0ZPnmMGQaFEtFdVcuIY59dEireOVvKB+RhLH/nPeyHzjGRQFZVO/HZN1wA hgndqQ0LnVXw8+QlJPuOENXYOnK8Pbd8CIiojKAj9KoT4XQnuyRbnm1x5J2gf9ZbBSdUk9wEbUCVr zbXk+qZCDVNcR6rpqOe9F2VDbaLEP2Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dQDW0-0002Qg-0l; Wed, 28 Jun 2017 14:00:20 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dQDVw-0001Db-Jh for linux-arm-kernel@lists.infradead.org; Wed, 28 Jun 2017 14:00:18 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: rperier) with ESMTPSA id 39612260E09 From: Romain Perier To: Greg Kroah-Hartman Subject: [PATCH RESEND] serial: imx: Enable RTSD only when needed Date: Wed, 28 Jun 2017 15:59:36 +0200 Message-Id: <20170628135936.30537-1-romain.perier@collabora.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170628_070016_812333_023D40BA X-CRM114-Status: UNSURE ( 6.98 ) 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: Romain Perier , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, Nandor Han 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: Nandor Han Currently, this IRQ is always enabled. Some devices might mux these pins to other I/Os, like I2C. This could lead to spurious interrupts. This commit makes this IRQ optional, by using the field have_rtscts. Signed-off-by: Nandor Han Signed-off-by: Romain Perier Reviewed-by: Fabio Estevam Acked-by: Uwe Kleine-König --- drivers/tty/serial/imx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 7327477..5437b34 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1302,7 +1302,9 @@ static int imx_startup(struct uart_port *port) imx_enable_dma(sport); temp = readl(sport->port.membase + UCR1); - temp |= UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN; + temp |= UCR1_RRDYEN | UCR1_UARTEN; + if (sport->have_rtscts) + temp |= UCR1_RTSDEN; writel(temp, sport->port.membase + UCR1);