Changeset b7fd2a0 in mainline for uspace/drv/bus/usb/uhci/hc.c
- Timestamp:
- 2018-01-13T03:10:29Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.c
r36f0738 rb7fd2a0 94 94 95 95 static void hc_init_hw(const hc_t *instance); 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);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); 100 100 101 101 … … 107 107 * @return Error code. 108 108 */ 109 int uhci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res, int *irq)109 errno_t uhci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res, int *irq) 110 110 { 111 111 assert(code); … … 216 216 * interrupt fibrils. 217 217 */ 218 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts)218 errno_t hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts) 219 219 { 220 220 assert(instance); … … 228 228 229 229 /* allow access to hc control registers */ 230 int ret = pio_enable_range(&hw_res->io_ranges.ranges[0],230 errno_t ret = pio_enable_range(&hw_res->io_ranges.ranges[0], 231 231 (void **) &instance->registers); 232 232 if (ret != EOK) { … … 318 318 * - frame list page (needs to be one UHCI hw accessible 4K page) 319 319 */ 320 int hc_init_mem_structures(hc_t *instance)320 errno_t hc_init_mem_structures(hc_t *instance) 321 321 { 322 322 assert(instance); … … 330 330 331 331 /* Init transfer lists */ 332 int ret = hc_init_transfer_lists(instance);332 errno_t ret = hc_init_transfer_lists(instance); 333 333 if (ret != EOK) { 334 334 usb_log_error("Failed to initialize transfer lists.\n"); … … 359 359 * USB scheduling. Sets pointer table for quick access. 360 360 */ 361 int hc_init_transfer_lists(hc_t *instance)361 errno_t hc_init_transfer_lists(hc_t *instance) 362 362 { 363 363 assert(instance); 364 364 #define SETUP_TRANSFER_LIST(type, name) \ 365 365 do { \ 366 int ret = transfer_list_init(&instance->transfers_##type, name); \366 errno_t ret = transfer_list_init(&instance->transfers_##type, name); \ 367 367 if (ret != EOK) { \ 368 368 usb_log_error("Failed to setup %s transfer list: %s.\n", \ … … 411 411 } 412 412 413 int uhci_hc_status(hcd_t *hcd, uint32_t *status)413 errno_t uhci_hc_status(hcd_t *hcd, uint32_t *status) 414 414 { 415 415 assert(hcd); … … 435 435 * Checks for bandwidth availability and appends the batch to the proper queue. 436 436 */ 437 int uhci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch)437 errno_t uhci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch) 438 438 { 439 439 assert(hcd); … … 464 464 * @return EOK (should never return) 465 465 */ 466 int hc_debug_checker(void *arg)466 errno_t hc_debug_checker(void *arg) 467 467 { 468 468 hc_t *instance = arg;
Note:
See TracChangeset
for help on using the changeset viewer.