From: gpramod@codeaurora.org
To: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Vinod Koul <vinod.koul@intel.com>,
Andy Gross <andy.gross@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
dmaengine@vger.kernel.org, Sinan Kaya <okaya@codeaurora.org>
Subject: Re: [PATCH v2 2/5] dmaengine: qcom: bam_dma: clear BAM interrupt only if it is rised
Date: Mon, 11 Apr 2016 13:21:06 +0530 [thread overview]
Message-ID: <a31a31ec563059899440ea512a34aa19@codeaurora.org> (raw)
In-Reply-To: <1459896982-30171-3-git-send-email-stanimir.varbanov@linaro.org>
On 2016-04-06 04:26, Stanimir Varbanov wrote:
> Currently we write BAM_IRQ_CLR register with zero even when no
> BAM_IRQ occured. This write has some bad side effects when the
> BAM instance is for the crypto engine. In case of crypto engine
> some of the BAM registers are xPU protected and they cannot be
> controlled by the driver.
>
> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> Reviewed-by: Andy Gross <andy.gross@linaro.org>
> ---
> drivers/dma/qcom/bam_dma.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
Tested-by: Pramod Gurav <gpramod@codeaurora.org>
> diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
> index a486bc0f82e0..789d5f836bf7 100644
> --- a/drivers/dma/qcom/bam_dma.c
> +++ b/drivers/dma/qcom/bam_dma.c
> @@ -801,13 +801,17 @@ static irqreturn_t bam_dma_irq(int irq, void
> *data)
> if (srcs & P_IRQ)
> tasklet_schedule(&bdev->task);
>
> - if (srcs & BAM_IRQ)
> + if (srcs & BAM_IRQ) {
> clr_mask = readl_relaxed(bam_addr(bdev, 0, BAM_IRQ_STTS));
>
> - /* don't allow reorder of the various accesses to the BAM registers
> */
> - mb();
> + /*
> + * don't allow reorder of the various accesses to the BAM
> + * registers
> + */
> + mb();
>
> - writel_relaxed(clr_mask, bam_addr(bdev, 0, BAM_IRQ_CLR));
> + writel_relaxed(clr_mask, bam_addr(bdev, 0, BAM_IRQ_CLR));
> + }
>
> return IRQ_HANDLED;
> }
next prev parent reply other threads:[~2016-04-11 7:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 22:56 [PATCH v2 0/5] bam dma fixes and one dt extension Stanimir Varbanov
2016-04-05 22:56 ` [PATCH v2 1/5] dmaengine: qcom: bam_dma: fix dma free memory on remove Stanimir Varbanov
2016-04-05 22:56 ` [PATCH v2 2/5] dmaengine: qcom: bam_dma: clear BAM interrupt only if it is rised Stanimir Varbanov
2016-04-05 23:41 ` Vinod Koul
2016-04-11 7:51 ` gpramod [this message]
2016-04-05 22:56 ` [PATCH v2 3/5] dmaengine: qcom: bam_dma: add controlled remotely dt property Stanimir Varbanov
2016-04-05 23:44 ` Vinod Koul
2016-04-06 6:05 ` Andy Gross
2016-04-06 15:05 ` Stanimir Varbanov
2016-04-07 17:57 ` Rob Herring
2016-04-11 7:53 ` gpramod
2016-04-05 22:56 ` [PATCH v2 4/5] dmaengine: qcom: bam_dma: use correct pipe FIFO size Stanimir Varbanov
[not found] ` <1459896982-30171-5-git-send-email-stanimir.varbanov-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-04-05 23:45 ` Vinod Koul
2016-04-05 22:56 ` [PATCH v2 5/5] dmaengine: qcom: bam_dma: rename BAM_MAX_DATA_SIZE define Stanimir Varbanov
2016-04-05 23:47 ` Vinod Koul
2016-04-06 15:30 ` Stanimir Varbanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a31a31ec563059899440ea512a34aa19@codeaurora.org \
--to=gpramod@codeaurora.org \
--cc=andy.gross@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=okaya@codeaurora.org \
--cc=robh+dt@kernel.org \
--cc=stanimir.varbanov@linaro.org \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).