Lines Matching refs:trb
186 struct cdns3_trb *trb) in cdns3_trb_virt_to_dma() argument
188 u32 offset = (char *)trb - (char *)priv_ep->trb_pool; in cdns3_trb_virt_to_dma()
965 struct cdns3_trb *trb) in cdns3_wa1_update_guard() argument
977 priv_ep->wa1_trb = trb; in cdns3_wa1_update_guard()
1004 struct cdns3_trb *trb; in cdns3_ep_run_stream_transfer() local
1024 trb = priv_ep->trb_pool + priv_ep->enqueue; in cdns3_ep_run_stream_transfer()
1027 priv_req->trb = trb; in cdns3_ep_run_stream_transfer()
1035 trb->buffer = cpu_to_le32(TRB_BUFFER(trb_dma)); in cdns3_ep_run_stream_transfer()
1038 trb->buffer = cpu_to_le32(TRB_BUFFER(request->sg[sg_idx].dma_address)); in cdns3_ep_run_stream_transfer()
1044 trb->length = cpu_to_le32(TRB_BURST_LEN(16) | TRB_LEN(length)); in cdns3_ep_run_stream_transfer()
1053 trb->length |= cpu_to_le32(TRB_TDL_SS_SIZE(tdl)); in cdns3_ep_run_stream_transfer()
1057 trb->control = cpu_to_le32(control); in cdns3_ep_run_stream_transfer()
1059 trace_cdns3_prepare_trb(priv_ep, priv_req->trb); in cdns3_ep_run_stream_transfer()
1129 struct cdns3_trb *trb; in cdns3_ep_run_transfer() local
1163 trb = priv_ep->trb_pool + priv_ep->enqueue; in cdns3_ep_run_transfer()
1165 priv_req->trb = trb; in cdns3_ep_run_transfer()
1202 togle_pcs = cdns3_wa1_update_guard(priv_ep, trb); in cdns3_ep_run_transfer()
1209 trb->length = 0; in cdns3_ep_run_transfer()
1216 trb->length = TRB_TDL_SS_SIZE(td_size); in cdns3_ep_run_transfer()
1227 trb->buffer = cpu_to_le32(TRB_BUFFER(sg_dma_address(s))); in cdns3_ep_run_transfer()
1230 trb->buffer = cpu_to_le32(TRB_BUFFER(trb_dma)); in cdns3_ep_run_transfer()
1238 trb->length |= cpu_to_le32(TRB_BURST_LEN(priv_ep->trb_burst_size) | in cdns3_ep_run_transfer()
1258 trb->control = cpu_to_le32(control); in cdns3_ep_run_transfer()
1260 priv_req->trb->control = cpu_to_le32(control); in cdns3_ep_run_transfer()
1263 trb->control |= TRB_ISP; in cdns3_ep_run_transfer()
1266 trb->control |= TRB_CHAIN; in cdns3_ep_run_transfer()
1275 trb = priv_ep->trb_pool + priv_ep->enqueue; in cdns3_ep_run_transfer()
1276 trb->length = 0; in cdns3_ep_run_transfer()
1279 trb = priv_req->trb; in cdns3_ep_run_transfer()
1285 trb->control |= cpu_to_le32(TRB_IOC | TRB_ISP); in cdns3_ep_run_transfer()
1311 trb->control = trb->control ^ cpu_to_le32(1); in cdns3_ep_run_transfer()
1320 trace_cdns3_prepare_trb(priv_ep, trb + i); in cdns3_ep_run_transfer()
1321 if (trb + i == link_trb) { in cdns3_ep_run_transfer()
1322 trb = priv_ep->trb_pool; in cdns3_ep_run_transfer()
1330 trace_cdns3_prepare_trb(priv_ep, priv_req->trb); in cdns3_ep_run_transfer()
1447 struct cdns3_trb *trb; in cdns3_trb_handled() local
1473 trb = &priv_ep->trb_pool[priv_ep->dequeue]; in cdns3_trb_handled()
1475 if ((le32_to_cpu(trb->control) & TRB_CYCLE) != priv_ep->ccs) in cdns3_trb_handled()
1511 struct cdns3_trb *trb; in cdns3_transfer_completed() local
1519 trb = priv_ep->trb_pool + priv_ep->dequeue; in cdns3_transfer_completed()
1522 if (TRB_FIELD_TO_TYPE(le32_to_cpu(trb->control)) == TRB_LINK) { in cdns3_transfer_completed()
1523 trace_cdns3_complete_trb(priv_ep, trb); in cdns3_transfer_completed()
1538 trb = priv_ep->trb_pool + priv_ep->dequeue; in cdns3_transfer_completed()
1539 trace_cdns3_complete_trb(priv_ep, trb); in cdns3_transfer_completed()
1543 TRB_LEN(le32_to_cpu(trb->length)); in cdns3_transfer_completed()
1546 le32_to_cpu(trb->control) & TRB_SMM) in cdns3_transfer_completed()
1569 trb = priv_ep->trb_pool; in cdns3_transfer_completed()
1570 trace_cdns3_complete_trb(priv_ep, trb); in cdns3_transfer_completed()
1572 if (trb != priv_req->trb) in cdns3_transfer_completed()
1575 priv_req->trb, trb); in cdns3_transfer_completed()
1577 request->actual += TRB_LEN(le32_to_cpu(trb->length)); in cdns3_transfer_completed()
2648 link_trb = priv_req->trb; in cdns3_gadget_ep_dequeue()
2657 if (priv_ep->wa1_trb == priv_req->trb) in cdns3_gadget_ep_dequeue()
2699 struct cdns3_trb *trb = NULL; in __cdns3_gadget_ep_clear_halt() local
2708 trb = priv_req->trb; in __cdns3_gadget_ep_clear_halt()
2709 if (trb) in __cdns3_gadget_ep_clear_halt()
2710 trb->control = trb->control ^ cpu_to_le32(TRB_CYCLE); in __cdns3_gadget_ep_clear_halt()
2724 if (trb) in __cdns3_gadget_ep_clear_halt()
2725 trb->control = trb->control ^ cpu_to_le32(TRB_CYCLE); in __cdns3_gadget_ep_clear_halt()