Remove building with NOCRYPTO option
[minix.git] / minix / drivers / bus / pci / pci.h
blob110a73e8b0fcbb68bf590e293cc05f6fd1d67e1d
1 /*
2 pci.h
4 Created: Jan 2000 by Philip Homburg <philip@cs.vu.nl>
5 */
7 struct pci_isabridge
9 u16_t vid;
10 u16_t did;
11 int checkclass;
12 int type;
15 struct pci_acl
17 int inuse;
18 struct rs_pci acl;
21 #define NR_DRIVERS NR_SYS_PROCS
23 #define PCI_IB_PIIX 1 /* Intel PIIX compatible ISA bridge */
24 #define PCI_IB_VIA 2 /* VIA compatible ISA bridge */
25 #define PCI_IB_AMD 3 /* AMD compatible ISA bridge */
26 #define PCI_IB_SIS 4 /* SIS compatible ISA bridge */
28 #define PCI_PPB_STD 1 /* Standard PCI-to-PCI bridge */
29 #define PCI_PPB_CB 2 /* Cardbus bridge */
30 /* Still needed? */
31 #define PCI_AGPB_VIA 3 /* VIA compatible AGP bridge */
33 extern int debug;
35 extern struct pci_isabridge pci_isabridge[];
36 extern struct pci_acl pci_acl[NR_DRIVERS];
38 /* Function prototypes. */
39 int sef_cb_init(int type, sef_init_info_t *info);
40 int map_service(struct rprocpub *rpub);
42 int _pci_grant_access(int devind, endpoint_t proc);
43 int _pci_reserve(int devind, endpoint_t proc, struct rs_pci *aclp);
44 void _pci_release(endpoint_t proc);
46 int _pci_first_dev(struct rs_pci *aclp, int *devindp, u16_t *vidp,
47 u16_t *didp);
48 int _pci_next_dev(struct rs_pci *aclp, int *devindp, u16_t *vidp, u16_t
49 *didp);
50 int _pci_find_dev(u8_t bus, u8_t dev, u8_t func, int *devindp);
52 void _pci_rescan_bus(u8_t busnr);
53 const char *_pci_dev_name(u16_t vid, u16_t did);
56 int _pci_get_bar(int devind, int port, u32_t *base, u32_t *size, int
57 *ioflag);
58 int _pci_slot_name(int devind, char **cpp);
59 int _pci_ids(int devind, u16_t *vidp, u16_t *didp);
61 /* PCI Config Read functions */
62 int _pci_attr_r8(int devind, int port, u8_t *vp);
63 int _pci_attr_r16(int devind, int port, u16_t *vp);
64 int _pci_attr_r32(int devind, int port, u32_t *vp);
66 /* PCI Config Write functions */
67 int _pci_attr_w8(int devind, int port, u8_t value);
68 int _pci_attr_w16(int devind, int port, u16_t value);
69 int _pci_attr_w32(int devind, int port, u32_t value);
71 /* minix hooks into NetBSD PCI IDS DB */
72 typedef uint32_t pcireg_t;
73 const char *pci_baseclass_name(pcireg_t reg);
74 const char *pci_subclass_name(pcireg_t reg);