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