]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
24a4ae86 BS |
2 | #ifndef __NVKM_INSTMEM_PRIV_H__ |
3 | #define __NVKM_INSTMEM_PRIV_H__ | |
b7a2bc18 | 4 | #define nvkm_instmem(p) container_of((p), struct nvkm_instmem, subdev) |
24a4ae86 BS |
5 | #include <subdev/instmem.h> |
6 | ||
b7a2bc18 BS |
7 | struct nvkm_instmem_func { |
8 | void *(*dtor)(struct nvkm_instmem *); | |
9 | int (*oneinit)(struct nvkm_instmem *); | |
10 | void (*fini)(struct nvkm_instmem *); | |
11 | u32 (*rd32)(struct nvkm_instmem *, u32 addr); | |
12 | void (*wr32)(struct nvkm_instmem *, u32 addr, u32 data); | |
d8e83994 BS |
13 | int (*memory_new)(struct nvkm_instmem *, u32 size, u32 align, |
14 | bool zero, struct nvkm_memory **); | |
15 | bool persistent; | |
16 | bool zero; | |
24a4ae86 BS |
17 | }; |
18 | ||
b7a2bc18 BS |
19 | void nvkm_instmem_ctor(const struct nvkm_instmem_func *, struct nvkm_device *, |
20 | int index, struct nvkm_instmem *); | |
24a4ae86 | 21 | #endif |