1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __NVKM_BAR_PRIV_H__ 3 #define __NVKM_BAR_PRIV_H__ 4 #define nvkm_bar(p) container_of((p), struct nvkm_bar, subdev) 5 #include <subdev/bar.h> 6 7 void nvkm_bar_ctor(const struct nvkm_bar_func *, struct nvkm_device *, 8 int, struct nvkm_bar *); 9 10 struct nvkm_bar_func { 11 void *(*dtor)(struct nvkm_bar *); 12 int (*oneinit)(struct nvkm_bar *); 13 int (*init)(struct nvkm_bar *); 14 struct nvkm_vm *(*kmap)(struct nvkm_bar *); 15 int (*umap)(struct nvkm_bar *, u64 size, int type, struct nvkm_vma *); 16 void (*flush)(struct nvkm_bar *); 17 }; 18 19 void g84_bar_flush(struct nvkm_bar *); 20 #endif 21