From patchwork Tue Mar 22 09:49:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pramod Gurav X-Patchwork-Id: 8639141 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B07D9C0554 for ; Tue, 22 Mar 2016 09:50:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2CC32039E for ; Tue, 22 Mar 2016 09:50:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 516A1203A4 for ; Tue, 22 Mar 2016 09:50:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758533AbcCVJuM (ORCPT ); Tue, 22 Mar 2016 05:50:12 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59440 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755863AbcCVJuI (ORCPT ); Tue, 22 Mar 2016 05:50:08 -0400 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 804EC615C9; Tue, 22 Mar 2016 09:50:06 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 701CB615D0; Tue, 22 Mar 2016 09:50:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from blr-ubuntu-56.ap.qualcomm.com (unknown [202.46.23.61]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: gpramod@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3172760220; Tue, 22 Mar 2016 09:50:01 +0000 (UTC) From: Pramod Gurav To: andy.gross@linaro.org, linux-kernel@vger.kernel.org Cc: dmaengine@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, dan.j.williams@intel.com, vinod.koul@intel.com, okaya@codeaurora.org, architt@codeaurora.org, Pramod Gurav Subject: [PATCH 1/2] dmaengine: qcom_bam_dma: Clear IRQ only if its set Date: Tue, 22 Mar 2016 15:19:10 +0530 Message-Id: <1458640151-15150-2-git-send-email-gpramod@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1458640151-15150-1-git-send-email-gpramod@codeaurora.org> References: <1458640151-15150-1-git-send-email-gpramod@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Clear the BAM IRQ bit only if there is a BAM interrupt. Signed-off-by: Pramod Gurav --- drivers/dma/qcom/bam_dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index d5e0a9c..0880345 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -807,7 +807,8 @@ static irqreturn_t bam_dma_irq(int irq, void *data) /* don't allow reorder of the various accesses to the BAM registers */ mb(); - writel_relaxed(clr_mask, bam_addr(bdev, 0, BAM_IRQ_CLR)); + if (srcs & BAM_IRQ) + writel_relaxed(clr_mask, bam_addr(bdev, 0, BAM_IRQ_CLR)); return IRQ_HANDLED; }