[issue] Appended device trees does not work for ST-E

Linus Walleij linus.walleij at linaro.org
Fri Oct 7 18:02:44 EST 2011


On Thu, Oct 6, 2011 at 6:35 PM, Mounir Bsaibes
<mounir.bsaibes at linaro.org> wrote:

> issue:
> "Appended device trees does not work for us. Still don't know why."

I have fixed it now, sorry for all the fuzz, appended device
trees *are* working for us, as of friday last week.

Short story: we're so stupid. (As usual.)

Long story, I *think* core problem was this:

In kernel 3.0 you could enable CONFIG_USE_OF
and PROC_DEVICETREE to get a dummy device tree in
/proc/device-tree, so you could enable it just to get the code
compiled in.

As of 3.1 rc:s if you enable CONFIG_USE_OF, the core
DT code will start looking for a compatible node, so you
need a .dt_compat entry in your MACHINE_START
structure, and it has to reference a matching compat node
in the device tree. Else it will print an error an hang.

Which is fully logical, if you enable device tree, you should
use it.

The problem was further complicated that the warning
about the missing compat node only appears in
early_printk() context since the console is not up at this
point, if you don't have that, the machine will hang without
any prints and you need to figure out what happens.

We enabled early printk:s but since early_printk() is
problematic with multi-machine configurations we didn't
see them.

So we were basically hit by the ambigous prossibility to
configure in earlyprints on machines with the UART in
different places, which has been discussed by Will Deacon
et al elsewhere.

Maybe we should document in Kconfig:s
CONFIG_USE_OF option that if you enable this
for ARM your machine it won't boot unless it finds a
compatible device tree, I don't know.

Yours,
Linus Walleij


More information about the devicetree-discuss mailing list