driver.h revision 1.3 1 /* $NetBSD: driver.h,v 1.3 2018/08/27 07:32:59 riastradh Exp $ */
2
3 #ifndef __NVIF_DRIVER_H__
4 #define __NVIF_DRIVER_H__
5
6 #ifdef __NetBSD__
7 # define __nvif_iomem volatile
8 # define __iomem __nvif_iomem
9 #endif
10
11 struct nvif_driver {
12 const char *name;
13 int (*init)(const char *name, u64 device, const char *cfg,
14 const char *dbg, void **priv);
15 void (*fini)(void *priv);
16 int (*suspend)(void *priv);
17 int (*resume)(void *priv);
18 int (*ioctl)(void *priv, bool super, void *data, u32 size, void **hack);
19 void __iomem *(*map)(void *priv, u64 handle, u32 size);
20 void (*unmap)(void *priv, void __iomem *ptr, u32 size);
21 bool keep;
22 };
23
24 #ifdef __NetBSD__
25 # undef __iomem
26 #endif
27
28 extern const struct nvif_driver nvif_driver_nvkm;
29 extern const struct nvif_driver nvif_driver_drm;
30 extern const struct nvif_driver nvif_driver_lib;
31 extern const struct nvif_driver nvif_driver_null;
32
33 #endif
34