aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/prom
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/prom')
-rw-r--r--arch/sparc/prom/init_32.c4
-rw-r--r--arch/sparc/prom/misc_32.c3
-rw-r--r--arch/sparc/prom/ranges.c3
-rw-r--r--arch/sparc/prom/tree_32.c17
4 files changed, 27 insertions, 0 deletions
diff --git a/arch/sparc/prom/init_32.c b/arch/sparc/prom/init_32.c
index 873217c6d823..6193c33ed4d4 100644
--- a/arch/sparc/prom/init_32.c
+++ b/arch/sparc/prom/init_32.c
@@ -8,16 +8,20 @@
8 8
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/module.h>
11 12
12#include <asm/openprom.h> 13#include <asm/openprom.h>
13#include <asm/oplib.h> 14#include <asm/oplib.h>
14 15
15struct linux_romvec *romvec; 16struct linux_romvec *romvec;
17EXPORT_SYMBOL(romvec);
18
16enum prom_major_version prom_vers; 19enum prom_major_version prom_vers;
17unsigned int prom_rev, prom_prev; 20unsigned int prom_rev, prom_prev;
18 21
19/* The root node of the prom device tree. */ 22/* The root node of the prom device tree. */
20int prom_root_node; 23int prom_root_node;
24EXPORT_SYMBOL(prom_root_node);
21 25
22/* Pointer to the device tree operations structure. */ 26/* Pointer to the device tree operations structure. */
23struct linux_nodeops *prom_nodeops; 27struct linux_nodeops *prom_nodeops;
diff --git a/arch/sparc/prom/misc_32.c b/arch/sparc/prom/misc_32.c
index cf6c3f6d36c3..4d61c540bb3d 100644
--- a/arch/sparc/prom/misc_32.c
+++ b/arch/sparc/prom/misc_32.c
@@ -8,6 +8,8 @@
8#include <linux/types.h> 8#include <linux/types.h>
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/sched.h> 10#include <linux/sched.h>
11#include <linux/module.h>
12
11#include <asm/openprom.h> 13#include <asm/openprom.h>
12#include <asm/oplib.h> 14#include <asm/oplib.h>
13#include <asm/auxio.h> 15#include <asm/auxio.h>
@@ -44,6 +46,7 @@ prom_feval(char *fstring)
44 restore_current(); 46 restore_current();
45 spin_unlock_irqrestore(&prom_lock, flags); 47 spin_unlock_irqrestore(&prom_lock, flags);
46} 48}
49EXPORT_SYMBOL(prom_feval);
47 50
48/* Drop into the prom, with the chance to continue with the 'go' 51/* Drop into the prom, with the chance to continue with the 'go'
49 * prom command. 52 * prom command.
diff --git a/arch/sparc/prom/ranges.c b/arch/sparc/prom/ranges.c
index 64579a376419..cd5790853ff6 100644
--- a/arch/sparc/prom/ranges.c
+++ b/arch/sparc/prom/ranges.c
@@ -6,6 +6,8 @@
6 */ 6 */
7 7
8#include <linux/init.h> 8#include <linux/init.h>
9#include <linux/module.h>
10
9#include <asm/openprom.h> 11#include <asm/openprom.h>
10#include <asm/oplib.h> 12#include <asm/oplib.h>
11#include <asm/types.h> 13#include <asm/types.h>
@@ -62,6 +64,7 @@ prom_apply_obio_ranges(struct linux_prom_registers *regs, int nregs)
62 if(num_obio_ranges) 64 if(num_obio_ranges)
63 prom_adjust_regs(regs, nregs, promlib_obio_ranges, num_obio_ranges); 65 prom_adjust_regs(regs, nregs, promlib_obio_ranges, num_obio_ranges);
64} 66}
67EXPORT_SYMBOL(prom_apply_obio_ranges);
65 68
66void __init prom_ranges_init(void) 69void __init prom_ranges_init(void)
67{ 70{
diff --git a/arch/sparc/prom/tree_32.c b/arch/sparc/prom/tree_32.c
index 6d8187357331..9d9965cd8bca 100644
--- a/arch/sparc/prom/tree_32.c
+++ b/arch/sparc/prom/tree_32.c
@@ -12,6 +12,7 @@
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/ctype.h> 14#include <linux/ctype.h>
15#include <linux/module.h>
15 16
16#include <asm/openprom.h> 17#include <asm/openprom.h>
17#include <asm/oplib.h> 18#include <asm/oplib.h>
@@ -33,6 +34,7 @@ int __prom_getchild(int node)
33 34
34 return cnode; 35 return cnode;
35} 36}
37EXPORT_SYMBOL(__prom_getchild);
36 38
37/* Return the child of node 'node' or zero if no this node has no 39/* Return the child of node 'node' or zero if no this node has no
38 * direct descendent. 40 * direct descendent.
@@ -50,6 +52,7 @@ int prom_getchild(int node)
50 52
51 return cnode; 53 return cnode;
52} 54}
55EXPORT_SYMBOL(prom_getchild);
53 56
54/* Internal version of prom_getsibling that does not alter return values. */ 57/* Internal version of prom_getsibling that does not alter return values. */
55int __prom_getsibling(int node) 58int __prom_getsibling(int node)
@@ -64,6 +67,7 @@ int __prom_getsibling(int node)
64 67
65 return cnode; 68 return cnode;
66} 69}
70EXPORT_SYMBOL(__prom_getsibling);
67 71
68/* Return the next sibling of node 'node' or zero if no more siblings 72/* Return the next sibling of node 'node' or zero if no more siblings
69 * at this level of depth in the tree. 73 * at this level of depth in the tree.
@@ -81,6 +85,7 @@ int prom_getsibling(int node)
81 85
82 return sibnode; 86 return sibnode;
83} 87}
88EXPORT_SYMBOL(prom_getsibling);
84 89
85/* Return the length in bytes of property 'prop' at node 'node'. 90/* Return the length in bytes of property 'prop' at node 'node'.
86 * Return -1 on error. 91 * Return -1 on error.
@@ -99,6 +104,7 @@ int prom_getproplen(int node, const char *prop)
99 spin_unlock_irqrestore(&prom_lock, flags); 104 spin_unlock_irqrestore(&prom_lock, flags);
100 return ret; 105 return ret;
101} 106}
107EXPORT_SYMBOL(prom_getproplen);
102 108
103/* Acquire a property 'prop' at node 'node' and place it in 109/* Acquire a property 'prop' at node 'node' and place it in
104 * 'buffer' which has a size of 'bufsize'. If the acquisition 110 * 'buffer' which has a size of 'bufsize'. If the acquisition
@@ -119,6 +125,7 @@ int prom_getproperty(int node, const char *prop, char *buffer, int bufsize)
119 spin_unlock_irqrestore(&prom_lock, flags); 125 spin_unlock_irqrestore(&prom_lock, flags);
120 return ret; 126 return ret;
121} 127}
128EXPORT_SYMBOL(prom_getproperty);
122 129
123/* Acquire an integer property and return its value. Returns -1 130/* Acquire an integer property and return its value. Returns -1
124 * on failure. 131 * on failure.
@@ -132,6 +139,7 @@ int prom_getint(int node, char *prop)
132 139
133 return -1; 140 return -1;
134} 141}
142EXPORT_SYMBOL(prom_getint);
135 143
136/* Acquire an integer property, upon error return the passed default 144/* Acquire an integer property, upon error return the passed default
137 * integer. 145 * integer.
@@ -145,6 +153,7 @@ int prom_getintdefault(int node, char *property, int deflt)
145 153
146 return retval; 154 return retval;
147} 155}
156EXPORT_SYMBOL(prom_getintdefault);
148 157
149/* Acquire a boolean property, 1=TRUE 0=FALSE. */ 158/* Acquire a boolean property, 1=TRUE 0=FALSE. */
150int prom_getbool(int node, char *prop) 159int prom_getbool(int node, char *prop)
@@ -155,6 +164,7 @@ int prom_getbool(int node, char *prop)
155 if(retval == -1) return 0; 164 if(retval == -1) return 0;
156 return 1; 165 return 1;
157} 166}
167EXPORT_SYMBOL(prom_getbool);
158 168
159/* Acquire a property whose value is a string, returns a null 169/* Acquire a property whose value is a string, returns a null
160 * string on error. The char pointer is the user supplied string 170 * string on error. The char pointer is the user supplied string
@@ -169,6 +179,7 @@ void prom_getstring(int node, char *prop, char *user_buf, int ubuf_size)
169 user_buf[0] = 0; 179 user_buf[0] = 0;
170 return; 180 return;
171} 181}
182EXPORT_SYMBOL(prom_getstring);
172 183
173 184
174/* Does the device at node 'node' have name 'name'? 185/* Does the device at node 'node' have name 'name'?
@@ -204,6 +215,7 @@ int prom_searchsiblings(int node_start, char *nodename)
204 215
205 return 0; 216 return 0;
206} 217}
218EXPORT_SYMBOL(prom_searchsiblings);
207 219
208/* Interal version of nextprop that does not alter return values. */ 220/* Interal version of nextprop that does not alter return values. */
209char * __prom_nextprop(int node, char * oprop) 221char * __prom_nextprop(int node, char * oprop)
@@ -228,6 +240,7 @@ char * prom_firstprop(int node, char *bufer)
228 240
229 return __prom_nextprop(node, ""); 241 return __prom_nextprop(node, "");
230} 242}
243EXPORT_SYMBOL(prom_firstprop);
231 244
232/* Return the property type string after property type 'oprop' 245/* Return the property type string after property type 'oprop'
233 * at node 'node' . Returns empty string if no more 246 * at node 'node' . Returns empty string if no more
@@ -240,6 +253,7 @@ char * prom_nextprop(int node, char *oprop, char *buffer)
240 253
241 return __prom_nextprop(node, oprop); 254 return __prom_nextprop(node, oprop);
242} 255}
256EXPORT_SYMBOL(prom_nextprop);
243 257
244int prom_finddevice(char *name) 258int prom_finddevice(char *name)
245{ 259{
@@ -287,6 +301,7 @@ int prom_finddevice(char *name)
287 } 301 }
288 return node; 302 return node;
289} 303}
304EXPORT_SYMBOL(prom_finddevice);
290 305
291int prom_node_has_property(int node, char *prop) 306int prom_node_has_property(int node, char *prop)
292{ 307{
@@ -299,6 +314,7 @@ int prom_node_has_property(int node, char *prop)
299 } while (*current_property); 314 } while (*current_property);
300 return 0; 315 return 0;
301} 316}
317EXPORT_SYMBOL(prom_node_has_property);
302 318
303/* Set property 'pname' at node 'node' to value 'value' which has a length 319/* Set property 'pname' at node 'node' to value 'value' which has a length
304 * of 'size' bytes. Return the number of bytes the prom accepted. 320 * of 'size' bytes. Return the number of bytes the prom accepted.
@@ -316,6 +332,7 @@ int prom_setprop(int node, const char *pname, char *value, int size)
316 spin_unlock_irqrestore(&prom_lock, flags); 332 spin_unlock_irqrestore(&prom_lock, flags);
317 return ret; 333 return ret;
318} 334}
335EXPORT_SYMBOL(prom_setprop);
319 336
320int prom_inst2pkg(int inst) 337int prom_inst2pkg(int inst)
321{ 338{