1
2 #ifndef __NVKM_TIMER_PRIV_H__
3 #define __NVKM_TIMER_PRIV_H__
4 #define nvkm_timer(p) container_of((p), struct nvkm_timer, subdev)
5 #include <subdev/timer.h>
6
7 int nvkm_timer_new_(const struct nvkm_timer_func *, struct nvkm_device *,
8 int index, struct nvkm_timer **);
9
10 struct nvkm_timer_func {
11 void (*init)(struct nvkm_timer *);
12 void (*intr)(struct nvkm_timer *);
13 u64 (*read)(struct nvkm_timer *);
14 void (*time)(struct nvkm_timer *, u64 time);
15 void (*alarm_init)(struct nvkm_timer *, u32 time);
16 void (*alarm_fini)(struct nvkm_timer *);
17 };
18
19 void nvkm_timer_alarm_trigger(struct nvkm_timer *);
20
21 void nv04_timer_fini(struct nvkm_timer *);
22 void nv04_timer_intr(struct nvkm_timer *);
23 void nv04_timer_time(struct nvkm_timer *, u64);
24 u64 nv04_timer_read(struct nvkm_timer *);
25 void nv04_timer_alarm_init(struct nvkm_timer *, u32);
26 void nv04_timer_alarm_fini(struct nvkm_timer *);
27 #endif