Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / drivers / gpu / drm / nouveau / include / nvkm / subdev / bios.h
blob979e9a144e7b27f5e1f815e74da28101e8ce02f1
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NVKM_BIOS_H__
3 #define __NVKM_BIOS_H__
4 #include <core/subdev.h>
6 struct nvkm_bios {
7 struct nvkm_subdev subdev;
8 u32 size;
9 u8 *data;
11 u32 image0_size;
12 u32 imaged_addr;
14 u32 bmp_offset;
15 u32 bit_offset;
17 struct {
18 u8 major;
19 u8 chip;
20 u8 minor;
21 u8 micro;
22 u8 patch;
23 } version;
26 u8 nvbios_checksum(const u8 *data, int size);
27 u16 nvbios_findstr(const u8 *data, int size, const char *str, int len);
28 int nvbios_memcmp(struct nvkm_bios *, u32 addr, const char *, u32 len);
29 u8 nvbios_rd08(struct nvkm_bios *, u32 addr);
30 u16 nvbios_rd16(struct nvkm_bios *, u32 addr);
31 u32 nvbios_rd32(struct nvkm_bios *, u32 addr);
33 int nvkm_bios_new(struct nvkm_device *, int, struct nvkm_bios **);
34 #endif