Changeset cabda7f in mainline for uspace/drv/uhci-hcd/uhci.c
- Timestamp:
- 2011-02-25T20:48:30Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0fde1d5
- Parents:
- 2d33eb5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/uhci.c
r2d33eb5 rcabda7f 141 141 142 142 instance->cleaner = fibril_create(uhci_interrupt_emulator, instance); 143 #ifndef USE_INTERRUTPS144 143 fibril_add_ready(instance->cleaner); 145 #endif146 144 147 145 instance->debug_checker = fibril_create(uhci_debug_checker, instance); … … 153 151 void uhci_init_hw(uhci_t *instance) 154 152 { 153 /* reset hc, who knows what touched it before us */ 154 pio_write_16(&instance->registers->usbcmd, UHCI_CMD_GLOBAL_RESET); 155 async_usleep(10000); /* 10ms according to USB spec */ 156 pio_write_16(&instance->registers->usbcmd, 0); 155 157 156 158 /* set framelist pointer */ … … 159 161 160 162 /* enable all interrupts, but resume interrupt */ 161 pio_write_16(&instance->registers->usbintr,162 UHCI_INTR_CRC | UHCI_INTR_COMPLETE | UHCI_INTR_SHORT_PACKET);163 // pio_write_16(&instance->registers->usbintr, 164 // UHCI_INTR_CRC | UHCI_INTR_COMPLETE | UHCI_INTR_SHORT_PACKET); 163 165 164 166 /* Start the hc with large(64B) packet FSBR */ … … 295 297 while(1) { 296 298 uint16_t status = pio_read_16(&instance->registers->usbsts); 299 usb_log_debug("UHCI status: %x.\n", status); 300 status |= 1; 297 301 uhci_interrupt(instance, status); 298 302 pio_write_16(&instance->registers->usbsts, 0x1f); 299 async_usleep(UHCI_CLEANER_TIMEOUT );303 async_usleep(UHCI_CLEANER_TIMEOUT * 1000); 300 304 } 301 305 return EOK; … … 313 317 cmd, sts, intr); 314 318 315 uintptr_t frame_list = pio_read_32(&instance->registers->flbaseadd); 319 uintptr_t frame_list = 320 pio_read_32(&instance->registers->flbaseadd) & ~0xfff; 316 321 if (frame_list != addr_to_phys(instance->frame_list)) { 317 322 usb_log_debug("Framelist address: %p vs. %p.\n",
Note:
See TracChangeset
for help on using the changeset viewer.