]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[POWERPC] bootwrapper: Add ft_find_device_rel().
authorScott Wood <scottwood@freescale.com>
Mon, 12 Mar 2007 20:41:53 +0000 (14:41 -0600)
committerPaul Mackerras <paulus@samba.org>
Fri, 16 Mar 2007 04:49:08 +0000 (15:49 +1100)
Add a function to look up a relative, rather than absolute, path name.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/boot/flatdevtree.c
arch/powerpc/boot/flatdevtree.h

index e319a6502918e51addd8861fd721f702faa8a257..bd006f75e5ed9e83f6c85a0fb74a13688768c755 100644 (file)
@@ -654,6 +654,19 @@ void *ft_find_device(struct ft_cxt *cxt, const char *srch_path)
        return ft_get_phandle(cxt, node);
 }
 
+void *ft_find_device_rel(struct ft_cxt *cxt, const void *top,
+                         const char *srch_path)
+{
+       char *node;
+
+       node = ft_node_ph2node(cxt, top);
+       if (node == NULL)
+               return NULL;
+
+       node = ft_find_descendent(cxt, node, srch_path);
+       return ft_get_phandle(cxt, node);
+}
+
 void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path)
 {
        struct ft_atom atom;
index b9cd9f61f351e47df2032c6328fbfefafdf007ec..1f37ca2d34f6f609e3a712fe1a26580047dee089 100644 (file)
@@ -97,6 +97,8 @@ int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size);
 void ft_dump_blob(const void *bphp);
 void ft_merge_blob(struct ft_cxt *cxt, void *blob);
 void *ft_find_device(struct ft_cxt *cxt, const char *srch_path);
+void *ft_find_device_rel(struct ft_cxt *cxt, const void *top,
+                         const char *srch_path);
 void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path);
 int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
                void *buf, const unsigned int buflen);