Changeset ff34e5a in mainline for uspace/drv/uhci-hcd/uhci_hc.c
- Timestamp:
- 2011-03-14T14:04:15Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9370884
- Parents:
- 6298d80
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/uhci_hc.c
r6298d80 rff34e5a 82 82 * interrupt fibrils. 83 83 */ 84 int uhci_hc_init(uhci_hc_t *instance, ddf_fun_t *fun, void *regs, size_t reg_size) 84 int uhci_hc_init(uhci_hc_t *instance, ddf_fun_t *fun, 85 void *regs, size_t reg_size, bool interrupts) 85 86 { 86 87 assert(reg_size >= sizeof(regs_t)); … … 95 96 } else (void) 0 96 97 98 instance->hw_interrupts = interrupts; 97 99 /* Setup UHCI function. */ 98 100 instance->ddf_instance = fun; … … 113 115 114 116 uhci_hc_init_hw(instance); 115 instance->cleaner = 116 fibril_create(uhci_hc_interrupt_emulator, instance); 117 fibril_add_ready(instance->cleaner); 117 if (!interrupts) { 118 instance->cleaner = 119 fibril_create(uhci_hc_interrupt_emulator, instance); 120 fibril_add_ready(instance->cleaner); 121 } 118 122 119 123 instance->debug_checker = fibril_create(uhci_hc_debug_checker, instance); … … 149 153 pio_write_32(®isters->flbaseadd, pa); 150 154 151 /* Enable all interrupts, but resume interrupt */ 152 pio_write_16(&instance->registers->usbintr, 153 UHCI_INTR_CRC | UHCI_INTR_COMPLETE | UHCI_INTR_SHORT_PACKET); 155 if (instance->hw_interrupts) { 156 /* Enable all interrupts, but resume interrupt */ 157 pio_write_16(&instance->registers->usbintr, 158 UHCI_INTR_CRC | UHCI_INTR_COMPLETE | UHCI_INTR_SHORT_PACKET); 159 } 154 160 155 161 uint16_t status = pio_read_16(®isters->usbcmd);
Note:
See TracChangeset
for help on using the changeset viewer.