1 /*	$NetBSD: bus.h,v 1.3 2021/12/18 23:45:33 riastradh Exp $	*/
2 
3 /* SPDX-License-Identifier: MIT */
4 #ifndef __NVKM_BUS_H__
5 #define __NVKM_BUS_H__
6 #include <core/subdev.h>
7 
8 struct nvkm_bus {
9 	const struct nvkm_bus_func *func;
10 	struct nvkm_subdev subdev;
11 };
12 
13 /* interface to sequencer */
14 struct nvkm_hwsq;
15 int  nvkm_hwsq_init(struct nvkm_subdev *, struct nvkm_hwsq **);
16 int  nvkm_hwsq_fini(struct nvkm_hwsq **, bool exec);
17 void nvkm_hwsq_wr32(struct nvkm_hwsq *, u32 addr, u32 data);
18 void nvkm_hwsq_setf(struct nvkm_hwsq *, u8 flag, int data);
19 void nvkm_hwsq_wait(struct nvkm_hwsq *, u8 flag, u8 data);
20 void nvkm_hwsq_wait_vblank(struct nvkm_hwsq *);
21 void nvkm_hwsq_nsec(struct nvkm_hwsq *, u32 nsec);
22 
23 int nv04_bus_new(struct nvkm_device *, int, struct nvkm_bus **);
24 int nv31_bus_new(struct nvkm_device *, int, struct nvkm_bus **);
25 int nv50_bus_new(struct nvkm_device *, int, struct nvkm_bus **);
26 int g94_bus_new(struct nvkm_device *, int, struct nvkm_bus **);
27 int gf100_bus_new(struct nvkm_device *, int, struct nvkm_bus **);
28 #endif
29