diff options
author | Scott Wood <scottwood@freescale.com> | 2007-09-06 05:21:12 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-09-14 01:33:23 +1000 |
commit | 21f3fe2f7ab57832ea1fc7f719ec7e167b7ad80e (patch) | |
tree | 5a3bf3c623fb858d61ca7effd9b1f8bd8b5e714f /arch/powerpc/boot/ops.h | |
parent | 9de782770b84768e1aa2e6454223ef30768de84e (diff) |
[POWERPC] bootwrapper: Add get_path()
This will be used by the PlanetCore firmware support to construct
a linux,stdout-path from the serial node that it finds.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/ops.h')
-rw-r--r-- | arch/powerpc/boot/ops.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index 45c2268d5c56..703255bf0089 100644 --- a/arch/powerpc/boot/ops.h +++ b/arch/powerpc/boot/ops.h @@ -47,6 +47,7 @@ struct dt_ops { const char *propname, const char *propval, int proplen); unsigned long (*finalize)(void); + char *(*get_path)(const void *phandle, char *buf, int len); }; extern struct dt_ops dt_ops; @@ -170,6 +171,14 @@ static inline void *find_node_by_linuxphandle(const u32 linuxphandle) (char *)&linuxphandle, sizeof(u32)); } +static inline char *get_path(const void *phandle, char *buf, int len) +{ + if (dt_ops.get_path) + return dt_ops.get_path(phandle, buf, len); + + return NULL; +} + static inline void *malloc(unsigned long size) { return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL; |