priv.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __NVKM_MC_PRIV_H__
  2. #define __NVKM_MC_PRIV_H__
  3. #include <subdev/mc.h>
  4. #define nvkm_mc_create(p,e,o,d) \
  5. nvkm_mc_create_((p), (e), (o), sizeof(**d), (void **)d)
  6. #define nvkm_mc_destroy(p) ({ \
  7. struct nvkm_mc *pmc = (p); _nvkm_mc_dtor(nv_object(pmc)); \
  8. })
  9. #define nvkm_mc_init(p) ({ \
  10. struct nvkm_mc *pmc = (p); _nvkm_mc_init(nv_object(pmc)); \
  11. })
  12. #define nvkm_mc_fini(p,s) ({ \
  13. struct nvkm_mc *pmc = (p); _nvkm_mc_fini(nv_object(pmc), (s)); \
  14. })
  15. int nvkm_mc_create_(struct nvkm_object *, struct nvkm_object *,
  16. struct nvkm_oclass *, int, void **);
  17. void _nvkm_mc_dtor(struct nvkm_object *);
  18. int _nvkm_mc_init(struct nvkm_object *);
  19. int _nvkm_mc_fini(struct nvkm_object *, bool);
  20. struct nvkm_mc_intr {
  21. u32 stat;
  22. u32 unit;
  23. };
  24. struct nvkm_mc_oclass {
  25. struct nvkm_oclass base;
  26. const struct nvkm_mc_intr *intr;
  27. void (*msi_rearm)(struct nvkm_mc *);
  28. void (*unk260)(struct nvkm_mc *, u32);
  29. };
  30. void gf100_mc_unk260(struct nvkm_mc *, u32);
  31. #endif