All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: padma.v@samsung.com, Dan Williams <djbw@fb.com>,
	Jon Hunter <jon-hunter@ti.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] dma: pl330: Use the generic of_dma_xlate_by_chan_id
Date: Tue, 2 Apr 2013 23:03:41 +0530	[thread overview]
Message-ID: <20130402173341.GL10326@intel.com> (raw)
In-Reply-To: <515AB694.7090403@metafoo.de>

On Tue, Apr 02, 2013 at 12:44:36PM +0200, Lars-Peter Clausen wrote:
> On 04/02/2013 11:12 AM, PADMAVATHI VENNA wrote:
> >> Use the generic of_dma_xlate_by_chan_id xlate callback instead of a custom
> >> implementation.
Hi Padma,

Can you please fix your MUA to
1) not break the message ids
2) reply inline which makes a distinction for quoted text

> >>
> >> There is one minor difference between the generic of_dma_xlate_by_chan_id
> >> function and the pl330 specific one. of_dma_xlate_by_chan_id only sets the
> >> DMA_SLAVE capability for the channel capability mask, while the pl330 driver
> >> additionally sets the DMA_CYCLIC capability. But since all pl330 channels which
> >> have the DMA_SLAVE capability set also have DMA_CYCLIC capability set both
> >> functions will have the same result.
> >>
> >> I am not clear about the dma capabilities. Is it mentioned some where that if we set DMA_SLAVE capability
> >> will that also set DMA_CYCLIC capability?
> >>
> > 
> > Well DMA_SLAVE won't automatically set DMA_CYCLIC. But the driver sets both.
> > 
> > I tested your patches, it's woking for audio. But I need some clarification related to capabilities.
> > As per my understanding, controller driver registers the available capabilities in the probe and 
> > client drivers requests for a particular capability. In both the cases, in the dmaengine it checks
> > if the requested capability is satisfied.
> > If we don't set the DMA_CYCLIC, how __dma_device_satisfies_mask works?
> > 
> >  Please correct me if I am wrong.
> > 
> > Thanks
> > Padma
> 
> Hi,
> 
> Well, DMA_SLAVE | DMA_CYCLIC is a more restrictive mask than DMA_SLAVE. So
> any channel that matches DMA_SLAVE | DMA_CYCLIC will also match DMA_SLAVE.
DMA_SLAVE means that controllers channel can do slave transactions and should
support the slave APIs.
DMA_CYCLIC means that controller can do a cyclic transfers for the sg list sent
and will do so untill channel is aborted

Now we are talking about DMA_CYCLIC for periphrals only so DMA_SLAVE cna be
implied and is usually the normal usage though nothing prevent you from doing a
cyclic memcpy if you would wish.

Right thing would be to set mask aptly on both sides, and since you are doing
DMA_CYCLIC, i would expect both the controller and client have done this, if not
we need this to be fixed :)

--
~Vinod

  reply	other threads:[~2013-04-02 18:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02  9:12 Re: [PATCH 2/2] dma: pl330: Use the generic of_dma_xlate_by_chan_id PADMAVATHI VENNA
2013-04-02 10:44 ` Lars-Peter Clausen
2013-04-02 17:33   ` Vinod Koul [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-04-02  6:27 PADMAVATHI VENNA
2013-04-02  7:33 ` Lars-Peter Clausen
2013-03-25 13:16 [PATCH 1/2] dma: of: Add generic xlate function for matching by channel id Lars-Peter Clausen
2013-03-25 13:16 ` [PATCH 2/2] dma: pl330: Use the generic of_dma_xlate_by_chan_id Lars-Peter Clausen

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=20130402173341.GL10326@intel.com \
    --to=vinod.koul@intel.com \
    --cc=djbw@fb.com \
    --cc=jon-hunter@ti.com \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=padma.v@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.