From: Magnus Damm <magnus.damm@gmail.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: "linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
linux-mmc@vger.kernel.org,
Dan Williams <dan.j.williams@intel.com>,
Ian Molton <ian@mnementh.co.uk>
Subject: Re: [PATCH 2/8] SH: add DMA slave IDs for two SDHI controllers, add
Date: Thu, 22 Apr 2010 07:05:35 +0000 [thread overview]
Message-ID: <n2saec7e5c31004220005w331e3a0el4ef829558a74b132@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1004220824200.4655@axis700.grange>
On Thu, Apr 22, 2010 at 3:28 PM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> On Wed, 21 Apr 2010, Magnus Damm wrote:
>> On Wed, Apr 21, 2010 at 11:36 AM, Guennadi Liakhovetski
>> <g.liakhovetski@gmx.de> wrote:
>> > SuperH SDHI controllers can use DMA, add slave IDs to the header and slave
>> > definitions to sh7722.
>> >
>> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>> > ---
>> > arch/sh/include/asm/dmaengine.h | 4 ++++
>> > arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 10 ++++++++++
>> > 2 files changed, 14 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/arch/sh/include/asm/dmaengine.h b/arch/sh/include/asm/dmaengine.h
>> > index 2a02b61..876e601 100644
>> > --- a/arch/sh/include/asm/dmaengine.h
>> > +++ b/arch/sh/include/asm/dmaengine.h
>> > @@ -29,6 +29,10 @@ enum {
>> > SHDMA_SLAVE_SIUA_RX,
>> > SHDMA_SLAVE_SIUB_TX,
>> > SHDMA_SLAVE_SIUB_RX,
>> > + SHDMA_SLAVE_SDHI0_RX,
>> > + SHDMA_SLAVE_SDHI0_TX,
>> > + SHDMA_SLAVE_SDHI1_RX,
>> > + SHDMA_SLAVE_SDHI1_TX,
>> > };
>> >
>> > #endif
>>
>> Thanks for your work on this. Two SDHIs may be enough for most
>> processor types, but I think the G3 processor actually has three. With
>> that in mind, I think it makes more sense to keep the slave ids
>> together with the processor specific bits in for instance
>> arch/sh/include/cpu-sh4/cpu/sh7722.h.
>>
>> If you have time, can you please make a patch that moves the slave ids
>> into the processor specific header files? This on top of the other
>> code in the sh/dmaengine topic branch.
>
> Ok, yes, first, I forgot to mention - this patch series is based on your
> earlier SH dmaengine patches. Secondly - sure, we can move these defines
> in cpu-specific headers, otoh - why? This is just an enum, it doesn't take
> space in binaries, and having them all together helps uniformity and
> avoids duplication, I think. So, I would just add those SDHI2 macros to
> this list. The important thing is, the actual slave definition array are
> per-CPU. Which is now the case after your patch series.
Like you say, the actual slave definition array is per processor type.
But the available hardware blocks varies with processor type, and we
already have other processor specific information in the cpu-specific
headers. It does not add any code size, true.
The reasons why I prefer them to be split out are:
1) When someone adds support for a new processor it's easy to
implement the same type of information in the new cpu-specific header
as other processors. Adding and removing things from a global list of
processor blocks in a driver/framework specific header file hidden
somewhere is not going to happen. Also, people usually only focus on
one processor at a time. A long global list is just going to make
people confused. "Why is there a SDHI2 there when I only have SDHI on
my processor?"
2) Having them in a global list adds an unneccesary point of patch
serialization.
3) We keep other things like GPIOs and HWBLK in cpu-specific headers
already, why be special?
4) Having it in a global list may encourage people to include this
header from drivers. Isn't it better to force the drivers to use this
value as a cookie instead? This prevents people from adding hardware
block specific workarounds to the driver that may or may not work on
all processors...
/ magnus
next prev parent reply other threads:[~2010-04-22 7:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-21 15:36 [PATCH 0/8] add DMA support to tmio_mmc, using dmaengine API, use Guennadi Liakhovetski
2010-04-21 15:36 ` [PATCH 1/8] SH: constify multiple DMA related objects and references Guennadi Liakhovetski
2010-04-26 7:10 ` [PATCH 1/8] SH: constify multiple DMA related objects and references to them Paul Mundt
2010-04-21 15:36 ` [PATCH 2/8] SH: add DMA slave IDs for two SDHI controllers, add Guennadi Liakhovetski
2010-04-22 0:02 ` Magnus Damm
2010-04-22 6:28 ` Guennadi Liakhovetski
2010-04-22 7:05 ` Magnus Damm [this message]
2010-04-22 9:38 ` Guennadi Liakhovetski
2010-04-21 15:36 ` [PATCH 3/8] SH: add DMA slave definitions to sh7724 Guennadi Liakhovetski
2010-04-21 15:37 ` [PATCH 4/8] MMC: add DMA support to tmio_mmc driver, when used on Guennadi Liakhovetski
2010-04-22 0:12 ` Magnus Damm
2010-04-22 9:51 ` [PATCH 4/8] MMC: add DMA support to tmio_mmc driver, when used Guennadi Liakhovetski
2010-04-21 15:37 ` [PATCH 5/8] SH: Add SDHI DMA support to ecovec Guennadi Liakhovetski
2010-04-22 0:16 ` Magnus Damm
2010-04-21 15:37 ` [PATCH 6/8] SH: Add SDHI DMA support to ms7724se Guennadi Liakhovetski
2010-04-22 0:18 ` Magnus Damm
2010-04-22 6:20 ` Guennadi Liakhovetski
2010-04-21 15:37 ` [PATCH 7/8] SH: Add SDHI DMA support to kfr2r09 Guennadi Liakhovetski
2010-04-21 15:37 ` [PATCH 8/8] SH: Add SDHI DMA support to migor Guennadi Liakhovetski
2010-04-27 10:38 ` [PATCH 0/8] add DMA support to tmio_mmc, using dmaengine API, Guennadi Liakhovetski
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=n2saec7e5c31004220005w331e3a0el4ef829558a74b132@mail.gmail.com \
--to=magnus.damm@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=g.liakhovetski@gmx.de \
--cc=ian@mnementh.co.uk \
--cc=linux-mmc@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).