1/* SPDX-License-Identifier: MIT */
2#ifndef __NVKM_VFN_PRIV_H__
3#define __NVKM_VFN_PRIV_H__
4#define nvkm_vfn(p) container_of((p), struct nvkm_vfn, subdev)
5#include <subdev/vfn.h>
6
7struct nvkm_vfn_func {
8	void (*dtor)(struct nvkm_vfn *);
9
10	const struct nvkm_intr_func *intr;
11	const struct nvkm_intr_data *intrs;
12
13	struct {
14		u32 addr;
15		u32 size;
16		struct nvkm_sclass base;
17	} user;
18};
19
20int r535_vfn_new(const struct nvkm_vfn_func *hw, struct nvkm_device *, enum nvkm_subdev_type, int,
21		 u32 addr, struct nvkm_vfn **);
22
23int nvkm_vfn_new_(const struct nvkm_vfn_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
24		  u32 addr, struct nvkm_vfn **);
25
26extern const struct nvkm_intr_func tu102_vfn_intr;
27
28int nvkm_uvfn_new(struct nvkm_device *, const struct nvkm_oclass *, void *, u32,
29		  struct nvkm_object **);
30#endif
31