of1275.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  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. typedef void *prom_handle;
  11. typedef void *ihandle;
  12. typedef void *phandle;
  13. typedef int (*prom_entry)(void *);
  14. #define OF_INVALID_HANDLE ((prom_handle)-1UL)
  15. extern prom_entry of_prom_entry;
  16. /* function declarations */
  17. void * claim(unsigned int virt, unsigned int size, unsigned int align);
  18. int map(unsigned int phys, unsigned int virt, unsigned int size);
  19. void enter(void);
  20. void exit(void);
  21. phandle finddevice(const char *name);
  22. int getprop(phandle node, const char *name, void *buf, int buflen);
  23. void ofinit(prom_entry entry);
  24. int ofstdio(ihandle *stdin, ihandle *stdout, ihandle *stderr);
  25. int read(ihandle instance, void *buf, int buflen);
  26. void release(void *virt, unsigned int size);
  27. int write(ihandle instance, void *buf, int buflen);
  28. /* inlines */
  29. extern inline void pause(void)
  30. {
  31. enter();
  32. }