1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NVKM_MC_PRIV_H__
3 #define __NVKM_MC_PRIV_H__
4 #define nvkm_mc(p) container_of((p), struct nvkm_mc, subdev)
7 void nvkm_mc_ctor(const struct nvkm_mc_func
*, struct nvkm_device
*,
8 int index
, struct nvkm_mc
*);
9 int nvkm_mc_new_(const struct nvkm_mc_func
*, struct nvkm_device
*,
10 int index
, struct nvkm_mc
**);
19 void (*init
)(struct nvkm_mc
*);
20 const struct nvkm_mc_map
*intr
;
21 /* disable reporting of interrupts to host */
22 void (*intr_unarm
)(struct nvkm_mc
*);
23 /* enable reporting of interrupts to host */
24 void (*intr_rearm
)(struct nvkm_mc
*);
25 /* (un)mask delivery of specific interrupts */
26 void (*intr_mask
)(struct nvkm_mc
*, u32 mask
, u32 stat
);
27 /* retrieve pending interrupt mask (NV_PMC_INTR) */
28 u32 (*intr_stat
)(struct nvkm_mc
*);
29 void (*intr_hack
)(struct nvkm_mc
*, bool *handled
);
30 const struct nvkm_mc_map
*reset
;
31 void (*unk260
)(struct nvkm_mc
*, u32
);
34 void nv04_mc_init(struct nvkm_mc
*);
35 void nv04_mc_intr_unarm(struct nvkm_mc
*);
36 void nv04_mc_intr_rearm(struct nvkm_mc
*);
37 u32
nv04_mc_intr_stat(struct nvkm_mc
*);
38 extern const struct nvkm_mc_map nv04_mc_reset
[];
40 extern const struct nvkm_mc_map nv17_mc_intr
[];
41 extern const struct nvkm_mc_map nv17_mc_reset
[];
43 void nv44_mc_init(struct nvkm_mc
*);
45 void nv50_mc_init(struct nvkm_mc
*);
46 void gk104_mc_init(struct nvkm_mc
*);
48 void gf100_mc_intr_unarm(struct nvkm_mc
*);
49 void gf100_mc_intr_rearm(struct nvkm_mc
*);
50 void gf100_mc_intr_mask(struct nvkm_mc
*, u32
, u32
);
51 u32
gf100_mc_intr_stat(struct nvkm_mc
*);
52 void gf100_mc_unk260(struct nvkm_mc
*, u32
);
53 void gp100_mc_intr_unarm(struct nvkm_mc
*);
54 void gp100_mc_intr_rearm(struct nvkm_mc
*);
55 void gp100_mc_intr_mask(struct nvkm_mc
*, u32
, u32
);
56 int gp100_mc_new_(const struct nvkm_mc_func
*, struct nvkm_device
*, int,
59 extern const struct nvkm_mc_map gk104_mc_intr
[];
60 extern const struct nvkm_mc_map gk104_mc_reset
[];
62 extern const struct nvkm_mc_map gp100_mc_intr
[];