priv.h 681 B

1234567891011121314151617181920
  1. #ifndef __NVKM_INSTMEM_PRIV_H__
  2. #define __NVKM_INSTMEM_PRIV_H__
  3. #define nvkm_instmem(p) container_of((p), struct nvkm_instmem, subdev)
  4. #include <subdev/instmem.h>
  5. struct nvkm_instmem_func {
  6. void *(*dtor)(struct nvkm_instmem *);
  7. int (*oneinit)(struct nvkm_instmem *);
  8. void (*fini)(struct nvkm_instmem *);
  9. u32 (*rd32)(struct nvkm_instmem *, u32 addr);
  10. void (*wr32)(struct nvkm_instmem *, u32 addr, u32 data);
  11. int (*memory_new)(struct nvkm_instmem *, u32 size, u32 align,
  12. bool zero, struct nvkm_memory **);
  13. bool persistent;
  14. bool zero;
  15. };
  16. void nvkm_instmem_ctor(const struct nvkm_instmem_func *, struct nvkm_device *,
  17. int index, struct nvkm_instmem *);
  18. #endif