Changeset 77ded647 in mainline for uspace/drv/bus/usb/xhci/hc.c
- Timestamp:
- 2018-02-01T11:42:11Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3e6ff9a
- Parents:
- 17d34a8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/hc.c
r17d34a8 r77ded647 477 477 478 478 uint64_t dcbaaptr = hc->dcbaa_dma.phys; 479 XHCI_REG_WR(hc->op_regs, XHCI_OP_DCBAAP_LO, LOWER32(dcbaaptr)); 480 XHCI_REG_WR(hc->op_regs, XHCI_OP_DCBAAP_HI, UPPER32(dcbaaptr)); 479 XHCI_REG_WR(hc->op_regs, XHCI_OP_DCBAAP, dcbaaptr); 481 480 XHCI_REG_WR(hc->op_regs, XHCI_OP_MAX_SLOTS_EN, hc->max_slots); 482 481 483 482 uintptr_t crcr; 484 483 xhci_trb_ring_reset_dequeue_state(&hc->cr.trb_ring, &crcr); 485 XHCI_REG_WR(hc->op_regs, XHCI_OP_CRCR_LO, LOWER32(crcr)); 486 XHCI_REG_WR(hc->op_regs, XHCI_OP_CRCR_HI, UPPER32(crcr)); 484 XHCI_REG_WR(hc->op_regs, XHCI_OP_CRCR, crcr); 487 485 488 486 XHCI_REG_SET(hc->op_regs, XHCI_OP_EWE, 1); … … 492 490 xhci_interrupter_regs_t *intr0 = &hc->rt_regs->ir[0]; 493 491 XHCI_REG_WR(intr0, XHCI_INTR_ERSTSZ, hc->event_ring.segment_count); 494 uint64_t erdp = hc->event_ring.dequeue_ptr; 495 XHCI_REG_WR(intr0, XHCI_INTR_ERDP_LO, LOWER32(erdp)); 496 XHCI_REG_WR(intr0, XHCI_INTR_ERDP_HI, UPPER32(erdp)); 497 uint64_t erstptr = hc->event_ring.erst.phys; 498 XHCI_REG_WR(intr0, XHCI_INTR_ERSTBA_LO, LOWER32(erstptr)); 499 XHCI_REG_WR(intr0, XHCI_INTR_ERSTBA_HI, UPPER32(erstptr)); 492 XHCI_REG_WR(intr0, XHCI_INTR_ERDP, hc->event_ring.dequeue_ptr); 493 XHCI_REG_WR(intr0, XHCI_INTR_ERSTBA, hc->event_ring.erst.phys); 500 494 501 495 if (hc->base.irq_cap > 0) { … … 670 664 } 671 665 672 uint64_t erdp = hc->event_ring.dequeue_ptr; 673 XHCI_REG_WR(intr, XHCI_INTR_ERDP_LO, LOWER32(erdp)); 674 XHCI_REG_WR(intr, XHCI_INTR_ERDP_HI, UPPER32(erdp)); 666 XHCI_REG_WR(intr, XHCI_INTR_ERDP, hc->event_ring.dequeue_ptr); 675 667 } 676 668 … … 679 671 uint64_t erdp = hc->event_ring.dequeue_ptr; 680 672 erdp |= XHCI_REG_MASK(XHCI_INTR_ERDP_EHB); 681 XHCI_REG_WR(intr, XHCI_INTR_ERDP_LO, LOWER32(erdp)); 682 XHCI_REG_WR(intr, XHCI_INTR_ERDP_HI, UPPER32(erdp)); 673 XHCI_REG_WR(intr, XHCI_INTR_ERDP, erdp); 683 674 684 675 usb_log_debug2("Event ring run finished.");
Note:
See TracChangeset
for help on using the changeset viewer.