public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/5] dmaengine: sun6i: Add 4 as a possible burst value
Date: Fri, 18 Mar 2016 16:09:46 +0100	[thread overview]
Message-ID: <20160318150946.GO30977@lukather> (raw)
In-Reply-To: <20160311172858.6cffb492a18da7da76e7ed94@free.fr>

On Fri, Mar 11, 2016 at 05:28:58PM +0100, Jean-Francois Moine wrote:
> On Fri, 11 Mar 2016 13:06:01 +0100
> Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> 
> > On Fri, Mar 11, 2016 at 12:01:29PM +0100, Jean-Francois Moine wrote:
> > > Some DMA transfers, as for H3 audio, ask for 4 as a burst value.
> 	[snip]
> > > @@ -238,6 +238,8 @@ static inline s8 convert_burst(u32 maxburst)
> > >  	switch (maxburst) {
> > >  	case 1:
> > >  		return 0;
> > > +	case 4:
> > > +		return 1;
> > 
> > This is true only for the H3.
> > 
> > For the other SoCs that we support, the only valid values are 0 and 2,
> > so we need to reject those values.
> > 
> > We should do that based on the compatible.
> > 
> > The easiest solution would be to expose the available burst sizes in
> > the probe, and just our new one if we match that compatible, and any
> > invalid burst size would be rejected by the framework. Vinod, any
> > objection to that?
> 
> Do you think that we should also check if the requested ports are
> valid, i.e. have a list/bitmap of the possible input/output ports per
> SoC, instead of just only the ID of the max port?

That would require having a map of the possible endpoints for a given
device, which would be quite difficult to accomplish.

I don't think customer drivers have access to that anyway, only the
provider driver is parsing the DT to retrieve the ID. And we already
trust the DT for so many things it would be a bit pointless to check
that.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160318/6b12d817/attachment.sig>

  reply	other threads:[~2016-03-18 15:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11 11:19 [PATCH v2 0/5] dmaengine: sun6i: Fixes and upgrade for audio transfers Jean-Francois Moine
2016-03-11 10:52 ` [PATCH v2 1/5] dmaengine: sun6i: Fix the access of the IRQ register Jean-Francois Moine
2016-03-11 10:55 ` [PATCH v2 2/5] dmaengine: sun6i: Fix impossible settings of burst and bus width Jean-Francois Moine
2016-03-11 11:01 ` [PATCH v2 3/5] dmaengine: sun6i: Add 4 as a possible burst value Jean-Francois Moine
2016-03-11 12:06   ` Maxime Ripard
2016-03-11 16:28     ` Jean-Francois Moine
2016-03-18 15:09       ` Maxime Ripard [this message]
2016-03-18 16:54         ` Jean-Francois Moine
2016-03-11 11:06 ` [PATCH v2 4/5] dmaengine: sun6i: Set system values to memory burst and bus width Jean-Francois Moine
2016-03-11 11:15 ` [PATCH v2 5/5] dmaengine: sun6i: Add cyclic capability Jean-Francois Moine

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=20160318150946.GO30977@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.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