iso9660fs: initialize buffer cache
[minix.git] / drivers / pci / pci.h
blob1aac8d373cc5083a52dfaf8985930d916351d123
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 unsigned pci_inb(u16_t port);
13 unsigned pci_inw(u16_t port);
14 unsigned pci_inl(u16_t port);
16 void pci_outb(u16_t port, u8_t value);
17 void pci_outw(u16_t port, u16_t value);
18 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 int sef_cb_init_fresh(int type, sef_init_info_t *info);
98 int map_service(struct rprocpub *rpub);
99 int pci_reserve_a(int devind, endpoint_t proc, struct rs_pci *aclp);
100 void pci_release(endpoint_t proc);
101 int pci_first_dev_a(struct rs_pci *aclp, int *devindp, u16_t *vidp,
102 u16_t *didp);
103 int pci_next_dev_a(struct rs_pci *aclp, int *devindp, u16_t *vidp, u16_t
104 *didp);
106 int pci_attr_r8_s(int devind, int port, u8_t *vp);
107 int pci_attr_r32_s(int devind, int port, u32_t *vp);
108 int pci_get_bar_s(int devind, int port, u32_t *base, u32_t *size, int
109 *ioflag);
110 int pci_slot_name_s(int devind, char **cpp);
111 int pci_ids_s(int devind, u16_t *vidp, u16_t *didp);
114 * $PchId: pci.h,v 1.4 2001/12/06 20:21:22 philip Exp $