summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/dynamic-resolution-notes.txt
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-11 10:47:50 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-11 10:47:50 (GMT)
commite98d6e7f7625ed60c7bc1d39aeb2375ed3918fd5 (patch)
treebc6e9a6428229d2fca73e1447b5cbfe59866c4b4 /Documentation/devicetree/dynamic-resolution-notes.txt
parent4e0b7fe38345b81930363b9f1b4b324181ddcc9e (diff)
parent2118f4b8dfc666c3e4a9e262beca79636a0852fe (diff)
downloadlinux-e98d6e7f7625ed60c7bc1d39aeb2375ed3918fd5.tar.xz
Merge tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux
Pull devicetree changes from Grant Likely: "This branch contains bug fixes and new features for the devicetree code. Most of the changes are either new testcases for the selftest code or documentation changes. The most notable change is the addition of a phandle resolver for use when grafting in a second device tree blob into the core tree. The resolver isn't currently used by anything other than the selftest module, but it will be used to support device tree overlays; probably in the v3.19 timeframe. Also note that I've moved my normal tree from git.secretlab.ca to git.kernel.org" * tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux: of/selftest: Move hash table off stack to fix large frame size To remove non-ascii characters in of_selftest.txt of/selftest: Use the resolver to fixup phandles of: Introduce Device Tree resolve support. of/selftest: Add a test for duplicate phandles of: Don't try to search when phandle == 0 of/selftest: Test structure of device tree of: Fix NULL dereference in selftest removal code of: add vendor prefix for Chipidea of: Add vendor prefix for Innolux Corporation of: Add vendor prefix for Sitronix devicetree: bindings: Document Gateworks vendor prefix of: Add vendor prefix for Energy Micro dt/documentation: add specification of dma bus information
Diffstat (limited to 'Documentation/devicetree/dynamic-resolution-notes.txt')
-rw-r--r--Documentation/devicetree/dynamic-resolution-notes.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/Documentation/devicetree/dynamic-resolution-notes.txt b/Documentation/devicetree/dynamic-resolution-notes.txt
new file mode 100644
index 0000000..083d232
--- /dev/null
+++ b/Documentation/devicetree/dynamic-resolution-notes.txt
@@ -0,0 +1,25 @@
+Device Tree Dynamic Resolver Notes
+----------------------------------
+
+This document describes the implementation of the in-kernel
+Device Tree resolver, residing in drivers/of/resolver.c and is a
+companion document to Documentation/devicetree/dt-object-internal.txt[1]
+
+How the resolver works
+----------------------
+
+The resolver is given as an input an arbitrary tree compiled with the
+proper dtc option and having a /plugin/ tag. This generates the
+appropriate __fixups__ & __local_fixups__ nodes as described in [1].
+
+In sequence the resolver works by the following steps:
+
+1. Get the maximum device tree phandle value from the live tree + 1.
+2. Adjust all the local phandles of the tree to resolve by that amount.
+3. Using the __local__fixups__ node information adjust all local references
+ by the same amount.
+4. For each property in the __fixups__ node locate the node it references
+ in the live tree. This is the label used to tag the node.
+5. Retrieve the phandle of the target of the fixup.
+6. For each fixup in the property locate the node:property:offset location
+ and replace it with the phandle value.