From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Miller <davem@davemloft.net>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: on the topic of of_device resources...
Date: Mon, 05 May 2008 18:55:32 +1000 [thread overview]
Message-ID: <1209977732.21644.65.camel@pasglop> (raw)
In-Reply-To: <20080505.014405.179523103.davem@davemloft.net>
On Mon, 2008-05-05 at 01:44 -0700, David Miller wrote:
>
> My plan on the sparc side is to remove the SBUS device type and bus
> entirely, as well as the EBUS layer I have. All of it can use
> of_device nodes on of_platform_bus. Even the DMA stuff just falls out
> of everything transparently because even that's all done via
> dev_archdata.
>
> If you look at the SBUS layer, it's simply replicating OF device
> node objects for things that sit underneath SBUS bus nodes. And
> it's like this because 32-bit sparc doesn't do the DMA stuff
> transparently like 64-bit sparc does.
>
> The of_platform_bus probing layer is extremely clean and I like
> how simple it is to write drivers using it. The drivers look
> like normal PCI device drivers, both in terms of matching
> and in terms of resource/irq fetching.
>
> I even use this for the core timeofday clock probing on sparc64.
Well, I agree it's nice and sleek for bus types you have complete
control on. The problem is when you start sharing with other
architecture :-) (well, other than powerpc & sparc !).
Which is why I might just stick to macio_device the way it is since
that's a totally local bus type, despite moving toward the different
approach I exposed for other things.
I think we need to continue supporting both approaches in the long run,
but that also means that low level parsers should as much as possible
remain based stictly on device node.
Now regarding using some kind of device for the timeofday clock probing,
well that's a different issue :-) We do need to get rid of our ppc_md.
stuff for that and move toward the new RTC infrastructure, which means
that our TODs will be proved like other devices.
Now, how so will depend on what TOD we have... i2c TODs (very common in
embedded) already have the necessary bits to be probed via the OF/i2c
bindings, creating i2c_device objects. Platform custom things like
PowerMac CUDA or PMU could be of_platform_devices. Etc...
Cheers,
Ben.
prev parent reply other threads:[~2008-05-05 8:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-05 7:59 on the topic of of_device resources David Miller
2008-05-05 8:26 ` Benjamin Herrenschmidt
2008-05-05 8:44 ` David Miller
2008-05-05 8:55 ` Benjamin Herrenschmidt [this message]
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=1209977732.21644.65.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=linuxppc-dev@ozlabs.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).