Virtex device tree generator proof of concept

Stephen Neuendorffer stephen.neuendorffer at xilinx.com
Thu Dec 7 11:19:41 EST 2006


> Yes please, send me your patches.
done.

> > I'm curious if you've heard of anyone using device trees 
> other than at 
> > boot time: for instance, using an incomplete device tree blob to 
> > represent components discovered at runtime?  It looks like 
> it should 
> > be possible to rip out alot of the code from 
> kernel/powerpc/prom.c in 
> > recent kernels to parse incomplete device trees, too...  
> Any thoughts?
> 
> Possible, but there are probably better ways do deal with 
> those; like just allocating and registering a platform 
> device; or adding nodes to the existing tree.  If you're able 
> to probe a device, then do you need to describe it with a 
> device tree fragment?
> 
> What scenario are you thinking about?

In an FPGA, even platform-bus devices don't necessarily exist at
processor boot time, and
they might change during the life of a system.
As you suggest, I plan to simply add the correct devices to the platform
bus at the correct time,
and I'm also trying to abstract the code that creates the platform
devices (which probably
should be part of a basic kernel device) from the information about
which devices actually exist.
There are probably other ways of doing this (for instance, automatically
generating the code for
a kernel module which adds devices to the platform bus), but a device
tree fragment 
doesn't seem like too bad a way of doing it.

Steve




More information about the Linuxppc-dev mailing list