posix-clock: Fix return code on the poll method's error path
[linux/fpc-iii.git] / drivers / gpu / drm / nouveau / include / nvkm / subdev / bios.h
blobe39a1fea930beefa28d0ab5ac2400cb7181952ad
1 #ifndef __NVKM_BIOS_H__
2 #define __NVKM_BIOS_H__
3 #include <core/subdev.h>
5 struct nvkm_bios {
6 struct nvkm_subdev subdev;
7 u32 size;
8 u8 *data;
10 u32 bmp_offset;
11 u32 bit_offset;
13 struct {
14 u8 major;
15 u8 chip;
16 u8 minor;
17 u8 micro;
18 u8 patch;
19 } version;
22 u8 nvbios_checksum(const u8 *data, int size);
23 u16 nvbios_findstr(const u8 *data, int size, const char *str, int len);
24 int nvbios_memcmp(struct nvkm_bios *, u32 addr, const char *, u32 len);
26 #define nvbios_rd08(b,o) (b)->data[(o)]
27 #define nvbios_rd16(b,o) get_unaligned_le16(&(b)->data[(o)])
28 #define nvbios_rd32(b,o) get_unaligned_le32(&(b)->data[(o)])
30 int nvkm_bios_new(struct nvkm_device *, int, struct nvkm_bios **);
31 #endif