* RFC: of_platform and platform bus merge
@ 2010-03-18 16:52 Grant Likely
2010-03-19 0:32 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2010-03-18 16:52 UTC (permalink / raw)
To: devicetree-discuss, David Miller,
sparclinux-u79uwXL29TY76Z2rM5mHXA
Cc: Jeremy Kerr, Michal Simek, Stephen Rothwell
Hi Dave,
I need your opinion on the of_platform bus. For powerpc, microblaze,
and all others I intend to merge the current of_platform_bus_type with
platform_bus_type. powerpc and microblaze basically use of_platform
bus as if it were the platform bus, so this is an easy decision to
make. As I mentioned, I've already written a patch that makes
of_device and platform_device the same structure. I also think I have
a way to adapt the of_platform_driver registration to make existing
of_platform_drivers register on the platform bus without any driver
changes, and preserving the existing OF-style match behaviour
(basically by moving the of_match_table into struct device_driver when
CONFIG_OF is set; I've got a patch that does this too), and preserving
the existing device hierarchy.
However, I know that sparc uses a different model in that every node
in a sparc device tree gets registered on the of_platform_bus, not
just the things that would be analogous to 'platform' devices.
Therefore, the merging of_platform_bus_type and platform_bus_type, and
the inherent co-mingling of device drivers for both buses, has a
higher likelyhood of causing problems on sparc than it does on powerpc
or microblaze.
I see two possible ways to proceed.
1. Split of_platform code so that sparc preserves the old behaviour,
while powerpc, mb, arm, etc. go ahead with the of_platform bus merge.
ie. when building sparc, of_platform_drivers will get registered on
the of_platform_bus_type as they currently do. When building
everything else, of_platform_driver registration will use an adapter
shim to register of_platform_drivers onto the platform bus. Non-sparc
of_platform_drivers will slowly get migrated to normal platform
drivers, and eventually the of_platform_bus APIs will be a
sparc-specific thing.
2. Merge of_platform_bus_type with platform_bus on sparc too.
I'm happy to take either path, so I need to know your opinion on the
of_platform/platform bus merger. I will of course do all the sparc
compile testing on any changes that I make, but I'll need help making
sure I don't break things at runtime.
Thanks,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RFC: of_platform and platform bus merge
2010-03-18 16:52 RFC: of_platform and platform bus merge Grant Likely
@ 2010-03-19 0:32 ` David Miller
2010-03-19 4:24 ` Grant Likely
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2010-03-19 0:32 UTC (permalink / raw)
To: grant.likely
Cc: devicetree-discuss, sparclinux, benh, sfr, michal.simek,
jeremy.kerr
From: Grant Likely <grant.likely@secretlab.ca>
Date: Thu, 18 Mar 2010 10:52:47 -0600
> 2. Merge of_platform_bus_type with platform_bus on sparc too.
Try this, if it explodes we'll just revert it and have
to think of a better idea.
The only issue that can arise is the case where some
platform device driver uses a name that exists in
the OF device tree name space.
We have control over the names that the pure platform device
drivers use, so... we could fix such conflicts and therefore
maintain the merge on sparc.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RFC: of_platform and platform bus merge
2010-03-19 0:32 ` David Miller
@ 2010-03-19 4:24 ` Grant Likely
0 siblings, 0 replies; 3+ messages in thread
From: Grant Likely @ 2010-03-19 4:24 UTC (permalink / raw)
To: David Miller
Cc: devicetree-discuss, sparclinux, benh, sfr, michal.simek,
jeremy.kerr
On Thu, Mar 18, 2010 at 6:32 PM, David Miller <davem@davemloft.net> wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
> Date: Thu, 18 Mar 2010 10:52:47 -0600
>
>> 2. Merge of_platform_bus_type with platform_bus on sparc too.
>
> Try this, if it explodes we'll just revert it and have
> to think of a better idea.
Okay, will do. I'll prepare the patches.
Thanks,
g.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-19 4:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-18 16:52 RFC: of_platform and platform bus merge Grant Likely
2010-03-19 0:32 ` David Miller
2010-03-19 4:24 ` Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox