aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h
new file mode 100644
index 000000000000..cbcd51852472
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h
@@ -0,0 +1,40 @@
1#ifndef __NVKM_DEVINIT_PRIV_H__
2#define __NVKM_DEVINIT_PRIV_H__
3
4#include <subdev/bios.h>
5#include <subdev/bios/pll.h>
6#include <subdev/bios/init.h>
7#include <subdev/clock/pll.h>
8#include <subdev/devinit.h>
9
10struct nouveau_devinit_impl {
11 struct nouveau_oclass base;
12 void (*meminit)(struct nouveau_devinit *);
13 int (*pll_set)(struct nouveau_devinit *, u32 type, u32 freq);
14 u64 (*disable)(struct nouveau_devinit *);
15 u32 (*mmio)(struct nouveau_devinit *, u32);
16 int (*post)(struct nouveau_subdev *, bool);
17};
18
19#define nouveau_devinit_create(p,e,o,d) \
20 nouveau_devinit_create_((p), (e), (o), sizeof(**d), (void **)d)
21#define nouveau_devinit_destroy(p) ({ \
22 struct nouveau_devinit *d = (p); \
23 _nouveau_devinit_dtor(nv_object(d)); \
24})
25#define nouveau_devinit_init(p) ({ \
26 struct nouveau_devinit *d = (p); \
27 _nouveau_devinit_init(nv_object(d)); \
28})
29#define nouveau_devinit_fini(p,s) ({ \
30 struct nouveau_devinit *d = (p); \
31 _nouveau_devinit_fini(nv_object(d), (s)); \
32})
33
34int nouveau_devinit_create_(struct nouveau_object *, struct nouveau_object *,
35 struct nouveau_oclass *, int, void **);
36void _nouveau_devinit_dtor(struct nouveau_object *);
37int _nouveau_devinit_init(struct nouveau_object *);
38int _nouveau_devinit_fini(struct nouveau_object *, bool suspend);
39
40#endif