1
2 #ifndef __NVKM_PMU_PRIV_H__
3 #define __NVKM_PMU_PRIV_H__
4 #define nvkm_pmu(p) container_of((p), struct nvkm_pmu, subdev)
5 #include <subdev/pmu.h>
6 #include <subdev/pmu/fuc/os.h>
7
8 int nvkm_pmu_ctor(const struct nvkm_pmu_func *, struct nvkm_device *,
9 int index, struct nvkm_pmu *);
10 int nvkm_pmu_new_(const struct nvkm_pmu_func *, struct nvkm_device *,
11 int index, struct nvkm_pmu **);
12
13 struct nvkm_pmu_func {
14 struct {
15 u32 *data;
16 u32 size;
17 } code;
18
19 struct {
20 u32 *data;
21 u32 size;
22 } data;
23
24 bool (*enabled)(struct nvkm_pmu *);
25 void (*reset)(struct nvkm_pmu *);
26 int (*init)(struct nvkm_pmu *);
27 void (*fini)(struct nvkm_pmu *);
28 void (*intr)(struct nvkm_pmu *);
29 int (*send)(struct nvkm_pmu *, u32 reply[2], u32 process,
30 u32 message, u32 data0, u32 data1);
31 void (*recv)(struct nvkm_pmu *);
32 void (*pgob)(struct nvkm_pmu *, bool);
33 };
34
35 int gt215_pmu_init(struct nvkm_pmu *);
36 void gt215_pmu_fini(struct nvkm_pmu *);
37 void gt215_pmu_intr(struct nvkm_pmu *);
38 void gt215_pmu_recv(struct nvkm_pmu *);
39 int gt215_pmu_send(struct nvkm_pmu *, u32[2], u32, u32, u32, u32);
40
41 bool gf100_pmu_enabled(struct nvkm_pmu *);
42 void gf100_pmu_reset(struct nvkm_pmu *);
43
44 void gk110_pmu_pgob(struct nvkm_pmu *, bool);
45 #endif