aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/ops.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-30 21:37:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-30 21:37:27 -0500
commit8af03e782cae1e0a0f530ddd22301cdd12cf9dc0 (patch)
treec4af13a38bd3cc1a811a37f2358491f171052070 /arch/powerpc/boot/ops.h
parent6232665040f9a23fafd9d94d4ae8d5a2dc850f65 (diff)
parent99e139126ab2e84be67969650f92eb37c12ab5cd (diff)
Merge branch 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (454 commits) [POWERPC] Cell IOMMU fixed mapping support [POWERPC] Split out the ioid fetching/checking logic [POWERPC] Add support to cell_iommu_setup_page_tables() for multiple windows [POWERPC] Split out the IOMMU logic from cell_dma_dev_setup() [POWERPC] Split cell_iommu_setup_hardware() into two parts [POWERPC] Split out the logic that allocates struct iommus [POWERPC] Allocate the hash table under 1G on cell [POWERPC] Add set_dma_ops() to match get_dma_ops() [POWERPC] 83xx: Clean up / convert mpc83xx board DTS files to v1 format. [POWERPC] 85xx: Only invalidate TLB0 and TLB1 [POWERPC] 83xx: Fix typo in mpc837x compatible entries [POWERPC] 85xx: convert sbc85* boards to use machine_device_initcall [POWERPC] 83xx: rework platform Kconfig [POWERPC] 85xx: rework platform Kconfig [POWERPC] 86xx: Remove unused IRQ defines [POWERPC] QE: Explicitly set address-cells and size cells for muram [POWERPC] Convert StorCenter DTS file to /dts-v1/ format. [POWERPC] 86xx: Convert all 86xx DTS files to /dts-v1/ format. [PPC] Remove 85xx from arch/ppc [PPC] Remove 83xx from arch/ppc ...
Diffstat (limited to 'arch/powerpc/boot/ops.h')
-rw-r--r--arch/powerpc/boot/ops.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h
index a180b6505f47..4b0544b03c64 100644
--- a/arch/powerpc/boot/ops.h
+++ b/arch/powerpc/boot/ops.h
@@ -46,6 +46,8 @@ struct dt_ops {
46 void *(*find_node_by_prop_value)(const void *prev, 46 void *(*find_node_by_prop_value)(const void *prev,
47 const char *propname, 47 const char *propname,
48 const char *propval, int proplen); 48 const char *propval, int proplen);
49 void *(*find_node_by_compatible)(const void *prev,
50 const char *compat);
49 unsigned long (*finalize)(void); 51 unsigned long (*finalize)(void);
50 char *(*get_path)(const void *phandle, char *buf, int len); 52 char *(*get_path)(const void *phandle, char *buf, int len);
51}; 53};
@@ -79,7 +81,7 @@ struct loader_info {
79extern struct loader_info loader_info; 81extern struct loader_info loader_info;
80 82
81void start(void); 83void start(void);
82int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device); 84void fdt_init(void *blob);
83int serial_console_init(void); 85int serial_console_init(void);
84int ns16550_console_init(void *devp, struct serial_console_data *scdp); 86int ns16550_console_init(void *devp, struct serial_console_data *scdp);
85int mpsc_console_init(void *devp, struct serial_console_data *scdp); 87int mpsc_console_init(void *devp, struct serial_console_data *scdp);
@@ -159,9 +161,32 @@ static inline void *find_node_by_devtype(const void *prev,
159 return find_node_by_prop_value_str(prev, "device_type", type); 161 return find_node_by_prop_value_str(prev, "device_type", type);
160} 162}
161 163
164static inline void *find_node_by_alias(const char *alias)
165{
166 void *devp = finddevice("/aliases");
167
168 if (devp) {
169 char path[MAX_PATH_LEN];
170 if (getprop(devp, alias, path, MAX_PATH_LEN) > 0)
171 return finddevice(path);
172 }
173
174 return NULL;
175}
176
177static inline void *find_node_by_compatible(const void *prev,
178 const char *compat)
179{
180 if (dt_ops.find_node_by_compatible)
181 return dt_ops.find_node_by_compatible(prev, compat);
182
183 return NULL;
184}
185
162void dt_fixup_memory(u64 start, u64 size); 186void dt_fixup_memory(u64 start, u64 size);
163void dt_fixup_cpu_clocks(u32 cpufreq, u32 tbfreq, u32 busfreq); 187void dt_fixup_cpu_clocks(u32 cpufreq, u32 tbfreq, u32 busfreq);
164void dt_fixup_clock(const char *path, u32 freq); 188void dt_fixup_clock(const char *path, u32 freq);
189void dt_fixup_mac_address_by_alias(const char *alias, const u8 *addr);
165void dt_fixup_mac_address(u32 index, const u8 *addr); 190void dt_fixup_mac_address(u32 index, const u8 *addr);
166void __dt_fixup_mac_addresses(u32 startindex, ...); 191void __dt_fixup_mac_addresses(u32 startindex, ...);
167#define dt_fixup_mac_addresses(...) \ 192#define dt_fixup_mac_addresses(...) \