[PATCH] powerpc: Routine to find the devtree node of a linux,phandle

Mark A. Greer mgreer at mvista.com
Wed Mar 28 08:31:41 EST 2007


Signed-off-by: Mark A. Greer <mgreer at mvista.com>
---

This depends on Scott Wood's patch
	'[PATCH 02/17] bootwrapper: Add dt_ops methods.'
from March 16 that adds 'find_node_by_prop_value()' and friends.

 ops.h |    6 ++++++
 1 file changed, 6 insertions(+)
---

diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h
index dae0e3b..ba516a6 100644
--- a/arch/powerpc/boot/ops.h
+++ b/arch/powerpc/boot/ops.h
@@ -140,6 +140,12 @@ static inline void *find_node_by_devtype(const void *prev,
 	return find_node_by_prop_value_str(prev, "device_type", type);
 }
 
+static inline void *find_node_by_linuxphandle(const u32 linuxphandle)
+{
+	return find_node_by_prop_value(NULL, "linux,phandle",
+			(char *)&linuxphandle, sizeof(u32));
+}
+
 static inline void *malloc(u32 size)
 {
 	return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL;



More information about the Linuxppc-dev mailing list