Changes in uspace/drv/uhci-hcd/pci.c [4abc304:fb78ae72] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/pci.c
r4abc304 rfb78ae72 39 39 #include <device/hw_res.h> 40 40 41 #include <usb/debug.h>42 43 41 #include "pci.h" 44 42 … … 51 49 * @return Error code. 52 50 */ 53 int pci_get_my_registers(d df_dev_t *dev,51 int pci_get_my_registers(device_t *dev, 54 52 uintptr_t *io_reg_address, size_t *io_reg_size, 55 53 int *irq_no) … … 85 83 irq = res->res.interrupt.irq; 86 84 irq_found = true; 87 usb_log_debug2("Found interrupt: %d.\n", irq);88 85 break; 89 86 case IO_RANGE: 90 io_address = res->res.io_range.address; 87 io_address = (uintptr_t) 88 res->res.io_range.address; 91 89 io_size = res->res.io_range.size; 92 usb_log_debug2("Found io: %llx %zu.\n",93 res->res.io_range.address, res->res.io_range.size);94 90 io_found = true; 95 91 break; … … 109 105 } 110 106 111 *io_reg_address = io_address; 112 *io_reg_size = io_size; 113 *irq_no = irq; 107 if (io_reg_address != NULL) { 108 *io_reg_address = io_address; 109 } 110 if (io_reg_size != NULL) { 111 *io_reg_size = io_size; 112 } 113 if (irq_no != NULL) { 114 *irq_no = irq; 115 } 114 116 115 117 rc = EOK; … … 120 122 } 121 123 /*----------------------------------------------------------------------------*/ 122 int pci_enable_interrupts(d df_dev_t *device)124 int pci_enable_interrupts(device_t *device) 123 125 { 124 126 int parent_phone = devman_parent_device_connect(device->handle, 125 127 IPC_FLAG_BLOCKING); 126 128 bool enabled = hw_res_enable_interrupt(parent_phone); 127 async_hangup(parent_phone);128 129 return enabled ? EOK : EIO; 129 130 }
Note:
See TracChangeset
for help on using the changeset viewer.