Changeset b5ba8f6 in mainline for uspace/drv/bus/pci/pciintel/pci.c
- Timestamp:
- 2013-09-13T13:11:53Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1eaa3cf
- Parents:
- 95027b5 (diff), 1c5f6f8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/pci/pciintel/pci.c
r95027b5 rb5ba8f6 256 256 fibril_mutex_lock(&bus->conf_mutex); 257 257 258 pio_write_32(bus->conf_addr_ port, host2uint32_t_le(conf_addr));258 pio_write_32(bus->conf_addr_reg, host2uint32_t_le(conf_addr)); 259 259 260 260 /* … … 263 263 * support shorter PIO reads offset from this register. 264 264 */ 265 val = uint32_t_le2host(pio_read_32(bus->conf_data_ port));265 val = uint32_t_le2host(pio_read_32(bus->conf_data_reg)); 266 266 267 267 switch (len) { … … 299 299 * missing bits first. 300 300 */ 301 pio_write_32(bus->conf_addr_ port, host2uint32_t_le(conf_addr));302 val = uint32_t_le2host(pio_read_32(bus->conf_data_ port));301 pio_write_32(bus->conf_addr_reg, host2uint32_t_le(conf_addr)); 302 val = uint32_t_le2host(pio_read_32(bus->conf_data_reg)); 303 303 } 304 304 … … 317 317 } 318 318 319 pio_write_32(bus->conf_addr_ port, host2uint32_t_le(conf_addr));320 pio_write_32(bus->conf_data_ port, host2uint32_t_le(val));319 pio_write_32(bus->conf_addr_reg, host2uint32_t_le(conf_addr)); 320 pio_write_32(bus->conf_data_reg, host2uint32_t_le(val)); 321 321 322 322 fibril_mutex_unlock(&bus->conf_mutex); … … 449 449 hw_resources[count].res.io_range.address = range_addr; 450 450 hw_resources[count].res.io_range.size = range_size; 451 hw_resources[count].res.io_range.relative = true; 451 452 hw_resources[count].res.io_range.endianness = LITTLE_ENDIAN; 452 453 } else { … … 454 455 hw_resources[count].res.mem_range.address = range_addr; 455 456 hw_resources[count].res.mem_range.size = range_size; 457 hw_resources[count].res.mem_range.relative = false; 456 458 hw_resources[count].res.mem_range.endianness = LITTLE_ENDIAN; 457 459 } … … 722 724 hw_resources.resources[1].res.io_range.address); 723 725 724 bus->conf_io_addr = 725 (uint32_t) hw_resources.resources[0].res.io_range.address; 726 bus->conf_io_data = 727 (uint32_t) hw_resources.resources[1].res.io_range.address; 728 729 if (pio_enable((void *)(uintptr_t)bus->conf_io_addr, 4, 730 &bus->conf_addr_port)) { 726 if (pio_enable_resource(&bus->pio_win, &hw_resources.resources[0], 727 (void **) &bus->conf_addr_reg)) { 731 728 ddf_msg(LVL_ERROR, "Failed to enable configuration ports."); 732 729 rc = EADDRNOTAVAIL; 733 730 goto fail; 734 731 } 735 if (pio_enable ((void *)(uintptr_t)bus->conf_io_data, 4,736 &bus->conf_data_port)) {732 if (pio_enable_resource(&bus->pio_win, &hw_resources.resources[1], 733 (void **) &bus->conf_data_reg)) { 737 734 ddf_msg(LVL_ERROR, "Failed to enable configuration ports."); 738 735 rc = EADDRNOTAVAIL;
Note:
See TracChangeset
for help on using the changeset viewer.