1 #ifndef __NVKM_MC_PRIV_H__ 2 #define __NVKM_MC_PRIV_H__ 3 #define nvkm_mc(p) container_of((p), struct nvkm_mc, subdev) 4 #include <subdev/mc.h> 5 6 int nvkm_mc_new_(const struct nvkm_mc_func *, struct nvkm_device *, 7 int index, struct nvkm_mc **); 8 9 struct nvkm_mc_map { 10 u32 stat; 11 u32 unit; 12 }; 13 14 struct nvkm_mc_func { 15 void (*init)(struct nvkm_mc *); 16 const struct nvkm_mc_map *intr; 17 /* disable reporting of interrupts to host */ 18 void (*intr_unarm)(struct nvkm_mc *); 19 /* enable reporting of interrupts to host */ 20 void (*intr_rearm)(struct nvkm_mc *); 21 /* retrieve pending interrupt mask (NV_PMC_INTR) */ 22 u32 (*intr_mask)(struct nvkm_mc *); 23 const struct nvkm_mc_map *reset; 24 void (*unk260)(struct nvkm_mc *, u32); 25 }; 26 27 void nv04_mc_init(struct nvkm_mc *); 28 void nv04_mc_intr_unarm(struct nvkm_mc *); 29 void nv04_mc_intr_rearm(struct nvkm_mc *); 30 u32 nv04_mc_intr_mask(struct nvkm_mc *); 31 extern const struct nvkm_mc_map nv04_mc_reset[]; 32 33 extern const struct nvkm_mc_map nv17_mc_intr[]; 34 extern const struct nvkm_mc_map nv17_mc_reset[]; 35 36 void nv44_mc_init(struct nvkm_mc *); 37 38 void nv50_mc_init(struct nvkm_mc *); 39 40 void gf100_mc_intr_unarm(struct nvkm_mc *); 41 void gf100_mc_intr_rearm(struct nvkm_mc *); 42 u32 gf100_mc_intr_mask(struct nvkm_mc *); 43 void gf100_mc_unk260(struct nvkm_mc *, u32); 44 45 extern const struct nvkm_mc_map gk104_mc_intr[]; 46 extern const struct nvkm_mc_map gk104_mc_reset[]; 47 #endif 48