Changeset 77ded647 in mainline for uspace/drv/bus/usb/xhci/hc.c


Ignore:
Timestamp:
2018-02-01T11:42:11Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3e6ff9a
Parents:
17d34a8
Message:

xhci: do not avoid 64-bit writes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/hc.c

    r17d34a8 r77ded647  
    477477
    478478        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);
    481480        XHCI_REG_WR(hc->op_regs, XHCI_OP_MAX_SLOTS_EN, hc->max_slots);
    482481
    483482        uintptr_t crcr;
    484483        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);
    487485
    488486        XHCI_REG_SET(hc->op_regs, XHCI_OP_EWE, 1);
     
    492490        xhci_interrupter_regs_t *intr0 = &hc->rt_regs->ir[0];
    493491        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);
    500494
    501495        if (hc->base.irq_cap > 0) {
     
    670664                }
    671665
    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);
    675667        }
    676668
     
    679671        uint64_t erdp = hc->event_ring.dequeue_ptr;
    680672        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);
    683674
    684675        usb_log_debug2("Event ring run finished.");
Note: See TracChangeset for help on using the changeset viewer.