Changes in uspace/drv/bus/usb/uhci/hc.c [b7fd2a0:8d2dd7f2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.c
rb7fd2a0 r8d2dd7f2 94 94 95 95 static void hc_init_hw(const hc_t *instance); 96 static errno_t hc_init_mem_structures(hc_t *instance);97 static errno_t hc_init_transfer_lists(hc_t *instance);98 99 static errno_t hc_debug_checker(void *arg);96 static int hc_init_mem_structures(hc_t *instance); 97 static int hc_init_transfer_lists(hc_t *instance); 98 99 static int hc_debug_checker(void *arg); 100 100 101 101 … … 103 103 * @param[out] code IRQ code structure. 104 104 * @param[in] hw_res Device's resources. 105 * @param[out] irq106 105 * 107 106 * @return Error code. 108 107 */ 109 errno_t uhci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res, int *irq)108 int uhci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res) 110 109 { 111 110 assert(code); … … 143 142 RNGABSPTR(regs), RNGSZ(regs), hw_res->irqs.irqs[0]); 144 143 145 *irq = hw_res->irqs.irqs[0]; 146 return EOK; 144 return hw_res->irqs.irqs[0]; 147 145 } 148 146 … … 216 214 * interrupt fibrils. 217 215 */ 218 errno_t hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts)216 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts) 219 217 { 220 218 assert(instance); … … 228 226 229 227 /* allow access to hc control registers */ 230 errno_t ret = pio_enable_range(&hw_res->io_ranges.ranges[0],228 int ret = pio_enable_range(&hw_res->io_ranges.ranges[0], 231 229 (void **) &instance->registers); 232 230 if (ret != EOK) { … … 318 316 * - frame list page (needs to be one UHCI hw accessible 4K page) 319 317 */ 320 errno_t hc_init_mem_structures(hc_t *instance)318 int hc_init_mem_structures(hc_t *instance) 321 319 { 322 320 assert(instance); … … 330 328 331 329 /* Init transfer lists */ 332 errno_t ret = hc_init_transfer_lists(instance);330 int ret = hc_init_transfer_lists(instance); 333 331 if (ret != EOK) { 334 332 usb_log_error("Failed to initialize transfer lists.\n"); … … 359 357 * USB scheduling. Sets pointer table for quick access. 360 358 */ 361 errno_t hc_init_transfer_lists(hc_t *instance)359 int hc_init_transfer_lists(hc_t *instance) 362 360 { 363 361 assert(instance); 364 362 #define SETUP_TRANSFER_LIST(type, name) \ 365 363 do { \ 366 errno_t ret = transfer_list_init(&instance->transfers_##type, name); \364 int ret = transfer_list_init(&instance->transfers_##type, name); \ 367 365 if (ret != EOK) { \ 368 366 usb_log_error("Failed to setup %s transfer list: %s.\n", \ … … 411 409 } 412 410 413 errno_t uhci_hc_status(hcd_t *hcd, uint32_t *status)411 int uhci_hc_status(hcd_t *hcd, uint32_t *status) 414 412 { 415 413 assert(hcd); … … 435 433 * Checks for bandwidth availability and appends the batch to the proper queue. 436 434 */ 437 errno_t uhci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch)435 int uhci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch) 438 436 { 439 437 assert(hcd); … … 464 462 * @return EOK (should never return) 465 463 */ 466 errno_t hc_debug_checker(void *arg)464 int hc_debug_checker(void *arg) 467 465 { 468 466 hc_t *instance = arg;
Note:
See TracChangeset
for help on using the changeset viewer.