Merge remote-tracking branch 'mkp-scsi/4.7/scsi-fixes' into fixes
[deliverable/linux.git] / arch / powerpc / boot / of.h
CommitLineData
2e601613
DG
1#ifndef _PPC_BOOT_OF_H_
2#define _PPC_BOOT_OF_H_
3
98fd433a
CLG
4#include "swab.h"
5
2e601613 6typedef void *phandle;
64130109 7typedef u32 ihandle;
2e601613
DG
8
9void of_init(void *promptr);
10int of_call_prom(const char *service, int nargs, int nret, ...);
034e55e6
CLG
11unsigned int of_claim(unsigned long virt, unsigned long size,
12 unsigned long align);
08464712 13void *of_vmlinux_alloc(unsigned long size);
2e601613 14void of_exit(void);
08464712
DG
15void *of_finddevice(const char *name);
16int of_getprop(const void *phandle, const char *name, void *buf,
17 const int buflen);
18int of_setprop(const void *phandle, const char *name, const void *buf,
19 const int buflen);
2e601613
DG
20
21/* Console functions */
22void of_console_init(void);
23
f1ec7187 24typedef u16 __be16;
fed23ed7 25typedef u32 __be32;
f1ec7187 26typedef u64 __be64;
fed23ed7 27
98fd433a 28#ifdef __LITTLE_ENDIAN__
6c87b220
JK
29#define cpu_to_be16(x) swab16(x)
30#define be16_to_cpu(x) swab16(x)
98fd433a
CLG
31#define cpu_to_be32(x) swab32(x)
32#define be32_to_cpu(x) swab32(x)
6c87b220
JK
33#define cpu_to_be64(x) swab64(x)
34#define be64_to_cpu(x) swab64(x)
98fd433a 35#else
6c87b220
JK
36#define cpu_to_be16(x) (x)
37#define be16_to_cpu(x) (x)
926e6940
CLG
38#define cpu_to_be32(x) (x)
39#define be32_to_cpu(x) (x)
6c87b220
JK
40#define cpu_to_be64(x) (x)
41#define be64_to_cpu(x) (x)
98fd433a 42#endif
926e6940 43
9cc36bb0
CLG
44#define PROM_ERROR (-1u)
45
2e601613 46#endif /* _PPC_BOOT_OF_H_ */
This page took 0.543077 seconds and 5 git commands to generate.