From: Arnd Bergmann <arnd@arndb.de>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 7/8 v2] ASoC: fsi: remove slave_id settings for DMAEngine
Date: Wed, 21 Jan 2015 09:15:13 +0000 [thread overview]
Message-ID: <1897645.0281MIAOiz@wuerfel> (raw)
In-Reply-To: <87bnluaxtt.wl%kuninori.morimoto.gx@renesas.com>
On Wednesday 21 January 2015 01:33:10 Kuninori Morimoto wrote:
> Hi Arnd
>
> > > diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
> > > index 8869971..c4eb234 100644
> > > --- a/sound/soc/sh/fsi.c
> > > +++ b/sound/soc/sh/fsi.c
> > > @@ -1374,10 +1374,9 @@ static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io, struct dev
> > > shdma_chan_filter, (void *)io->dma_id,
> > > dev, is_play ? "tx" : "rx");
> > > if (io->chan) {
> > > - struct dma_slave_config cfg;
> > > + struct dma_slave_config cfg = {};
> > > int ret;
> > >
> > > - cfg.slave_id = io->dma_id;
> > > cfg.dst_addr = 0; /* use default addr */
> > > cfg.src_addr = 0; /* use default addr */
> > > cfg.direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
> >
> > As the dma_slave_config structure is now initialized to all-zeroes, the
> > two address assignments are not strictly required any more.
> >
> > However, I also suspect that that particular initialization to zero
> > is also incorrect: When booting with DT, the dst_addr/src_addr fields
> > are no longer passed in the platform data for the DMA engine but
> > are expected to be set by the slave driver.
> >
> > Also set the correct address width, which has the same problem.
>
> Thank you for pointing it.
> But, unfortunately, this FSI driver is not used from DT.
> (It is supporting DT probe, but no one use it)
> So, it is assuming that dst_addr/src_addr fields are come
> from platform data.
I see. My patch would still be correct, right?
I think the way that Guennadi Liakhovetski started the conversion of
shmobile dmaengine drivers, each slave driver either uses a custom
filter function that relies on the platform data and will not work
with DT, or it uses dma_request_slave_channel_compat() which will
work on both, and then uses dmaengine_slave_config() to pass the
extra settings. This driver is the one exception you have since it
uses a combination of the two approaches.
Arnd
next prev parent reply other threads:[~2015-01-21 9:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 4:18 [PATCH 7/8 v2] ASoC: fsi: remove slave_id settings for DMAEngine Kuninori Morimoto
2015-01-20 13:02 ` Arnd Bergmann
2015-01-21 1:33 ` Kuninori Morimoto
2015-01-21 9:15 ` Arnd Bergmann [this message]
2015-01-22 1:08 ` Kuninori Morimoto
2015-01-22 1:24 ` Kuninori Morimoto
2015-01-22 9:43 ` Arnd Bergmann
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=1897645.0281MIAOiz@wuerfel \
--to=arnd@arndb.de \
--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