Changeset 3e200736 in mainline for uspace/drv/bus/usb/uhci/hc.c
- Timestamp:
- 2014-01-18T21:34:32Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a5361fb
- Parents:
- e26a9d95
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.c
re26a9d95 r3e200736 96 96 static int hc_init_transfer_lists(hc_t *instance); 97 97 98 static int hc_interrupt_emulator(void *arg);99 98 static int hc_debug_checker(void *arg); 100 99 … … 245 244 246 245 hc_init_hw(instance); 247 if (!interrupts) {248 instance->interrupt_emulator =249 fibril_create(hc_interrupt_emulator, instance);250 fibril_add_ready(instance->interrupt_emulator);251 }252 246 (void)hc_debug_checker; 253 247 … … 460 454 } 461 455 462 /** Polling function, emulates interrupts.463 *464 * @param[in] arg UHCI hc structure to use.465 * @return EOK (should never return)466 */467 int hc_interrupt_emulator(void* arg)468 {469 usb_log_debug("Started interrupt emulator.\n");470 hc_t *instance = arg;471 assert(instance);472 473 while (1) {474 /* Read and clear status register */475 uint16_t status = pio_read_16(&instance->registers->usbsts);476 pio_write_16(&instance->registers->usbsts, status);477 if (status != 0)478 usb_log_debug2("UHCI status: %x.\n", status);479 hc_interrupt(instance, status);480 async_usleep(UHCI_INT_EMULATOR_TIMEOUT);481 }482 return EOK;483 }484 485 456 /** Debug function, checks consistency of memory structures. 486 457 *
Note:
See TracChangeset
for help on using the changeset viewer.