aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/oplib_32.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/include/asm/oplib_32.h')
-rw-r--r--arch/sparc/include/asm/oplib_32.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h
index 33e31ce6b31f..51296a6f5005 100644
--- a/arch/sparc/include/asm/oplib_32.h
+++ b/arch/sparc/include/asm/oplib_32.h
@@ -30,7 +30,7 @@ extern unsigned int prom_rev, prom_prev;
30/* Root node of the prom device tree, this stays constant after 30/* Root node of the prom device tree, this stays constant after
31 * initialization is complete. 31 * initialization is complete.
32 */ 32 */
33extern int prom_root_node; 33extern phandle prom_root_node;
34 34
35/* Pointer to prom structure containing the device tree traversal 35/* Pointer to prom structure containing the device tree traversal
36 * and usage utility functions. Only prom-lib should use these, 36 * and usage utility functions. Only prom-lib should use these,
@@ -178,68 +178,68 @@ extern void prom_putsegment(int context, unsigned long virt_addr,
178/* PROM device tree traversal functions... */ 178/* PROM device tree traversal functions... */
179 179
180/* Get the child node of the given node, or zero if no child exists. */ 180/* Get the child node of the given node, or zero if no child exists. */
181extern int prom_getchild(int parent_node); 181extern phandle prom_getchild(phandle parent_node);
182 182
183/* Get the next sibling node of the given node, or zero if no further 183/* Get the next sibling node of the given node, or zero if no further
184 * siblings exist. 184 * siblings exist.
185 */ 185 */
186extern int prom_getsibling(int node); 186extern phandle prom_getsibling(phandle node);
187 187
188/* Get the length, at the passed node, of the given property type. 188/* Get the length, at the passed node, of the given property type.
189 * Returns -1 on error (ie. no such property at this node). 189 * Returns -1 on error (ie. no such property at this node).
190 */ 190 */
191extern int prom_getproplen(int thisnode, const char *property); 191extern int prom_getproplen(phandle thisnode, const char *property);
192 192
193/* Fetch the requested property using the given buffer. Returns 193/* Fetch the requested property using the given buffer. Returns
194 * the number of bytes the prom put into your buffer or -1 on error. 194 * the number of bytes the prom put into your buffer or -1 on error.
195 */ 195 */
196extern int __must_check prom_getproperty(int thisnode, const char *property, 196extern int __must_check prom_getproperty(phandle thisnode, const char *property,
197 char *prop_buffer, int propbuf_size); 197 char *prop_buffer, int propbuf_size);
198 198
199/* Acquire an integer property. */ 199/* Acquire an integer property. */
200extern int prom_getint(int node, char *property); 200extern int prom_getint(phandle node, char *property);
201 201
202/* Acquire an integer property, with a default value. */ 202/* Acquire an integer property, with a default value. */
203extern int prom_getintdefault(int node, char *property, int defval); 203extern int prom_getintdefault(phandle node, char *property, int defval);
204 204
205/* Acquire a boolean property, 0=FALSE 1=TRUE. */ 205/* Acquire a boolean property, 0=FALSE 1=TRUE. */
206extern int prom_getbool(int node, char *prop); 206extern int prom_getbool(phandle node, char *prop);
207 207
208/* Acquire a string property, null string on error. */ 208/* Acquire a string property, null string on error. */
209extern void prom_getstring(int node, char *prop, char *buf, int bufsize); 209extern void prom_getstring(phandle node, char *prop, char *buf, int bufsize);
210 210
211/* Does the passed node have the given "name"? YES=1 NO=0 */ 211/* Does the passed node have the given "name"? YES=1 NO=0 */
212extern int prom_nodematch(int thisnode, char *name); 212extern int prom_nodematch(phandle thisnode, char *name);
213 213
214/* Search all siblings starting at the passed node for "name" matching 214/* Search all siblings starting at the passed node for "name" matching
215 * the given string. Returns the node on success, zero on failure. 215 * the given string. Returns the node on success, zero on failure.
216 */ 216 */
217extern int prom_searchsiblings(int node_start, char *name); 217extern phandle prom_searchsiblings(phandle node_start, char *name);
218 218
219/* Return the first property type, as a string, for the given node. 219/* Return the first property type, as a string, for the given node.
220 * Returns a null string on error. 220 * Returns a null string on error.
221 */ 221 */
222extern char *prom_firstprop(int node, char *buffer); 222extern char *prom_firstprop(phandle node, char *buffer);
223 223
224/* Returns the next property after the passed property for the given 224/* Returns the next property after the passed property for the given
225 * node. Returns null string on failure. 225 * node. Returns null string on failure.
226 */ 226 */
227extern char *prom_nextprop(int node, char *prev_property, char *buffer); 227extern char *prom_nextprop(phandle node, char *prev_property, char *buffer);
228 228
229/* Returns phandle of the path specified */ 229/* Returns phandle of the path specified */
230extern int prom_finddevice(char *name); 230extern phandle prom_finddevice(char *name);
231 231
232/* Returns 1 if the specified node has given property. */ 232/* Returns 1 if the specified node has given property. */
233extern int prom_node_has_property(int node, char *property); 233extern int prom_node_has_property(phandle node, char *property);
234 234
235/* Set the indicated property at the given node with the passed value. 235/* Set the indicated property at the given node with the passed value.
236 * Returns the number of bytes of your value that the prom took. 236 * Returns the number of bytes of your value that the prom took.
237 */ 237 */
238extern int prom_setprop(int node, const char *prop_name, char *prop_value, 238extern int prom_setprop(phandle node, const char *prop_name, char *prop_value,
239 int value_size); 239 int value_size);
240 240
241extern int prom_pathtoinode(char *path); 241extern phandle prom_pathtoinode(char *path);
242extern int prom_inst2pkg(int); 242extern phandle prom_inst2pkg(int);
243 243
244/* Dorking with Bus ranges... */ 244/* Dorking with Bus ranges... */
245 245
@@ -247,13 +247,13 @@ extern int prom_inst2pkg(int);
247extern void prom_apply_obio_ranges(struct linux_prom_registers *obioregs, int nregs); 247extern void prom_apply_obio_ranges(struct linux_prom_registers *obioregs, int nregs);
248 248
249/* Apply ranges of any prom node (and optionally parent node as well) to registers. */ 249/* Apply ranges of any prom node (and optionally parent node as well) to registers. */
250extern void prom_apply_generic_ranges(int node, int parent, 250extern void prom_apply_generic_ranges(phandle node, phandle parent,
251 struct linux_prom_registers *sbusregs, int nregs); 251 struct linux_prom_registers *sbusregs, int nregs);
252 252
253/* CPU probing helpers. */ 253/* CPU probing helpers. */
254int cpu_find_by_instance(int instance, int *prom_node, int *mid); 254int cpu_find_by_instance(int instance, phandle *prom_node, int *mid);
255int cpu_find_by_mid(int mid, int *prom_node); 255int cpu_find_by_mid(int mid, phandle *prom_node);
256int cpu_get_hwmid(int prom_node); 256int cpu_get_hwmid(phandle prom_node);
257 257
258extern spinlock_t prom_lock; 258extern spinlock_t prom_lock;
259 259