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