2015-01-14 04:35:35 +00:00
|
|
|
#ifndef __NVKM_BAR_H__
|
|
|
|
#define __NVKM_BAR_H__
|
2012-07-14 09:09:17 +00:00
|
|
|
#include <core/subdev.h>
|
2015-01-14 04:35:35 +00:00
|
|
|
struct nvkm_vma;
|
2012-07-14 09:09:17 +00:00
|
|
|
|
2015-01-14 04:35:35 +00:00
|
|
|
struct nvkm_bar {
|
2015-08-20 04:54:20 +00:00
|
|
|
const struct nvkm_bar_func *func;
|
2015-08-20 04:54:06 +00:00
|
|
|
struct nvkm_subdev subdev;
|
2012-07-14 09:09:17 +00:00
|
|
|
|
2015-08-20 04:54:20 +00:00
|
|
|
spinlock_t lock;
|
2014-06-27 10:28:50 +00:00
|
|
|
|
|
|
|
/* whether the BAR supports to be ioremapped WC or should be uncached */
|
|
|
|
bool iomap_uncached;
|
2012-07-14 09:09:17 +00:00
|
|
|
};
|
|
|
|
|
2015-08-20 04:54:20 +00:00
|
|
|
void nvkm_bar_flush(struct nvkm_bar *);
|
|
|
|
struct nvkm_vm *nvkm_bar_kmap(struct nvkm_bar *);
|
|
|
|
int nvkm_bar_umap(struct nvkm_bar *, u64 size, int type, struct nvkm_vma *);
|
2012-07-14 09:09:17 +00:00
|
|
|
|
2015-08-20 04:54:20 +00:00
|
|
|
int nv50_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
|
|
|
|
int g84_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
|
|
|
|
int gf100_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
|
|
|
|
int gk20a_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
|
2012-07-14 09:09:17 +00:00
|
|
|
#endif
|