[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>
This commit is contained in:
Scott Wood
2007-09-06 05:21:12 +10:00
committed by Paul Mackerras
parent 9de782770b
commit 21f3fe2f7a
4 changed files with 75 additions and 0 deletions

View File

@@ -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;