Lines Matching refs:trb
100 struct cdns2_trb *trb) in cdns2_trb_virt_to_dma() argument
102 u32 offset = (char *)trb - (char *)pep->ring.trbs; in cdns2_trb_virt_to_dma()
228 struct cdns2_trb *trb) in cdns2_next_trb() argument
230 if (trb == (pep->ring.trbs + (TRBS_PER_SEGMENT - 1))) in cdns2_next_trb()
233 return ++trb; in cdns2_next_trb()
281 struct cdns2_trb *trb) in cdns2_wa1_update_guard() argument
293 pep->wa1_trb = trb; in cdns2_wa1_update_guard()
367 struct cdns2_trb *trb = preq->trb; in cdns2_dbg_request_trbs() local
372 trace_cdns2_queue_trb(pep, trb + i); in cdns2_dbg_request_trbs()
373 if (trb + i == link_trb) { in cdns2_dbg_request_trbs()
374 trb = pep->ring.trbs; in cdns2_dbg_request_trbs()
504 struct cdns2_trb *trb; in cdns2_ep_tx_isoc() local
586 trb = pep->ring.trbs + pep->ring.enqueue; in cdns2_ep_tx_isoc()
587 trb->buffer = cpu_to_le32(TRB_BUFFER(trb_dma)); in cdns2_ep_tx_isoc()
588 trb->length = cpu_to_le32(length); in cdns2_ep_tx_isoc()
589 trb->control = cpu_to_le32(control); in cdns2_ep_tx_isoc()
620 struct cdns2_trb *trb; in cdns2_ep_tx_bulk() local
639 trb = pep->ring.trbs + ring->enqueue; in cdns2_ep_tx_bulk()
651 trb->buffer = cpu_to_le32(pep->ring.dma + in cdns2_ep_tx_bulk()
653 trb->length = 0; in cdns2_ep_tx_bulk()
654 trb->control = cpu_to_le32(control); in cdns2_ep_tx_bulk()
672 trb->buffer = cpu_to_le32(trb_dma); in cdns2_ep_tx_bulk()
673 trb->length = cpu_to_le32(TRB_BURST(pep->trb_burst_size) | in cdns2_ep_tx_bulk()
675 trb->control = cpu_to_le32(control); in cdns2_ep_tx_bulk()
714 struct cdns2_trb *trb; in cdns2_prepare_first_isoc_transfer() local
735 trb = &pep->ring.trbs[TRBS_PER_SEGMENT]; in cdns2_prepare_first_isoc_transfer()
736 trb->length = 0; in cdns2_prepare_first_isoc_transfer()
737 trb->buffer = cpu_to_le32(TRB_BUFFER(buffer)); in cdns2_prepare_first_isoc_transfer()
738 trb->control = cpu_to_le32((hw_ccs ? TRB_CYCLE : 0) | TRB_TYPE(TRB_NORMAL)); in cdns2_prepare_first_isoc_transfer()
744 trb++; in cdns2_prepare_first_isoc_transfer()
745 trb->length = 0; in cdns2_prepare_first_isoc_transfer()
746 trb->buffer = cpu_to_le32(TRB_BUFFER(buffer)); in cdns2_prepare_first_isoc_transfer()
747 trb->control = cpu_to_le32((hw_ccs ? TRB_CYCLE : 0) | in cdns2_prepare_first_isoc_transfer()
751 trb->control |= cpu_to_le32(TRB_TOGGLE); in cdns2_prepare_first_isoc_transfer()
784 preq->trb = ring->trbs + ring->enqueue; in cdns2_ep_run_transfer()
802 preq->trb->control = preq->trb->control ^ cpu_to_le32(1); in cdns2_ep_run_transfer()
883 struct cdns2_trb *trb; in cdns2_trb_handled() local
916 trb = &ring->trbs[ring->dequeue]; in cdns2_trb_handled()
918 if ((le32_to_cpu(trb->control) & TRB_CYCLE) != ring->ccs) in cdns2_trb_handled()
953 struct cdns2_trb *trb; in cdns2_skip_isoc_td() local
956 trb = pep->ring.trbs + pep->ring.dequeue; in cdns2_skip_isoc_td()
960 trace_cdns2_complete_trb(pep, trb); in cdns2_skip_isoc_td()
962 trb = cdns2_next_trb(pep, trb); in cdns2_skip_isoc_td()
976 struct cdns2_trb *trb; in cdns2_transfer_completed() local
980 trb = pep->ring.trbs + pep->ring.dequeue; in cdns2_transfer_completed()
986 while (TRB_FIELD_TO_TYPE(le32_to_cpu(trb->control)) == TRB_LINK && in cdns2_transfer_completed()
987 le32_to_cpu(trb->length)) { in cdns2_transfer_completed()
988 trace_cdns2_complete_trb(pep, trb); in cdns2_transfer_completed()
990 trb = pep->ring.trbs + pep->ring.dequeue; in cdns2_transfer_completed()
1005 trb = pep->ring.trbs + pep->ring.dequeue; in cdns2_transfer_completed()
1006 trace_cdns2_complete_trb(pep, trb); in cdns2_transfer_completed()
1016 TRB_LEN(le32_to_cpu(trb->length)); in cdns2_transfer_completed()
1783 link_trb = preq->trb; in cdns2_gadget_ep_dequeue()
1807 if (pep->wa1_trb == preq->trb) in cdns2_gadget_ep_dequeue()
1840 struct cdns2_trb *trb = NULL; in cdns2_halt_endpoint() local
1846 trb = preq->trb; in cdns2_halt_endpoint()
1847 if (trb) { in cdns2_halt_endpoint()
1848 trb_tmp = *trb; in cdns2_halt_endpoint()
1849 trb->control = trb->control ^ cpu_to_le32(TRB_CYCLE); in cdns2_halt_endpoint()
1865 if (trb) in cdns2_halt_endpoint()
1866 *trb = trb_tmp; in cdns2_halt_endpoint()