blob: 0f058ef69521c00000fed729ef5abb4f202b577a [file] [log] [blame]
David Gibson2e601612007-06-13 14:52:54 +10001#ifndef _PPC_BOOT_OF_H_
2#define _PPC_BOOT_OF_H_
3
4typedef void *phandle;
5typedef void *ihandle;
6
7void of_init(void *promptr);
8int of_call_prom(const char *service, int nargs, int nret, ...);
9void *of_claim(unsigned long virt, unsigned long size, unsigned long align);
David Gibson08464712007-06-27 16:54:58 +100010void *of_vmlinux_alloc(unsigned long size);
David Gibson2e601612007-06-13 14:52:54 +100011void of_exit(void);
David Gibson08464712007-06-27 16:54:58 +100012void *of_finddevice(const char *name);
13int of_getprop(const void *phandle, const char *name, void *buf,
14 const int buflen);
15int of_setprop(const void *phandle, const char *name, const void *buf,
16 const int buflen);
David Gibson2e601612007-06-13 14:52:54 +100017
18/* Console functions */
19void of_console_init(void);
20
Cédric Le Goaterfed23ed2014-04-24 09:23:26 +020021typedef u32 __be32;
22
Cédric Le Goater926e6942014-04-24 09:23:28 +020023#define cpu_to_be32(x) (x)
24#define be32_to_cpu(x) (x)
25
Cédric Le Goater9cc36bb2014-04-24 09:23:29 +020026#define PROM_ERROR (-1u)
27
David Gibson2e601612007-06-13 14:52:54 +100028#endif /* _PPC_BOOT_OF_H_ */