Lines Matching refs:td
73 struct usb_td __iomem *td, in next_bd() argument
79 return ++td; in next_bd()
152 struct usb_td __iomem *td; in fhci_create_ep() local
168 ep_mem_size = ring_len * sizeof(*td) + sizeof(struct fhci_ep_pram); in fhci_create_ep()
203 ep->ep_pram_ptr = (void __iomem *)ep->td_base + sizeof(*td) * ring_len; in fhci_create_ep()
211 td = ep->td_base; in fhci_create_ep()
213 out_be32(&td->buf_ptr, 0); in fhci_create_ep()
214 out_be16(&td->status, 0); in fhci_create_ep()
215 out_be16(&td->length, 0); in fhci_create_ep()
216 out_be16(&td->extra, 0); in fhci_create_ep()
217 td++; in fhci_create_ep()
219 td--; in fhci_create_ep()
220 out_be16(&td->status, TD_W); /* for last TD set Wrap bit */ in fhci_create_ep()
221 out_be16(&td->length, 0); in fhci_create_ep()
281 struct usb_td __iomem *td; in fhci_td_transaction_confirm() local
293 td = ep->conf_td; in fhci_td_transaction_confirm()
294 td_status = in_be16(&td->status); in fhci_td_transaction_confirm()
295 td_length = in_be16(&td->length); in fhci_td_transaction_confirm()
296 buf = in_be32(&td->buf_ptr); in fhci_td_transaction_confirm()
297 extra_data = in_be16(&td->extra); in fhci_td_transaction_confirm()
307 clrbits16(&td->status, ~TD_W); in fhci_td_transaction_confirm()
308 out_be16(&td->length, 0); in fhci_td_transaction_confirm()
309 out_be32(&td->buf_ptr, 0); in fhci_td_transaction_confirm()
310 out_be16(&td->extra, 0); in fhci_td_transaction_confirm()
386 struct usb_td __iomem *td; in fhci_host_transaction() local
392 td = ep->empty_td; in fhci_host_transaction()
393 td_status = in_be16(&td->status); in fhci_host_transaction()
395 if (td_status & TD_R && in_be16(&td->length)) { in fhci_host_transaction()
404 pkt->priv_data = td; in fhci_host_transaction()
405 out_be32(&td->buf_ptr, virt_to_phys(pkt->data)); in fhci_host_transaction()
421 out_be16(&td->extra, extra_data); in fhci_host_transaction()
450 out_be16(&td->status, td_status); in fhci_host_transaction()
454 out_be16(&td->length, pkt->len + CRC_SIZE); in fhci_host_transaction()
456 out_be16(&td->length, pkt->len); in fhci_host_transaction()
471 struct usb_td __iomem *td; in fhci_flush_bds() local
474 td = ep->td_base; in fhci_flush_bds()
476 td_status = in_be16(&td->status); in fhci_flush_bds()
477 in_be32(&td->buf_ptr); in fhci_flush_bds()
478 in_be16(&td->extra); in fhci_flush_bds()
482 out_be16(&td->status, (td_status & ~TD_R) | TD_TO); in fhci_flush_bds()
484 else if (in_be32(&td->buf_ptr) == DUMMY_BD_BUFFER) in fhci_flush_bds()
485 out_be32(&td->buf_ptr, DUMMY2_BD_BUFFER); in fhci_flush_bds()
490 td++; in fhci_flush_bds()
495 td = ep->td_base; in fhci_flush_bds()
497 out_be16(&td->status, 0); in fhci_flush_bds()
498 out_be16(&td->length, 0); in fhci_flush_bds()
499 out_be32(&td->buf_ptr, 0); in fhci_flush_bds()
500 out_be16(&td->extra, 0); in fhci_flush_bds()
501 td++; in fhci_flush_bds()
502 } while (!(in_be16(&td->status) & TD_W)); in fhci_flush_bds()
503 out_be16(&td->status, TD_W); /* for last TD set Wrap bit */ in fhci_flush_bds()
504 out_be16(&td->length, 0); in fhci_flush_bds()
505 out_be32(&td->buf_ptr, 0); in fhci_flush_bds()
506 out_be16(&td->extra, 0); in fhci_flush_bds()
527 struct usb_td __iomem *td; in fhci_flush_actual_frame() local
535 td = cpm_muram_addr(tb_ptr); in fhci_flush_actual_frame()
536 td_status = in_be16(&td->status); in fhci_flush_actual_frame()
537 buf_ptr = in_be32(&td->buf_ptr); in fhci_flush_actual_frame()
538 in_be16(&td->extra); in fhci_flush_actual_frame()
541 out_be16(&td->status, (td_status & ~TD_R) | TD_TO); in fhci_flush_actual_frame()
543 out_be32(&td->buf_ptr, 0); in fhci_flush_actual_frame()
549 td = next_bd(ep->td_base, td, td_status); in fhci_flush_actual_frame()
550 td_status = in_be16(&td->status); in fhci_flush_actual_frame()
551 buf_ptr = in_be32(&td->buf_ptr); in fhci_flush_actual_frame()
552 in_be16(&td->extra); in fhci_flush_actual_frame()
591 struct usb_td __iomem *td; in fhci_host_transmit_actual_frame() local
595 td = cpm_muram_addr(tb_ptr); in fhci_host_transmit_actual_frame()
597 if (in_be32(&td->buf_ptr) == DUMMY_BD_BUFFER) { in fhci_host_transmit_actual_frame()
598 struct usb_td __iomem *old_td = td; in fhci_host_transmit_actual_frame()
601 td_status = in_be16(&td->status); in fhci_host_transmit_actual_frame()
603 td = next_bd(ep->td_base, td, td_status); in fhci_host_transmit_actual_frame()
604 tb_ptr = cpm_muram_offset(td); in fhci_host_transmit_actual_frame()
608 if (in_be16(&td->status) & TD_R) in fhci_host_transmit_actual_frame()