aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/ops.h
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2007-09-05 15:21:12 -0400
committerPaul Mackerras <paulus@samba.org>2007-09-13 11:33:23 -0400
commit21f3fe2f7ab57832ea1fc7f719ec7e167b7ad80e (patch)
tree5a3bf3c623fb858d61ca7effd9b1f8bd8b5e714f /arch/powerpc/boot/ops.h
parent9de782770b84768e1aa2e6454223ef30768de84e (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.h9
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 {
47 const char *propname, 47 const char *propname,
48 const char *propval, int proplen); 48 const char *propval, int proplen);
49 unsigned long (*finalize)(void); 49 unsigned long (*finalize)(void);
50 char *(*get_path)(const void *phandle, char *buf, int len);
50}; 51};
51extern struct dt_ops dt_ops; 52extern struct dt_ops dt_ops;
52 53
@@ -170,6 +171,14 @@ static inline void *find_node_by_linuxphandle(const u32 linuxphandle)
170 (char *)&linuxphandle, sizeof(u32)); 171 (char *)&linuxphandle, sizeof(u32));
171} 172}
172 173
174static inline char *get_path(const void *phandle, char *buf, int len)
175{
176 if (dt_ops.get_path)
177 return dt_ops.get_path(phandle, buf, len);
178
179 return NULL;
180}
181
173static inline void *malloc(unsigned long size) 182static inline void *malloc(unsigned long size)
174{ 183{
175 return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL; 184 return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL;