From patchwork Mon Apr 9 20:53:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 7696 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DA89D23E47 for ; Mon, 9 Apr 2012 20:53:35 +0000 (UTC) Received: from mail-gy0-f180.google.com (mail-gy0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id 9EE94A18126 for ; Mon, 9 Apr 2012 20:53:35 +0000 (UTC) Received: by ghbz12 with SMTP id z12so2511326ghb.11 for ; Mon, 09 Apr 2012 13:53:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=GIYcjCUlfp6LdQIO3vcTEG9mne+/Lv49EFYAEAjHUUM=; b=C2S0Xcgtoa2Kdp/lRp0J7S2JQlI/j3StyVn9cNOvYQF0TIj4e/gprxC+6JGKA53vrA KNo8jAKWM60+kGJvHGGL3B9e7fsGpoMRpzH5LPjYr14fpJOvVPZOKnMBhz5KecOOStn3 8EPm9RcrMQWk4g0FG1g6Caz4c+dnQ6gtidPp/hVYrqfI7VI03UvQ6QtTRy6UYC1nIoMd BWkc0s74qTCJPzafUTIbklb+XXKsuNbAdDf7Rm1jnfp2AyVMRNW+EUPeM/XC4bBOcHXH bjNctLNzHEION4uB2VtxNJKEyr6/xoRfgXgaGAmwtpJq8fo74t1s0aURWUh9vmUF3caR +ISg== Received: by 10.50.187.225 with SMTP id fv1mr316167igc.28.1334004814779; Mon, 09 Apr 2012 13:53:34 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.164.217 with SMTP id f25csp180273iby; Mon, 9 Apr 2012 13:53:33 -0700 (PDT) Received: by 10.152.146.234 with SMTP id tf10mr12957736lab.31.1334004811909; Mon, 09 Apr 2012 13:53:31 -0700 (PDT) Received: from mail.df.lth.se (mail.df.lth.se. [194.47.250.12]) by mx.google.com with ESMTPS id sq7si4724703lab.46.2012.04.09.13.53.29 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 Apr 2012 13:53:31 -0700 (PDT) Received-SPF: neutral (google.com: 194.47.250.12 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=194.47.250.12; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.47.250.12 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) smtp.mail=linus.walleij@linaro.org Received: from fecusia (c83-249-217-26.bredband.comhem.se [83.249.217.26]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.df.lth.se (Postfix) with ESMTPSA id ACF0D65D6A; Mon, 9 Apr 2012 22:53:27 +0200 (CEST) Received: by fecusia (sSMTP sendmail emulation); Mon, 9 Apr 2012 22:53:26 +0200 From: "Linus Walleij" To: Vinod Koul , linux-kernel@vger.kernel.org Cc: Dan Williams , linux-arm-kernel@lists.infradead.org, Linus Walleij , Russell King , Viresh Kumar , Alim Akhtar Subject: [PATCH 1/2] dma/amba-pl08x: check for terminal count status only Date: Mon, 9 Apr 2012 22:53:21 +0200 Message-Id: <1334004801-20185-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.7.7.6 X-Gm-Message-State: ALoCoQlcxDMzlg0/+lZFKl9hn5k+OyCQay+VPXvONfT7usmmkAZBtXSs+flFh2btJNIFwgaKhK1y For some reason I can't figure out we're reading the PL080_INT_STATUS register instead of PL080_TC_STATUS when checking for the terminal count. The PL080_INT_STATUS is a logical OR between the error and terminal count status register and may not report what we want it to, especially if there is an error and a terminal count at the same time and the former is not lowered in time for the check in the TC register. Make sure we read what we're actually interested in. Cc: Russell King Cc: Viresh Kumar Cc: Alim Akhtar Signed-off-by: Linus Walleij --- drivers/dma/amba-pl08x.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index c301a8e..08589c6 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c @@ -1615,7 +1615,7 @@ static irqreturn_t pl08x_irq(int irq, void *dev) __func__, err); writel(err, pl08x->base + PL080_ERR_CLEAR); } - tc = readl(pl08x->base + PL080_INT_STATUS); + tc = readl(pl08x->base + PL080_TC_STATUS); if (tc) writel(tc, pl08x->base + PL080_TC_CLEAR);