3.1.7 branch.
[minix.git] / drivers / pci / pci.h
blob9f91f31917140b02249fd426e2ea973510981812
1 /*
2 pci.h
4 Created: Jan 2000 by Philip Homburg <philip@cs.vu.nl>
5 */
7 #include <minix/drivers.h>
8 #include <minix/driver.h>
9 #include <minix/rs.h>
11 /* tempory functions: to be replaced later (see pci_intel.h) */
12 _PROTOTYPE( unsigned pci_inb, (u16_t port) );
13 _PROTOTYPE( unsigned pci_inw, (u16_t port) );
14 _PROTOTYPE( unsigned pci_inl, (u16_t port) );
16 _PROTOTYPE( void pci_outb, (u16_t port, u8_t value) );
17 _PROTOTYPE( void pci_outw, (u16_t port, u16_t value) );
18 _PROTOTYPE( void pci_outl, (u16_t port, u32_t value) );
20 struct pci_vendor
22 u16_t vid;
23 char *name;
26 struct pci_device
28 u16_t vid;
29 u16_t did;
30 char *name;
33 struct pci_baseclass
35 u8_t baseclass;
36 char *name;
39 struct pci_subclass
41 u8_t baseclass;
42 u8_t subclass;
43 u16_t infclass;
44 char *name;
47 struct pci_intel_ctrl
49 u16_t vid;
50 u16_t did;
53 struct pci_isabridge
55 u16_t vid;
56 u16_t did;
57 int checkclass;
58 int type;
61 struct pci_pcibridge
63 u16_t vid;
64 u16_t did;
65 int type;
68 struct pci_acl
70 int inuse;
71 struct rs_pci acl;
74 #define NR_DRIVERS NR_SYS_PROCS
76 #define PCI_IB_PIIX 1 /* Intel PIIX compatible ISA bridge */
77 #define PCI_IB_VIA 2 /* VIA compatible ISA bridge */
78 #define PCI_IB_AMD 3 /* AMD compatible ISA bridge */
79 #define PCI_IB_SIS 4 /* SIS compatible ISA bridge */
81 #define PCI_PPB_STD 1 /* Standard PCI-to-PCI bridge */
82 #define PCI_PPB_CB 2 /* Cardbus bridge */
83 /* Still needed? */
84 #define PCI_AGPB_VIA 3 /* VIA compatible AGP bridge */
86 extern struct pci_vendor pci_vendor_table[];
87 extern struct pci_device pci_device_table[];
88 extern struct pci_baseclass pci_baseclass_table[];
89 extern struct pci_subclass pci_subclass_table[];
90 #if 0
91 extern struct pci_intel_ctrl pci_intel_ctrl[];
92 #endif
93 extern struct pci_isabridge pci_isabridge[];
94 extern struct pci_pcibridge pci_pcibridge[];
96 /* Function prototypes. */
97 _PROTOTYPE( int sef_cb_init_fresh, (int type, sef_init_info_t *info) );
98 _PROTOTYPE( int map_service, (struct rprocpub *rpub) );
99 _PROTOTYPE( int pci_reserve2, (int devind, endpoint_t proc) );
100 _PROTOTYPE( void pci_release, (endpoint_t proc) );
101 _PROTOTYPE( int pci_first_dev_a, (struct rs_pci *aclp, int *devindp,
102 u16_t *vidp, u16_t *didp) );
103 _PROTOTYPE( int pci_next_dev_a, (struct rs_pci *aclp, int *devindp,
104 u16_t *vidp, u16_t *didp) );
106 _PROTOTYPE( int pci_attr_r8_s, (int devind, int port, u8_t *vp) );
107 _PROTOTYPE( int pci_attr_r32_s, (int devind, int port, u32_t *vp) );
108 _PROTOTYPE( int pci_slot_name_s, (int devind, char **cpp) );
109 _PROTOTYPE( int pci_ids_s, (int devind, u16_t *vidp, u16_t *didp) );
112 * $PchId: pci.h,v 1.4 2001/12/06 20:21:22 philip Exp $