From patchwork Wed May 21 01:09:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 4213611 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EBA8D9F32A for ; Wed, 21 May 2014 02:31:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 28F4D20375 for ; Wed, 21 May 2014 02:31:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6747720364 for ; Wed, 21 May 2014 02:31:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WmwGp-0001Nc-Bn; Wed, 21 May 2014 02:28:43 +0000 Received: from mail-bn1lp0139.outbound.protection.outlook.com ([207.46.163.139] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WmwGl-0001Jp-7a for linux-arm-kernel@lists.infradead.org; Wed, 21 May 2014 02:28:40 +0000 Received: from BY2PR03CA032.namprd03.prod.outlook.com (10.242.234.153) by BY2PR03MB426.namprd03.prod.outlook.com (10.141.141.140) with Microsoft SMTP Server (TLS) id 15.0.944.11; Wed, 21 May 2014 02:28:14 +0000 Received: from BY2FFO11FD051.protection.gbl (2a01:111:f400:7c0c::175) by BY2PR03CA032.outlook.office365.com (2a01:111:e400:2c2c::25) with Microsoft SMTP Server (TLS) id 15.0.944.11 via Frontend Transport; Wed, 21 May 2014 02:28:14 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD051.mail.protection.outlook.com (10.1.15.188) with Microsoft SMTP Server (TLS) id 15.0.949.9 via Frontend Transport; Wed, 21 May 2014 02:28:14 +0000 Received: from shlinux1.ap.freescale.net (shlinux1.ap.freescale.net [10.192.225.216]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s4L2S9VW011772; Tue, 20 May 2014 19:28:11 -0700 From: Huang Shijie To: Subject: [PATCH 2/2 v2] serial: imx: remove the redundant code Date: Wed, 21 May 2014 09:09:47 +0800 Message-ID: <1400634587-513-1-git-send-email-b32955@freescale.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1400633789-31979-2-git-send-email-b32955@freescale.com> References: <1400633789-31979-2-git-send-email-b32955@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(199002)(189002)(77096999)(89996001)(79102001)(81342001)(88136002)(83072002)(92726001)(33646001)(93916002)(84676001)(68736004)(87936001)(77982001)(81156002)(21056001)(92566001)(87286001)(69596002)(62966002)(36756003)(50466002)(20776003)(102836001)(46102001)(76482001)(47776003)(19580395003)(83322001)(19580405001)(80022001)(44976005)(64706001)(97736001)(74662001)(48376002)(50226001)(31966008)(6806004)(74502001)(76176999)(85852003)(99396002)(50986999)(81542001)(77156001)(4396001)(42262001); DIR:OUT; SFP:; SCL:1; SRVR:BY2PR03MB426; H:az84smr01.freescale.net; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Forefront-PRVS: 0218A015FA Received-SPF: Fail (: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=shijie.huang@freescale.com; X-OriginatorOrg: freescale.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140520_192839_411021_2C99FA22 X-CRM114-Status: UNSURE ( 8.43 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: Huang Shijie , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In the imx_startup(), we will reset the uart port which will reset all the FIFOs, including the URXD. So the code to clear the RX FIFO is redundant. Just remove it. Signed-off-by: Huang Shijie --- fix the typo. --- drivers/tty/serial/imx.c | 9 --------- 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 64901d0..febf400 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1161,15 +1161,6 @@ static int imx_startup(struct uart_port *port) temp |= UCR2_IRTS; writel(temp, sport->port.membase + UCR2); - if (USE_IRDA(sport)) { - /* clear RX-FIFO */ - int i = 64; - while ((--i > 0) && - (readl(sport->port.membase + URXD0) & URXD_CHARRDY)) { - barrier(); - } - } - if (!is_imx1_uart(sport)) { temp = readl(sport->port.membase + UCR3); temp |= IMX21_UCR3_RXDMUXSEL;