Changeset 230385c in mainline for uspace/drv/bus/pci/pciintel/pci.c
- Timestamp:
- 2012-01-24T02:41:51Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 690d2e7
- Parents:
- 948911d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/pci/pciintel/pci.c
r948911d r230385c 650 650 got_res = true; 651 651 652 653 assert(hw_resources.count > 1); 654 assert(hw_resources.resources[0].type == IO_RANGE); 655 assert(hw_resources.resources[0].res.io_range.size >= 4); 656 657 assert(hw_resources.resources[1].type == IO_RANGE); 658 assert(hw_resources.resources[1].res.io_range.size >= 4); 659 652 660 ddf_msg(LVL_DEBUG, "conf_addr = %" PRIx64 ".", 653 661 hw_resources.resources[0].res.io_range.address); 654 655 assert(hw_resources.count > 0); 656 assert(hw_resources.resources[0].type == IO_RANGE); 657 assert(hw_resources.resources[0].res.io_range.size == 8); 662 ddf_msg(LVL_DEBUG, "data_addr = %" PRIx64 ".", 663 hw_resources.resources[1].res.io_range.address); 658 664 659 665 bus->conf_io_addr = 660 666 (uint32_t) hw_resources.resources[0].res.io_range.address; 661 662 if (pio_enable((void *)(uintptr_t)bus->conf_io_addr, 8, 667 bus->conf_io_data = 668 (uint32_t) hw_resources.resources[1].res.io_range.address; 669 670 if (pio_enable((void *)(uintptr_t)bus->conf_io_addr, 4, 663 671 &bus->conf_addr_port)) { 664 672 ddf_msg(LVL_ERROR, "Failed to enable configuration ports."); … … 666 674 goto fail; 667 675 } 668 bus->conf_data_port = (char *) bus->conf_addr_port + 4; 676 if (pio_enable((void *)(uintptr_t)bus->conf_io_data, 4, 677 &bus->conf_data_port)) { 678 ddf_msg(LVL_ERROR, "Failed to enable configuration ports."); 679 rc = EADDRNOTAVAIL; 680 goto fail; 681 } 669 682 670 683 /* Make the bus device more visible. It has no use yet. */
Note:
See TracChangeset
for help on using the changeset viewer.