Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: MIT */
0002 #ifndef __NVKM_INSTMEM_PRIV_H__
0003 #define __NVKM_INSTMEM_PRIV_H__
0004 #define nvkm_instmem(p) container_of((p), struct nvkm_instmem, subdev)
0005 #include <subdev/instmem.h>
0006 
0007 struct nvkm_instmem_func {
0008     void *(*dtor)(struct nvkm_instmem *);
0009     int (*oneinit)(struct nvkm_instmem *);
0010     void (*fini)(struct nvkm_instmem *);
0011     u32  (*rd32)(struct nvkm_instmem *, u32 addr);
0012     void (*wr32)(struct nvkm_instmem *, u32 addr, u32 data);
0013     int (*memory_new)(struct nvkm_instmem *, u32 size, u32 align,
0014               bool zero, struct nvkm_memory **);
0015     bool zero;
0016 };
0017 
0018 void nvkm_instmem_ctor(const struct nvkm_instmem_func *, struct nvkm_device *,
0019                enum nvkm_subdev_type, int, struct nvkm_instmem *);
0020 void nvkm_instmem_boot(struct nvkm_instmem *);
0021 
0022 #include <core/memory.h>
0023 
0024 struct nvkm_instobj {
0025     struct nvkm_memory memory;
0026     struct list_head head;
0027     u32 *suspend;
0028 };
0029 
0030 void nvkm_instobj_ctor(const struct nvkm_memory_func *func,
0031                struct nvkm_instmem *, struct nvkm_instobj *);
0032 void nvkm_instobj_dtor(struct nvkm_instmem *, struct nvkm_instobj *);
0033 #endif