Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81366
b: refs/heads/master
c: b3bea15
h: refs/heads/master
v: v3
  • Loading branch information
Kumar Gala committed Jan 27, 2008
1 parent 676dc86 commit 7d8674f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03a16b27bd30f22d88f570585551925248469f84
refs/heads/master: b3bea15d29799797d1486aeddf883404a2e05c81
9 changes: 9 additions & 0 deletions trunk/arch/powerpc/boot/libfdt-wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ static void *fdt_wrapper_find_node_by_prop_value(const void *prev,
return offset_devp(offset);
}

static void *fdt_wrapper_find_node_by_compatible(const void *prev,
const char *val)
{
int offset = fdt_node_offset_by_compatible(fdt, devp_offset_find(prev),
val);
return offset_devp(offset);
}

static char *fdt_wrapper_get_path(const void *devp, char *buf, int len)
{
int rc;
Expand Down Expand Up @@ -164,6 +172,7 @@ void fdt_init(void *blob)
dt_ops.get_parent = fdt_wrapper_get_parent;
dt_ops.create_node = fdt_wrapper_create_node;
dt_ops.find_node_by_prop_value = fdt_wrapper_find_node_by_prop_value;
dt_ops.find_node_by_compatible = fdt_wrapper_find_node_by_compatible;
dt_ops.get_path = fdt_wrapper_get_path;
dt_ops.finalize = fdt_wrapper_finalize;

Expand Down
11 changes: 11 additions & 0 deletions trunk/arch/powerpc/boot/ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7d8674f

Please sign in to comment.