From patchwork Sat Mar 25 23:04:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 9644917 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 7A415601D7 for ; Sat, 25 Mar 2017 23:05:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66B8026D05 for ; Sat, 25 Mar 2017 23:05:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B67627FA8; Sat, 25 Mar 2017 23:05:33 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE5FA26D05 for ; Sat, 25 Mar 2017 23:05:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751303AbdCYXEh (ORCPT ); Sat, 25 Mar 2017 19:04:37 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41376 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751164AbdCYXEf (ORCPT ); Sat, 25 Mar 2017 19:04:35 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0BFA560DCF; Sat, 25 Mar 2017 23:04:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1490483052; bh=V4ykJWgfwkkBc1ubcEozBxZWqbZpI320xsytgpHUFBM=; h=From:To:Cc:Subject:Date:From; b=TtBKLFbrKzkQxPzBYMDizoLX4jXJ8+RTe5ZwKpXbmDHkE15p5bBFwc/6C3AqMrx7z l3nWCIqwUu/5+bBClckQdBsxFTpphbzUqjEAiY+Nj8bmyqCOfdwA+gqJIMAhADj+XP wQHqAuvUPH7TNkbKWtRtc/W/nGMcK5VIdO+9mI90= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 28837607A3; Sat, 25 Mar 2017 23:04:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1490483051; bh=V4ykJWgfwkkBc1ubcEozBxZWqbZpI320xsytgpHUFBM=; h=From:To:Cc:Subject:Date:From; b=PM5pie+agLfyYkvMBUj86vMVlfr3cua5q2Jz9fp9YgAqqPcn4K/eEkDvn1lnRw1TU R4NS4oReejqpQUQ8PWj4AXjT8biaPI733yPyyfF6wpyQWqPFh3o7WDjSN7Wg43CXdw 0EqZ94NHfJK6URAafvMMczXFRr5+nM98BEH5m66s= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 28837607A3 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: dmaengine@vger.kernel.org, timur@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , Andy Gross , David Brown , Vinod Koul , Dan Williams , linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] dmaengine: qcom_hidma: disable/enable IRQs on pause/resume Date: Sat, 25 Mar 2017 19:04:02 -0400 Message-Id: <1490483043-4364-1-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Once the channels are stopped, disable interrupts to make sure no new HW interaction can happen. Similarly, re-enable the interrupts only if we know that channel is operational again. Signed-off-by: Sinan Kaya --- drivers/dma/qcom/hidma_ll.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/dma/qcom/hidma_ll.c b/drivers/dma/qcom/hidma_ll.c index 6645bdf..1530a66 100644 --- a/drivers/dma/qcom/hidma_ll.c +++ b/drivers/dma/qcom/hidma_ll.c @@ -499,6 +499,9 @@ int hidma_ll_enable(struct hidma_lldev *lldev) lldev->trch_state = HIDMA_CH_ENABLED; lldev->evch_state = HIDMA_CH_ENABLED; + /* enable irqs */ + writel(ENABLE_IRQS, lldev->evca + HIDMA_EVCA_IRQ_EN_REG); + return 0; } @@ -596,6 +599,9 @@ int hidma_ll_disable(struct hidma_lldev *lldev) lldev->trch_state = HIDMA_CH_SUSPENDED; lldev->evch_state = HIDMA_CH_SUSPENDED; + + /* disable interrupts */ + writel(0, lldev->evca + HIDMA_EVCA_IRQ_EN_REG); return 0; }