1*b7019ac5SIlia Mirkin /* SPDX-License-Identifier: MIT */ 2898a2b32SBen Skeggs #ifndef __NVKM_NVSW_H__ 3898a2b32SBen Skeggs #define __NVKM_NVSW_H__ 407b9e6ccSBen Skeggs #define nvkm_nvsw(p) container_of((p), struct nvkm_nvsw, object) 54246b92cSBen Skeggs #include <core/object.h> 6898a2b32SBen Skeggs 707b9e6ccSBen Skeggs struct nvkm_nvsw { 807b9e6ccSBen Skeggs struct nvkm_object object; 907b9e6ccSBen Skeggs const struct nvkm_nvsw_func *func; 1007b9e6ccSBen Skeggs struct nvkm_sw_chan *chan; 1107b9e6ccSBen Skeggs }; 1207b9e6ccSBen Skeggs 1307b9e6ccSBen Skeggs struct nvkm_nvsw_func { 1407b9e6ccSBen Skeggs int (*mthd)(struct nvkm_nvsw *, u32 mthd, void *data, u32 size); 1507b9e6ccSBen Skeggs }; 1607b9e6ccSBen Skeggs 1707b9e6ccSBen Skeggs int nvkm_nvsw_new_(const struct nvkm_nvsw_func *, struct nvkm_sw_chan *, 1807b9e6ccSBen Skeggs const struct nvkm_oclass *, void *data, u32 size, 19898a2b32SBen Skeggs struct nvkm_object **pobject); 2007b9e6ccSBen Skeggs int nvkm_nvsw_new(struct nvkm_sw_chan *, const struct nvkm_oclass *, 2107b9e6ccSBen Skeggs void *data, u32 size, struct nvkm_object **pobject); 22898a2b32SBen Skeggs #endif 23