Changeset ebcb05a in mainline for uspace/drv/pciintel/pci.c
- Timestamp:
- 2011-04-01T19:00:51Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 969585f, ea53529
- Parents:
- bdbb6f6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/pciintel/pci.c
rbdbb6f6 rebcb05a 226 226 227 227 if (match_id_str == NULL) { 228 ddf_msg(LVL_ERROR, "Out of memory creating match ID. \n");228 ddf_msg(LVL_ERROR, "Out of memory creating match ID."); 229 229 return; 230 230 } … … 232 232 rc = ddf_fun_add_match_id(fun->fnode, match_id_str, 90); 233 233 if (rc != EOK) { 234 ddf_msg(LVL_ERROR, "Failed adding match ID: %s \n",234 ddf_msg(LVL_ERROR, "Failed adding match ID: %s", 235 235 str_error(rc)); 236 236 } … … 325 325 if (range_addr != 0) { 326 326 ddf_msg(LVL_DEBUG, "Function %s : address = %" PRIx64 327 ", size = %x \n", fun->fnode->name, range_addr,327 ", size = %x", fun->fnode->name, range_addr, 328 328 (unsigned int) range_size); 329 329 } … … 351 351 hw_res_list->count++; 352 352 353 ddf_msg(LVL_NOTE, "Function %s uses irq %x. \n", fun->fnode->name, irq);353 ddf_msg(LVL_NOTE, "Function %s uses irq %x.", fun->fnode->name, irq); 354 354 } 355 355 … … 407 407 char *fun_name = pci_fun_create_name(fun); 408 408 if (fun_name == NULL) { 409 ddf_msg(LVL_ERROR, "Out of memory. \n");409 ddf_msg(LVL_ERROR, "Out of memory."); 410 410 return; 411 411 } … … 413 413 fnode = ddf_fun_create(bus->dnode, fun_inner, fun_name); 414 414 if (fnode == NULL) { 415 ddf_msg(LVL_ERROR, "Failed creating function. \n");415 ddf_msg(LVL_ERROR, "Failed creating function."); 416 416 return; 417 417 } … … 427 427 fnode->driver_data = fun; 428 428 429 ddf_msg(LVL_DEBUG, "Adding new function %s. \n",429 ddf_msg(LVL_DEBUG, "Adding new function %s.", 430 430 fnode->name); 431 431 … … 445 445 PCI_BRIDGE_SEC_BUS_NUM); 446 446 ddf_msg(LVL_DEBUG, "Device is pci-to-pci " 447 "bridge, secondary bus number = %d. \n",447 "bridge, secondary bus number = %d.", 448 448 bus_num); 449 449 if (child_bus > bus_num) … … 468 468 int rc; 469 469 470 ddf_msg(LVL_DEBUG, "pci_add_device \n");470 ddf_msg(LVL_DEBUG, "pci_add_device"); 471 471 dnode->parent_phone = -1; 472 472 473 473 bus = pci_bus_new(); 474 474 if (bus == NULL) { 475 ddf_msg(LVL_ERROR, "pci_add_device allocation failed. \n");475 ddf_msg(LVL_ERROR, "pci_add_device allocation failed."); 476 476 rc = ENOMEM; 477 477 goto fail; … … 484 484 if (dnode->parent_phone < 0) { 485 485 ddf_msg(LVL_ERROR, "pci_add_device failed to connect to the " 486 "parent's driver. \n");486 "parent's driver."); 487 487 rc = dnode->parent_phone; 488 488 goto fail; … … 494 494 if (rc != EOK) { 495 495 ddf_msg(LVL_ERROR, "pci_add_device failed to get hw resources " 496 "for the device. \n");496 "for the device."); 497 497 goto fail; 498 498 } 499 499 got_res = true; 500 500 501 ddf_msg(LVL_DEBUG, "conf_addr = %" PRIx64 ". \n",501 ddf_msg(LVL_DEBUG, "conf_addr = %" PRIx64 ".", 502 502 hw_resources.resources[0].res.io_range.address); 503 503 … … 511 511 if (pio_enable((void *)(uintptr_t)bus->conf_io_addr, 8, 512 512 &bus->conf_addr_port)) { 513 ddf_msg(LVL_ERROR, "Failed to enable configuration ports. \n");513 ddf_msg(LVL_ERROR, "Failed to enable configuration ports."); 514 514 rc = EADDRNOTAVAIL; 515 515 goto fail; … … 518 518 519 519 /* Make the bus device more visible. It has no use yet. */ 520 ddf_msg(LVL_DEBUG, "Adding a 'ctl' function \n");520 ddf_msg(LVL_DEBUG, "Adding a 'ctl' function"); 521 521 522 522 ctl = ddf_fun_create(bus->dnode, fun_exposed, "ctl"); 523 523 if (ctl == NULL) { 524 printf(NAME ": error creating control function.\n");524 ddf_msg(LVL_ERROR, "Failed creating control function."); 525 525 rc = ENOMEM; 526 526 goto fail; … … 529 529 rc = ddf_fun_bind(ctl); 530 530 if (rc != EOK) { 531 printf(NAME ": error binding control function.\n");531 ddf_msg(LVL_ERROR, "Failed binding control function."); 532 532 goto fail; 533 533 } 534 534 535 535 /* Enumerate functions. */ 536 ddf_msg(LVL_DEBUG, "Scanning the bus \n");536 ddf_msg(LVL_DEBUG, "Scanning the bus"); 537 537 pci_bus_scan(bus, 0); 538 538 … … 634 634 int main(int argc, char *argv[]) 635 635 { 636 printf(NAME ": HelenOS pci bus driver (intel method 1).\n");636 printf(NAME ": HelenOS PCI bus driver (Intel method 1).\n"); 637 637 pciintel_init(); 638 638 return ddf_driver_main(&pci_driver);
Note:
See TracChangeset
for help on using the changeset viewer.