0001
0002 #ifndef __NVKM_BAR_PRIV_H__
0003 #define __NVKM_BAR_PRIV_H__
0004 #define nvkm_bar(p) container_of((p), struct nvkm_bar, subdev)
0005 #include <subdev/bar.h>
0006
0007 void nvkm_bar_ctor(const struct nvkm_bar_func *, struct nvkm_device *,
0008 enum nvkm_subdev_type, int, struct nvkm_bar *);
0009
0010 struct nvkm_bar_func {
0011 void *(*dtor)(struct nvkm_bar *);
0012 int (*oneinit)(struct nvkm_bar *);
0013 void (*init)(struct nvkm_bar *);
0014
0015 struct {
0016 void (*init)(struct nvkm_bar *);
0017 void (*fini)(struct nvkm_bar *);
0018 void (*wait)(struct nvkm_bar *);
0019 struct nvkm_vmm *(*vmm)(struct nvkm_bar *);
0020 } bar1, bar2;
0021
0022 void (*flush)(struct nvkm_bar *);
0023 };
0024
0025 void nv50_bar_bar1_fini(struct nvkm_bar *);
0026 void nv50_bar_bar2_fini(struct nvkm_bar *);
0027
0028 void g84_bar_flush(struct nvkm_bar *);
0029
0030 void gf100_bar_bar1_fini(struct nvkm_bar *);
0031 void gf100_bar_bar2_fini(struct nvkm_bar *);
0032
0033 void gm107_bar_bar1_wait(struct nvkm_bar *);
0034 #endif