diff options
Diffstat (limited to 'include/asm-powerpc/prom.h')
-rw-r--r-- | include/asm-powerpc/prom.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index d0fa1b9aed35..c15e66a2e681 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -72,8 +72,8 @@ struct property { | |||
72 | }; | 72 | }; |
73 | 73 | ||
74 | struct device_node { | 74 | struct device_node { |
75 | char *name; | 75 | const char *name; |
76 | char *type; | 76 | const char *type; |
77 | phandle node; | 77 | phandle node; |
78 | phandle linux_phandle; | 78 | phandle linux_phandle; |
79 | char *full_name; | 79 | char *full_name; |
@@ -160,7 +160,7 @@ extern void unflatten_device_tree(void); | |||
160 | extern void early_init_devtree(void *); | 160 | extern void early_init_devtree(void *); |
161 | extern int device_is_compatible(struct device_node *device, const char *); | 161 | extern int device_is_compatible(struct device_node *device, const char *); |
162 | extern int machine_is_compatible(const char *compat); | 162 | extern int machine_is_compatible(const char *compat); |
163 | extern void *get_property(struct device_node *node, const char *name, | 163 | extern const void *get_property(struct device_node *node, const char *name, |
164 | int *lenp); | 164 | int *lenp); |
165 | extern void print_properties(struct device_node *node); | 165 | extern void print_properties(struct device_node *node); |
166 | extern int prom_n_addr_cells(struct device_node* np); | 166 | extern int prom_n_addr_cells(struct device_node* np); |
@@ -198,7 +198,7 @@ extern int release_OF_resource(struct device_node* node, int index); | |||
198 | 198 | ||
199 | 199 | ||
200 | /* Helper to read a big number */ | 200 | /* Helper to read a big number */ |
201 | static inline u64 of_read_number(u32 *cell, int size) | 201 | static inline u64 of_read_number(const u32 *cell, int size) |
202 | { | 202 | { |
203 | u64 r = 0; | 203 | u64 r = 0; |
204 | while (size--) | 204 | while (size--) |
@@ -209,15 +209,15 @@ static inline u64 of_read_number(u32 *cell, int size) | |||
209 | /* Translate an OF address block into a CPU physical address | 209 | /* Translate an OF address block into a CPU physical address |
210 | */ | 210 | */ |
211 | #define OF_BAD_ADDR ((u64)-1) | 211 | #define OF_BAD_ADDR ((u64)-1) |
212 | extern u64 of_translate_address(struct device_node *np, u32 *addr); | 212 | extern u64 of_translate_address(struct device_node *np, const u32 *addr); |
213 | 213 | ||
214 | /* Extract an address from a device, returns the region size and | 214 | /* Extract an address from a device, returns the region size and |
215 | * the address space flags too. The PCI version uses a BAR number | 215 | * the address space flags too. The PCI version uses a BAR number |
216 | * instead of an absolute index | 216 | * instead of an absolute index |
217 | */ | 217 | */ |
218 | extern u32 *of_get_address(struct device_node *dev, int index, | 218 | extern const u32 *of_get_address(struct device_node *dev, int index, |
219 | u64 *size, unsigned int *flags); | 219 | u64 *size, unsigned int *flags); |
220 | extern u32 *of_get_pci_address(struct device_node *dev, int bar_no, | 220 | extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no, |
221 | u64 *size, unsigned int *flags); | 221 | u64 *size, unsigned int *flags); |
222 | 222 | ||
223 | /* Get an address as a resource. Note that if your address is | 223 | /* Get an address as a resource. Note that if your address is |
@@ -234,7 +234,7 @@ extern int of_pci_address_to_resource(struct device_node *dev, int bar, | |||
234 | /* Parse the ibm,dma-window property of an OF node into the busno, phys and | 234 | /* Parse the ibm,dma-window property of an OF node into the busno, phys and |
235 | * size parameters. | 235 | * size parameters. |
236 | */ | 236 | */ |
237 | void of_parse_dma_window(struct device_node *dn, unsigned char *dma_window_prop, | 237 | void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop, |
238 | unsigned long *busno, unsigned long *phys, unsigned long *size); | 238 | unsigned long *busno, unsigned long *phys, unsigned long *size); |
239 | 239 | ||
240 | extern void kdump_move_device_tree(void); | 240 | extern void kdump_move_device_tree(void); |
@@ -259,7 +259,7 @@ struct of_irq { | |||
259 | u32 specifier[OF_MAX_IRQ_SPEC]; /* Specifier copy */ | 259 | u32 specifier[OF_MAX_IRQ_SPEC]; /* Specifier copy */ |
260 | }; | 260 | }; |
261 | 261 | ||
262 | /*** | 262 | /** |
263 | * of_irq_map_init - Initialize the irq remapper | 263 | * of_irq_map_init - Initialize the irq remapper |
264 | * @flags: flags defining workarounds to enable | 264 | * @flags: flags defining workarounds to enable |
265 | * | 265 | * |
@@ -272,7 +272,7 @@ struct of_irq { | |||
272 | 272 | ||
273 | extern void of_irq_map_init(unsigned int flags); | 273 | extern void of_irq_map_init(unsigned int flags); |
274 | 274 | ||
275 | /*** | 275 | /** |
276 | * of_irq_map_raw - Low level interrupt tree parsing | 276 | * of_irq_map_raw - Low level interrupt tree parsing |
277 | * @parent: the device interrupt parent | 277 | * @parent: the device interrupt parent |
278 | * @intspec: interrupt specifier ("interrupts" property of the device) | 278 | * @intspec: interrupt specifier ("interrupts" property of the device) |
@@ -289,12 +289,12 @@ extern void of_irq_map_init(unsigned int flags); | |||
289 | * | 289 | * |
290 | */ | 290 | */ |
291 | 291 | ||
292 | extern int of_irq_map_raw(struct device_node *parent, u32 *intspec, | 292 | extern int of_irq_map_raw(struct device_node *parent, const u32 *intspec, |
293 | u32 ointsize, u32 *addr, | 293 | u32 ointsize, const u32 *addr, |
294 | struct of_irq *out_irq); | 294 | struct of_irq *out_irq); |
295 | 295 | ||
296 | 296 | ||
297 | /*** | 297 | /** |
298 | * of_irq_map_one - Resolve an interrupt for a device | 298 | * of_irq_map_one - Resolve an interrupt for a device |
299 | * @device: the device whose interrupt is to be resolved | 299 | * @device: the device whose interrupt is to be resolved |
300 | * @index: index of the interrupt to resolve | 300 | * @index: index of the interrupt to resolve |
@@ -307,7 +307,7 @@ extern int of_irq_map_raw(struct device_node *parent, u32 *intspec, | |||
307 | extern int of_irq_map_one(struct device_node *device, int index, | 307 | extern int of_irq_map_one(struct device_node *device, int index, |
308 | struct of_irq *out_irq); | 308 | struct of_irq *out_irq); |
309 | 309 | ||
310 | /*** | 310 | /** |
311 | * of_irq_map_pci - Resolve the interrupt for a PCI device | 311 | * of_irq_map_pci - Resolve the interrupt for a PCI device |
312 | * @pdev: the device whose interrupt is to be resolved | 312 | * @pdev: the device whose interrupt is to be resolved |
313 | * @out_irq: structure of_irq filled by this function | 313 | * @out_irq: structure of_irq filled by this function |