pci-i386.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  * Low-Level PCI Access for i386 machines.
  3.  *
  4.  * (c) 1999 Martin Mares <mj@ucw.cz>
  5.  */
  6. #undef DEBUG
  7. #ifdef DEBUG
  8. #define DBG(x...) printk(x)
  9. #else
  10. #define DBG(x...)
  11. #endif
  12. #define PCI_PROBE_BIOS 0x0001
  13. #define PCI_PROBE_CONF1 0x0002
  14. #define PCI_PROBE_CONF2 0x0004
  15. #define PCI_NO_SORT 0x0100
  16. #define PCI_BIOS_SORT 0x0200
  17. #define PCI_NO_CHECKS 0x0400
  18. #define PCI_ASSIGN_ROMS 0x1000
  19. #define PCI_BIOS_IRQ_SCAN 0x2000
  20. #define PCI_ASSIGN_ALL_BUSSES 0x4000
  21. extern unsigned int pci_probe;
  22. /* pci-i386.c */
  23. extern unsigned int pcibios_max_latency;
  24. void pcibios_resource_survey(void);
  25. int pcibios_enable_resources(struct pci_dev *, int);
  26. /* pci-pc.c */
  27. extern int pcibios_last_bus;
  28. extern struct pci_bus *pci_root_bus;
  29. extern struct pci_ops *pci_root_ops;
  30. /* pci-irq.c */
  31. struct irq_info {
  32. u8 bus, devfn; /* Bus, device and function */
  33. struct {
  34. u8 link; /* IRQ line ID, chipset dependent, 0=not routed */
  35. u16 bitmap; /* Available IRQs */
  36. } __attribute__((packed)) irq[4];
  37. u8 slot; /* Slot number, 0=onboard */
  38. u8 rfu;
  39. } __attribute__((packed));
  40. struct irq_routing_table {
  41. u32 signature; /* PIRQ_SIGNATURE should be here */
  42. u16 version; /* PIRQ_VERSION */
  43. u16 size; /* Table size in bytes */
  44. u8 rtr_bus, rtr_devfn; /* Where the interrupt router lies */
  45. u16 exclusive_irqs; /* IRQs devoted exclusively to PCI usage */
  46. u16 rtr_vendor, rtr_device; /* Vendor and device ID of interrupt router */
  47. u32 miniport_data; /* Crap */
  48. u8 rfu[11];
  49. u8 checksum; /* Modulo 256 checksum must give zero */
  50. struct irq_info slots[0];
  51. } __attribute__((packed));
  52. extern unsigned int pcibios_irq_mask;
  53. void pcibios_irq_init(void);
  54. void pcibios_fixup_irqs(void);
  55. void pcibios_enable_irq(struct pci_dev *dev);