2015-01-14 13:05:26 +08:00
|
|
|
#ifndef __NVKM_INSTMEM_H__
|
|
|
|
#define __NVKM_INSTMEM_H__
|
2012-07-14 17:09:17 +08:00
|
|
|
#include <core/subdev.h>
|
2015-08-20 12:54:17 +08:00
|
|
|
struct nvkm_memory;
|
2012-07-14 17:09:17 +08:00
|
|
|
|
2015-01-14 13:05:26 +08:00
|
|
|
struct nvkm_instmem {
|
2015-08-20 12:54:20 +08:00
|
|
|
const struct nvkm_instmem_func *func;
|
2015-08-20 12:54:06 +08:00
|
|
|
struct nvkm_subdev subdev;
|
2012-07-14 17:09:17 +08:00
|
|
|
|
2015-11-11 07:48:13 +08:00
|
|
|
spinlock_t lock;
|
2015-08-20 12:54:20 +08:00
|
|
|
struct list_head list;
|
2012-07-14 17:09:17 +08:00
|
|
|
u32 reserved;
|
2015-08-20 12:54:17 +08:00
|
|
|
|
2015-08-20 12:54:17 +08:00
|
|
|
struct nvkm_memory *vbios;
|
2015-08-20 12:54:17 +08:00
|
|
|
struct nvkm_ramht *ramht;
|
2015-08-20 12:54:17 +08:00
|
|
|
struct nvkm_memory *ramro;
|
|
|
|
struct nvkm_memory *ramfc;
|
2015-08-20 12:54:13 +08:00
|
|
|
};
|
|
|
|
|
2015-08-20 12:54:20 +08:00
|
|
|
u32 nvkm_instmem_rd32(struct nvkm_instmem *, u32 addr);
|
|
|
|
void nvkm_instmem_wr32(struct nvkm_instmem *, u32 addr, u32 data);
|
|
|
|
int nvkm_instobj_new(struct nvkm_instmem *, u32 size, u32 align, bool zero,
|
|
|
|
struct nvkm_memory **);
|
2014-01-14 12:56:22 +08:00
|
|
|
|
2012-07-14 17:09:17 +08:00
|
|
|
|
2015-08-20 12:54:20 +08:00
|
|
|
int nv04_instmem_new(struct nvkm_device *, int, struct nvkm_instmem **);
|
|
|
|
int nv40_instmem_new(struct nvkm_device *, int, struct nvkm_instmem **);
|
|
|
|
int nv50_instmem_new(struct nvkm_device *, int, struct nvkm_instmem **);
|
|
|
|
int gk20a_instmem_new(struct nvkm_device *, int, struct nvkm_instmem **);
|
2012-07-14 17:09:17 +08:00
|
|
|
#endif
|