1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NVBIOS_INIT_H__
3 #define __NVBIOS_INIT_H__
4 
5 struct nvbios_init {
6 	struct nvkm_subdev *subdev;
7 	u32 offset;
8 
9 	struct dcb_output *outp;
10 	int or;
11 	int link;
12 	int head;
13 
14 	/* internal state used during parsing */
15 	u8 execute;
16 	u32 nested;
17 	u32 repeat;
18 	u32 repend;
19 	u32 ramcfg;
20 };
21 
22 #define nvbios_init(s,o,ARGS...) ({                                            \
23 	struct nvbios_init init = {                                            \
24 		.subdev = (s),                                                 \
25 		.offset = (o),                                                 \
26 		.or = -1,                                                      \
27 		.link = 0,                                                     \
28 		.head = -1,                                                    \
29 		.execute = 1,                                                  \
30 	};                                                                     \
31 	ARGS                                                                   \
32 	nvbios_exec(&init);                                                    \
33 })
34 int nvbios_exec(struct nvbios_init *);
35 
36 int nvbios_post(struct nvkm_subdev *, bool execute);
37 #endif
38