Devicetree
 help / color / mirror / Atom feed
* 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

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