2019-06-20 00:13:43 +00:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
2012-07-11 00:44:20 +00:00
|
|
|
#ifndef __NVBIOS_INIT_H__
|
|
|
|
#define __NVBIOS_INIT_H__
|
2015-08-20 04:54:20 +00:00
|
|
|
|
2012-07-11 00:44:20 +00:00
|
|
|
struct nvbios_init {
|
2015-01-14 04:40:03 +00:00
|
|
|
struct nvkm_subdev *subdev;
|
2017-05-19 13:59:34 +00:00
|
|
|
u32 offset;
|
2017-05-19 13:59:34 +00:00
|
|
|
|
2012-07-11 00:44:20 +00:00
|
|
|
struct dcb_output *outp;
|
2017-05-19 13:59:34 +00:00
|
|
|
int or;
|
|
|
|
int link;
|
2017-05-19 13:59:35 +00:00
|
|
|
int head;
|
2012-07-11 00:44:20 +00:00
|
|
|
|
|
|
|
/* internal state used during parsing */
|
|
|
|
u8 execute;
|
|
|
|
u32 nested;
|
2017-05-19 13:59:34 +00:00
|
|
|
u32 repeat;
|
|
|
|
u32 repend;
|
2012-12-19 21:48:51 +00:00
|
|
|
u32 ramcfg;
|
2012-07-11 00:44:20 +00:00
|
|
|
};
|
|
|
|
|
2017-05-19 13:59:34 +00:00
|
|
|
#define nvbios_init(s,o,ARGS...) ({ \
|
|
|
|
struct nvbios_init init = { \
|
|
|
|
.subdev = (s), \
|
|
|
|
.offset = (o), \
|
|
|
|
.or = -1, \
|
|
|
|
.link = 0, \
|
|
|
|
.head = -1, \
|
|
|
|
.execute = 1, \
|
|
|
|
}; \
|
|
|
|
ARGS \
|
|
|
|
nvbios_exec(&init); \
|
|
|
|
})
|
2012-07-11 00:44:20 +00:00
|
|
|
int nvbios_exec(struct nvbios_init *);
|
2017-05-19 13:59:34 +00:00
|
|
|
|
2017-05-19 13:59:34 +00:00
|
|
|
int nvbios_post(struct nvkm_subdev *, bool execute);
|
2012-07-11 00:44:20 +00:00
|
|
|
#endif
|