Lines Matching refs:ptd

52 struct ptd {  struct
281 struct ptd *ptd) in ptd_read() argument
284 ISP_BANK(0) + ptd_offset + slot*sizeof(*ptd)); in ptd_read()
286 bank_reads8(base, ptd_offset + slot*sizeof(*ptd), ISP_BANK(0), in ptd_read()
287 (void *) ptd, sizeof(*ptd)); in ptd_read()
291 struct ptd *ptd) in ptd_write() argument
293 mem_writes8(base, ptd_offset + slot*sizeof(*ptd) + sizeof(ptd->dw0), in ptd_write()
294 &ptd->dw1, 7*sizeof(ptd->dw1)); in ptd_write()
298 mem_writes8(base, ptd_offset + slot*sizeof(*ptd), &ptd->dw0, in ptd_write()
299 sizeof(ptd->dw0)); in ptd_write()
536 struct isp1760_qtd *qtd, struct ptd *ptd) in create_ptd_atl() argument
543 memset(ptd, 0, sizeof(*ptd)); in create_ptd_atl()
552 ptd->dw0 = DW0_VALID_BIT; in create_ptd_atl()
553 ptd->dw0 |= TO_DW0_LENGTH(qtd->length); in create_ptd_atl()
554 ptd->dw0 |= TO_DW0_MAXPACKET(maxpacket); in create_ptd_atl()
555 ptd->dw0 |= TO_DW0_ENDPOINT(usb_pipeendpoint(qtd->urb->pipe)); in create_ptd_atl()
558 ptd->dw1 = usb_pipeendpoint(qtd->urb->pipe) >> 1; in create_ptd_atl()
559 ptd->dw1 |= TO_DW1_DEVICE_ADDR(usb_pipedevice(qtd->urb->pipe)); in create_ptd_atl()
560 ptd->dw1 |= TO_DW1_PID_TOKEN(qtd->packet_type); in create_ptd_atl()
563 ptd->dw1 |= DW1_TRANS_BULK; in create_ptd_atl()
565 ptd->dw1 |= DW1_TRANS_INT; in create_ptd_atl()
570 ptd->dw1 |= DW1_TRANS_SPLIT; in create_ptd_atl()
572 ptd->dw1 |= DW1_SE_USB_LOSPEED; in create_ptd_atl()
574 ptd->dw1 |= TO_DW1_PORT_NUM(qtd->urb->dev->ttport); in create_ptd_atl()
575 ptd->dw1 |= TO_DW1_HUB_NUM(qtd->urb->dev->tt->hub->devnum); in create_ptd_atl()
580 ptd->dw1 |= 2 << 16; in create_ptd_atl()
585 ptd->dw0 |= TO_DW0_MULTI(multi); in create_ptd_atl()
588 ptd->dw3 |= TO_DW3_PING(qh->ping); in create_ptd_atl()
591 ptd->dw2 = 0; in create_ptd_atl()
592 ptd->dw2 |= TO_DW2_DATA_START_ADDR(base_to_chip(qtd->payload_addr)); in create_ptd_atl()
593 ptd->dw2 |= TO_DW2_RL(rl); in create_ptd_atl()
596 ptd->dw3 |= TO_DW3_NAKCOUNT(nak); in create_ptd_atl()
597 ptd->dw3 |= TO_DW3_DATA_TOGGLE(qh->toggle); in create_ptd_atl()
600 ptd->dw3 &= ~TO_DW3_DATA_TOGGLE(1); in create_ptd_atl()
602 ptd->dw3 |= TO_DW3_DATA_TOGGLE(1); in create_ptd_atl()
605 ptd->dw3 |= DW3_ACTIVE_BIT; in create_ptd_atl()
607 ptd->dw3 |= TO_DW3_CERR(ERR_COUNTER); in create_ptd_atl()
611 struct isp1760_qtd *qtd, struct ptd *ptd) in transform_add_int() argument
652 ptd->dw5 = 0xff; /* Execute Complete Split on any uFrame */ in transform_add_int()
658 ptd->dw2 |= period; in transform_add_int()
659 ptd->dw4 = usof; in transform_add_int()
663 struct isp1760_qtd *qtd, struct ptd *ptd) in create_ptd_int() argument
665 create_ptd_atl(qh, qtd, ptd); in create_ptd_int()
666 transform_add_int(qh, qtd, ptd); in create_ptd_int()
722 struct ptd *ptd) in start_bus_transfer() argument
749 ptd_write(hcd->regs, ptd_offset, slot, ptd); in start_bus_transfer()
838 struct ptd ptd; in enqueue_qtds() local
894 create_ptd_int(qh, qtd, &ptd); in enqueue_qtds()
896 create_ptd_atl(qh, qtd, &ptd); in enqueue_qtds()
899 slots, qtd, qh, &ptd); in enqueue_qtds()
979 static int check_int_transfer(struct usb_hcd *hcd, struct ptd *ptd, in check_int_transfer() argument
985 dw4 = ptd->dw4; in check_int_transfer()
991 if (ptd->dw3 & DW3_HALT_BIT) { in check_int_transfer()
1026 static int check_atl_transfer(struct usb_hcd *hcd, struct ptd *ptd, in check_atl_transfer() argument
1029 WARN_ON(!ptd); in check_atl_transfer()
1030 if (ptd->dw3 & DW3_HALT_BIT) { in check_atl_transfer()
1031 if (ptd->dw3 & DW3_BABBLE_BIT) in check_atl_transfer()
1033 else if (FROM_DW3_CERR(ptd->dw3)) in check_atl_transfer()
1035 else if (ptd->dw3 & DW3_ERROR_BIT) in check_atl_transfer()
1050 if ((ptd->dw3 & DW3_ERROR_BIT) && (ptd->dw3 & DW3_ACTIVE_BIT)) { in check_atl_transfer()
1056 if (!FROM_DW3_NAKCOUNT(ptd->dw3) && (ptd->dw3 & DW3_ACTIVE_BIT)) { in check_atl_transfer()
1071 struct ptd ptd; in handle_done_ptds() local
1101 ptd_read(hcd->regs, INT_PTD_OFFSET, slot, &ptd); in handle_done_ptds()
1102 state = check_int_transfer(hcd, &ptd, in handle_done_ptds()
1116 ptd_read(hcd->regs, ATL_PTD_OFFSET, slot, &ptd); in handle_done_ptds()
1117 state = check_atl_transfer(hcd, &ptd, in handle_done_ptds()
1134 FROM_DW3_SCS_NRBYTESTRANSFERRED(ptd.dw3); in handle_done_ptds()
1137 FROM_DW3_NRBYTESTRANSFERRED(ptd.dw3); in handle_done_ptds()
1147 qh->toggle = FROM_DW3_DATA_TOGGLE(ptd.dw3); in handle_done_ptds()
1148 qh->ping = FROM_DW3_PING(ptd.dw3); in handle_done_ptds()
1153 ptd.dw0 |= DW0_VALID_BIT; in handle_done_ptds()
1155 ptd.dw3 &= ~TO_DW3_NAKCOUNT(0xf); in handle_done_ptds()
1156 ptd.dw3 |= TO_DW3_NAKCOUNT(FROM_DW2_RL(ptd.dw2)); in handle_done_ptds()
1157 ptd.dw3 &= ~TO_DW3_CERR(3); in handle_done_ptds()
1158 ptd.dw3 |= TO_DW3_CERR(ERR_COUNTER); in handle_done_ptds()
1159 qh->toggle = FROM_DW3_DATA_TOGGLE(ptd.dw3); in handle_done_ptds()
1160 qh->ping = FROM_DW3_PING(ptd.dw3); in handle_done_ptds()
1191 create_ptd_int(qh, qtd, &ptd); in handle_done_ptds()
1194 create_ptd_atl(qh, qtd, &ptd); in handle_done_ptds()
1198 qh, &ptd); in handle_done_ptds()
1269 struct ptd ptd; in errata2_function() local
1278 ptd_read(hcd->regs, ATL_PTD_OFFSET, slot, &ptd); in errata2_function()
1279 if (!FROM_DW0_VALID(ptd.dw0) && in errata2_function()
1280 !FROM_DW3_ACTIVE(ptd.dw3)) in errata2_function()