Changes in uspace/drv/bus/pci/pciintel/pci.c [6dbc500:46eb2c4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/pci/pciintel/pci.c
r6dbc500 r46eb2c4 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.