pci.h 889 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __NVKM_PCI_H__
  2. #define __NVKM_PCI_H__
  3. #include <core/subdev.h>
  4. struct nvkm_pci {
  5. const struct nvkm_pci_func *func;
  6. struct nvkm_subdev subdev;
  7. struct pci_dev *pdev;
  8. int irq;
  9. struct {
  10. struct agp_bridge_data *bridge;
  11. u32 mode;
  12. u64 base;
  13. u64 size;
  14. int mtrr;
  15. bool cma;
  16. bool acquired;
  17. } agp;
  18. bool msi;
  19. };
  20. u32 nvkm_pci_rd32(struct nvkm_pci *, u16 addr);
  21. void nvkm_pci_wr08(struct nvkm_pci *, u16 addr, u8 data);
  22. void nvkm_pci_wr32(struct nvkm_pci *, u16 addr, u32 data);
  23. void nvkm_pci_rom_shadow(struct nvkm_pci *, bool shadow);
  24. int nv04_pci_new(struct nvkm_device *, int, struct nvkm_pci **);
  25. int nv40_pci_new(struct nvkm_device *, int, struct nvkm_pci **);
  26. int nv4c_pci_new(struct nvkm_device *, int, struct nvkm_pci **);
  27. int nv50_pci_new(struct nvkm_device *, int, struct nvkm_pci **);
  28. int gf100_pci_new(struct nvkm_device *, int, struct nvkm_pci **);
  29. #endif