diff options
Diffstat (limited to 'arch/sparc/prom/tree_64.c')
-rw-r--r-- | arch/sparc/prom/tree_64.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/sparc/prom/tree_64.c b/arch/sparc/prom/tree_64.c index 281aea44790b..8ea73ddc61dc 100644 --- a/arch/sparc/prom/tree_64.c +++ b/arch/sparc/prom/tree_64.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/module.h> | ||
13 | 14 | ||
14 | #include <asm/openprom.h> | 15 | #include <asm/openprom.h> |
15 | #include <asm/oplib.h> | 16 | #include <asm/oplib.h> |
@@ -32,6 +33,7 @@ inline int prom_getchild(int node) | |||
32 | if(cnode == -1) return 0; | 33 | if(cnode == -1) return 0; |
33 | return (int)cnode; | 34 | return (int)cnode; |
34 | } | 35 | } |
36 | EXPORT_SYMBOL(prom_getchild); | ||
35 | 37 | ||
36 | inline int prom_getparent(int node) | 38 | inline int prom_getparent(int node) |
37 | { | 39 | { |
@@ -63,6 +65,7 @@ inline int prom_getsibling(int node) | |||
63 | 65 | ||
64 | return sibnode; | 66 | return sibnode; |
65 | } | 67 | } |
68 | EXPORT_SYMBOL(prom_getsibling); | ||
66 | 69 | ||
67 | /* Return the length in bytes of property 'prop' at node 'node'. | 70 | /* Return the length in bytes of property 'prop' at node 'node'. |
68 | * Return -1 on error. | 71 | * Return -1 on error. |
@@ -75,6 +78,7 @@ inline int prom_getproplen(int node, const char *prop) | |||
75 | P1275_INOUT(2, 1), | 78 | P1275_INOUT(2, 1), |
76 | node, prop); | 79 | node, prop); |
77 | } | 80 | } |
81 | EXPORT_SYMBOL(prom_getproplen); | ||
78 | 82 | ||
79 | /* Acquire a property 'prop' at node 'node' and place it in | 83 | /* Acquire a property 'prop' at node 'node' and place it in |
80 | * 'buffer' which has a size of 'bufsize'. If the acquisition | 84 | * 'buffer' which has a size of 'bufsize'. If the acquisition |
@@ -97,6 +101,7 @@ inline int prom_getproperty(int node, const char *prop, | |||
97 | node, prop, buffer, P1275_SIZE(plen)); | 101 | node, prop, buffer, P1275_SIZE(plen)); |
98 | } | 102 | } |
99 | } | 103 | } |
104 | EXPORT_SYMBOL(prom_getproperty); | ||
100 | 105 | ||
101 | /* Acquire an integer property and return its value. Returns -1 | 106 | /* Acquire an integer property and return its value. Returns -1 |
102 | * on failure. | 107 | * on failure. |
@@ -110,6 +115,7 @@ inline int prom_getint(int node, const char *prop) | |||
110 | 115 | ||
111 | return -1; | 116 | return -1; |
112 | } | 117 | } |
118 | EXPORT_SYMBOL(prom_getint); | ||
113 | 119 | ||
114 | /* Acquire an integer property, upon error return the passed default | 120 | /* Acquire an integer property, upon error return the passed default |
115 | * integer. | 121 | * integer. |
@@ -124,6 +130,7 @@ int prom_getintdefault(int node, const char *property, int deflt) | |||
124 | 130 | ||
125 | return retval; | 131 | return retval; |
126 | } | 132 | } |
133 | EXPORT_SYMBOL(prom_getintdefault); | ||
127 | 134 | ||
128 | /* Acquire a boolean property, 1=TRUE 0=FALSE. */ | 135 | /* Acquire a boolean property, 1=TRUE 0=FALSE. */ |
129 | int prom_getbool(int node, const char *prop) | 136 | int prom_getbool(int node, const char *prop) |
@@ -134,6 +141,7 @@ int prom_getbool(int node, const char *prop) | |||
134 | if(retval == -1) return 0; | 141 | if(retval == -1) return 0; |
135 | return 1; | 142 | return 1; |
136 | } | 143 | } |
144 | EXPORT_SYMBOL(prom_getbool); | ||
137 | 145 | ||
138 | /* Acquire a property whose value is a string, returns a null | 146 | /* Acquire a property whose value is a string, returns a null |
139 | * string on error. The char pointer is the user supplied string | 147 | * string on error. The char pointer is the user supplied string |
@@ -148,7 +156,7 @@ void prom_getstring(int node, const char *prop, char *user_buf, int ubuf_size) | |||
148 | user_buf[0] = 0; | 156 | user_buf[0] = 0; |
149 | return; | 157 | return; |
150 | } | 158 | } |
151 | 159 | EXPORT_SYMBOL(prom_getstring); | |
152 | 160 | ||
153 | /* Does the device at node 'node' have name 'name'? | 161 | /* Does the device at node 'node' have name 'name'? |
154 | * YES = 1 NO = 0 | 162 | * YES = 1 NO = 0 |
@@ -181,6 +189,7 @@ int prom_searchsiblings(int node_start, const char *nodename) | |||
181 | 189 | ||
182 | return 0; | 190 | return 0; |
183 | } | 191 | } |
192 | EXPORT_SYMBOL(prom_searchsiblings); | ||
184 | 193 | ||
185 | /* Return the first property type for node 'node'. | 194 | /* Return the first property type for node 'node'. |
186 | * buffer should be at least 32B in length | 195 | * buffer should be at least 32B in length |
@@ -194,6 +203,7 @@ inline char *prom_firstprop(int node, char *buffer) | |||
194 | node, (char *) 0x0, buffer); | 203 | node, (char *) 0x0, buffer); |
195 | return buffer; | 204 | return buffer; |
196 | } | 205 | } |
206 | EXPORT_SYMBOL(prom_firstprop); | ||
197 | 207 | ||
198 | /* Return the property type string after property type 'oprop' | 208 | /* Return the property type string after property type 'oprop' |
199 | * at node 'node' . Returns NULL string if no more | 209 | * at node 'node' . Returns NULL string if no more |
@@ -217,6 +227,7 @@ inline char *prom_nextprop(int node, const char *oprop, char *buffer) | |||
217 | node, oprop, buffer); | 227 | node, oprop, buffer); |
218 | return buffer; | 228 | return buffer; |
219 | } | 229 | } |
230 | EXPORT_SYMBOL(prom_nextprop); | ||
220 | 231 | ||
221 | int | 232 | int |
222 | prom_finddevice(const char *name) | 233 | prom_finddevice(const char *name) |
@@ -228,6 +239,7 @@ prom_finddevice(const char *name) | |||
228 | P1275_INOUT(1, 1), | 239 | P1275_INOUT(1, 1), |
229 | name); | 240 | name); |
230 | } | 241 | } |
242 | EXPORT_SYMBOL(prom_finddevice); | ||
231 | 243 | ||
232 | int prom_node_has_property(int node, const char *prop) | 244 | int prom_node_has_property(int node, const char *prop) |
233 | { | 245 | { |
@@ -241,7 +253,8 @@ int prom_node_has_property(int node, const char *prop) | |||
241 | } while (*buf); | 253 | } while (*buf); |
242 | return 0; | 254 | return 0; |
243 | } | 255 | } |
244 | 256 | EXPORT_SYMBOL(prom_node_has_property); | |
257 | |||
245 | /* Set property 'pname' at node 'node' to value 'value' which has a length | 258 | /* Set property 'pname' at node 'node' to value 'value' which has a length |
246 | * of 'size' bytes. Return the number of bytes the prom accepted. | 259 | * of 'size' bytes. Return the number of bytes the prom accepted. |
247 | */ | 260 | */ |
@@ -264,6 +277,7 @@ prom_setprop(int node, const char *pname, char *value, int size) | |||
264 | P1275_INOUT(4, 1), | 277 | P1275_INOUT(4, 1), |
265 | node, pname, value, P1275_SIZE(size)); | 278 | node, pname, value, P1275_SIZE(size)); |
266 | } | 279 | } |
280 | EXPORT_SYMBOL(prom_setprop); | ||
267 | 281 | ||
268 | inline int prom_inst2pkg(int inst) | 282 | inline int prom_inst2pkg(int inst) |
269 | { | 283 | { |