Lines Matching refs:device

34 	struct nvkm_device *device = subdev->device;  in gt215_pmu_send()  local
39 addr = nvkm_rd32(device, 0x10a4a0); in gt215_pmu_send()
40 if (nvkm_msec(device, 2000, in gt215_pmu_send()
41 u32 tmp = nvkm_rd32(device, 0x10a4b0); in gt215_pmu_send()
60 nvkm_wr32(device, 0x10a580, 0x00000001); in gt215_pmu_send()
61 } while (nvkm_rd32(device, 0x10a580) != 0x00000001); in gt215_pmu_send()
64 nvkm_wr32(device, 0x10a1c0, 0x01000000 | (((addr & 0x07) << 4) + in gt215_pmu_send()
66 nvkm_wr32(device, 0x10a1c4, process); in gt215_pmu_send()
67 nvkm_wr32(device, 0x10a1c4, message); in gt215_pmu_send()
68 nvkm_wr32(device, 0x10a1c4, data0); in gt215_pmu_send()
69 nvkm_wr32(device, 0x10a1c4, data1); in gt215_pmu_send()
70 nvkm_wr32(device, 0x10a4a0, (addr + 1) & 0x0f); in gt215_pmu_send()
73 nvkm_wr32(device, 0x10a580, 0x00000000); in gt215_pmu_send()
90 struct nvkm_device *device = subdev->device; in gt215_pmu_recv() local
94 u32 addr = nvkm_rd32(device, 0x10a4cc); in gt215_pmu_recv()
95 if (addr == nvkm_rd32(device, 0x10a4c8)) in gt215_pmu_recv()
100 nvkm_wr32(device, 0x10a580, 0x00000002); in gt215_pmu_recv()
101 } while (nvkm_rd32(device, 0x10a580) != 0x00000002); in gt215_pmu_recv()
104 nvkm_wr32(device, 0x10a1c0, 0x02000000 | (((addr & 0x07) << 4) + in gt215_pmu_recv()
106 process = nvkm_rd32(device, 0x10a1c4); in gt215_pmu_recv()
107 message = nvkm_rd32(device, 0x10a1c4); in gt215_pmu_recv()
108 data0 = nvkm_rd32(device, 0x10a1c4); in gt215_pmu_recv()
109 data1 = nvkm_rd32(device, 0x10a1c4); in gt215_pmu_recv()
110 nvkm_wr32(device, 0x10a4cc, (addr + 1) & 0x0f); in gt215_pmu_recv()
113 nvkm_wr32(device, 0x10a580, 0x00000000); in gt215_pmu_recv()
142 struct nvkm_device *device = subdev->device; in gt215_pmu_intr() local
143 u32 disp = nvkm_rd32(device, 0x10a01c); in gt215_pmu_intr()
144 u32 intr = nvkm_rd32(device, 0x10a008) & disp & ~(disp >> 16); in gt215_pmu_intr()
147 u32 stat = nvkm_rd32(device, 0x10a16c); in gt215_pmu_intr()
151 nvkm_rd32(device, 0x10a168)); in gt215_pmu_intr()
152 nvkm_wr32(device, 0x10a16c, 0x00000000); in gt215_pmu_intr()
159 nvkm_wr32(device, 0x10a004, 0x00000040); in gt215_pmu_intr()
165 nvkm_rd32(device, 0x10a7a0), in gt215_pmu_intr()
166 nvkm_rd32(device, 0x10a7a4)); in gt215_pmu_intr()
167 nvkm_wr32(device, 0x10a004, 0x00000080); in gt215_pmu_intr()
173 nvkm_wr32(device, 0x10a004, intr); in gt215_pmu_intr()
180 nvkm_wr32(pmu->subdev.device, 0x10a014, 0x00000060); in gt215_pmu_fini()
187 struct nvkm_device *device = pmu->subdev.device; in gt215_pmu_reset() local
189 nvkm_mask(device, 0x022210, 0x00000001, 0x00000000); in gt215_pmu_reset()
190 nvkm_mask(device, 0x022210, 0x00000001, 0x00000001); in gt215_pmu_reset()
191 nvkm_rd32(device, 0x022210); in gt215_pmu_reset()
197 return nvkm_rd32(pmu->subdev.device, 0x022210) & 0x00000001; in gt215_pmu_enabled()
203 struct nvkm_device *device = pmu->subdev.device; in gt215_pmu_init() local
208 nvkm_wr32(device, 0x10a014, 0x0000ffff); in gt215_pmu_init()
209 nvkm_msec(device, 2000, in gt215_pmu_init()
210 if (!nvkm_rd32(device, 0x10a04c)) in gt215_pmu_init()
218 nvkm_msec(device, 2000, in gt215_pmu_init()
219 if (!(nvkm_rd32(device, 0x10a10c) & 0x00000006)) in gt215_pmu_init()
224 nvkm_wr32(device, 0x10a1c0, 0x01000000); in gt215_pmu_init()
226 nvkm_wr32(device, 0x10a1c4, pmu->func->data.data[i]); in gt215_pmu_init()
229 nvkm_wr32(device, 0x10a180, 0x01000000); in gt215_pmu_init()
232 nvkm_wr32(device, 0x10a188, i >> 6); in gt215_pmu_init()
233 nvkm_wr32(device, 0x10a184, pmu->func->code.data[i]); in gt215_pmu_init()
237 nvkm_wr32(device, 0x10a10c, 0x00000000); in gt215_pmu_init()
238 nvkm_wr32(device, 0x10a104, 0x00000000); in gt215_pmu_init()
239 nvkm_wr32(device, 0x10a100, 0x00000002); in gt215_pmu_init()
242 if (nvkm_msec(device, 2000, in gt215_pmu_init()
243 if (nvkm_rd32(device, 0x10a4d0)) 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()
251 if (nvkm_msec(device, 2000, in gt215_pmu_init()
252 if (nvkm_rd32(device, 0x10a4dc)) 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()
259 nvkm_wr32(device, 0x10a010, 0x000000e0); in gt215_pmu_init()
290 gt215_pmu_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, in gt215_pmu_new() argument
293 return nvkm_pmu_new_(gt215_pmu_fwif, device, type, inst, ppmu); in gt215_pmu_new()