Home | History | Annotate | Line # | Download | only in devinit
      1 /*	$NetBSD: priv.h,v 1.3 2021/12/18 23:45:39 riastradh Exp $	*/
      2 
      3 /* SPDX-License-Identifier: MIT */
      4 #ifndef __NVKM_DEVINIT_PRIV_H__
      5 #define __NVKM_DEVINIT_PRIV_H__
      6 #define nvkm_devinit(p) container_of((p), struct nvkm_devinit, subdev)
      7 #include <subdev/devinit.h>
      8 
      9 struct nvkm_devinit_func {
     10 	void *(*dtor)(struct nvkm_devinit *);
     11 	void (*preinit)(struct nvkm_devinit *);
     12 	void (*init)(struct nvkm_devinit *);
     13 	int  (*post)(struct nvkm_devinit *, bool post);
     14 	u32  (*mmio)(struct nvkm_devinit *, u32);
     15 	void (*meminit)(struct nvkm_devinit *);
     16 	int  (*pll_set)(struct nvkm_devinit *, u32 type, u32 freq);
     17 	u64  (*disable)(struct nvkm_devinit *);
     18 };
     19 
     20 void nvkm_devinit_ctor(const struct nvkm_devinit_func *, struct nvkm_device *,
     21 		       int index, struct nvkm_devinit *);
     22 
     23 int nv04_devinit_post(struct nvkm_devinit *, bool);
     24 #endif
     25