From: Vinod Koul <vinod.koul@intel.com>
To: Josh Cartwright <joshc@codeaurora.org>
Cc: Andy Gross <agross@codeaurora.org>,
Dan Williams <dan.j.williams@intel.com>,
dmaengine@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [Patch v5 1/2] dmaengine: add Qualcomm BAM dma driver
Date: Tue, 11 Feb 2014 23:33:44 +0530 [thread overview]
Message-ID: <20140211180344.GS10628@intel.com> (raw)
In-Reply-To: <20140211174910.GE841@joshc.qualcomm.com>
On Tue, Feb 11, 2014 at 11:49:10AM -0600, Josh Cartwright wrote:
> On Tue, Feb 11, 2014 at 11:00:48PM +0530, Vinod Koul wrote:
> > On Tue, Feb 04, 2014 at 02:42:35PM -0600, Andy Gross wrote:
> > > Add the DMA engine driver for the QCOM Bus Access Manager (BAM) DMA controller
> > > found in the MSM 8x74 platforms.
> > >
> > > Each BAM DMA device is associated with a specific on-chip peripheral. Each
> > > channel provides a uni-directional data transfer engine that is capable of
> > > transferring data between the peripheral and system memory (System mode), or
> > > between two peripherals (BAM2BAM).
> > >
> > > The initial release of this driver only supports slave transfers between
> > > peripherals and system memory.
> > >
> > > Signed-off-by: Andy Gross <agross@codeaurora.org>
> >
> > > +++ b/drivers/dma/qcom_bam_dma.c
> [..]
> > > +static void bam_reset_channel(struct bam_chan *bchan)
> > > +{
> > > + struct bam_device *bdev = bchan->bdev;
> > > +
> > > + /* reset channel */
> > > + writel_relaxed(1, bdev->regs + BAM_P_RST(bchan->id));
> > > + writel_relaxed(0, bdev->regs + BAM_P_RST(bchan->id));
> > > +
> > > + /* don't allow reorder of the channel reset */
> > > + wmb();
> > Documentation/memory-barriers.txt describes wmb() as a CPU barier but based on
> > above you want it to be a compiler barrier then you should do 1st write,
> > barrier(), second write.
>
> It could also be that the intent was to prevent these writes from being
> ordered before setting the initialized flag below, either way the
> comment could be made clearer.
yes for that case, but i am suspecting the comment is correct as it would make
sense to ensure reset is in sequence...
--
~Vinod
>
> > > +
> > > + /* make sure hw is initialized when channel is used the first time */
> > > + bchan->initialized = 0;
> > > +}
>
--
next prev parent reply other threads:[~2014-02-11 18:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 20:42 [Patch v5 0/2] Add Qualcomm BAM dmaengine driver Andy Gross
2014-02-04 20:42 ` [Patch v5 1/2] dmaengine: add Qualcomm BAM dma driver Andy Gross
2014-02-04 21:17 ` Joe Perches
2014-02-08 2:42 ` Stephen Boyd
2014-02-11 17:30 ` Vinod Koul
2014-02-11 17:49 ` Josh Cartwright
2014-02-11 17:50 ` Josh Cartwright
2014-02-11 18:03 ` Vinod Koul [this message]
2014-02-11 20:58 ` Andy Gross
[not found] ` <20140211205852.GA10744-zC7DfRvBq/JWk0Htik3J/w@public.gmane.org>
2014-02-17 8:54 ` Vinod Koul
2014-02-04 20:42 ` [Patch v5 2/2] dmaengine: qcom_bam_dma: Add device tree binding Andy Gross
2014-02-11 20:56 ` Kumar Gala
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=20140211180344.GS10628@intel.com \
--to=vinod.koul@intel.com \
--cc=agross@codeaurora.org \
--cc=dan.j.williams@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=joshc@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).