Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2943285imm; Thu, 24 May 2018 19:34:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoUpVCYC5HE7Uav0c3z9JNdiZKxHgCMbh6TWOP0Ex2DkxkDUeP3uf00eOKoZwy4lLGhsCVA X-Received: by 2002:a65:410d:: with SMTP id w13-v6mr444270pgp.111.1527215693389; Thu, 24 May 2018 19:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527215693; cv=none; d=google.com; s=arc-20160816; b=wj8Atyqr0GT4IJZMEykl/o48FqYd0/PfRrtI0WsOEgDmcpHB0HVVRYOKzqOPKdvm+U bSBD9/V54Knxq57j0lZ8Dec7iQeTJMqMivLUZjBhf97Orxg/nKRllrOSjUTtuBCG/W7c +NhkltNYZHvVN464rxYX7+hDBgnPPTd6PU5aNVJCBFU3j7KsM8Z65ToFgu79dKbirien vVwd6ypnkaBE8Yi6Xfqycr0sOqDPt0lBZaFSWaKXLuAcKO6sKAlR5RUJbt7Dgm94rIHX /PBL17UXD163N6J/k+5pWrx+Mo2p9gBRM6RLoys1xIKoqIQWi/RzPdobDHzSMkkrgDq2 qb8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=QuUGUyn+TwpFB+2d0k7jAmm90N/dw5/HD+EbVsr2Smg=; b=OCBhsl6PmDmhEw+YNDKXTmE36hTA/pJSi+pwOu9MK2qZQYryKgoZX5Qwguiw02JjSC uPBh643h3SFgRmSj+zrwaDeFCW528xE4P+y3bz075qtLVLpdmCNmSX/tXOFlopV5X7Ea 9qvDsphDlz+D0jg+6XkSVNmCIc3LhHNUzNC6XMa08ht5qjf/kYY7wU8YgWDvdP5SIJRl NNmeUrpIQWB2bkWCSou1oujO7AbXPWI7Jz+xKZeXTCGAfkiKpXPUFki3qMLQE5Ubd7EE ERu/FFErgmTmFlYZSawOByWygsQjczPJIFKlyf8D5mUAIJTe/jki/TH0837mxln7qvZU GKlg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t196-v6si11644887pgc.648.2018.05.24.19.34.38; Thu, 24 May 2018 19:34:53 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968182AbeEXRng (ORCPT + 99 others); Thu, 24 May 2018 13:43:36 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:37757 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966744AbeEXRnf (ORCPT ); Thu, 24 May 2018 13:43:35 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fLuGu-0003cL-Pr; Thu, 24 May 2018 19:43:28 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1fLuGr-0000oD-9G; Thu, 24 May 2018 19:43:25 +0200 Date: Thu, 24 May 2018 19:43:25 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Sebastian Reichel Cc: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, Fabio Estevam , Shawn Guo , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] serial: imx: disable UCR4_OREN on shutdown Message-ID: <20180524174325.ym5k7uhco3ylslaa@pengutronix.de> References: <20180524173024.20936-1-sebastian.reichel@collabora.co.uk> <20180524173024.20936-3-sebastian.reichel@collabora.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180524173024.20936-3-sebastian.reichel@collabora.co.uk> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 24, 2018 at 07:30:24PM +0200, Sebastian Reichel wrote: > 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); Not sure this is necessary, but I assume it cannot hurt either, so Acked-by: Uwe Kleine-K?nig Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |