Re: [issue] Appended device trees does not work for ST-E
From: Mounir Bsaibes <hidden>
Date: 2011-10-07 14:22:52
On Fri, Oct 7, 2011 at 2:02 AM, Linus Walleij [off-list ref]wrote:
On Thu, Oct 6, 2011 at 6:35 PM, Mounir Bsaibes [off-list ref] wrote:quoted
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. Excellent - thank you.
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.
copying John Ztultz to handle as he see fit. John is working on kconfig, maybe he would slip this suggestion in.
Yours, Linus Walleij
-- Mounir Bsaibes Project Manager Follow Linaro.org: facebook.com/pages/Linaro/155974581091106 http://twitter.com/#!/linaroorg http://www.linaro.org/linaro-blog <http://www.linaro.org/linaro-blog>