All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: David Miller <davem@davemloft.net>, thierry.reding@avionic-design.de
Cc: sparclinux@vger.kernel.org, linus.walleij@linaro.org,
	linux-kernel@vger.kernel.org
Subject: Re: SPARC and OF_GPIO
Date: Fri, 30 Nov 2012 09:35:20 +0000	[thread overview]
Message-ID: <20121130093520.631503E070C@localhost> (raw)
In-Reply-To: <20121107.023419.1656398773495533906.davem@davemloft.net>

On Wed, 07 Nov 2012 02:34:19 -0500 (EST), David Miller <davem@davemloft.net> wrote:
> From: Thierry Reding <thierry.reding@avionic-design.de>
> Date: Wed, 7 Nov 2012 07:52:58 +0100
> 
> > It seems like OF_ADDRESS would be trickier. A comment around line 60 in
> > drivers/of/platform.c says that SPARC doesn't need functions defined in
> > the enclosing #ifdef CONFIG_OF_ADDRESS block. I'm not sure it would be
> > acceptable to remove the conflict nonetheless, even if the functions
> > aren't used. One benefit would be that the code could receive some extra
> > compile coverage.
>  ...
> > Finally, OF_IRQ is again just generic code to map device tree data to
> > IRQ domains. While I didn't see the IRQ_DOMAIN symbol selected anywhere
> > in SPARC it should still be possible to run drivers that properly
> > implement IRQ domains on SPARC, right? Or is there any reason why they
> > wouldn't work?
> 
> These are the two most conflicted areas for Sparc.
> 
> For addresses, we fully compute the full fully resolved physical
> address of all registers of an OF device very early at bootup time
> when we first scan the device tree.
> 
> Same goes for interrupts, we fully compute them early in the bootup
> process.

Right. That's the reason I haven't tackled making all architectures do
the same thing. I've not been confident that I'd get the sparc bits
correct. I think it could be done, but I haven't been able to wrap my
brain around it sufficiently.

On non-sparc I've actually been moving in the direction of resolving
resources at .probe time to make it easier to handle deferred probing.
So if, for example, a device irq line is routed to a GPIO instead of the
core interrupt controller, then the irq number won't be known until
after the gpio driver .probe occurs. For addresses, this situation is
unlikely, but for all the other kinds of resources (gpios, regs, clocks, irqs,
etc) it is a problem that we're actually seeing.

g.

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.

  reply	other threads:[~2012-11-30  9:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-05  9:22 SPARC and OF_GPIO Thierry Reding
2012-11-05  9:22 ` Thierry Reding
2012-11-05  9:53 ` Thierry Reding
2012-11-05  9:53   ` Thierry Reding
2012-11-06 23:40   ` David Miller
2012-11-06 23:40     ` David Miller
2012-11-07  6:52     ` Thierry Reding
2012-11-07  6:52       ` Thierry Reding
2012-11-07  7:34       ` David Miller
2012-11-07  7:34         ` David Miller
2012-11-30  9:35         ` Grant Likely [this message]
2012-11-30  9:40           ` Thierry Reding
2012-11-30  9:40             ` Thierry Reding
2012-11-30  9:58             ` Grant Likely
2012-11-30 16:46           ` David Miller
2012-11-30 16:46             ` David Miller

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=20121130093520.631503E070C@localhost \
    --to=grant.likely@secretlab.ca \
    --cc=davem@davemloft.net \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=thierry.reding@avionic-design.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.