Lines Matching refs:sec2
30 struct nvkm_sec2 *sec2 = container_of(work, typeof(*sec2), work); in nvkm_sec2_recv() local
32 if (!sec2->initmsg_received) { in nvkm_sec2_recv()
33 int ret = sec2->func->initmsg(sec2); in nvkm_sec2_recv()
35 nvkm_error(&sec2->engine.subdev, in nvkm_sec2_recv()
40 sec2->initmsg_received = true; in nvkm_sec2_recv()
43 nvkm_falcon_msgq_recv(sec2->msgq); in nvkm_sec2_recv()
49 struct nvkm_sec2 *sec2 = nvkm_sec2(engine); in nvkm_sec2_intr() local
50 sec2->func->intr(sec2); in nvkm_sec2_intr()
56 struct nvkm_sec2 *sec2 = nvkm_sec2(engine); in nvkm_sec2_fini() local
58 flush_work(&sec2->work); in nvkm_sec2_fini()
61 nvkm_falcon_cmdq_fini(sec2->cmdq); in nvkm_sec2_fini()
62 sec2->initmsg_received = false; in nvkm_sec2_fini()
71 struct nvkm_sec2 *sec2 = nvkm_sec2(engine); in nvkm_sec2_dtor() local
72 nvkm_falcon_msgq_del(&sec2->msgq); in nvkm_sec2_dtor()
73 nvkm_falcon_cmdq_del(&sec2->cmdq); in nvkm_sec2_dtor()
74 nvkm_falcon_qmgr_del(&sec2->qmgr); in nvkm_sec2_dtor()
75 nvkm_falcon_dtor(&sec2->falcon); in nvkm_sec2_dtor()
76 return sec2; in nvkm_sec2_dtor()
90 struct nvkm_sec2 *sec2; in nvkm_sec2_new_() local
93 if (!(sec2 = *psec2 = kzalloc(sizeof(*sec2), GFP_KERNEL))) in nvkm_sec2_new_()
96 ret = nvkm_engine_ctor(&nvkm_sec2, device, type, inst, true, &sec2->engine); in nvkm_sec2_new_()
100 fwif = nvkm_firmware_load(&sec2->engine.subdev, fwif, "Sec2", sec2); in nvkm_sec2_new_()
104 sec2->func = fwif->func; in nvkm_sec2_new_()
106 ret = nvkm_falcon_ctor(sec2->func->flcn, &sec2->engine.subdev, in nvkm_sec2_new_()
107 sec2->engine.subdev.name, addr, &sec2->falcon); in nvkm_sec2_new_()
111 if ((ret = nvkm_falcon_qmgr_new(&sec2->falcon, &sec2->qmgr)) || in nvkm_sec2_new_()
112 (ret = nvkm_falcon_cmdq_new(sec2->qmgr, "cmdq", &sec2->cmdq)) || in nvkm_sec2_new_()
113 (ret = nvkm_falcon_msgq_new(sec2->qmgr, "msgq", &sec2->msgq))) in nvkm_sec2_new_()
116 INIT_WORK(&sec2->work, nvkm_sec2_recv); in nvkm_sec2_new_()