From patchwork Fri Oct 20 21:20:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 10020965 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 0A3E860211 for ; Fri, 20 Oct 2017 21:21:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC5AE28F55 for ; Fri, 20 Oct 2017 21:21:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDF9B28F64; Fri, 20 Oct 2017 21:21:03 +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=-3.7 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM 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 6FEAA28F55 for ; Fri, 20 Oct 2017 21:21:03 +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=LmqkE377GqPkhxD4HrPWdYUedkPLCJgx7mqSxx8bg0s=; b=f51Ekn9gu2vGYc+LfZbL3YaBPZ wlptR3O1Vd9LRUmGHzucQyI76o0mm7U3WpP/FYQ7tlY2uaKEMN+ge2y513WD9ULRNJOHcY+fTl884 YMbyntC29riJMp3SuehXwaot7FGlrk3OOw8SefiCzt5AgPLHEmzuN81CJqb860MUf8RJXGvrMRGgx a465GDEBMRaLId9+gdB7wJUKOS1+7UrK21TcJ8/OOgshjflSxrVxzRl8qJ5nF35chgm1oL9Xpcs7y MJsdLzubS7VeP4nxp5Dv/hsuOSZXZa6+7LTwFBhmMREJ7x6Svk3Zl8vV3FXaKW0crfQVaF6o6w2nB zS6LmEVA==; 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 1e5eiv-00039D-Ei; Fri, 20 Oct 2017 21:20:57 +0000 Received: from wsip-98-189-142-135.oc.oc.cox.net ([98.189.142.135] helo=office-server2) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e5eiq-00037o-Ub for linux-arm-kernel@lists.infradead.org; Fri, 20 Oct 2017 21:20:55 +0000 Received: from tkisky by office-server2 with local (Exim 4.88) (envelope-from ) id 1e5eiN-0003PV-Se; Fri, 20 Oct 2017 14:20:23 -0700 From: Troy Kisky To: gregkh@linuxfoundation.org, nandor.han@ge.com Subject: [PATCH v2 2/3] tty: serial: imx: remove dead code imx_dma_rxint Date: Fri, 20 Oct 2017 14:20:20 -0700 Message-Id: <20171020212021.13065-2-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171020212021.13065-1-troy.kisky@boundarydevices.com> References: <20171020212021.13065-1-troy.kisky@boundarydevices.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171020_142053_027403_BF9DC662 X-CRM114-Status: UNSURE ( 9.76 ) 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: Troy Kisky , linux-serial@vger.kernel.org, u.kleine-koenig@pengutronix.de, fabio.estevam@nxp.com, linux-arm-kernel@lists.infradead.org, l.stach@pengutronix.de 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 Since commit 4dec2f119e86 ("imx-serial: RX DMA startup latency") the interrupt routine no longer will start rx dma. imx_dma_rxint no longer needs to be called to try and start dma. It won't start dma because dma_is_rxing is already true meaning dma is already started. Signed-off-by: Troy Kisky --- v2: split into 2 patches --- drivers/tty/serial/imx.c | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index bf47b15df2e8..15b0ecb4cf60 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -732,29 +732,6 @@ static void imx_disable_rx_int(struct imx_port *sport) } static void clear_rx_errors(struct imx_port *sport); -static int start_rx_dma(struct imx_port *sport); -/* - * If the RXFIFO is filled with some data, and then we - * arise a DMA operation to receive them. - */ -static void imx_dma_rxint(struct imx_port *sport) -{ - unsigned long temp; - unsigned long flags; - - spin_lock_irqsave(&sport->port.lock, flags); - - temp = readl(sport->port.membase + USR2); - if ((temp & USR2_RDR) && !sport->dma_is_rxing) { - - imx_disable_rx_int(sport); - - /* tell the DMA to receive the data. */ - start_rx_dma(sport); - } - - spin_unlock_irqrestore(&sport->port.lock, flags); -} /* * We have a modem side uart, so the meanings of RTS and CTS are inverted. @@ -816,11 +793,8 @@ static irqreturn_t imx_int(int irq, void *dev_id) sts = readl(sport->port.membase + USR1); sts2 = readl(sport->port.membase + USR2); - if (sts & (USR1_RRDY | USR1_AGTIM)) { - if (sport->dma_is_enabled) - imx_dma_rxint(sport); - else - imx_rxint(irq, dev_id); + if (!sport->dma_is_enabled && (sts & (USR1_RRDY | USR1_AGTIM))) { + imx_rxint(irq, dev_id); ret = IRQ_HANDLED; }