linux/arch/powerpc/boot/of.h
<<
>>
Prefs
   1#ifndef _PPC_BOOT_OF_H_
   2#define _PPC_BOOT_OF_H_
   3
   4#include "swab.h"
   5
   6typedef void *phandle;
   7typedef u32 ihandle;
   8
   9void of_init(void *promptr);
  10int of_call_prom(const char *service, int nargs, int nret, ...);
  11unsigned int of_claim(unsigned long virt, unsigned long size,
  12        unsigned long align);
  13void *of_vmlinux_alloc(unsigned long size);
  14void of_exit(void);
  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);
  20
  21/* Console functions */
  22void of_console_init(void);
  23
  24typedef u32                     __be32;
  25
  26#ifdef __LITTLE_ENDIAN__
  27#define cpu_to_be32(x) swab32(x)
  28#define be32_to_cpu(x) swab32(x)
  29#else
  30#define cpu_to_be32(x) (x)
  31#define be32_to_cpu(x) (x)
  32#endif
  33
  34#define PROM_ERROR (-1u)
  35
  36#endif /* _PPC_BOOT_OF_H_ */
  37