1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __NVKM_BAR_H__ 3 #define __NVKM_BAR_H__ 4 #include <core/subdev.h> 5 struct nvkm_vma; 6 7 struct nvkm_bar { 8 const struct nvkm_bar_func *func; 9 struct nvkm_subdev subdev; 10 11 spinlock_t lock; 12 13 /* whether the BAR supports to be ioremapped WC or should be uncached */ 14 bool iomap_uncached; 15 }; 16 17 void nvkm_bar_flush(struct nvkm_bar *); 18 struct nvkm_vm *nvkm_bar_kmap(struct nvkm_bar *); 19 int nvkm_bar_umap(struct nvkm_bar *, u64 size, int type, struct nvkm_vma *); 20 21 int nv50_bar_new(struct nvkm_device *, int, struct nvkm_bar **); 22 int g84_bar_new(struct nvkm_device *, int, struct nvkm_bar **); 23 int gf100_bar_new(struct nvkm_device *, int, struct nvkm_bar **); 24 int gk20a_bar_new(struct nvkm_device *, int, struct nvkm_bar **); 25 #endif 26