1
2#ifndef __NVKM_BAR_H__
3#define __NVKM_BAR_H__
4#include <core/subdev.h>
5struct nvkm_vma;
6
7struct nvkm_bar {
8 const struct nvkm_bar_func *func;
9 struct nvkm_subdev subdev;
10
11 spinlock_t lock;
12 bool bar2;
13
14
15 bool iomap_uncached;
16};
17
18struct nvkm_vmm *nvkm_bar_bar1_vmm(struct nvkm_device *);
19void nvkm_bar_bar1_reset(struct nvkm_device *);
20void nvkm_bar_bar2_init(struct nvkm_device *);
21void nvkm_bar_bar2_fini(struct nvkm_device *);
22void nvkm_bar_bar2_reset(struct nvkm_device *);
23struct nvkm_vmm *nvkm_bar_bar2_vmm(struct nvkm_device *);
24void nvkm_bar_flush(struct nvkm_bar *);
25
26int nv50_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
27int g84_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
28int gf100_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
29int gk20a_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
30int gm107_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
31int gm20b_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
32int tu102_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
33#endif
34