Changeset b7fd2a0 in mainline for uspace/drv/bus/usb/ohci/hc.c
- Timestamp:
- 2018-01-13T03:10:29Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
-
uspace/drv/bus/usb/ohci/hc.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.c
r36f0738 rb7fd2a0 91 91 static void hc_gain_control(hc_t *instance); 92 92 static void hc_start(hc_t *instance); 93 static int hc_init_transfer_lists(hc_t *instance);94 static int hc_init_memory(hc_t *instance);93 static errno_t hc_init_transfer_lists(hc_t *instance); 94 static errno_t hc_init_memory(hc_t *instance); 95 95 96 96 /** Generate IRQ code. … … 103 103 * @return Error code. 104 104 */ 105 int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res, int *irq)105 errno_t ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res, int *irq) 106 106 { 107 107 assert(code); … … 152 152 * @return Error code 153 153 */ 154 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts)154 errno_t hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts) 155 155 { 156 156 assert(instance); … … 160 160 return EINVAL; 161 161 162 int ret = pio_enable_range(&hw_res->mem_ranges.ranges[0],162 errno_t ret = pio_enable_range(&hw_res->mem_ranges.ranges[0], 163 163 (void **) &instance->registers); 164 164 if (ret != EOK) { … … 269 269 } 270 270 271 int ohci_hc_status(hcd_t *hcd, uint32_t *status)271 errno_t ohci_hc_status(hcd_t *hcd, uint32_t *status) 272 272 { 273 273 assert(hcd); … … 289 289 * @return Error code. 290 290 */ 291 int ohci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch)291 errno_t ohci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch) 292 292 { 293 293 assert(hcd); … … 518 518 * @return Error code 519 519 */ 520 int hc_init_transfer_lists(hc_t *instance)520 errno_t hc_init_transfer_lists(hc_t *instance) 521 521 { 522 522 assert(instance); … … 524 524 do { \ 525 525 const char *name = usb_str_transfer_type(type); \ 526 const int ret = endpoint_list_init(&instance->lists[type], name); \526 const errno_t ret = endpoint_list_init(&instance->lists[type], name); \ 527 527 if (ret != EOK) { \ 528 528 usb_log_error("Failed to setup %s endpoint list: %s.\n", \ … … 552 552 * @return Error code. 553 553 */ 554 int hc_init_memory(hc_t *instance)554 errno_t hc_init_memory(hc_t *instance) 555 555 { 556 556 assert(instance); … … 558 558 memset(&instance->rh, 0, sizeof(instance->rh)); 559 559 /* Init queues */ 560 const int ret = hc_init_transfer_lists(instance);560 const errno_t ret = hc_init_transfer_lists(instance); 561 561 if (ret != EOK) { 562 562 return ret;
Note:
See TracChangeset
for help on using the changeset viewer.
