These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / gpu / drm / nouveau / nvkm / subdev / pci / priv.h
1 #ifndef __NVKM_PCI_PRIV_H__
2 #define __NVKM_PCI_PRIV_H__
3 #define nvkm_pci(p) container_of((p), struct nvkm_pci, subdev)
4 #include <subdev/pci.h>
5
6 int nvkm_pci_new_(const struct nvkm_pci_func *, struct nvkm_device *,
7                   int index, struct nvkm_pci **);
8
9 struct nvkm_pci_func {
10         void (*init)(struct nvkm_pci *);
11         u32 (*rd32)(struct nvkm_pci *, u16 addr);
12         void (*wr08)(struct nvkm_pci *, u16 addr, u8 data);
13         void (*wr32)(struct nvkm_pci *, u16 addr, u32 data);
14         void (*msi_rearm)(struct nvkm_pci *);
15 };
16
17 u32 nv40_pci_rd32(struct nvkm_pci *, u16);
18 void nv40_pci_wr08(struct nvkm_pci *, u16, u8);
19 void nv40_pci_wr32(struct nvkm_pci *, u16, u32);
20 void nv40_pci_msi_rearm(struct nvkm_pci *);
21
22 void nv46_pci_msi_rearm(struct nvkm_pci *);
23
24 void g84_pci_init(struct nvkm_pci *pci);
25 #endif