Changeset 7e9e652 in mainline for uspace/drv/bus/isa/isa.c
- Timestamp:
- 2016-12-17T09:37:08Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0195374
- Parents:
- 3c5b86c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/isa/isa.c
r3c5b86c r7e9e652 78 78 typedef struct { 79 79 fibril_mutex_t mutex; 80 uint16_t vendor_id; 81 uint16_t device_id; 80 uint16_t pci_vendor_id; 81 uint16_t pci_device_id; 82 uint8_t pci_class; 83 uint8_t pci_subclass; 82 84 ddf_dev_t *dev; 83 85 ddf_fun_t *fctl; … … 598 600 static void isa_functions_add(isa_bus_t *isa) 599 601 { 602 #define BASE_CLASS_BRIDGE 0x06 603 #define SUB_CLASS_BRIDGE_ISA 0x01 604 bool isa_bridge = ((isa->pci_class == BASE_CLASS_BRIDGE) && 605 (isa->pci_subclass == SUB_CLASS_BRIDGE_ISA)); 606 600 607 #define VENDOR_ID_SUN 0x108e 601 608 #define DEVICE_ID_EBUS 0x1000 602 bool ebus = ((isa->vendor_id == VENDOR_ID_SUN) && 603 (isa->device_id == DEVICE_ID_EBUS)); 604 605 const char *conf_path; 606 if (ebus) 607 conf_path = EBUS_CHILD_FUN_CONF_PATH; 608 else 609 bool ebus = ((isa->pci_vendor_id == VENDOR_ID_SUN) && 610 (isa->pci_device_id == DEVICE_ID_EBUS)); 611 612 const char *conf_path = NULL; 613 if (isa_bridge) 609 614 conf_path = ISA_CHILD_FUN_CONF_PATH; 615 else if (ebus) 616 conf_path = EBUS_CHILD_FUN_CONF_PATH; 610 617 611 618 char *conf = fun_conf_read(conf_path); … … 639 646 } 640 647 641 rc = pci_config_space_read_16(sess, PCI_VENDOR_ID, &isa-> vendor_id);648 rc = pci_config_space_read_16(sess, PCI_VENDOR_ID, &isa->pci_vendor_id); 642 649 if (rc != EOK) 643 650 return rc; 644 rc = pci_config_space_read_16(sess, PCI_DEVICE_ID, &isa->device_id); 651 rc = pci_config_space_read_16(sess, PCI_DEVICE_ID, &isa->pci_device_id); 652 if (rc != EOK) 653 return rc; 654 rc = pci_config_space_read_8(sess, PCI_BASE_CLASS, &isa->pci_class); 655 if (rc != EOK) 656 return rc; 657 rc = pci_config_space_read_8(sess, PCI_SUB_CLASS, &isa->pci_subclass); 645 658 if (rc != EOK) 646 659 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.