Lines Matching full:pmu
30 gt215_pmu_send(struct nvkm_pmu *pmu, u32 reply[2], in gt215_pmu_send() argument
33 struct nvkm_subdev *subdev = &pmu->subdev; in gt215_pmu_send()
37 mutex_lock(&pmu->send.mutex); in gt215_pmu_send()
45 mutex_unlock(&pmu->send.mutex); in gt215_pmu_send()
50 * on a synchronous reply, take the PMU mutex and tell the in gt215_pmu_send()
54 pmu->recv.message = message; in gt215_pmu_send()
55 pmu->recv.process = process; in gt215_pmu_send()
65 pmu->send.base)); in gt215_pmu_send()
77 wait_event(pmu->recv.wait, (pmu->recv.process == 0)); in gt215_pmu_send()
78 reply[0] = pmu->recv.data[0]; in gt215_pmu_send()
79 reply[1] = pmu->recv.data[1]; in gt215_pmu_send()
82 mutex_unlock(&pmu->send.mutex); in gt215_pmu_send()
87 gt215_pmu_recv(struct nvkm_pmu *pmu) in gt215_pmu_recv() argument
89 struct nvkm_subdev *subdev = &pmu->subdev; in gt215_pmu_recv()
105 pmu->recv.base)); in gt215_pmu_recv()
116 if (pmu->recv.process) { in gt215_pmu_recv()
117 if (process == pmu->recv.process && in gt215_pmu_recv()
118 message == pmu->recv.message) { in gt215_pmu_recv()
119 pmu->recv.data[0] = data0; in gt215_pmu_recv()
120 pmu->recv.data[1] = data1; in gt215_pmu_recv()
121 pmu->recv.process = 0; in gt215_pmu_recv()
122 wake_up(&pmu->recv.wait); in gt215_pmu_recv()
139 gt215_pmu_intr(struct nvkm_pmu *pmu) in gt215_pmu_intr() argument
141 struct nvkm_subdev *subdev = &pmu->subdev; in gt215_pmu_intr()
158 schedule_work(&pmu->recv.work); in gt215_pmu_intr()
178 gt215_pmu_fini(struct nvkm_pmu *pmu) in gt215_pmu_fini() argument
180 nvkm_wr32(pmu->subdev.device, 0x10a014, 0x00000060); in gt215_pmu_fini()
181 flush_work(&pmu->recv.work); in gt215_pmu_fini()
185 gt215_pmu_reset(struct nvkm_pmu *pmu) in gt215_pmu_reset() argument
187 struct nvkm_device *device = pmu->subdev.device; in gt215_pmu_reset()
195 gt215_pmu_enabled(struct nvkm_pmu *pmu) in gt215_pmu_enabled() argument
197 return nvkm_rd32(pmu->subdev.device, 0x022210) & 0x00000001; in gt215_pmu_enabled()
201 gt215_pmu_init(struct nvkm_pmu *pmu) in gt215_pmu_init() argument
203 struct nvkm_device *device = pmu->subdev.device; in gt215_pmu_init()
207 if (pmu->func->enabled(pmu)) { in gt215_pmu_init()
215 pmu->func->reset(pmu); in gt215_pmu_init()
225 for (i = 0; i < pmu->func->data.size / 4; i++) in gt215_pmu_init()
226 nvkm_wr32(device, 0x10a1c4, pmu->func->data.data[i]); in gt215_pmu_init()
230 for (i = 0; i < pmu->func->code.size / 4; i++) { in gt215_pmu_init()
233 nvkm_wr32(device, 0x10a184, pmu->func->code.data[i]); in gt215_pmu_init()
241 /* wait for valid host->pmu ring configuration */ in gt215_pmu_init()
247 pmu->send.base = nvkm_rd32(device, 0x10a4d0) & 0x0000ffff; in gt215_pmu_init()
248 pmu->send.size = nvkm_rd32(device, 0x10a4d0) >> 16; in gt215_pmu_init()
250 /* wait for valid pmu->host ring configuration */ in gt215_pmu_init()
256 pmu->recv.base = nvkm_rd32(device, 0x10a4dc) & 0x0000ffff; in gt215_pmu_init()
257 pmu->recv.size = nvkm_rd32(device, 0x10a4dc) >> 16; in gt215_pmu_init()