128f10520708f6b3a77fcee7f407553fc6132fb9
[tpg/acess2.git] / Kernel / include / drv_pci.h
1 /**\r
2  * \file drv_pci.h\r
3  * \brief PCI Bus Driver\r
4  * \author John Hodge (thePowersGang)\r
5  */\r
6 #ifndef _DRV_PCI_H\r
7 #define _DRV_PCI_H\r
8 \r
9 /**\r
10  * \brief PCI Class Codes\r
11  */\r
12 enum ePCIClasses\r
13 {\r
14         PCI_CLASS_PRE20 = 0x00,\r
15         PCI_CLASS_STORAGE,\r
16         PCI_CLASS_NETWORK,\r
17         PCI_CLASS_DISPLAY,\r
18         PCI_CLASS_MULTIMEDIA,\r
19         PCI_CLASS_MEMORY,\r
20         PCI_CLASS_BRIDGE,\r
21         PCI_CLASS_COMM,\r
22         PCI_CLASS_PREPH,\r
23         PCI_CLASS_INPUT,\r
24         PCI_CLASS_DOCKING,\r
25         PCI_CLASS_PROCESSORS,\r
26         PCI_CLASS_SERIALBUS,\r
27         PCI_CLASS_MISC = 0xFF\r
28 };\r
29 \r
30 enum ePCIOverClasses\r
31 {\r
32         PCI_OC_PCIBRIDGE = 0x0604,\r
33         PCI_OC_SCSI = 0x0100\r
34 };\r
35 \r
36 /**\r
37  * \brief Count PCI Devices\r
38  * \r
39  * Counts the number of devices with specified Vendor and Device IDs\r
40  */\r
41 extern int      PCI_CountDevices(Uint16 vendor, Uint16 device, Uint16 fcn);\r
42 \r
43 extern int      PCI_GetDevice(Uint16 vendor, Uint16 device, Uint16 fcn, int idx);\r
44 extern int      PCI_GetDeviceByClass(Uint16 class, Uint16 mask, int prev);\r
45 extern Uint8    PCI_GetIRQ(int id);\r
46 extern Uint32   PCI_GetBAR0(int id);\r
47 extern Uint32   PCI_GetBAR1(int id);\r
48 extern Uint32   PCI_GetBAR2(int id);\r
49 extern Uint32   PCI_GetBAR3(int id);\r
50 extern Uint32   PCI_GetBAR4(int id);\r
51 extern Uint32   PCI_GetBAR5(int id);\r
52 extern Uint16   PCI_AssignPort(int id, int bar, int count);\r
53 \r
54 #endif\r

UCC git Repository :: git.ucc.asn.au