Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2943334imm; Thu, 24 May 2018 19:34:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp3+yNcpW2GzAkpjQ8PgZSjJhw9kDL8Z/2XzmXov4DXXEy24BfJzxJeaSCEumG5mLRdwvuc X-Received: by 2002:a63:6dc3:: with SMTP id i186-v6mr467161pgc.316.1527215697276; Thu, 24 May 2018 19:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527215697; cv=none; d=google.com; s=arc-20160816; b=ch12xRgZOuvYzyh5CDBlogj3IiW3aQk53YrB65PkBIsYs2oY1p6lmvBvqC1rBWLm4p lDBftvWOkGTVhOrSiNCCroKlYp/e+HhIYbP9Ygugimg3DTm2WTbnLvS74ZRRjd8ua2ON EMAbVAF76UoLXp2kiG8pZcbIbGJJfJ0EJAomix8+8l/gfRX2b/KK14Vth2/QkAajurcg 3szB/SpFJSG8k7b4Cw/IG4r3rKzEvMnDAgq85OYieEgnvonaiVa30nDsV+7xiT4/mXET gfHEAaBw/cGtkMgm8hGLiaqGuGSrcnsbWNVlEjaWY9PBni0X4jfiyCk771V7pjZFVmjI QclQ== 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:arc-authentication-results; bh=ibvsuG7dLFeuNe3MrYulT85TGahEbxDyg5k+u7GkDdA=; b=QItSSxrDbyEfjOBurJzjVW3KDWiLqI+0U5usjadXr97DfMFdHoCkzRRTSCEE/DdIJ3 yeg9culKoNdsZS5SgvW49I3pMNQx4C937aqlKXBk6cex2S2zU75/wuLrOhNgOk2Clpt0 lfuXWN22nJoq/Za2lLTwaixDM/pywxdFr10o3hEHWV+e7FhLTgYJUonVERByQarPTsK6 u9PoWDrlPYeKFSu2UDz1NvpNZH50tYLucH8QDqnL/4WlsDjkQimJqJ/MCKyyNtlO9XAR vEad3OJjuyPqMfNKmFAtY7OGAqE63i3dbSWCe/3osH2BQ4Asoz8aG+EdSVipnNMNjfGh HbAw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1-v6si21741959pld.152.2018.05.24.19.34.42; Thu, 24 May 2018 19:34:57 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966592AbeEXRak (ORCPT + 99 others); Thu, 24 May 2018 13:30:40 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:52436 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966512AbeEXRae (ORCPT ); Thu, 24 May 2018 13:30:34 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 4BF74286EC4 From: Sebastian Reichel To: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org Cc: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Fabio Estevam , Shawn Guo , linux-kernel@vger.kernel.org, Sebastian Reichel Subject: [PATCH 2/2] serial: imx: disable UCR4_OREN on shutdown Date: Thu, 24 May 2018 19:30:24 +0200 Message-Id: <20180524173024.20936-3-sebastian.reichel@collabora.co.uk> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524173024.20936-1-sebastian.reichel@collabora.co.uk> References: <20180524173024.20936-1-sebastian.reichel@collabora.co.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org UCR4_OREN is (depending on the configuration) enabled in startup, but is never disabled. Fix this by disabling it in shutdown. Reported-by: Nandor Han Signed-off-by: Sebastian Reichel --- drivers/tty/serial/imx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index a0fc0327c8a5..31e1df8a8d29 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1422,7 +1422,7 @@ static void imx_uart_shutdown(struct uart_port *port) { struct imx_port *sport = (struct imx_port *)port; unsigned long flags; - u32 ucr1, ucr2; + u32 ucr1, ucr2, ucr4; if (sport->dma_is_enabled) { dmaengine_terminate_sync(sport->dma_chan_tx); @@ -1452,6 +1452,10 @@ static void imx_uart_shutdown(struct uart_port *port) ucr2 = imx_uart_readl(sport, UCR2); ucr2 &= ~(UCR2_TXEN | UCR2_ATEN); imx_uart_writel(sport, ucr2, UCR2); + + ucr4 = imx_uart_readl(sport, UCR4); + ucr4 &= ~UCR4_OREN; + imx_uart_writel(sport, ucr4, UCR4); spin_unlock_irqrestore(&sport->port.lock, flags); /* -- 2.17.0