Skip to contentSkip to conversation

powerpc: Add flatdevtree source

PATCH In review Mark A. Greer 1 participant 1 message Oct 10, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 2/4 powerpc: Add flatdevtree source

Add the latest version of the flatdevtree code and corresponding glue.

A phandle table now tracks values returned by ft_find_device(). The value returned by ft_find_device() is a phandle which is really an index into the phandle table. The phandle table contains the address of the corresponding node. When the flat dt is edited/moved, the node pointers in the phandle table are updated accordingly so no phandles kept by the caller become stale.

---

 Makefile           |    3 
 flatdevtree.c      |  876 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 flatdevtree.h      |   62 +++
 flatdevtree_env.h  |   47 ++
 flatdevtree_misc.c |   56 +++
 5 files changed, 1042 insertions(+), 2 deletions(-)

---

arch/powerpc/boot/Makefile +2 -1
index 003520b..d4042ad 100644
@@ -40,7 +40,8 @@ zliblinuxheader := zlib.h zconf.h zutil.
 $(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) \
 		$(addprefix $(obj)/,$(zlibheader))
 
-src-wlib := string.S stdio.c main.c div64.S $(zlib)
+src-wlib := string.S stdio.c main.c flatdevtree.c flatdevtree_misc.c div64.S \
+		$(zlib)
 src-plat := of.c
 src-boot := crt0.S $(src-wlib) $(src-plat) empty.c
 
arch/powerpc/boot/flatdevtree.c new file +876 -0

876 lines not on this page · raw message

arch/powerpc/boot/flatdevtree.h +61 -1

72 lines not on this page · raw message

arch/powerpc/boot/flatdevtree_env.h new file +47 -0

47 lines not on this page · raw message

arch/powerpc/boot/flatdevtree_misc.c new file +56 -0

56 lines not on this page · raw message