summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/ops.h
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-01-25 05:41:05 +0100
committerKumar Gala <galak@kernel.crashing.org>2008-01-27 21:07:37 +0100
commitb3bea15d29799797d1486aeddf883404a2e05c81 (patch)
treed8ddcaa66e27a0b367d50c9d32e389c41d580322 /arch/powerpc/boot/ops.h
parent[POWERPC] Always build setup-bus.c on powerpc (diff)
downloadlinux-b3bea15d29799797d1486aeddf883404a2e05c81.tar.xz
linux-b3bea15d29799797d1486aeddf883404a2e05c81.zip
[POWERPC] bootwrapper: Add find_node_by_compatible
Add the ability to find a device node by just what its compatible with. This is useful in cases that we don't have a prop to find the node with. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/boot/ops.h')
-rw-r--r--arch/powerpc/boot/ops.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h
index 5872ef1779ae..4b0544b03c64 100644
--- a/arch/powerpc/boot/ops.h
+++ b/arch/powerpc/boot/ops.h
@@ -46,6 +46,8 @@ struct dt_ops {
void *(*find_node_by_prop_value)(const void *prev,
const char *propname,
const char *propval, int proplen);
+ void *(*find_node_by_compatible)(const void *prev,
+ const char *compat);
unsigned long (*finalize)(void);
char *(*get_path)(const void *phandle, char *buf, int len);
};
@@ -172,6 +174,15 @@ static inline void *find_node_by_alias(const char *alias)
return NULL;
}
+static inline void *find_node_by_compatible(const void *prev,
+ const char *compat)
+{
+ if (dt_ops.find_node_by_compatible)
+ return dt_ops.find_node_by_compatible(prev, compat);
+
+ return NULL;
+}
+
void dt_fixup_memory(u64 start, u64 size);
void dt_fixup_cpu_clocks(u32 cpufreq, u32 tbfreq, u32 busfreq);
void dt_fixup_clock(const char *path, u32 freq);