diff options
Diffstat (limited to 'arch/powerpc/boot/ops.h')
-rw-r--r-- | arch/powerpc/boot/ops.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index 135eb4bb03b4..8abb6516bb7c 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 | }; |
28 | extern struct platform_ops platform_ops; | 29 | extern struct platform_ops platform_ops; |
@@ -30,13 +31,11 @@ extern struct platform_ops platform_ops; | |||
30 | /* Device Tree operations */ | 31 | /* Device Tree operations */ |
31 | struct dt_ops { | 32 | struct 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 | unsigned long (*finalize)(void); |
38 | const u32 addr_len); | ||
39 | unsigned long (*ft_addr)(void); | ||
40 | }; | 39 | }; |
41 | extern struct dt_ops dt_ops; | 40 | extern struct dt_ops dt_ops; |
42 | 41 | ||
@@ -59,10 +58,13 @@ struct serial_console_data { | |||
59 | void (*close)(void); | 58 | void (*close)(void); |
60 | }; | 59 | }; |
61 | 60 | ||
62 | extern int platform_init(void *promptr); | 61 | int platform_init(void *promptr, char *dt_blob_start, char *dt_blob_end); |
63 | extern void simple_alloc_init(void); | 62 | int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device); |
64 | extern void ft_init(void *dt_blob); | 63 | int serial_console_init(void); |
65 | extern int serial_console_init(void); | 64 | int ns16550_console_init(void *devp, struct serial_console_data *scdp); |
65 | void *simple_alloc_init(char *base, u32 heap_size, u32 granularity, | ||
66 | u32 max_allocs); | ||
67 | |||
66 | 68 | ||
67 | static inline void *finddevice(const char *name) | 69 | static inline void *finddevice(const char *name) |
68 | { | 70 | { |
@@ -84,10 +86,10 @@ static inline void *malloc(u32 size) | |||
84 | return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL; | 86 | return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL; |
85 | } | 87 | } |
86 | 88 | ||
87 | static inline void free(void *ptr, u32 size) | 89 | static inline void free(void *ptr) |
88 | { | 90 | { |
89 | if (platform_ops.free) | 91 | if (platform_ops.free) |
90 | platform_ops.free(ptr, size); | 92 | platform_ops.free(ptr); |
91 | } | 93 | } |
92 | 94 | ||
93 | static inline void exit(void) | 95 | static inline void exit(void) |