init.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __NVBIOS_INIT_H__
  3. #define __NVBIOS_INIT_H__
  4. struct nvbios_init {
  5. struct nvkm_subdev *subdev;
  6. u32 offset;
  7. struct dcb_output *outp;
  8. int or;
  9. int link;
  10. int head;
  11. /* internal state used during parsing */
  12. u8 execute;
  13. u32 nested;
  14. u32 repeat;
  15. u32 repend;
  16. u32 ramcfg;
  17. };
  18. #define nvbios_init(s,o,ARGS...) ({ \
  19. struct nvbios_init init = { \
  20. .subdev = (s), \
  21. .offset = (o), \
  22. .or = -1, \
  23. .link = 0, \
  24. .head = -1, \
  25. .execute = 1, \
  26. }; \
  27. ARGS \
  28. nvbios_exec(&init); \
  29. })
  30. int nvbios_exec(struct nvbios_init *);
  31. int nvbios_post(struct nvkm_subdev *, bool execute);
  32. #endif