public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] ARM: mach-shmobile: ap4evb SDHI0 platform data
Date: Wed, 10 Mar 2010 07:58:28 +0000	[thread overview]
Message-ID: <20100310075828.GE19518@linux-sh.org> (raw)
In-Reply-To: <20100310071528.5975.28821.sendpatchset@t400s>

On Wed, Mar 10, 2010 at 04:49:24PM +0900, Magnus Damm wrote:
> On Wed, Mar 10, 2010 at 4:36 PM, Paul Mundt <lethal@linux-sh.org> wrote:
> > On Wed, Mar 10, 2010 at 04:15:28PM +0900, Magnus Damm wrote:
> >> @@ -206,10 +207,38 @@ static struct platform_device keysc_devi
> >> ? ? ? },
> >> ?};
> >>
> >> +/* SDHI0 */
> >> +static struct sh_mobile_sdhi_info sdhi0_info = {
> >> +};
> >> +
> > Try again?
> 
> The sh_mobile_sdhi driver allows omitting the platform data, so
> perhaps that's a better idea.
> 
If the driver didn't allow for omitting platform data it would be crap,
and broken. We do not condone silly driver behaviour.

> >> +static struct resource sdhi0_resources[] = {
> >> + ? ? [0] = {
> >> + ? ? ? ? ? ? .name ? = "SDHI0",
> >> + ? ? ? ? ? ? .start ?= 0xe6850000,
> >> + ? ? ? ? ? ? .end ? ?= 0xe68501ff,
> >> + ? ? ? ? ? ? .flags ?= IORESOURCE_MEM,
> >
> > If you aren't going to use a useful name for the resource, then the
> > name can just be left unset, this will ensure that the driver core
> > assigns the resource a name matching the device name/id pair.
> 
> The data sheet refers to this hardware block as SDHI0.
> 
> > So if left unset you would end up with "sh_mobile_sdhi.0" in /proc/iomem,
> > which could be more intuitive.
> 
> Sure, that's also an option. For sh7724 (and perhaps earlier
> SH-Mobile) most resources use the data sheet name for /proc/iomem.
> 
Leaving it as it is in the data sheet is of course fine, but many of
these blocks have absurdly generic names. Also note that in this case
/proc/iomem and /proc/interrupts and so on will have an inconsistency
between the naming, so we have a mixture of SDHI0 and sh_mobile_sdhi.0.

Perhaps some people find this separation useful, but it quickly turns in
to a mess with things like 12 TMU channels all using slightly different
naming conventions.

  parent reply	other threads:[~2010-03-10  7:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10  7:15 [PATCH] ARM: mach-shmobile: ap4evb SDHI0 platform data Magnus Damm
2010-03-10  7:36 ` Paul Mundt
2010-03-10  7:49 ` Magnus Damm
2010-03-10  7:58 ` Paul Mundt [this message]
2010-03-10  9:26 ` [PATCH] ARM: mach-shmobile: ap4evb SDHI0 platform data V2 Magnus Damm

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=20100310075828.GE19518@linux-sh.org \
    --to=lethal@linux-sh.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