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()
952 struct cdns3_trb *trb) in cdns3_wa1_update_guard() argument
964 priv_ep->wa1_trb = trb; in cdns3_wa1_update_guard()
991 struct cdns3_trb *trb; in cdns3_ep_run_stream_transfer() local
1011 trb = priv_ep->trb_pool + priv_ep->enqueue; in cdns3_ep_run_stream_transfer()
1014 priv_req->trb = trb; in cdns3_ep_run_stream_transfer()
1022 trb->buffer = cpu_to_le32(TRB_BUFFER(trb_dma)); in cdns3_ep_run_stream_transfer()
1025 trb->buffer = cpu_to_le32(TRB_BUFFER(request->sg[sg_idx].dma_address)); in cdns3_ep_run_stream_transfer()
1031 trb->length = cpu_to_le32(TRB_BURST_LEN(16) | TRB_LEN(length)); in cdns3_ep_run_stream_transfer()
1040 trb->length |= cpu_to_le32(TRB_TDL_SS_SIZE(tdl)); in cdns3_ep_run_stream_transfer()
1044 trb->control = cpu_to_le32(control); in cdns3_ep_run_stream_transfer()
1046 trace_cdns3_prepare_trb(priv_ep, priv_req->trb); in cdns3_ep_run_stream_transfer()
1116 struct cdns3_trb *trb; in cdns3_ep_run_transfer() local
1150 trb = priv_ep->trb_pool + priv_ep->enqueue; in cdns3_ep_run_transfer()
1152 priv_req->trb = trb; in cdns3_ep_run_transfer()
1189 togle_pcs = cdns3_wa1_update_guard(priv_ep, trb); in cdns3_ep_run_transfer()
1196 trb->length = 0; in cdns3_ep_run_transfer()
1203 trb->length = TRB_TDL_SS_SIZE(td_size); in cdns3_ep_run_transfer()
1214 trb->buffer = cpu_to_le32(TRB_BUFFER(sg_dma_address(s))); in cdns3_ep_run_transfer()
1217 trb->buffer = cpu_to_le32(TRB_BUFFER(trb_dma)); in cdns3_ep_run_transfer()
1225 trb->length |= cpu_to_le32(TRB_BURST_LEN(priv_ep->trb_burst_size) | in cdns3_ep_run_transfer()
1245 trb->control = cpu_to_le32(control); in cdns3_ep_run_transfer()
1247 priv_req->trb->control = cpu_to_le32(control); in cdns3_ep_run_transfer()
1250 trb->control |= TRB_ISP; in cdns3_ep_run_transfer()
1253 trb->control |= TRB_CHAIN; in cdns3_ep_run_transfer()
1262 trb = priv_ep->trb_pool + priv_ep->enqueue; in cdns3_ep_run_transfer()
1263 trb->length = 0; in cdns3_ep_run_transfer()
1266 trb = priv_req->trb; in cdns3_ep_run_transfer()
1272 trb->control |= cpu_to_le32(TRB_IOC | TRB_ISP); in cdns3_ep_run_transfer()
1298 trb->control = trb->control ^ cpu_to_le32(1); in cdns3_ep_run_transfer()
1307 trace_cdns3_prepare_trb(priv_ep, trb + i); in cdns3_ep_run_transfer()
1308 if (trb + i == link_trb) { in cdns3_ep_run_transfer()
1309 trb = priv_ep->trb_pool; in cdns3_ep_run_transfer()
1317 trace_cdns3_prepare_trb(priv_ep, priv_req->trb); in cdns3_ep_run_transfer()
1434 struct cdns3_trb *trb; in cdns3_trb_handled() local
1460 trb = &priv_ep->trb_pool[priv_ep->dequeue]; in cdns3_trb_handled()
1462 if ((le32_to_cpu(trb->control) & TRB_CYCLE) != priv_ep->ccs) in cdns3_trb_handled()
1498 struct cdns3_trb *trb; in cdns3_transfer_completed() local
1506 trb = priv_ep->trb_pool + priv_ep->dequeue; in cdns3_transfer_completed()
1509 while (TRB_FIELD_TO_TYPE(le32_to_cpu(trb->control)) == TRB_LINK) { in cdns3_transfer_completed()
1510 trace_cdns3_complete_trb(priv_ep, trb); in cdns3_transfer_completed()
1512 trb = priv_ep->trb_pool + priv_ep->dequeue; in cdns3_transfer_completed()
1526 trb = priv_ep->trb_pool + priv_ep->dequeue; in cdns3_transfer_completed()
1527 trace_cdns3_complete_trb(priv_ep, trb); in cdns3_transfer_completed()
1531 TRB_LEN(le32_to_cpu(trb->length)); in cdns3_transfer_completed()
1534 le32_to_cpu(trb->control) & TRB_SMM && in cdns3_transfer_completed()
1535 le32_to_cpu(trb->control) & TRB_CHAIN) in cdns3_transfer_completed()
1558 trb = priv_ep->trb_pool; in cdns3_transfer_completed()
1559 trace_cdns3_complete_trb(priv_ep, trb); in cdns3_transfer_completed()
1561 if (trb != priv_req->trb) in cdns3_transfer_completed()
1564 priv_req->trb, trb); in cdns3_transfer_completed()
1566 request->actual += TRB_LEN(le32_to_cpu(trb->length)); in cdns3_transfer_completed()
2645 link_trb = priv_req->trb; in cdns3_gadget_ep_dequeue()
2654 if (priv_ep->wa1_trb == priv_req->trb) in cdns3_gadget_ep_dequeue()
2696 struct cdns3_trb *trb = NULL; in __cdns3_gadget_ep_clear_halt() local
2706 trb = priv_req->trb; in __cdns3_gadget_ep_clear_halt()
2707 if (trb) { in __cdns3_gadget_ep_clear_halt()
2708 trb_tmp = *trb; in __cdns3_gadget_ep_clear_halt()
2709 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 = trb_tmp; in __cdns3_gadget_ep_clear_halt()