Home
last modified time | relevance | path

Searched refs:trb (Results 1 – 22 of 22) sorted by relevance

/linux/drivers/usb/cdns3/
H A Dcdns3-debug.h113 struct cdns3_trb *trb; in cdns3_dbg_ring() local
120 trb = &priv_ep->trb_pool[priv_ep->dequeue]; in cdns3_dbg_ring()
125 priv_ep->dequeue, trb, in cdns3_dbg_ring()
126 (unsigned long long)cdns3_trb_virt_to_dma(priv_ep, trb)); in cdns3_dbg_ring()
128 trb = &priv_ep->trb_pool[priv_ep->enqueue]; in cdns3_dbg_ring()
131 priv_ep->enqueue, trb, in cdns3_dbg_ring()
132 (unsigned long long)cdns3_trb_virt_to_dma(priv_ep, trb)); in cdns3_dbg_ring()
145 trb = &priv_ep->trb_pool[i]; in cdns3_dbg_ring()
148 le32_to_cpu(trb->buffer), in cdns3_dbg_ring()
149 le32_to_cpu(trb->length), in cdns3_dbg_ring()
[all …]
H A Dcdns3-gadget.c188 struct cdns3_trb *trb) in cdns3_trb_virt_to_dma() argument
190 u32 offset = (char *)trb - (char *)priv_ep->trb_pool; in cdns3_trb_virt_to_dma()
957 struct cdns3_trb *trb) in cdns3_wa1_update_guard() argument
969 priv_ep->wa1_trb = trb; in cdns3_wa1_update_guard()
996 struct cdns3_trb *trb; in cdns3_ep_run_stream_transfer() local
1016 trb = priv_ep->trb_pool + priv_ep->enqueue; in cdns3_ep_run_stream_transfer()
1019 priv_req->trb = trb; in cdns3_ep_run_stream_transfer()
1027 trb->buffer = cpu_to_le32(TRB_BUFFER(trb_dma)); in cdns3_ep_run_stream_transfer()
1030 trb->buffer = cpu_to_le32(TRB_BUFFER(request->sg[sg_idx].dma_address)); in cdns3_ep_run_stream_transfer()
1036 trb->length = cpu_to_le32(TRB_BURST_LEN(16) | TRB_LEN(length)); in cdns3_ep_run_stream_transfer()
[all …]
H A Dcdnsp-ring.c72 union cdnsp_trb *trb) in cdnsp_trb_virt_to_dma() argument
74 unsigned long segment_offset = trb - seg->trbs; in cdnsp_trb_virt_to_dma()
76 if (trb < seg->trbs || segment_offset >= TRBS_PER_SEGMENT) in cdnsp_trb_virt_to_dma()
79 return seg->dma + (segment_offset * sizeof(*trb)); in cdnsp_trb_virt_to_dma()
82 static bool cdnsp_trb_is_noop(union cdnsp_trb *trb) in cdnsp_trb_is_noop() argument
84 return TRB_TYPE_NOOP_LE32(trb->generic.field[3]); in cdnsp_trb_is_noop()
87 static bool cdnsp_trb_is_link(union cdnsp_trb *trb) in cdnsp_trb_is_link() argument
89 return TRB_TYPE_LINK_LE32(trb->link.control); in cdnsp_trb_is_link()
92 bool cdnsp_last_trb_on_seg(struct cdnsp_segment *seg, union cdnsp_trb *trb) in cdnsp_last_trb_on_seg() argument
94 return trb == &seg->trbs[TRBS_PER_SEGMENT - 1]; in cdnsp_last_trb_on_seg()
[all …]
H A Dcdnsp-gadget.h1517 union cdnsp_trb *trb);
1518 bool cdnsp_last_trb_on_seg(struct cdnsp_segment *seg, union cdnsp_trb *trb);
1521 union cdnsp_trb *trb);
H A Dcdns3-gadget.h1235 struct cdns3_trb *trb; member
1346 struct cdns3_trb *trb);
/linux/drivers/usb/gadget/udc/cdns2/
H A Dcdns2-debug.h103 struct cdns2_trb *trb; in cdns2_raw_ring() local
110 trb = &trbs[ring->dequeue]; in cdns2_raw_ring()
111 dma = cdns2_trb_virt_to_dma(pep, trb); in cdns2_raw_ring()
114 ring->dequeue, trb, &dma); in cdns2_raw_ring()
116 trb = &trbs[ring->enqueue]; in cdns2_raw_ring()
117 dma = cdns2_trb_virt_to_dma(pep, trb); in cdns2_raw_ring()
120 ring->enqueue, trb, &dma); in cdns2_raw_ring()
134 trb = &trbs[i]; in cdns2_raw_ring()
137 le32_to_cpu(trb->buffer), in cdns2_raw_ring()
138 le32_to_cpu(trb->length), in cdns2_raw_ring()
[all …]
H A Dcdns2-gadget.c100 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()
[all …]
H A Dcdns2-gadget.h601 struct cdns2_trb *trb; member
692 struct cdns2_trb *trb);
/linux/drivers/usb/host/
H A Dxhci-trace.h111 TP_PROTO(struct xhci_ring *ring, struct xhci_generic_trb *trb),
112 TP_ARGS(ring, trb),
122 __entry->field0 = le32_to_cpu(trb->field[0]);
123 __entry->field1 = le32_to_cpu(trb->field[1]);
124 __entry->field2 = le32_to_cpu(trb->field[2]);
125 __entry->field3 = le32_to_cpu(trb->field[3]);
134 TP_PROTO(struct xhci_ring *ring, struct xhci_generic_trb *trb),
135 TP_ARGS(ring, trb)
139 TP_PROTO(struct xhci_ring *ring, struct xhci_generic_trb *trb),
140 TP_ARGS(ring, trb)
[all …]
H A Dxhci-dbgcap.c158 req->trb = NULL; in xhci_dbc_giveback()
176 static void trb_to_noop(union xhci_trb *trb) in trb_to_noop() argument
178 trb->generic.field[0] = 0; in trb_to_noop()
179 trb->generic.field[1] = 0; in trb_to_noop()
180 trb->generic.field[2] = 0; in trb_to_noop()
181 trb->generic.field[3] &= cpu_to_le32(TRB_CYCLE); in trb_to_noop()
182 trb->generic.field[3] |= cpu_to_le32(TRB_TYPE(TRB_TR_NOOP)); in trb_to_noop()
187 trb_to_noop(req->trb); in xhci_dbc_flush_single_request()
243 union xhci_trb *trb, *next; in xhci_dbc_queue_trb() local
245 trb = ring->enqueue; in xhci_dbc_queue_trb()
[all …]
H A Dxhci-ring.c70 union xhci_trb *trb) in xhci_trb_virt_to_dma() argument
74 if (!seg || !trb || trb < seg->trbs) in xhci_trb_virt_to_dma()
77 segment_offset = trb - seg->trbs; in xhci_trb_virt_to_dma()
80 return seg->dma + (segment_offset * sizeof(*trb)); in xhci_trb_virt_to_dma()
83 static bool trb_is_noop(union xhci_trb *trb) in trb_is_noop() argument
85 return TRB_TYPE_NOOP_LE32(trb->generic.field[3]); in trb_is_noop()
88 static bool trb_is_link(union xhci_trb *trb) in trb_is_link() argument
90 return TRB_TYPE_LINK_LE32(trb->link.control); in trb_is_link()
93 static bool last_trb_on_seg(struct xhci_segment *seg, union xhci_trb *trb) in last_trb_on_seg() argument
95 return trb == &seg->trbs[TRBS_PER_SEGMENT - 1]; in last_trb_on_seg()
[all …]
H A Dxhci-debugfs.c201 union xhci_trb *trb; in xhci_ring_dump_segment() local
205 trb = &seg->trbs[i]; in xhci_ring_dump_segment()
206 dma = seg->dma + i * sizeof(*trb); in xhci_ring_dump_segment()
208 xhci_decode_trb(str, XHCI_MSG_MAX, le32_to_cpu(trb->generic.field[0]), in xhci_ring_dump_segment()
209 le32_to_cpu(trb->generic.field[1]), in xhci_ring_dump_segment()
210 le32_to_cpu(trb->generic.field[2]), in xhci_ring_dump_segment()
211 le32_to_cpu(trb->generic.field[3]))); in xhci_ring_dump_segment()
H A Dxhci-dbgcap.h165 union xhci_trb *trb; member
H A Dxhci.h1875 dma_addr_t xhci_trb_virt_to_dma(struct xhci_segment *seg, union xhci_trb *trb);
/linux/drivers/usb/dwc3/
H A Dep0.c39 struct dwc3_trb *trb; in dwc3_ep0_prepare_one_trb() local
43 trb = &dwc->ep0_trb[dep->trb_enqueue]; in dwc3_ep0_prepare_one_trb()
48 trb->bpl = lower_32_bits(buf_dma); in dwc3_ep0_prepare_one_trb()
49 trb->bph = upper_32_bits(buf_dma); in dwc3_ep0_prepare_one_trb()
50 trb->size = len; in dwc3_ep0_prepare_one_trb()
51 trb->ctrl = type; in dwc3_ep0_prepare_one_trb()
53 trb->ctrl |= (DWC3_TRB_CTRL_HWO in dwc3_ep0_prepare_one_trb()
57 trb->ctrl |= DWC3_TRB_CTRL_CHN; in dwc3_ep0_prepare_one_trb()
59 trb->ctrl |= (DWC3_TRB_CTRL_IOC in dwc3_ep0_prepare_one_trb()
62 trace_dwc3_prepare_trb(dep, trb); in dwc3_ep0_prepare_one_trb()
[all …]
H A Dgadget.c206 if (req->trb) in dwc3_gadget_del_and_unmap_request()
210 req->trb = NULL; in dwc3_gadget_del_and_unmap_request()
479 struct dwc3_trb *trb) in dwc3_trb_dma_offset() argument
481 u32 offset = (char *) trb - (char *) dep->trb_pool; in dwc3_trb_dma_offset()
913 struct dwc3_trb *trb; in __dwc3_gadget_ep_enable() local
918 trb = &dep->trb_pool[0]; in __dwc3_gadget_ep_enable()
919 trb_dma = dwc3_trb_dma_offset(dep, trb); in __dwc3_gadget_ep_enable()
1214 struct dwc3_trb *trb; in dwc3_prepare_one_trb() local
1231 trb = &dep->trb_pool[dep->trb_enqueue]; in dwc3_prepare_one_trb()
1233 if (!req->trb) { in dwc3_prepare_one_trb()
[all …]
H A Ddebugfs.c910 struct dwc3_trb *trb = &dep->trb_pool[i]; in dwc3_trb_ring_show() local
911 unsigned int type = DWC3_TRBCTL_TYPE(trb->ctrl); in dwc3_trb_ring_show()
914 trb->bph, trb->bpl, trb->size, in dwc3_trb_ring_show()
916 !!(trb->ctrl & DWC3_TRB_CTRL_IOC), in dwc3_trb_ring_show()
917 !!(trb->ctrl & DWC3_TRB_CTRL_ISP_IMI), in dwc3_trb_ring_show()
918 !!(trb->ctrl & DWC3_TRB_CTRL_CSP), in dwc3_trb_ring_show()
919 !!(trb->ctrl & DWC3_TRB_CTRL_CHN), in dwc3_trb_ring_show()
920 !!(trb->ctrl & DWC3_TRB_CTRL_LST), in dwc3_trb_ring_show()
921 !!(trb->ctrl & DWC3_TRB_CTRL_HWO), in dwc3_trb_ring_show()
H A Dcore.h976 struct dwc3_trb *trb; member
/linux/drivers/usb/gadget/udc/
H A Dtegra-xudc.c336 static inline u32 trb_read_##name(struct tegra_xudc_trb *trb) \
338 return (le32_to_cpu(trb->member) >> (shift)) & (mask); \
341 trb_write_##name(struct tegra_xudc_trb *trb, u32 val) \
345 tmp = le32_to_cpu(trb->member) & ~((mask) << (shift)); \
347 trb->member = cpu_to_le32(tmp); \
369 static inline u64 trb_read_data_ptr(struct tegra_xudc_trb *trb) in trb_read_data_ptr() argument
371 return ((u64)trb_read_data_hi(trb) << 32) | in trb_read_data_ptr()
372 trb_read_data_lo(trb); in trb_read_data_ptr()
375 static inline void trb_write_data_ptr(struct tegra_xudc_trb *trb, u64 addr) in trb_write_data_ptr() argument
377 trb_write_data_lo(trb, lower_32_bits(addr)); in trb_write_data_ptr()
[all …]
/linux/drivers/usb/early/
H A Dxhci-dbc.c392 struct xdbc_trb *trb, *link_trb; in xdbc_queue_trb() local
394 trb = ring->enqueue; in xdbc_queue_trb()
395 trb->field[0] = cpu_to_le32(field1); in xdbc_queue_trb()
396 trb->field[1] = cpu_to_le32(field2); in xdbc_queue_trb()
397 trb->field[2] = cpu_to_le32(field3); in xdbc_queue_trb()
398 trb->field[3] = cpu_to_le32(field4); in xdbc_queue_trb()
467 struct xdbc_trb *trb; in xdbc_bulk_transfer() local
487 trb = ring->enqueue; in xdbc_bulk_transfer()
515 trb->field[3] |= cpu_to_le32(cycle); in xdbc_bulk_transfer()
517 trb->field[3] &= cpu_to_le32(~TRB_CYCLE); in xdbc_bulk_transfer()
/linux/Documentation/driver-api/usb/
H A Ddwc3.rst50 5. Up to 256 TRBs [#trb]_ per endpoint
85 According to Synopsys Databook, all OUT transfer TRBs [#trb]_ must
103 We, currently, have a hard limit of 256 TRBs [#trb]_ per endpoint,
631 TP_printk("%s: %d/%d trb %p buf %08x%08x size %s%d ctrl %08x (%c%c%c%c:%c%c:%s)",
633 __entry->trb, __entry->bph, __entry->bpl,
703 .. [#trb] Transfer Request Block
/linux/drivers/net/wireless/mediatek/mt76/mt7915/
H A Dmac.c1942 u32 trb; in mt7915_mac_severe_check() local
1951 trb = mt76_rr(dev, MT_TRB_RXPSR0(phy->mt76->band_idx)); in mt7915_mac_severe_check()
1953 if ((FIELD_GET(MT_TRB_RXPSR0_RX_RMAC_PTR, trb) != in mt7915_mac_severe_check()
1954 FIELD_GET(MT_TRB_RXPSR0_RX_WTBL_PTR, trb)) && in mt7915_mac_severe_check()
1957 trb == phy->trb_ts) in mt7915_mac_severe_check()
1961 phy->trb_ts = trb; in mt7915_mac_severe_check()