instmem.h 959 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __NVKM_INSTMEM_H__
  3. #define __NVKM_INSTMEM_H__
  4. #include <core/subdev.h>
  5. struct nvkm_memory;
  6. struct nvkm_instmem {
  7. const struct nvkm_instmem_func *func;
  8. struct nvkm_subdev subdev;
  9. spinlock_t lock;
  10. struct list_head list;
  11. struct list_head boot;
  12. u32 reserved;
  13. struct nvkm_memory *vbios;
  14. struct nvkm_ramht *ramht;
  15. struct nvkm_memory *ramro;
  16. struct nvkm_memory *ramfc;
  17. };
  18. u32 nvkm_instmem_rd32(struct nvkm_instmem *, u32 addr);
  19. void nvkm_instmem_wr32(struct nvkm_instmem *, u32 addr, u32 data);
  20. int nvkm_instobj_new(struct nvkm_instmem *, u32 size, u32 align, bool zero,
  21. struct nvkm_memory **);
  22. int nv04_instmem_new(struct nvkm_device *, int, struct nvkm_instmem **);
  23. int nv40_instmem_new(struct nvkm_device *, int, struct nvkm_instmem **);
  24. int nv50_instmem_new(struct nvkm_device *, int, struct nvkm_instmem **);
  25. int gk20a_instmem_new(struct nvkm_device *, int, struct nvkm_instmem **);
  26. #endif