aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/ops.h
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@mvista.com>2006-10-16 16:49:27 -0400
committerPaul Mackerras <paulus@samba.org>2006-10-18 01:50:18 -0400
commitc888554bf95a5a0a6ac3e2389c6bf1e03e9480ba (patch)
tree0bd690be6846ac378498310f9d90ae526a3028bd /arch/powerpc/boot/ops.h
parentb0a779debd56514b2b5de7617a1643e5dac2d4dd (diff)
[POWERPC] More bootwrapper reorganization
More reorganization of the bootwrapper: - Add dtb section to zImage - ft_init now called by platform_init - Pack a flat dt before calling kernel - Remove size parameter from free - printf only calls console_ops.write it its not NULL - Some cleanup Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/ops.h')
-rw-r--r--arch/powerpc/boot/ops.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h
index 135eb4bb03b4..59832fb0f276 100644
--- a/arch/powerpc/boot/ops.h
+++ b/arch/powerpc/boot/ops.h
@@ -22,7 +22,8 @@ struct platform_ops {
22 void (*fixups)(void); 22 void (*fixups)(void);
23 void (*image_hdr)(const void *); 23 void (*image_hdr)(const void *);
24 void * (*malloc)(u32 size); 24 void * (*malloc)(u32 size);
25 void (*free)(void *ptr, u32 size); 25 void (*free)(void *ptr);
26 void * (*realloc)(void *ptr, unsigned long size);
26 void (*exit)(void); 27 void (*exit)(void);
27}; 28};
28extern struct platform_ops platform_ops; 29extern struct platform_ops platform_ops;
@@ -30,12 +31,11 @@ extern struct platform_ops platform_ops;
30/* Device Tree operations */ 31/* Device Tree operations */
31struct dt_ops { 32struct dt_ops {
32 void * (*finddevice)(const char *name); 33 void * (*finddevice)(const char *name);
33 int (*getprop)(const void *node, const char *name, void *buf, 34 int (*getprop)(const void *phandle, const char *name, void *buf,
34 const int buflen); 35 const int buflen);
35 int (*setprop)(const void *node, const char *name, 36 int (*setprop)(const void *phandle, const char *name,
36 const void *buf, const int buflen); 37 const void *buf, const int buflen);
37 u64 (*translate_addr)(const char *path, const u32 *in_addr, 38 void (*ft_pack)(void);
38 const u32 addr_len);
39 unsigned long (*ft_addr)(void); 39 unsigned long (*ft_addr)(void);
40}; 40};
41extern struct dt_ops dt_ops; 41extern struct dt_ops dt_ops;
@@ -59,10 +59,13 @@ struct serial_console_data {
59 void (*close)(void); 59 void (*close)(void);
60}; 60};
61 61
62extern int platform_init(void *promptr); 62int platform_init(void *promptr, char *dt_blob_start, char *dt_blob_end);
63extern void simple_alloc_init(void); 63int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device);
64extern void ft_init(void *dt_blob); 64int serial_console_init(void);
65extern int serial_console_init(void); 65int ns16550_console_init(void *devp, struct serial_console_data *scdp);
66void *simple_alloc_init(char *base, u32 heap_size, u32 granularity,
67 u32 max_allocs);
68
66 69
67static inline void *finddevice(const char *name) 70static inline void *finddevice(const char *name)
68{ 71{
@@ -84,10 +87,10 @@ static inline void *malloc(u32 size)
84 return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL; 87 return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL;
85} 88}
86 89
87static inline void free(void *ptr, u32 size) 90static inline void free(void *ptr)
88{ 91{
89 if (platform_ops.free) 92 if (platform_ops.free)
90 platform_ops.free(ptr, size); 93 platform_ops.free(ptr);
91} 94}
92 95
93static inline void exit(void) 96static inline void exit(void)