devicetree platform bus bindings

Herring Robert-RA7055 ra7055 at freescale.com
Tue Apr 6 22:45:17 EST 2010


Grant,

> > Do you plan to have generic DT parsing to platform device 
> creation code or
> > will this remain platform specific?
> 
> I'm actively developing this.  A while ago I decided I was not going
> to port of_platform_bus_type bus to any new architectures because it
> is effectively just platform_bus_type with a slightly different
> matching scheme.  So I wrote a patch that generates platform devices
> from the device tree instead.
> 
> However, since then I took on the task of removing
> of_platform_bus_type entirely and just using platform_bus_type on ppc,
> mb & sparc, so arm will be able to use the same code.  The patches I
> just pushed out to my experimental branch show my WIP code and how
> both the versatile and omap platforms are modified to use the common
> code.
> 
> Word of warning though, this is highly experimental code and I cannot
> promise it won't break spectacularly.
> 

I've updated to your latest tree and have MX51 working with DT. I've got
a few issues with bus_id/name+id. Is your goal that existing platform
drivers work unmodified? If so, the current <address>.<name> bus_id
scheme doesn't really work. The platform matching code needs
platform_device.name to be just a name without any instance id. I was
thinking this would be the compatible field. There are also dependencies
on the bus_id being name.id in the clock code for example. I was
planning to use cell-index property for the id.

How do you see adding platform_data to the devices working?

Rob


More information about the devicetree-discuss mailing list