From patchwork Sat Jun 22 18:02:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 11011365 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E8C56C5 for ; Sat, 22 Jun 2019 18:05:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DDBD28A9D for ; Sat, 22 Jun 2019 18:05:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BFF028B73; Sat, 22 Jun 2019 18:05:13 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 F07CC28A9D for ; Sat, 22 Jun 2019 18:05:12 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:MIME-Version:Subject:To :From:References:In-Reply-To:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RFm0c/2fwSYDGVVnV1oHyQA6itPc5zxdwQwECpJeYMA=; b=RXqqsExe2A2HVw JgvE1sZJfk4fVzbJwZZI+MnFJDW+SGK+5e17Uj8usct5lrZTRU69f1nR+4C67U5USTCwGD8aUeWod U/UxzwekTfiGYNy12v9sOsRlaVrX39+sAhGPtD2fxzzt61JdPs8lzIcJ/1KhlSpt8Fb/iz8iVz8CH 7953UZrg07KQkgXxU9VfKZR/dqgdGVPmFYH7+DRW9z+h07KaKafKzJNx9v3PJDDZj+yn6MgWM9nB/ Wi9prqqgZKYE581lznPEl+z5lvZNcXObA1omDF8hsezfgZyUO8+2ksUAQeG1YUhXtaIRFRYwa6Ykl DkwNXp+bsTHuBwIlVEOg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hekNz-0002gO-Ro; Sat, 22 Jun 2019 18:05:11 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hekNx-0001OL-DE for linux-arm-kernel@lists.infradead.org; Sat, 22 Jun 2019 18:05:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YLLngcfYF+Lf6PbqhusKwH4dyS0jGxhgKdh6Y63Svz4=; b=pxYWUfYEHUZyrsHMzmYZCmeH6u vA66hUZenIzw17pXvXv6f93SdcQ0X7FTSnQNjotf0jmcFxwFXASe0XPpIm8aUUd127H12zRGe9rmC F+fh57NshmgsjRLwizN7eCwpiMTFg47U1lP20vT2lX5Rzfh+G6gXN731oR/ejxbMeF0HnZQUVXinS YdAr1e3Y1xVbZd1IEGCFmDsqmrDX59NKEETzvNJ9WtyAOnQFfGu1cBFQQw3XIkZ43haAXoNcgXDFX Vw5y0RolO9d4Syk+Q6yp9/bdu0+BVWs57oRuJaRungfh3ycXmN0X1eodZGBvG5IX9c+1zYoeAERZk l0sE8niQ==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:44126 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1hekLh-00056r-Bz; Sat, 22 Jun 2019 19:02:49 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1hekLg-0002hJ-Jg; Sat, 22 Jun 2019 19:02:48 +0100 In-Reply-To: <20190622165318.bgyun52hssqmdv4n@shell.armlinux.org.uk> References: <20190622165318.bgyun52hssqmdv4n@shell.armlinux.org.uk> From: Russell King To: Michael Olbrich , Lucas Stach , Vinod Koul Subject: [PATCH] dmaengine: imx-sdma: fix incorrect conversion to readl_relaxed_poll_timeout_atomic() MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Sat, 22 Jun 2019 19:02:48 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190622_110509_453523_802CEE43 X-CRM114-Status: GOOD ( 10.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , Sascha Hauer , NXP Linux Team , Pengutronix Kernel Team , dmaengine@vger.kernel.org, Dan Williams , Shawn Guo , linux-arm-kernel@lists.infradead.org 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 When imx-sdma was converted to use readl_relaxed_poll_timeout_atomic(), the termination condition was inverted. Fix this. Fixes: 1d069bfa3c78 ("dmaengine: imx-sdma: ack channel 0 IRQ in the interrupt handler") Signed-off-by: Russell King --- drivers/dma/imx-sdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 5f3c1378b90e..ba84c0444f35 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -660,7 +660,7 @@ static int sdma_run_channel0(struct sdma_engine *sdma) sdma_enable_channel(sdma, 0); ret = readl_relaxed_poll_timeout_atomic(sdma->regs + SDMA_H_STATSTOP, - reg, !(reg & 1), 1, 500); + reg, reg & 1, 1, 500); if (ret) dev_err(sdma->dev, "Timeout waiting for CH0 ready\n");