diff options
author | Paul Mackerras <paulus@samba.org> | 2008-01-23 23:29:14 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-01-23 23:29:14 -0500 |
commit | dcb571be2019ae677bc5ed64437dbc87ae1eb67f (patch) | |
tree | 1b93f9ea3568be4dcc49ffb2adc0d3ab0a02b47f /arch/powerpc/boot/ops.h | |
parent | 9156ad48338e0306e508ead5c0d9986050744475 (diff) | |
parent | 96f39c1718091d63dc1c5012d566737ea0d2a20c (diff) |
Merge branch 'for-2.6.25' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into for-2.6.25
Diffstat (limited to 'arch/powerpc/boot/ops.h')
-rw-r--r-- | arch/powerpc/boot/ops.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index 6036a98e646a..5872ef1779ae 100644 --- a/arch/powerpc/boot/ops.h +++ b/arch/powerpc/boot/ops.h | |||
@@ -159,9 +159,23 @@ static inline void *find_node_by_devtype(const void *prev, | |||
159 | return find_node_by_prop_value_str(prev, "device_type", type); | 159 | return find_node_by_prop_value_str(prev, "device_type", type); |
160 | } | 160 | } |
161 | 161 | ||
162 | static inline void *find_node_by_alias(const char *alias) | ||
163 | { | ||
164 | void *devp = finddevice("/aliases"); | ||
165 | |||
166 | if (devp) { | ||
167 | char path[MAX_PATH_LEN]; | ||
168 | if (getprop(devp, alias, path, MAX_PATH_LEN) > 0) | ||
169 | return finddevice(path); | ||
170 | } | ||
171 | |||
172 | return NULL; | ||
173 | } | ||
174 | |||
162 | void dt_fixup_memory(u64 start, u64 size); | 175 | void dt_fixup_memory(u64 start, u64 size); |
163 | void dt_fixup_cpu_clocks(u32 cpufreq, u32 tbfreq, u32 busfreq); | 176 | void dt_fixup_cpu_clocks(u32 cpufreq, u32 tbfreq, u32 busfreq); |
164 | void dt_fixup_clock(const char *path, u32 freq); | 177 | void dt_fixup_clock(const char *path, u32 freq); |
178 | void dt_fixup_mac_address_by_alias(const char *alias, const u8 *addr); | ||
165 | void dt_fixup_mac_address(u32 index, const u8 *addr); | 179 | void dt_fixup_mac_address(u32 index, const u8 *addr); |
166 | void __dt_fixup_mac_addresses(u32 startindex, ...); | 180 | void __dt_fixup_mac_addresses(u32 startindex, ...); |
167 | #define dt_fixup_mac_addresses(...) \ | 181 | #define dt_fixup_mac_addresses(...) \ |