revert between 56095 -> 55830 in arch
[AROS.git] / arch / ppc-all / prep / startup / of1275.h
blob99c3d70ce7af9cfa9e9302a1d1bf02474b584ac3
1 /*
2 * BK Id: SCCS/s.of1275.h 1.6 05/18/01 15:16:42 cort
3 */
4 /* 6.3.2.1 Client interface */
6 void of_init(void *handler);
9 typedef struct _of_test_service {
10 const char *service;
11 int n_args;
12 int n_returns;
13 /*in*/
14 const char *name;
15 /*out*/
16 int missing;
17 } of_test_service;
19 int of_test(const char *name, int *missing);
22 /* 6.3.2.2 Device tree */
25 typedef struct _of_peer_service {
26 const char *service;
27 int n_args;
28 int n_returns;
29 /*in*/
30 int phandle;
31 /*out*/
32 int sibling_phandle;
33 } of_peer_service;
35 int of_peer(int phandle, int *sibling_phandle);
38 typedef struct _of_child_service {
39 const char *service;
40 int n_args;
41 int n_returns;
42 /*in*/
43 int phandle;
44 /*out*/
45 int child_phandle;
46 } of_child_service;
48 int of_child(int phandle, int *child_phandle);
51 typedef struct _of_parent_service {
52 const char *service;
53 int n_args;
54 int n_returns;
55 /*in*/
56 int phandle;
57 /*out*/
58 int parent_phandle;
59 } of_parent_service;
61 int of_child(int phandle, int *parent_phandle);
64 typedef struct _of_instance_to_package_service {
65 const char *service;
66 int n_args;
67 int n_returns;
68 /*in*/
69 int ihandle;
70 /*out*/
71 int phandle;
72 } of_instance_to_package_service;
74 int of_instance_to_package(int ihandle, int *phandle);
77 typedef struct _of_getproplen_service {
78 const char *service;
79 int n_args;
80 int n_returns;
81 /*in*/
82 int phandle;
83 const char *name;
84 /*out*/
85 int proplen;
86 } of_getproplen_service;
88 int of_getproplen(int phandle, const char *name, int *proplen);
91 typedef struct _of_getprop_service {
92 const char *service;
93 int n_args;
94 int n_returns;
95 /*in*/
96 int phandle;
97 const char *name;
98 void *buf;
99 int buflen;
100 /*out*/
101 int size;
102 } of_getprop_service;
104 int of_getprop(int phandle, const char *name, void *buf, int buflen,
105 int *size);
108 typedef struct _of_nextprop_service {
109 const char *service;
110 int n_args;
111 int n_returns;
112 /*in*/
113 int phandle;
114 const char *previous;
115 void *buf;
116 /*out*/
117 int flag;
118 } of_nextprop_service;
120 int of_nextprop(int phandle, const char *previous, void *buf, int *flag);
123 typedef struct _of_setprop_service {
124 const char *service;
125 int n_args;
126 int n_returns;
127 /*in*/
128 int phandle;
129 const char *name;
130 void *buf;
131 int len;
132 /*out*/
133 int size;
134 } of_setprop_service;
136 int of_setprop(int phandle, const char *name, void *buf, int len, int *size);
139 typedef struct _of_canon_service {
140 const char *service;
141 int n_args;
142 int n_returns;
143 /*in*/
144 const char *device_specifier;
145 void *buf;
146 int buflen;
147 /*out*/
148 int length;
149 } of_canon_service;
151 int of_canon(const char *device_specifier, void *buf, int buflen, int *length);
154 typedef struct _of_finddevice_service {
155 const char *service;
156 int n_args;
157 int n_returns;
158 /*in*/
159 const char *device_specifier;
160 /*out*/
161 int phandle;
162 } of_finddevice_service;
164 int of_finddevice(const char *device_specifier, int *phandle);
167 typedef struct _of_instance_to_path_service {
168 const char *service;
169 int n_args;
170 int n_returns;
171 /*in*/
172 int ihandle;
173 void *buf;
174 int buflen;
175 /*out*/
176 int length;
177 } of_instance_to_path_service;
179 int of_instance_to_path(int ihandle, void *buf, int buflen, int *length);
182 typedef struct _of_package_to_path_service {
183 const char *service;
184 int n_args;
185 int n_returns;
186 /*in*/
187 int phandle;
188 void *buf;
189 int buflen;
190 /*out*/
191 int length;
192 } of_package_to_path_service;
194 int of_package_to_path(int phandle, void *buf, int buflen, int *length);
197 typedef struct _of_call_method_service {
198 const char *service;
199 int n_args;
200 int n_returns;
201 /*in*/
202 const char *method;
203 int ihandle;
204 /*...*/
205 int args[0];
206 } of_call_method_service;
208 int of_call_method(const char *method, int ihandle, ...);
211 /* 6.3.2.3 Device I/O */
214 typedef struct _of_open_service {
215 const char *service;
216 int n_args;
217 int n_returns;
218 /*in*/
219 const char *device_specifier;
220 /*out*/
221 int ihandle;
222 } of_open_service;
224 int of_open(const char *device_specifier,
225 int *ihandle);
228 typedef struct _of_close_service {
229 const char *service;
230 int n_args;
231 int n_returns;
232 /*in*/
233 int ihandle;
234 /*out*/
235 } of_close_service;
237 int of_close(int ihandle);
240 typedef struct _of_read_service {
241 const char *service;
242 int n_args;
243 int n_returns;
244 /*in*/
245 int ihandle;
246 void *addr;
247 int len;
248 /*out*/
249 int actual;
250 } of_read_service;
252 int of_read(int ihandle, void *addr, int len, int *actual);
255 typedef struct _of_write_service {
256 const char *service;
257 int n_args;
258 int n_returns;
259 /*in*/
260 int ihandle;
261 void *addr;
262 int len;
263 /*out*/
264 int actual;
265 } of_write_service;
267 int of_write(int ihandle, void *addr, int len, int *actual);
270 typedef struct _of_seek_service {
271 const char *service;
272 int n_args;
273 int n_returns;
274 /*in*/
275 int ihandle;
276 int pos_hi;
277 int pos_lo;
278 /*out*/
279 int status;
280 } of_seek_service;
282 int of_seek(int ihandle, int pos_hi, int pos_lo, int *status);
285 /* 6.3.2.4 Memory */
288 typedef struct _of_claim_service {
289 const char *service;
290 int n_args;
291 int n_returns;
292 /*in*/
293 void *virt;
294 int size;
295 int align;
296 /*out*/
297 void *baseaddr;
298 } of_claim_service;
300 int of_claim(void *virt, int size, int align, void **baseaddr);
303 typedef struct _of_release_service {
304 const char *service;
305 int n_args;
306 int n_returns;
307 /*in*/
308 void *virt;
309 int size;
310 int align;
311 /*out*/
312 } of_release_service;
314 int of_release(void *virt, int size);
317 /* 6.3.2.5 Control transfer */
320 typedef struct _of_boot_service {
321 const char *service;
322 int n_args;
323 int n_returns;
324 /*in*/
325 const char *bootspec;
326 /*out*/
327 } of_boot_service;
329 int of_boot(const char *bootspec);
332 typedef struct _of_enter_service {
333 const char *service;
334 int n_args;
335 int n_returns;
336 /*in*/
337 /*out*/
338 } of_enter_service;
340 int of_enter(void);
343 typedef struct _of_exit_service {
344 const char *service;
345 int n_args;
346 int n_returns;
347 /*in*/
348 /*out*/
349 } of_exit_service;
351 int of_exit(void);
354 typedef struct _of_chain_service {
355 const char *service;
356 int n_args;
357 int n_returns;
358 /*in*/
359 void *virt;
360 int size;
361 void *entry;
362 void *args;
363 int len;
364 /*out*/
365 } of_chain_service;
367 int of_chain(void *virt, int size, void *entry, void *args, int len);
370 /* 6.3.2.6 User interface */
373 typedef struct _of_interpret_service {
374 const char *service;
375 int n_args;
376 int n_returns;
377 /*in*/
378 const char *cmd;
379 int args[0];
380 /*...*/
381 /*out*/
382 /*...*/
383 } of_interpret_service;
385 int of_interpret(const char *arg, ...);
388 typedef struct _of_set_callback_service {
389 const char *service;
390 int n_args;
391 int n_returns;
392 /*in*/
393 void *newfunc;
394 /*out*/
395 void *oldfunc;
396 } of_set_callback_service;
398 int of_set_callback(void *newfunc, void **oldfunc);
401 typedef struct _of_set_symbol_lookup_service {
402 const char *service;
403 int n_args;
404 int n_returns;
405 /*in*/
406 void *sym_to_value;
407 void *value_to_sym;
408 /*out*/
409 } of_set_symbol_lookup_service;
411 int of_set_symbol_lookup(void *sym_to_value, void *value_to_sym);
414 /* 6.3.2.7 Time */
417 typedef struct _of_milliseconds_service {
418 const char *service;
419 int n_args;
420 int n_returns;
421 /*in*/
422 /*out*/
423 int ms;
424 } of_milliseconds_service;
426 int of_milliseconds(int *ms);