• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef __NVKM_INSTMEM_PRIV_H__
2 #define __NVKM_INSTMEM_PRIV_H__
3 #define nvkm_instmem(p) container_of((p), struct nvkm_instmem, subdev)
4 #include <subdev/instmem.h>
5 
6 struct nvkm_instmem_func {
7 	void *(*dtor)(struct nvkm_instmem *);
8 	int (*oneinit)(struct nvkm_instmem *);
9 	void (*fini)(struct nvkm_instmem *);
10 	u32  (*rd32)(struct nvkm_instmem *, u32 addr);
11 	void (*wr32)(struct nvkm_instmem *, u32 addr, u32 data);
12 	int (*memory_new)(struct nvkm_instmem *, u32 size, u32 align,
13 			  bool zero, struct nvkm_memory **);
14 	bool persistent;
15 	bool zero;
16 };
17 
18 void nvkm_instmem_ctor(const struct nvkm_instmem_func *, struct nvkm_device *,
19 		       int index, struct nvkm_instmem *);
20 #endif
21