1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NVKM_SEC2_PRIV_H__
3 #define __NVKM_SEC2_PRIV_H__
4 #include <engine/sec2.h>
5 
6 struct nvkm_sec2_func {
7 	const struct nvkm_falcon_func *flcn;
8 	u8 unit_unload;
9 	u8 unit_acr;
10 	irqreturn_t (*intr)(struct nvkm_inth *);
11 	int (*initmsg)(struct nvkm_sec2 *);
12 };
13 
14 irqreturn_t gp102_sec2_intr(struct nvkm_inth *);
15 int gp102_sec2_initmsg(struct nvkm_sec2 *);
16 
17 struct nvkm_sec2_fwif {
18 	int version;
19 	int (*load)(struct nvkm_sec2 *, int ver, const struct nvkm_sec2_fwif *);
20 	const struct nvkm_sec2_func *func;
21 	const struct nvkm_acr_lsf_func *acr;
22 };
23 
24 int gp102_sec2_nofw(struct nvkm_sec2 *, int, const struct nvkm_sec2_fwif *);
25 int gp102_sec2_load(struct nvkm_sec2 *, int, const struct nvkm_sec2_fwif *);
26 extern const struct nvkm_sec2_func gp102_sec2;
27 extern const struct nvkm_acr_lsf_func gp102_sec2_acr_1;
28 
29 int nvkm_sec2_new_(const struct nvkm_sec2_fwif *, struct nvkm_device *, enum nvkm_subdev_type,
30 		   int, u32 addr, struct nvkm_sec2 **);
31 #endif
32