Changeset 484
- Timestamp:
- 05/12/08 12:20:50 (6 months ago)
- Files:
-
- 1 modified
-
Whitix/branches/hybrid/devices/pci/pci_lib.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/hybrid/devices/pci/pci_lib.c
r234 r484 23 23 #include <init.h> 24 24 #include <llist.h> 25 #include <module.h> 25 26 #include <pci.h> 26 27 #include <slab.h> 27 28 28 29 LIST_HEAD(pciDriverList); 30 31 int (*PciRead)(int bus, int dev, int func, int reg, int bytes, DWORD* val); 32 int (*PciWrite)(int bus, int dev, int func, int reg, DWORD v, int bytes); 29 33 30 34 /* These functions assume PciRead and PciWrite will be set, because the code calling … … 36 40 return PciWrite(device->bus->index, device->dev, device->func, reg, value, 1); 37 41 } 42 43 SYMBOL_EXPORT(PciWriteConfigByte); 38 44 39 45 int PciReadConfigByte(struct PciDevice* device, int reg, BYTE* value) … … 50 56 } 51 57 58 SYMBOL_EXPORT(PciReadConfigByte); 59 52 60 int PciWriteConfigWord(struct PciDevice* device, int reg, WORD value) 53 61 { 54 62 return PciWrite(device->bus->index, device->dev, device->func, reg, value, 2); 55 63 } 64 65 SYMBOL_EXPORT(PciWriteConfigWord); 56 66 57 67 int PciReadConfigWord(struct PciDevice* device, int reg, WORD* value) … … 68 78 } 69 79 80 SYMBOL_EXPORT(PciReadConfigWord); 81 70 82 int PciEnableDevice(struct PciDevice* device) 71 83 { … … 81 93 return PciWriteConfigWord(device, PCI_COMMAND, command); 82 94 } 95 96 SYMBOL_EXPORT(PciEnableDevice); 83 97 84 98 int PciRegisterDriver(struct PciDriver* pciDriver) … … 98 112 } 99 113 114 SYMBOL_EXPORT(PciRegisterDriver); 115 100 116 int PciResourceStart(struct PciDevice* device, int index) 101 117 { … … 105 121 return PCI_RES_BEGIN_MASK(device->spaces[index]); 106 122 } 123 124 SYMBOL_EXPORT(PciResourceStart);
