Changeset a9f91cd in mainline for uspace/drv/uhci-hcd/uhci_hc.c
- Timestamp:
- 2011-03-13T18:09:16Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 335382d, f123909
- Parents:
- 9351353
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/uhci_hc.c
r9351353 ra9f91cd 68 68 */ 69 69 /*----------------------------------------------------------------------------*/ 70 static int uhci_ init_transfer_lists(uhci_hc_t *instance);71 static int uhci_ init_mem_structures(uhci_hc_t *instance);72 static void uhci_ init_hw(uhci_hc_t *instance);73 74 static int uhci_ interrupt_emulator(void *arg);75 static int uhci_ debug_checker(void *arg);70 static int uhci_hc_init_transfer_lists(uhci_hc_t *instance); 71 static int uhci_hc_init_mem_structures(uhci_hc_t *instance); 72 static void uhci_hc_init_hw(uhci_hc_t *instance); 73 74 static int uhci_hc_interrupt_emulator(void *arg); 75 static int uhci_hc_debug_checker(void *arg); 76 76 77 77 static bool allowed_usb_packet( … … 113 113 io, reg_size); 114 114 115 ret = uhci_ init_mem_structures(instance);115 ret = uhci_hc_init_mem_structures(instance); 116 116 CHECK_RET_DEST_FUN_RETURN(ret, 117 117 "Failed to initialize UHCI memory structures.\n"); 118 118 119 uhci_ init_hw(instance);119 uhci_hc_init_hw(instance); 120 120 instance->cleaner = 121 fibril_create(uhci_ interrupt_emulator, instance);121 fibril_create(uhci_hc_interrupt_emulator, instance); 122 122 fibril_add_ready(instance->cleaner); 123 123 124 instance->debug_checker = fibril_create(uhci_ debug_checker, instance);124 instance->debug_checker = fibril_create(uhci_hc_debug_checker, instance); 125 125 fibril_add_ready(instance->debug_checker); 126 126 … … 134 134 * @param[in] instance UHCI structure to use. 135 135 */ 136 void uhci_ init_hw(uhci_hc_t *instance)136 void uhci_hc_init_hw(uhci_hc_t *instance) 137 137 { 138 138 assert(instance); … … 172 172 * @note Should be called only once on any structure. 173 173 */ 174 int uhci_ init_mem_structures(uhci_hc_t *instance)174 int uhci_hc_init_mem_structures(uhci_hc_t *instance) 175 175 { 176 176 assert(instance); … … 201 201 202 202 /* Init transfer lists */ 203 ret = uhci_ init_transfer_lists(instance);203 ret = uhci_hc_init_transfer_lists(instance); 204 204 CHECK_RET_DEST_CMDS_RETURN(ret, "Failed to init transfer lists.\n"); 205 205 usb_log_debug("Initialized transfer lists.\n"); … … 235 235 * @note Should be called only once on any structure. 236 236 */ 237 int uhci_ init_transfer_lists(uhci_hc_t *instance)237 int uhci_hc_init_transfer_lists(uhci_hc_t *instance) 238 238 { 239 239 assert(instance); … … 299 299 * @return Error code 300 300 */ 301 int uhci_ schedule(uhci_hc_t *instance, batch_t *batch)301 int uhci_hc_schedule(uhci_hc_t *instance, batch_t *batch) 302 302 { 303 303 assert(instance); … … 327 327 * @param[in] status Value of the stsatus regiser at the time of interrupt. 328 328 */ 329 void uhci_ interrupt(uhci_hc_t *instance, uint16_t status)329 void uhci_hc_interrupt(uhci_hc_t *instance, uint16_t status) 330 330 { 331 331 assert(instance); … … 345 345 * @return EOK 346 346 */ 347 int uhci_ interrupt_emulator(void* arg)347 int uhci_hc_interrupt_emulator(void* arg) 348 348 { 349 349 usb_log_debug("Started interrupt emulator.\n"); … … 357 357 if (status != 0) 358 358 usb_log_debug2("UHCI status: %x.\n", status); 359 uhci_ interrupt(instance, status);359 uhci_hc_interrupt(instance, status); 360 360 async_usleep(UHCI_CLEANER_TIMEOUT); 361 361 } … … 368 368 * @return EOK 369 369 */ 370 int uhci_ debug_checker(void *arg)370 int uhci_hc_debug_checker(void *arg) 371 371 { 372 372 uhci_hc_t *instance = (uhci_hc_t*)arg;
Note:
See TracChangeset
for help on using the changeset viewer.