Linux-libre 3.17.4-gnu
[librecmc/linux-libre.git] / drivers / gpu / drm / nouveau / core / subdev / timer / nv04.h
1 #ifndef __NVKM_TIMER_NV04_H__
2 #define __NVKM_TIMER_NV04_H__
3
4 #include "priv.h"
5
6 #define NV04_PTIMER_INTR_0      0x009100
7 #define NV04_PTIMER_INTR_EN_0   0x009140
8 #define NV04_PTIMER_NUMERATOR   0x009200
9 #define NV04_PTIMER_DENOMINATOR 0x009210
10 #define NV04_PTIMER_TIME_0      0x009400
11 #define NV04_PTIMER_TIME_1      0x009410
12 #define NV04_PTIMER_ALARM_0     0x009420
13
14 struct nv04_timer_priv {
15         struct nouveau_timer base;
16         struct list_head alarms;
17         spinlock_t lock;
18         u64 suspend_time;
19 };
20
21 int  nv04_timer_ctor(struct nouveau_object *, struct nouveau_object *,
22                      struct nouveau_oclass *, void *, u32,
23                      struct nouveau_object **);
24 void nv04_timer_dtor(struct nouveau_object *);
25 int  nv04_timer_fini(struct nouveau_object *, bool);
26
27 #endif