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 void nvkm_mc_ctor(const struct nvkm_mc_func *, struct nvkm_device *, 7 int index, struct nvkm_mc *); 8 int nvkm_mc_new_(const struct nvkm_mc_func *, struct nvkm_device *, 9 int index, struct nvkm_mc **); 10 11 struct nvkm_mc_map { 12 u32 stat; 13 u32 unit; 14 bool noauto; 15 }; 16 17 struct nvkm_mc_func { 18 void (*init)(struct nvkm_mc *); 19 const struct nvkm_mc_map *intr; 20 /* disable reporting of interrupts to host */ 21 void (*intr_unarm)(struct nvkm_mc *); 22 /* enable reporting of interrupts to host */ 23 void (*intr_rearm)(struct nvkm_mc *); 24 /* (un)mask delivery of specific interrupts */ 25 void (*intr_mask)(struct nvkm_mc *, u32 mask, u32 stat); 26 /* retrieve pending interrupt mask (NV_PMC_INTR) */ 27 u32 (*intr_stat)(struct nvkm_mc *); 28 const struct nvkm_mc_map *reset; 29 void (*unk260)(struct nvkm_mc *, u32); 30 }; 31 32 void nv04_mc_init(struct nvkm_mc *); 33 void nv04_mc_intr_unarm(struct nvkm_mc *); 34 void nv04_mc_intr_rearm(struct nvkm_mc *); 35 u32 nv04_mc_intr_stat(struct nvkm_mc *); 36 extern const struct nvkm_mc_map nv04_mc_reset[]; 37 38 extern const struct nvkm_mc_map nv17_mc_intr[]; 39 extern const struct nvkm_mc_map nv17_mc_reset[]; 40 41 void nv44_mc_init(struct nvkm_mc *); 42 43 void nv50_mc_init(struct nvkm_mc *); 44 void gk104_mc_init(struct nvkm_mc *); 45 46 void gf100_mc_intr_unarm(struct nvkm_mc *); 47 void gf100_mc_intr_rearm(struct nvkm_mc *); 48 void gf100_mc_intr_mask(struct nvkm_mc *, u32, u32); 49 u32 gf100_mc_intr_stat(struct nvkm_mc *); 50 void gf100_mc_unk260(struct nvkm_mc *, u32); 51 void gp100_mc_intr_unarm(struct nvkm_mc *); 52 void gp100_mc_intr_rearm(struct nvkm_mc *); 53 void gp100_mc_intr_mask(struct nvkm_mc *, u32, u32); 54 int gp100_mc_new_(const struct nvkm_mc_func *, struct nvkm_device *, int, 55 struct nvkm_mc **); 56 57 extern const struct nvkm_mc_map gk104_mc_intr[]; 58 extern const struct nvkm_mc_map gk104_mc_reset[]; 59 #endif 60