Changes in uspace/drv/bus/pci/pciintel/pci.c [46eb2c4:6dbc500] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/pci/pciintel/pci.c
r46eb2c4 r6dbc500 256 256 fibril_mutex_lock(&bus->conf_mutex); 257 257 258 pio_write_32(bus->conf_addr_ reg, host2uint32_t_le(conf_addr));258 pio_write_32(bus->conf_addr_port, 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_ reg));265 val = uint32_t_le2host(pio_read_32(bus->conf_data_port)); 266 266 267 267 switch (len) { … … 299 299 * missing bits first. 300 300 */ 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));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)); 303 303 } 304 304 … … 317 317 } 318 318 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));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)); 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;452 451 hw_resources[count].res.io_range.endianness = LITTLE_ENDIAN; 453 452 } else { … … 455 454 hw_resources[count].res.mem_range.address = range_addr; 456 455 hw_resources[count].res.mem_range.size = range_size; 457 hw_resources[count].res.mem_range.relative = false;458 456 hw_resources[count].res.mem_range.endianness = LITTLE_ENDIAN; 459 457 } … … 724 722 hw_resources.resources[1].res.io_range.address); 725 723 726 if (pio_enable_resource(&bus->pio_win, &hw_resources.resources[0], 727 (void **) &bus->conf_addr_reg)) { 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)) { 728 731 ddf_msg(LVL_ERROR, "Failed to enable configuration ports."); 729 732 rc = EADDRNOTAVAIL; 730 733 goto fail; 731 734 } 732 if (pio_enable _resource(&bus->pio_win, &hw_resources.resources[1],733 (void **) &bus->conf_data_reg)) {735 if (pio_enable((void *)(uintptr_t)bus->conf_io_data, 4, 736 &bus->conf_data_port)) { 734 737 ddf_msg(LVL_ERROR, "Failed to enable configuration ports."); 735 738 rc = EADDRNOTAVAIL;
Note:
See TracChangeset
for help on using the changeset viewer.