blob: 69173df76db0c06b8cb65de84c0a5f8859a8345a [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Copyright (C) Paul Mackerras 1997.
3 * Copyright (C) Leigh Brown 2002.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.
9 */
10
11typedef void *prom_handle;
12typedef void *ihandle;
13typedef void *phandle;
14typedef int (*prom_entry)(void *);
15
16#define OF_INVALID_HANDLE ((prom_handle)-1UL)
17
18extern prom_entry of_prom_entry;
19
20/* function declarations */
21
22void * claim(unsigned int virt, unsigned int size, unsigned int align);
23int map(unsigned int phys, unsigned int virt, unsigned int size);
24void enter(void);
25void exit(void);
26phandle finddevice(const char *name);
27int getprop(phandle node, const char *name, void *buf, int buflen);
28void ofinit(prom_entry entry);
29int ofstdio(ihandle *stdin, ihandle *stdout, ihandle *stderr);
30int read(ihandle instance, void *buf, int buflen);
31void release(void *virt, unsigned int size);
32int write(ihandle instance, void *buf, int buflen);
33
34/* inlines */
35
36extern inline void pause(void)
37{
38 enter();
39}