Lines Matching refs:trb

184 	if (req->trb)  in dwc3_gadget_del_and_unmap_request()
188 req->trb = NULL; in dwc3_gadget_del_and_unmap_request()
425 struct dwc3_trb *trb) in dwc3_trb_dma_offset() argument
427 u32 offset = (char *) trb - (char *) dep->trb_pool; in dwc3_trb_dma_offset()
666 struct dwc3_trb *trb; in __dwc3_gadget_ep_enable() local
671 trb = &dep->trb_pool[0]; in __dwc3_gadget_ep_enable()
672 trb_dma = dwc3_trb_dma_offset(dep, trb); in __dwc3_gadget_ep_enable()
910 static void __dwc3_prepare_one_trb(struct dwc3_ep *dep, struct dwc3_trb *trb, in __dwc3_prepare_one_trb() argument
918 trb->size = DWC3_TRB_SIZE_LENGTH(length); in __dwc3_prepare_one_trb()
919 trb->bpl = lower_32_bits(dma); in __dwc3_prepare_one_trb()
920 trb->bph = upper_32_bits(dma); in __dwc3_prepare_one_trb()
924 trb->ctrl = DWC3_TRBCTL_CONTROL_SETUP; in __dwc3_prepare_one_trb()
929 trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS_FIRST; in __dwc3_prepare_one_trb()
964 trb->size |= DWC3_TRB_SIZE_PCM1(mult); in __dwc3_prepare_one_trb()
967 trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS; in __dwc3_prepare_one_trb()
971 trb->ctrl |= DWC3_TRB_CTRL_ISP_IMI; in __dwc3_prepare_one_trb()
976 trb->ctrl = DWC3_TRBCTL_NORMAL; in __dwc3_prepare_one_trb()
993 trb->ctrl |= DWC3_TRB_CTRL_CSP; in __dwc3_prepare_one_trb()
996 trb->ctrl |= DWC3_TRB_CTRL_ISP_IMI; in __dwc3_prepare_one_trb()
1001 trb->ctrl |= DWC3_TRB_CTRL_IOC; in __dwc3_prepare_one_trb()
1004 trb->ctrl |= DWC3_TRB_CTRL_CHN; in __dwc3_prepare_one_trb()
1007 trb->ctrl |= DWC3_TRB_CTRL_SID_SOFN(stream_id); in __dwc3_prepare_one_trb()
1009 trb->ctrl |= DWC3_TRB_CTRL_HWO; in __dwc3_prepare_one_trb()
1013 trace_dwc3_prepare_trb(dep, trb); in __dwc3_prepare_one_trb()
1026 struct dwc3_trb *trb; in dwc3_prepare_one_trb() local
1041 trb = &dep->trb_pool[dep->trb_enqueue]; in dwc3_prepare_one_trb()
1043 if (!req->trb) { in dwc3_prepare_one_trb()
1045 req->trb = trb; in dwc3_prepare_one_trb()
1046 req->trb_dma = dwc3_trb_dma_offset(dep, trb); in dwc3_prepare_one_trb()
1051 __dwc3_prepare_one_trb(dep, trb, dma, length, chain, node, in dwc3_prepare_one_trb()
1076 struct dwc3_trb *trb; in dwc3_prepare_one_trb_sg() local
1084 trb = &dep->trb_pool[dep->trb_enqueue]; in dwc3_prepare_one_trb_sg()
1086 __dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr, in dwc3_prepare_one_trb_sg()
1121 struct dwc3_trb *trb; in dwc3_prepare_one_trb_linear() local
1129 trb = &dep->trb_pool[dep->trb_enqueue]; in dwc3_prepare_one_trb_linear()
1131 __dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr, maxp - rem, in dwc3_prepare_one_trb_linear()
1138 struct dwc3_trb *trb; in dwc3_prepare_one_trb_linear() local
1146 trb = &dep->trb_pool[dep->trb_enqueue]; in dwc3_prepare_one_trb_linear()
1148 __dwc3_prepare_one_trb(dep, trb, dwc->bounce_addr, 0, in dwc3_prepare_one_trb_linear()
1257 if (req->trb) in __dwc3_gadget_kick_transfer()
1258 memset(req->trb, 0, sizeof(struct dwc3_trb)); in __dwc3_gadget_kick_transfer()
1506 struct dwc3_trb *trb; in dwc3_gadget_ep_skip_trbs() local
1508 trb = req->trb + i; in dwc3_gadget_ep_skip_trbs()
1509 trb->ctrl &= ~DWC3_TRB_CTRL_HWO; in dwc3_gadget_ep_skip_trbs()
1557 if (!r->trb) in dwc3_gadget_ep_dequeue()
1595 struct dwc3_trb *trb; in __dwc3_gadget_ep_set_halt() local
1601 trb = dwc3_ep_prev_trb(dep, dep->trb_enqueue); in __dwc3_gadget_ep_set_halt()
1603 trb = &dwc->ep0_trb[dep->trb_enqueue]; in __dwc3_gadget_ep_set_halt()
1605 transfer_in_flight = trb->ctrl & DWC3_TRB_CTRL_HWO; in __dwc3_gadget_ep_set_halt()
2367 struct dwc3_request *req, struct dwc3_trb *trb, in dwc3_gadget_ep_reclaim_completed_trb() argument
2374 trace_dwc3_complete_trb(dep, trb); in dwc3_gadget_ep_reclaim_completed_trb()
2387 if (chain && (trb->ctrl & DWC3_TRB_CTRL_HWO)) in dwc3_gadget_ep_reclaim_completed_trb()
2388 trb->ctrl &= ~DWC3_TRB_CTRL_HWO; in dwc3_gadget_ep_reclaim_completed_trb()
2395 (trb->ctrl & DWC3_TRBCTL_ISOCHRONOUS_FIRST)) { in dwc3_gadget_ep_reclaim_completed_trb()
2398 frame_number = DWC3_TRB_CTRL_GET_SID_SOFN(trb->ctrl); in dwc3_gadget_ep_reclaim_completed_trb()
2409 if (req->needs_extra_trb && !(trb->ctrl & DWC3_TRB_CTRL_CHN)) { in dwc3_gadget_ep_reclaim_completed_trb()
2410 trb->ctrl &= ~DWC3_TRB_CTRL_HWO; in dwc3_gadget_ep_reclaim_completed_trb()
2414 count = trb->size & DWC3_TRB_SIZE_MASK; in dwc3_gadget_ep_reclaim_completed_trb()
2417 if ((trb->ctrl & DWC3_TRB_CTRL_HWO) && status != -ESHUTDOWN) in dwc3_gadget_ep_reclaim_completed_trb()
2433 struct dwc3_trb *trb = &dep->trb_pool[dep->trb_dequeue]; in dwc3_gadget_ep_reclaim_trb_sg() local
2441 trb = &dep->trb_pool[dep->trb_dequeue]; in dwc3_gadget_ep_reclaim_trb_sg()
2443 if (trb->ctrl & DWC3_TRB_CTRL_HWO) in dwc3_gadget_ep_reclaim_trb_sg()
2450 trb, event, status, true); in dwc3_gadget_ep_reclaim_trb_sg()
2462 struct dwc3_trb *trb = &dep->trb_pool[dep->trb_dequeue]; in dwc3_gadget_ep_reclaim_trb_linear() local
2464 return dwc3_gadget_ep_reclaim_completed_trb(dep, req, trb, in dwc3_gadget_ep_reclaim_trb_linear()