Changes in uspace/drv/pciintel/pci.c [ffa2c8ef:7e752b2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/pciintel/pci.c
rffa2c8ef r7e752b2 49 49 #include <ipc/devman.h> 50 50 #include <ipc/dev_iface.h> 51 #include < ops/hw_res.h>51 #include <resource.h> 52 52 #include <device/hw_res.h> 53 53 #include <ddi.h> … … 77 77 } 78 78 79 static hw_res_ops_t pciintel_child_hw_res_ops= {79 static resource_iface_t pciintel_child_res_iface = { 80 80 &pciintel_get_child_resources, 81 81 &pciintel_enable_child_interrupt … … 324 324 printf(NAME ": device %s : ", dev->name); 325 325 printf("address = %" PRIx64, range_addr); 326 printf(", size = %x\n", (unsigned int)range_size);326 printf(", size = %x\n", range_size); 327 327 } 328 328 … … 452 452 static int pci_add_device(device_t *dev) 453 453 { 454 int rc;455 456 454 printf(NAME ": pci_add_device\n"); 457 455 … … 468 466 "parent's driver.\n"); 469 467 delete_pci_bus_data(bus_data); 470 return dev->parent_phone;468 return EPARTY; /* FIXME: use another EC */ 471 469 } 472 470 473 471 hw_resource_list_t hw_resources; 474 472 475 rc = hw_res_get_resource_list(dev->parent_phone, &hw_resources); 476 if (rc != EOK) { 473 if (!get_hw_resources(dev->parent_phone, &hw_resources)) { 477 474 printf(NAME ": pci_add_device failed to get hw resources for " 478 475 "the device.\n"); 479 476 delete_pci_bus_data(bus_data); 480 async_hangup(dev->parent_phone);481 return rc;477 ipc_hangup(dev->parent_phone); 478 return EPARTY; /* FIXME: use another EC */ 482 479 } 483 480 … … 492 489 (uint32_t) hw_resources.resources[0].res.io_range.address; 493 490 494 if (pio_enable((void *) (uintptr_t)bus_data->conf_io_addr, 8,491 if (pio_enable((void *)bus_data->conf_io_addr, 8, 495 492 &bus_data->conf_addr_port)) { 496 493 printf(NAME ": failed to enable configuration ports.\n"); 497 494 delete_pci_bus_data(bus_data); 498 async_hangup(dev->parent_phone);499 hw_res_clean_resource_list(&hw_resources);495 ipc_hangup(dev->parent_phone); 496 clean_hw_resource_list(&hw_resources); 500 497 return EADDRNOTAVAIL; 501 498 } … … 508 505 pci_bus_scan(dev, 0); 509 506 510 hw_res_clean_resource_list(&hw_resources);507 clean_hw_resource_list(&hw_resources); 511 508 512 509 return EOK; … … 515 512 static void pciintel_init(void) 516 513 { 517 pci_child_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_child_ hw_res_ops;514 pci_child_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_child_res_iface; 518 515 } 519 516 … … 537 534 { 538 535 if (dev_data != NULL) { 539 hw_res_clean_resource_list(&dev_data->hw_resources);536 clean_hw_resource_list(&dev_data->hw_resources); 540 537 free(dev_data); 541 538 }
Note:
See TracChangeset
for help on using the changeset viewer.