diff options
Diffstat (limited to 'arch/sparc/include/asm/oplib_64.h')
-rw-r--r-- | arch/sparc/include/asm/oplib_64.h | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h index 3e0b2d62303d..c9cc078e3e31 100644 --- a/arch/sparc/include/asm/oplib_64.h +++ b/arch/sparc/include/asm/oplib_64.h | |||
@@ -16,7 +16,7 @@ extern char prom_version[]; | |||
16 | /* Root node of the prom device tree, this stays constant after | 16 | /* Root node of the prom device tree, this stays constant after |
17 | * initialization is complete. | 17 | * initialization is complete. |
18 | */ | 18 | */ |
19 | extern int prom_root_node; | 19 | extern phandle prom_root_node; |
20 | 20 | ||
21 | /* PROM stdin and stdout */ | 21 | /* PROM stdin and stdout */ |
22 | extern int prom_stdin, prom_stdout; | 22 | extern int prom_stdin, prom_stdout; |
@@ -24,7 +24,7 @@ extern int prom_stdin, prom_stdout; | |||
24 | /* /chosen node of the prom device tree, this stays constant after | 24 | /* /chosen node of the prom device tree, this stays constant after |
25 | * initialization is complete. | 25 | * initialization is complete. |
26 | */ | 26 | */ |
27 | extern int prom_chosen_node; | 27 | extern phandle prom_chosen_node; |
28 | 28 | ||
29 | /* Helper values and strings in arch/sparc64/kernel/head.S */ | 29 | /* Helper values and strings in arch/sparc64/kernel/head.S */ |
30 | extern const char prom_peer_name[]; | 30 | extern const char prom_peer_name[]; |
@@ -218,68 +218,69 @@ extern void prom_unmap(unsigned long size, unsigned long vaddr); | |||
218 | /* PROM device tree traversal functions... */ | 218 | /* PROM device tree traversal functions... */ |
219 | 219 | ||
220 | /* Get the child node of the given node, or zero if no child exists. */ | 220 | /* Get the child node of the given node, or zero if no child exists. */ |
221 | extern int prom_getchild(int parent_node); | 221 | extern phandle prom_getchild(phandle parent_node); |
222 | 222 | ||
223 | /* Get the next sibling node of the given node, or zero if no further | 223 | /* Get the next sibling node of the given node, or zero if no further |
224 | * siblings exist. | 224 | * siblings exist. |
225 | */ | 225 | */ |
226 | extern int prom_getsibling(int node); | 226 | extern phandle prom_getsibling(phandle node); |
227 | 227 | ||
228 | /* Get the length, at the passed node, of the given property type. | 228 | /* Get the length, at the passed node, of the given property type. |
229 | * Returns -1 on error (ie. no such property at this node). | 229 | * Returns -1 on error (ie. no such property at this node). |
230 | */ | 230 | */ |
231 | extern int prom_getproplen(int thisnode, const char *property); | 231 | extern int prom_getproplen(phandle thisnode, const char *property); |
232 | 232 | ||
233 | /* Fetch the requested property using the given buffer. Returns | 233 | /* Fetch the requested property using the given buffer. Returns |
234 | * the number of bytes the prom put into your buffer or -1 on error. | 234 | * the number of bytes the prom put into your buffer or -1 on error. |
235 | */ | 235 | */ |
236 | extern int prom_getproperty(int thisnode, const char *property, | 236 | extern int prom_getproperty(phandle thisnode, const char *property, |
237 | char *prop_buffer, int propbuf_size); | 237 | char *prop_buffer, int propbuf_size); |
238 | 238 | ||
239 | /* Acquire an integer property. */ | 239 | /* Acquire an integer property. */ |
240 | extern int prom_getint(int node, const char *property); | 240 | extern int prom_getint(phandle node, const char *property); |
241 | 241 | ||
242 | /* Acquire an integer property, with a default value. */ | 242 | /* Acquire an integer property, with a default value. */ |
243 | extern int prom_getintdefault(int node, const char *property, int defval); | 243 | extern int prom_getintdefault(phandle node, const char *property, int defval); |
244 | 244 | ||
245 | /* Acquire a boolean property, 0=FALSE 1=TRUE. */ | 245 | /* Acquire a boolean property, 0=FALSE 1=TRUE. */ |
246 | extern int prom_getbool(int node, const char *prop); | 246 | extern int prom_getbool(phandle node, const char *prop); |
247 | 247 | ||
248 | /* Acquire a string property, null string on error. */ | 248 | /* Acquire a string property, null string on error. */ |
249 | extern void prom_getstring(int node, const char *prop, char *buf, int bufsize); | 249 | extern void prom_getstring(phandle node, const char *prop, char *buf, |
250 | int bufsize); | ||
250 | 251 | ||
251 | /* Does the passed node have the given "name"? YES=1 NO=0 */ | 252 | /* Does the passed node have the given "name"? YES=1 NO=0 */ |
252 | extern int prom_nodematch(int thisnode, const char *name); | 253 | extern int prom_nodematch(phandle thisnode, const char *name); |
253 | 254 | ||
254 | /* Search all siblings starting at the passed node for "name" matching | 255 | /* Search all siblings starting at the passed node for "name" matching |
255 | * the given string. Returns the node on success, zero on failure. | 256 | * the given string. Returns the node on success, zero on failure. |
256 | */ | 257 | */ |
257 | extern int prom_searchsiblings(int node_start, const char *name); | 258 | extern phandle prom_searchsiblings(phandle node_start, const char *name); |
258 | 259 | ||
259 | /* Return the first property type, as a string, for the given node. | 260 | /* Return the first property type, as a string, for the given node. |
260 | * Returns a null string on error. Buffer should be at least 32B long. | 261 | * Returns a null string on error. Buffer should be at least 32B long. |
261 | */ | 262 | */ |
262 | extern char *prom_firstprop(int node, char *buffer); | 263 | extern char *prom_firstprop(phandle node, char *buffer); |
263 | 264 | ||
264 | /* Returns the next property after the passed property for the given | 265 | /* Returns the next property after the passed property for the given |
265 | * node. Returns null string on failure. Buffer should be at least 32B long. | 266 | * node. Returns null string on failure. Buffer should be at least 32B long. |
266 | */ | 267 | */ |
267 | extern char *prom_nextprop(int node, const char *prev_property, char *buffer); | 268 | extern char *prom_nextprop(phandle node, const char *prev_property, char *buf); |
268 | 269 | ||
269 | /* Returns 1 if the specified node has given property. */ | 270 | /* Returns 1 if the specified node has given property. */ |
270 | extern int prom_node_has_property(int node, const char *property); | 271 | extern int prom_node_has_property(phandle node, const char *property); |
271 | 272 | ||
272 | /* Returns phandle of the path specified */ | 273 | /* Returns phandle of the path specified */ |
273 | extern int prom_finddevice(const char *name); | 274 | extern phandle prom_finddevice(const char *name); |
274 | 275 | ||
275 | /* Set the indicated property at the given node with the passed value. | 276 | /* Set the indicated property at the given node with the passed value. |
276 | * Returns the number of bytes of your value that the prom took. | 277 | * Returns the number of bytes of your value that the prom took. |
277 | */ | 278 | */ |
278 | extern int prom_setprop(int node, const char *prop_name, char *prop_value, | 279 | extern int prom_setprop(phandle node, const char *prop_name, char *prop_value, |
279 | int value_size); | 280 | int value_size); |
280 | 281 | ||
281 | extern int prom_pathtoinode(const char *path); | 282 | extern phandle prom_pathtoinode(const char *path); |
282 | extern int prom_inst2pkg(int); | 283 | extern phandle prom_inst2pkg(int); |
283 | extern int prom_service_exists(const char *service_name); | 284 | extern int prom_service_exists(const char *service_name); |
284 | extern void prom_sun4v_guest_soft_state(void); | 285 | extern void prom_sun4v_guest_soft_state(void); |
285 | 286 | ||