diff options
Diffstat (limited to 'arch/powerpc/boot/ops.h')
-rw-r--r-- | arch/powerpc/boot/ops.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index 592dc6c20bdb..cc191e8e147f 100644 --- a/arch/powerpc/boot/ops.h +++ b/arch/powerpc/boot/ops.h | |||
@@ -96,6 +96,11 @@ static inline int setprop(void *devp, const char *name, | |||
96 | { | 96 | { |
97 | return (dt_ops.setprop) ? dt_ops.setprop(devp, name, buf, buflen) : -1; | 97 | return (dt_ops.setprop) ? dt_ops.setprop(devp, name, buf, buflen) : -1; |
98 | } | 98 | } |
99 | #define setprop_val(devp, name, val) \ | ||
100 | do { \ | ||
101 | typeof(val) x = (val); \ | ||
102 | setprop((devp), (name), &x, sizeof(x)); \ | ||
103 | } while (0) | ||
99 | 104 | ||
100 | static inline int setprop_str(void *devp, const char *name, const char *buf) | 105 | static inline int setprop_str(void *devp, const char *name, const char *buf) |
101 | { | 106 | { |
@@ -141,6 +146,14 @@ static inline void *find_node_by_devtype(const void *prev, | |||
141 | return find_node_by_prop_value_str(prev, "device_type", type); | 146 | return find_node_by_prop_value_str(prev, "device_type", type); |
142 | } | 147 | } |
143 | 148 | ||
149 | void dt_fixup_memory(u64 start, u64 size); | ||
150 | void dt_fixup_cpu_clocks(u32 cpufreq, u32 tbfreq, u32 busfreq); | ||
151 | void dt_fixup_clock(const char *path, u32 freq); | ||
152 | void __dt_fixup_mac_addresses(u32 startindex, ...); | ||
153 | #define dt_fixup_mac_addresses(...) \ | ||
154 | __dt_fixup_mac_addresses(0, __VA_ARGS__, NULL) | ||
155 | |||
156 | |||
144 | static inline void *malloc(u32 size) | 157 | static inline void *malloc(u32 size) |
145 | { | 158 | { |
146 | return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL; | 159 | return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL; |