xtensa.h 861 字节
Newer Older
1 2
#ifndef __NVKM_XTENSA_H__
#define __NVKM_XTENSA_H__
3
#define nvkm_xtensa(p) container_of((p), struct nvkm_xtensa, engine)
4 5
#include <core/engine.h>

6
struct nvkm_xtensa {
7
	struct nvkm_engine engine;
8
	const struct nvkm_xtensa_func *func;
9 10

	u32 addr;
11
	struct nvkm_memory *gpu_fw;
12 13 14 15
	u32 fifo_val;
	u32 unkd28;
};

16 17 18 19 20
struct nvkm_xtensa_func {
	void (*init)(struct nvkm_xtensa *);
	struct nvkm_sclass sclass[];
};

21 22
#define nvkm_xtensa_create(p,e,c,b,d,i,f,r)				\
	nvkm_xtensa_create_((p), (e), (c), (b), (d), (i), (f),	\
23 24
			       sizeof(**r),(void **)r)

25 26 27
int nvkm_xtensa_create_(struct nvkm_object *,
			   struct nvkm_object *,
			   struct nvkm_oclass *, u32, bool,
28 29
			   const char *, const char *,
			   int, void **);
30 31 32
#define _nvkm_xtensa_dtor _nvkm_engine_dtor
int _nvkm_xtensa_init(struct nvkm_object *);
int _nvkm_xtensa_fini(struct nvkm_object *, bool);
33
#endif