SUPERH platform development
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Vinod Koul <vinod.koul@intel.com>,
	Mark Brown <broonie@kernel.org>, Simon <horms@verge.net.au>,
	Linux-SH <linux-sh@vger.kernel.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Laurent <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH 0/19] ASoC: rsnd: move 2nd DMAC from DMAEngine to rsnd driver
Date: Thu, 19 Feb 2015 08:51:46 +0000	[thread overview]
Message-ID: <6087418.KkNNyy5Y2y@wuerfel> (raw)
In-Reply-To: <87wq3ez3us.wl%kuninori.morimoto.gx@renesas.com>

On Thursday 19 February 2015 08:44:30 Kuninori Morimoto wrote:
> I tried this idea before, but I got issues on DT.
> I forgot detail, but if my memory was correct, it was
> dev->of_node.
> 
>         sound {
>                 ...
>                 ssi3: ssi@3 {
>                         interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>;
>                         dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>;
>                         dma-names = "rx", "tx", "rxu", "txu";
>                 };
>         }
> 
> dma_request_slave_channel_compat() requests "dev",
> and this dev means sound here.
> 
> This "dev" will be used in dma_request_slave_channel_reason()
> and, it uses "dev->of_node".
> But, here, "dev->of_node" means "sound" here.
> 
> If I use your style, I need to do like below,
> or I need new compat function which can select of_node.
> 
>         tmp_node = dev->of_node;
>         dev->of_node = subnode;
>         dma_request_slave_channel_compat(... dev ...);
>         dev->of_node = tmp_node;

Ah, I see. I think the best way around this then would be to use
of_dma_request_slave_channel(), which takes a device node pointer
and a name argument as you need here.

Doing this will require marking that function as EXPORT_SYMBOL_GPL(),
but I see no problem with that.

I see you use dma_request_slave_channel_compat here. Does that mean
you have to support boards with this sound device that do not use DT?
If so, you will also have to split the request function like

	if (of_node)
		chan = of_dma_request_slave_channel(of_node, "rx");
	else
		chan = dma_request_channel(mask, filter, arg);

	Arnd

  reply	other threads:[~2015-02-19  8:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19  3:50 [PATCH 0/19] ASoC: rsnd: move 2nd DMAC from DMAEngine to rsnd driver Kuninori Morimoto
2015-02-19  3:50 ` [PATCH 01/19] ASoC: rsnd: remove SH-DMA-BASE specific implementation Kuninori Morimoto
2015-02-19  3:50 ` [PATCH 02/19] ASoC: rsnd: remove un-needed parameter from rsnd_dma_init() Kuninori Morimoto
2015-02-19  3:51 ` [PATCH 03/19] ASoC: rsnd: remove unused rsnd_dma_available() Kuninori Morimoto
2015-02-19  3:51 ` [PATCH 04/19] ASoC: rsnd: remove un-needed parameter from rsnd_dma_quit() Kuninori Morimoto
2015-02-19  3:51 ` [PATCH 05/19] ASoC: rsnd: tidyup rsnd_dma_to_mod() macro declaration position Kuninori Morimoto
2015-02-19  3:51 ` [PATCH 06/19] ASoC: rsnd: enable to get resource by name Kuninori Morimoto
2015-02-19  3:51 ` [PATCH 07/19] ASoC: rsnd: add rsnd_gen_get_phy_addr() to get physical address Kuninori Morimoto
2015-02-19  3:51 ` [PATCH 08/19] ASoC: rsnd: add dma.c for Audio DMAC / Audio DMAC peri peri Kuninori Morimoto
2015-02-19  3:52 ` [PATCH 09/19] ASoC: rsnd: move rsnd_gen_dma_addr() from gen.c to dma.c Kuninori Morimoto
2015-02-19  3:52 ` [PATCH 10/19] ASoC: rsnd: enable to care 1st / 2nd DMAC on rsnd_dma_xxx() Kuninori Morimoto
2015-02-19  3:52 ` [PATCH 11/19] ASoC: rsnd: add Audio DMAC peri peri support rework Kuninori Morimoto
2015-02-19  3:52 ` [PATCH 12/19] ASoC: rsnd: dma-names cares 1st DMAC only Kuninori Morimoto
2015-02-19  3:52 ` [PATCH 13/19] ASoC: rsnd: remove rsnd_dma::addr Kuninori Morimoto
2015-02-19  3:53 ` [PATCH 14/19] ASoC: rsnd: remove rsnd_dma::dir Kuninori Morimoto
2015-02-19  3:53 ` [PATCH 15/19] ASoC: rsnd: tidyup rcar_sound,ssi sample code Kuninori Morimoto
2015-02-19  3:53 ` [PATCH 16/19] ASoC: rsnd: add sample code of rcar_sound,src irq Kuninori Morimoto
2015-02-19  3:53 ` [PATCH 17/19] ASoC: rsnd: add sample code of reg-names Kuninori Morimoto
2015-02-19  3:53 ` [PATCH 18/19] ASoC: rsnd: add sample code of missing clocks Kuninori Morimoto
2015-02-19  3:53 ` [PATCH 19/19] ASoC: rsnd: add sample code of dma entry Kuninori Morimoto
2015-02-19  8:19 ` [PATCH 0/19] ASoC: rsnd: move 2nd DMAC from DMAEngine to rsnd driver Arnd Bergmann
2015-02-19  8:44   ` Kuninori Morimoto
2015-02-19  8:51     ` Arnd Bergmann [this message]
2015-02-19  9:11       ` 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=6087418.KkNNyy5Y2y@wuerfel \
    --to=arnd@arndb.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-sh@vger.kernel.org \
    --cc=vinod.koul@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox