Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset a0be5d0 in mainline for uspace/drv/bus/usb/xhci/commands.c


Ignore:
Timestamp:
2017-10-09T14:11:22Z (5 years ago)
Author:
Michal Staruch <salmelu@…>
Branches:
lfn, master, serial
Children:
42bc933
Parents:
ae03552e
Message:

Moved ring_doorbell, added address check

File:
1 edited

Legend:

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

    rae03552e ra0be5d0  
    145145}
    146146
    147 static inline int ring_doorbell(xhci_hc_t *hc, unsigned doorbell, unsigned target)
    148 {
    149         assert(hc);
    150         uint32_t v = host2xhci(32, target & BIT_RRANGE(uint32_t, 7));
    151         pio_write_32(&hc->db_arry[doorbell], v);
    152         return EOK;
    153 }
    154 
    155147static inline int enqueue_command(xhci_hc_t *hc, xhci_cmd_t *cmd, unsigned doorbell, unsigned target)
    156148{
     
    161153
    162154        xhci_trb_ring_enqueue(&hc->command_ring, &cmd->trb, &cmd->trb_phys);
    163         ring_doorbell(hc, doorbell, target);
     155        hc_ring_doorbell(hc, doorbell, target);
    164156
    165157        usb_log_debug2("HC(%p): Sent command:", hc);
     
    196188
    197189        XHCI_REG_WR(hc->op_regs, XHCI_OP_CRR, 1);
    198         ring_doorbell(hc, 0, 0);
     190        hc_ring_doorbell(hc, 0, 0);
    199191}
    200192
Note: See TracChangeset for help on using the changeset viewer.