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