Blame view

arch/powerpc/boot/of.h 876 Bytes
2e6016133   David Gibson   [POWERPC] Split l...
1
2
  #ifndef _PPC_BOOT_OF_H_
  #define _PPC_BOOT_OF_H_
98fd433aa   Cédric Le Goater   powerpc/boot: Def...
3
  #include "swab.h"
2e6016133   David Gibson   [POWERPC] Split l...
4
  typedef void *phandle;
641301093   Cédric Le Goater   powerpc/boot: Def...
5
  typedef u32 ihandle;
2e6016133   David Gibson   [POWERPC] Split l...
6
7
8
  
  void of_init(void *promptr);
  int of_call_prom(const char *service, int nargs, int nret, ...);
034e55e6c   Cédric Le Goater   powerpc/boot: Rew...
9
10
  unsigned int of_claim(unsigned long virt, unsigned long size,
  	unsigned long align);
084647125   David Gibson   [POWERPC] Make mo...
11
  void *of_vmlinux_alloc(unsigned long size);
2e6016133   David Gibson   [POWERPC] Split l...
12
  void of_exit(void);
084647125   David Gibson   [POWERPC] Make mo...
13
14
15
16
17
  void *of_finddevice(const char *name);
  int of_getprop(const void *phandle, const char *name, void *buf,
  	       const int buflen);
  int of_setprop(const void *phandle, const char *name, const void *buf,
  	       const int buflen);
2e6016133   David Gibson   [POWERPC] Split l...
18
19
20
  
  /* Console functions */
  void of_console_init(void);
fed23ed7e   Cédric Le Goater   powerpc/boot: Use...
21
  typedef u32			__be32;
98fd433aa   Cédric Le Goater   powerpc/boot: Def...
22
23
24
25
  #ifdef __LITTLE_ENDIAN__
  #define cpu_to_be32(x) swab32(x)
  #define be32_to_cpu(x) swab32(x)
  #else
926e6940f   Cédric Le Goater   powerpc/boot: Add...
26
27
  #define cpu_to_be32(x) (x)
  #define be32_to_cpu(x) (x)
98fd433aa   Cédric Le Goater   powerpc/boot: Def...
28
  #endif
926e6940f   Cédric Le Goater   powerpc/boot: Add...
29

9cc36bb0a   Cédric Le Goater   powerpc/boot: Add...
30
  #define PROM_ERROR (-1u)
2e6016133   David Gibson   [POWERPC] Split l...
31
  #endif /* _PPC_BOOT_OF_H_ */