Changeset c90aed4 in mainline
- Timestamp:
- 2013-05-23T17:25:28Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 192565b, 94dfb92
- Parents:
- 4a5a18be
- Location:
- uspace/drv/bus/pci/pciintel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/pci/pciintel/pci.c
r4a5a18be rc90aed4 327 327 328 328 /* Vendor ID & Device ID, length(incl \0) 22 */ 329 rc = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/ven=%04 x&dev=%04x",330 fun->vendor_id, fun->device_id);329 rc = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/ven=%04" 330 PRIx16 "&dev=%04" PRIx16, fun->vendor_id, fun->device_id); 331 331 if (rc < 0) { 332 332 ddf_msg(LVL_ERROR, "Failed creating match ID str: %s", … … 758 758 fun->vendor_id = pci_conf_read_16(fun, PCI_VENDOR_ID); 759 759 fun->device_id = pci_conf_read_16(fun, PCI_DEVICE_ID); 760 761 /* Explicitly enable PCI bus mastering */ 762 fun->command = pci_conf_read_16(fun, PCI_COMMAND) | 763 PCI_COMMAND_MASTER; 764 pci_conf_write_16(fun, PCI_COMMAND, fun->command); 765 760 766 fun->class_code = pci_conf_read_8(fun, PCI_BASE_CLASS); 761 767 fun->subclass_code = pci_conf_read_8(fun, PCI_SUB_CLASS); -
uspace/drv/bus/pci/pciintel/pci.h
r4a5a18be rc90aed4 59 59 int dev; 60 60 int fn; 61 int vendor_id; 62 int device_id; 61 uint16_t vendor_id; 62 uint16_t device_id; 63 uint16_t command; 63 64 uint8_t class_code; 64 65 uint8_t subclass_code; -
uspace/drv/bus/pci/pciintel/pci_regs.h
r4a5a18be rc90aed4 95 95 #define PCI_BRIDGE_CTL 0x3E 96 96 97 /* PCI command flags */ 98 #define PCI_COMMAND_IO 0x001 99 #define PCI_COMMAND_MEMORY 0x002 100 #define PCI_COMMAND_MASTER 0x004 101 #define PCI_COMMAND_SPECIAL 0x008 102 #define PCI_COMMAND_INVALIDATE 0x010 103 #define PCI_COMMAND_VGA_PALETTE 0x020 104 #define PCI_COMMAND_PARITY 0x040 105 #define PCI_COMMAND_WAIT 0x080 106 #define PCI_COMMAND_SERR 0x100 107 #define PCI_COMMAND_FAST_BACK 0x200 108 #define PCI_COMMAND_INTX_DISABLE 0x400 109 97 110 #endif 98 111
Note:
See TracChangeset
for help on using the changeset viewer.