SUPERH platform development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH][resend] dmaengine: rcar-audmapp: independent from SH_DMAE_BASE
Date: Mon, 08 Dec 2014 18:32:16 +0000	[thread overview]
Message-ID: <5437195.1byQrlazfz@avalon> (raw)
In-Reply-To: <87fvd4b2kh.wl%kuninori.morimoto.gx@renesas.com>

Hi Vinod,

On Monday 08 December 2014 18:15:25 Vinod Koul wrote:
> On Fri, Nov 28, 2014 at 12:17:59AM +0000, Kuninori Morimoto wrote:
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > 
> > Current Renesas Audio DMAC Peri Peri driver is for Renesas R-Car series,
> > but it is based on SH_DMAE_BASE driver which is used for Renesas
> > SH-Mobile. But it is not fully cared about DT.
> > 
> > For example, current SH_DMAE_BASE base driver will return non-matching
> > DMA channel if some non-SH_DMAE_BASE drivers are probed.
> > So, sound driver will get wrong DMA channel if Audio DMAC (= rcar-dma)
> > was not probed and Audio DMAC Peri Peri (= SH_DMAE_BASE) was probed.
> > 
> > OTOH, many SH-Mobile series drivers are using SH_DMAE_BASE driver, and
> > Renesas R-Car series will not use it anymore. Maintenance cost for fully
> > cared DT support on SH_DMAE_BASE will be very high
> > (and keeping compatibility will be very complex).
> > 
> > In addition, Audio DMAC Peri Peri itself is very simple device, and,
> > no SoC/board is usign it from non-DT environment.
> > 
> > This patch remakes rcar-audmapp driver simply independents
> > from SH_DMAE_BASE.
> 
> Hi Kuninori
> 
> Can you please split these changes into multiple smaller changes so that we
> can review this propely...

I was about to ask the same when I realized this is a complete rewrite of the 
driver. I'm not sure whether it could be split properly. Reviewing the result 
might be easier.

> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> > 
> >  drivers/dma/sh/Kconfig                         |    3 +-
> >  drivers/dma/sh/rcar-audmapp.c                  |  399 +++++++++---------
> >  include/linux/platform_data/dma-rcar-audmapp.h |   34 --
> >  3 files changed, 184 insertions(+), 252 deletions(-)
> >  delete mode 100644 include/linux/platform_data/dma-rcar-audmapp.h
> > 
> > diff --git a/drivers/dma/sh/Kconfig b/drivers/dma/sh/Kconfig
> > index 8190ad2..41e5c97 100644
> > --- a/drivers/dma/sh/Kconfig
> > +++ b/drivers/dma/sh/Kconfig
> > @@ -53,7 +53,8 @@ config RCAR_HPB_DMAE
> > 
> >  config RCAR_AUDMAC_PP
> >  	tristate "Renesas R-Car Audio DMAC Peripheral Peripheral support"
> > -	depends on SH_DMAE_BASE
> > +	depends on ARCH_SHMOBILE || COMPILE_TEST
> 
> Am bit wary of this, given that folks dont test on lots of archs, like arm,
> powerpc, x86 etc before turning this on, so was this done here?

The whole point of COMPILE_TEST is to catch compilation failures on other 
architectures. I agree it should be tested at least on x86.

> > +static struct dma_async_tx_descriptor *
> > +audmapp_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
> > +			size_t buf_len, size_t period_len,
> > +			enum dma_transfer_direction dir, unsigned long flags)
> >  {
> > -	struct audmapp_chan *auchan = to_chan(schan);
> > -	u32 chcr;
> > -	dma_addr_t dst;
> > -	int ret;
> > -
> > -	ret = audmapp_get_config(auchan, slave_id, &chcr, &dst);
> > -	if (ret < 0)
> > -		return ret;
> > -
> > -	if (try)
> > -		return 0;
> > -
> > -	auchan->chcr		= chcr;
> > -	auchan->slave_addr	= slave_addr ? : dst;
> > +	struct audmapp_chan *achan = chan_to_achan(chan);
> > 
> > -	return 0;
> > +	return &achan->async_tx;
> 
> That doesn't look right to me. So for prepare you are returning descriptor
> but not really preparing one, did I miss something here

-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2014-12-08 18:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-28  0:17 [PATCH][resend] dmaengine: rcar-audmapp: independent from SH_DMAE_BASE Kuninori Morimoto
2014-12-08 12:57 ` Vinod Koul
2014-12-08 18:32 ` Laurent Pinchart [this message]
2014-12-09  6:20 ` Vinod Koul
2014-12-10  0:51 ` Kuninori Morimoto

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=5437195.1byQrlazfz@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-sh@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