Changeset 3eb0c85 in mainline
- Timestamp:
- 2014-02-02T00:36:35Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8e7c9fe
- Parents:
- 1412b7ee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/hc.c
r1412b7ee r3eb0c85 350 350 { 351 351 assert(instance); 352 /* Turn of the HC if it's running, Reseting a running device is352 /* Turn off the HC if it's running, Reseting a running device is 353 353 * undefined */ 354 354 if (!(EHCI_RD(instance->registers->usbsts) & USB_STS_HC_HALTED_FLAG)) { … … 377 377 /* Use the lowest 4G segment */ 378 378 EHCI_WR(instance->registers->ctrldssegment, 0); 379 /* Set periodic list */ 379 380 /* Enable periodic list */ 380 381 assert(instance->periodic_list_base); 381 382 const uintptr_t phys_base = … … 393 394 EHCI_SET(instance->registers->usbcmd, USB_CMD_ASYNC_SCHEDULE_FLAG); 394 395 395 /* start hc and get all ports */396 /* Start hc and get all ports */ 396 397 EHCI_SET(instance->registers->usbcmd, USB_CMD_RUN_FLAG); 397 398 EHCI_SET(instance->registers->configflag, USB_CONFIG_FLAG_FLAG); 398 #if 0 399 /* 400 * TURN OFF EHCI FOR NOW 401 */ 402 usb_log_debug("USBCMD value: %x.\n", 403 EHCI_RD(instance->registers->usbcmd)); 404 if (EHCI_RD(instance->registers->usbcmd) & USB_CMD_RUN_FLAG) { 405 /* disable all interrupts */ 406 EHCI_WR(instance->registers->usbintr, 0); 407 /* ack all interrupts */ 408 EHCI_WR(instance->registers->usbsts, 0x3f); 409 /* release RH ports */ 410 EHCI_WR(instance->registers->configflag, 0); 411 EHCI_WR(instance->registers->usbcmd, 0); 412 /* Wait until hc is halted */ 413 while ((EHCI_RD(instance->registers->usbsts) & USB_STS_HC_HALTED_FLAG) == 0); 414 usb_log_info("EHCI turned off.\n"); 415 } else { 416 usb_log_info("EHCI was not running.\n"); 417 } 418 #endif 399 419 400 usb_log_debug("Registers: \n" 420 401 "\t USBCMD(%p): %x(0x00080000 = at least 1ms between interrupts)\n"
Note:
See TracChangeset
for help on using the changeset viewer.