Thread (3 messages) flat view 3 messages, 2 authors, 2015-05-13

Re: [PATCH v4 19/21] drivers/of: Support adding sub-tree

From: Pantelis Antoniou <hidden>
Date: 2015-05-04 16:41:59
Also in: linux-pci, linuxppc-dev

Hi Ben,
On May 2, 2015, at 01:57 , Benjamin Herrenschmidt [off-list ref] wrote:

On Fri, 2015-05-01 at 13:46 -0500, Rob Herring wrote:
quoted
On Fri, May 1, 2015 at 10:22 AM, Benjamin Herrenschmidt
[off-list ref] wrote:
quoted
On Fri, 2015-05-01 at 07:54 -0500, Rob Herring wrote:
quoted
The difference seems to be whether you allocate space or just point to
the FDT for various strings/data. Is that right?
quoted
  * of_fdt_add_subtree() is the introduced API to do the work.
Have you looked at overlays and if so why do they not work for your purposes?

Why do you need to do this with the flattened tree?
The basic idea I asked Gavin to implement is that since the FW needs to
provide a bunch of DT updates to Linux at runtime in the form of new
nodes below an existing one, rather than doing it via some new/custom
format, instead, have it send a bit of FDT blob to expand under an
existing node.
Overlay = an FDT blob to graft into a live running system. Sounds like
the same thing.
quoted
As for the details of Gavin implementation, I haven't looked at it in
details yet so there might be issues there, however I don't know what
you mean by "overlays", any pointer ?
CONFIG_OF_OVERLAY

http://events.linuxfoundation.org/sites/events/files/slides/dynamic-dt-keynote-v3.pdf
Well, that looks horrendously complicated, poorly documented and totally
unused in-tree outside of the unittest stuff, yay ! It has all sort of
"features" that I don't really care about.
If it was easy to get stuff in, it would get more of the real-use drivers
in.
I still don't see what it buys me other than making my FW a lot more
complex having to generate all that additional fixup etc... crap that I
don't totally get yet.
You don’t generate any additional fixups. You just compile with the option
that generates all the fixups for you.
What's wrong with just unflattening the nodes in place ? The DT comes
from the FW in the first place so all the phandles are already good in
the new added blob. Internally, the FW created new nodes in its internal
representation and flattened the subtree and sends that subtree to
Linux.

I don't plan to play "revert" either, if you unplug, I do need to remove
what's under the slot but that's true of boot time devices, not just
"new" ones, so the overlay stuff won't do the trick and I certainly
don't want to keep track…
You get all of the corner cases handled for free. Perhaps it works for your
case too.

Perhaps you can educate me on what you need supported and we can make sure
it’s included.
Ben.
Regards

— Pantelis

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help