/arch/ppc/boot/of1275/claim.c

https://bitbucket.org/evzijst/gittest · C · 34 lines · 22 code · 3 blank · 9 comment · 0 complexity · 6a24107fd6698286d6e5b1ae28264d09 MD5 · raw file

  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. #include "of1275.h"
  11. void *
  12. claim(unsigned int virt, unsigned int size, unsigned int align)
  13. {
  14. struct prom_args {
  15. char *service;
  16. int nargs;
  17. int nret;
  18. unsigned int virt;
  19. unsigned int size;
  20. unsigned int align;
  21. void *ret;
  22. } args;
  23. args.service = "claim";
  24. args.nargs = 3;
  25. args.nret = 1;
  26. args.virt = virt;
  27. args.size = size;
  28. args.align = align;
  29. (*of_prom_entry)(&args);
  30. return args.ret;
  31. }