linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Magnus Damm <magnus.damm@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Vinod Koul <vinod.koul@intel.com>,
	Mark Brown <broonie@linaro.org>, Mark Brown <broonie@kernel.org>,
	Simon <horms@verge.net.au>, Rob Herring <robh+dt@kernel.org>,
	Linux-SH <linux-sh@vger.kernel.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	dmaengine@vger.kernel.org
Subject: Re: [PATCH 1/2][RFC] dmaengine: rcar-audmapp: calculate chcr via src/dst addr
Date: Thu, 29 Jan 2015 09:33:28 +0000	[thread overview]
Message-ID: <CAMuHMdX5SEwEARo7dFTZrtuDXbrv2MeZrOZFWsahNhccWPNn_A@mail.gmail.com> (raw)
In-Reply-To: <16757441.qC3ryuq0R5@wuerfel>

On Thu, Jan 29, 2015 at 10:15 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Thursday 29 January 2015 01:24:06 Kuninori Morimoto wrote:
>> Current rcar-audmapp is assuming that CHCR value are specified
>> from platform data or DTS bindings. but, it is possible to
>> calculate CHCR settings from src/dst address.
>> DTS bindings node can be reduced by this patch.
>>
>> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> The intention definitely looks good, but I'm worried that the
> table you add here might be too SoC specific.
>
>> +struct id_addr_table {
>> +     u8  id;
>> +     u16 addr;
>> +};
>> +
>> +static u32 audmapp_addr_to_id(struct device *dev, u32 addr)
>> +{
>> +     struct id_addr_table ssi_id_table[] = {

static const, so they don't get copied to the stack on every invocation.

>> +             {0x00, 0x0000}, /* SSI00 */
>> +             {0x01, 0x0400}, /* SSI01 */
>> +             {0x02, 0x0800}, /* SSI02 */
>> +             {0x03, 0x0C00}, /* SSI03 */
>> +             {0x04, 0x1000}, /* SSI10 */
>> +             {0x05, 0x1400}, /* SSI11 */
>> +             {0x06, 0x1800}, /* SSI12 */
>> +             {0x07, 0x1C00}, /* SSI13 */
>> +             {0x08, 0x2000}, /* SSI20 */
>
> Isn't the address part here the physical address of the FIFO,

Yes they are.

> which can be different for each implementation that contains
> an audmapp device?

Fortunately they're identical for all (current) members of the R-Car Gen2
family.

Morimoto-san: Are the base addresses configured in DT?
I did a quick search for 0xec300000, 0xec320000, 0xec40000,
0xec420000, and 0xec000000,  and couldn't find them in DT, only in
source code (comments). They must come from somewhere?
Note that I didn't follow the sound binding discussions that closely.

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2015-01-29  9:33 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20  1:43 [PATCH 0/2 v5] dmaengine: rcar-audmapp: independent from SH_DMAE_BASE Kuninori Morimoto
2015-01-20 13:16 ` Laurent Pinchart
2015-01-21  0:51 ` Kuninori Morimoto
2015-01-22 21:14 ` Laurent Pinchart
2015-01-23  0:35   ` Kuninori Morimoto
2015-01-26  2:18     ` [alsa-devel] " Kuninori Morimoto
2015-01-26  3:03       ` Kuninori Morimoto
2015-01-26  2:39     ` Laurent Pinchart
2015-01-26  2:57       ` Kuninori Morimoto
2015-01-26  3:01         ` Laurent Pinchart
2015-01-28  5:45           ` Magnus Damm
2015-01-29  1:23             ` Kuninori Morimoto
2015-01-29  1:24               ` [PATCH 1/2][RFC] dmaengine: rcar-audmapp: calculate chcr via src/dst addr Kuninori Morimoto
2015-01-29  9:15                 ` Arnd Bergmann
2015-01-29  9:33                   ` Geert Uytterhoeven [this message]
2015-01-29  9:45                     ` Kuninori Morimoto
2015-01-29  9:50                       ` Geert Uytterhoeven
2015-01-30  0:27                         ` Kuninori Morimoto
2015-01-30  1:17                           ` [alsa-devel] " Kuninori Morimoto
2015-01-29  9:41                   ` Kuninori Morimoto
2015-01-29  1:24               ` [PATCH 2/2][RFC] ARM: shmobile: r8a7790: sound enables Audio DMAC peri peri entry on DTSI Kuninori Morimoto
2015-01-29  6:34               ` [PATCH 0/2 v5] dmaengine: rcar-audmapp: independent from SH_DMAE_BASE Magnus Damm
2015-01-29  6:45                 ` Kuninori Morimoto
2015-01-26  6:26       ` Vinod Koul
2015-01-26  6:40         ` Kuninori Morimoto
2015-01-26  7:16           ` Kuninori Morimoto
  -- strict thread matches above, loose matches on Subject: below --
2014-11-12  9:02 [PATCH] " 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=CAMuHMdX5SEwEARo7dFTZrtuDXbrv2MeZrOZFWsahNhccWPNn_A@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=broonie@linaro.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).