diff options
Diffstat (limited to 'arch/powerpc/boot/ops.h')
-rw-r--r-- | arch/powerpc/boot/ops.h | 25 |
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 | }; |
28 | extern struct platform_ops platform_ops; | 29 | extern struct platform_ops platform_ops; |
@@ -30,12 +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 | void (*ft_pack)(void); |
38 | const u32 addr_len); | ||
39 | unsigned long (*ft_addr)(void); | 39 | unsigned long (*ft_addr)(void); |
40 | }; | 40 | }; |
41 | extern struct dt_ops dt_ops; | 41 | extern 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 | ||
62 | extern int platform_init(void *promptr); | 62 | int platform_init(void *promptr, char *dt_blob_start, char *dt_blob_end); |
63 | extern void simple_alloc_init(void); | 63 | int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device); |
64 | extern void ft_init(void *dt_blob); | 64 | int serial_console_init(void); |
65 | extern int serial_console_init(void); | 65 | int ns16550_console_init(void *devp, struct serial_console_data *scdp); |
66 | void *simple_alloc_init(char *base, u32 heap_size, u32 granularity, | ||
67 | u32 max_allocs); | ||
68 | |||
66 | 69 | ||
67 | static inline void *finddevice(const char *name) | 70 | static 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 | ||
87 | static inline void free(void *ptr, u32 size) | 90 | static 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 | ||
93 | static inline void exit(void) | 96 | static inline void exit(void) |