All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [issue] Appended device trees does not work for ST-E
       [not found] ` <CAPQUh1TeeJTXVB7=PQZS2XBi-iW=EvkP5bZ95J-fxiE5B-nOgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-10-07  7:02   ` Linus Walleij
       [not found]     ` <CACRpkdZ_nc5B7Sy9r58U1b9dPy5Ua0NxXRq7YYkZnJEk6df7bA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2011-10-07  7:02 UTC (permalink / raw)
  To: Mounir Bsaibes
  Cc: Nicolas Pitre, Deepak Saxena, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Thu, Oct 6, 2011 at 6:35 PM, Mounir Bsaibes
<mounir.bsaibes-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [issue] Appended device trees does not work for ST-E
       [not found]     ` <CACRpkdZ_nc5B7Sy9r58U1b9dPy5Ua0NxXRq7YYkZnJEk6df7bA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-10-07  9:47       ` Pawel Moll
  2011-10-07 14:22       ` Mounir Bsaibes
  1 sibling, 0 replies; 3+ messages in thread
From: Pawel Moll @ 2011-10-07  9:47 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Nicolas Pitre, Deepak Saxena,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Mounir Bsaibes

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

Under such circumstances I connect a
let's-call-it-JTAG-debugger-of-your-choice ;-) to the target and dump
the log_buf. Saved my live so many times...

Cheers!

Paweł



_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [issue] Appended device trees does not work for ST-E
       [not found]     ` <CACRpkdZ_nc5B7Sy9r58U1b9dPy5Ua0NxXRq7YYkZnJEk6df7bA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2011-10-07  9:47       ` Pawel Moll
@ 2011-10-07 14:22       ` Mounir Bsaibes
  1 sibling, 0 replies; 3+ messages in thread
From: Mounir Bsaibes @ 2011-10-07 14:22 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Nicolas Pitre, Deepak Saxena, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ


[-- Attachment #1.1: Type: text/plain, Size: 2230 bytes --]

On Fri, Oct 7, 2011 at 2:02 AM, Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>wrote:

> On Thu, Oct 6, 2011 at 6:35 PM, Mounir Bsaibes
> <mounir.bsaibes-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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.
>
> 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>

[-- Attachment #1.2: Type: text/html, Size: 3456 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-07 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAPQUh1TeeJTXVB7=PQZS2XBi-iW=EvkP5bZ95J-fxiE5B-nOgw@mail.gmail.com>
     [not found] ` <CAPQUh1TeeJTXVB7=PQZS2XBi-iW=EvkP5bZ95J-fxiE5B-nOgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-07  7:02   ` [issue] Appended device trees does not work for ST-E Linus Walleij
     [not found]     ` <CACRpkdZ_nc5B7Sy9r58U1b9dPy5Ua0NxXRq7YYkZnJEk6df7bA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-07  9:47       ` Pawel Moll
2011-10-07 14:22       ` Mounir Bsaibes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.