Lines Matching refs:ptd
53 struct ptd { struct
282 struct ptd *ptd) in ptd_read() argument
285 ISP_BANK(0) + ptd_offset + slot*sizeof(*ptd)); in ptd_read()
287 bank_reads8(base, ptd_offset + slot*sizeof(*ptd), ISP_BANK(0), in ptd_read()
288 (void *) ptd, sizeof(*ptd)); in ptd_read()
292 struct ptd *ptd) in ptd_write() argument
294 mem_writes8(base, ptd_offset + slot*sizeof(*ptd) + sizeof(ptd->dw0), in ptd_write()
295 &ptd->dw1, 7*sizeof(ptd->dw1)); in ptd_write()
299 mem_writes8(base, ptd_offset + slot*sizeof(*ptd), &ptd->dw0, in ptd_write()
300 sizeof(ptd->dw0)); in ptd_write()
534 struct isp1760_qtd *qtd, struct ptd *ptd) in create_ptd_atl() argument
541 memset(ptd, 0, sizeof(*ptd)); in create_ptd_atl()
550 ptd->dw0 = DW0_VALID_BIT; in create_ptd_atl()
551 ptd->dw0 |= TO_DW0_LENGTH(qtd->length); in create_ptd_atl()
552 ptd->dw0 |= TO_DW0_MAXPACKET(maxpacket); in create_ptd_atl()
553 ptd->dw0 |= TO_DW0_ENDPOINT(usb_pipeendpoint(qtd->urb->pipe)); in create_ptd_atl()
556 ptd->dw1 = usb_pipeendpoint(qtd->urb->pipe) >> 1; in create_ptd_atl()
557 ptd->dw1 |= TO_DW1_DEVICE_ADDR(usb_pipedevice(qtd->urb->pipe)); in create_ptd_atl()
558 ptd->dw1 |= TO_DW1_PID_TOKEN(qtd->packet_type); in create_ptd_atl()
561 ptd->dw1 |= DW1_TRANS_BULK; in create_ptd_atl()
563 ptd->dw1 |= DW1_TRANS_INT; in create_ptd_atl()
568 ptd->dw1 |= DW1_TRANS_SPLIT; in create_ptd_atl()
570 ptd->dw1 |= DW1_SE_USB_LOSPEED; in create_ptd_atl()
572 ptd->dw1 |= TO_DW1_PORT_NUM(qtd->urb->dev->ttport); in create_ptd_atl()
573 ptd->dw1 |= TO_DW1_HUB_NUM(qtd->urb->dev->tt->hub->devnum); in create_ptd_atl()
578 ptd->dw1 |= 2 << 16; in create_ptd_atl()
583 ptd->dw0 |= TO_DW0_MULTI(multi); in create_ptd_atl()
586 ptd->dw3 |= TO_DW3_PING(qh->ping); in create_ptd_atl()
589 ptd->dw2 = 0; in create_ptd_atl()
590 ptd->dw2 |= TO_DW2_DATA_START_ADDR(base_to_chip(qtd->payload_addr)); in create_ptd_atl()
591 ptd->dw2 |= TO_DW2_RL(rl); in create_ptd_atl()
594 ptd->dw3 |= TO_DW3_NAKCOUNT(nak); in create_ptd_atl()
595 ptd->dw3 |= TO_DW3_DATA_TOGGLE(qh->toggle); in create_ptd_atl()
598 ptd->dw3 &= ~TO_DW3_DATA_TOGGLE(1); in create_ptd_atl()
600 ptd->dw3 |= TO_DW3_DATA_TOGGLE(1); in create_ptd_atl()
603 ptd->dw3 |= DW3_ACTIVE_BIT; in create_ptd_atl()
605 ptd->dw3 |= TO_DW3_CERR(ERR_COUNTER); in create_ptd_atl()
609 struct isp1760_qtd *qtd, struct ptd *ptd) in transform_add_int() argument
650 ptd->dw5 = 0xff; /* Execute Complete Split on any uFrame */ in transform_add_int()
656 ptd->dw2 |= period; in transform_add_int()
657 ptd->dw4 = usof; in transform_add_int()
661 struct isp1760_qtd *qtd, struct ptd *ptd) in create_ptd_int() argument
663 create_ptd_atl(qh, qtd, ptd); in create_ptd_int()
664 transform_add_int(qh, qtd, ptd); in create_ptd_int()
720 struct ptd *ptd) in start_bus_transfer() argument
747 ptd_write(hcd->regs, ptd_offset, slot, ptd); in start_bus_transfer()
836 struct ptd ptd; in enqueue_qtds() local
892 create_ptd_int(qh, qtd, &ptd); in enqueue_qtds()
894 create_ptd_atl(qh, qtd, &ptd); in enqueue_qtds()
897 slots, qtd, qh, &ptd); in enqueue_qtds()
977 static int check_int_transfer(struct usb_hcd *hcd, struct ptd *ptd, in check_int_transfer() argument
983 dw4 = ptd->dw4; in check_int_transfer()
989 if (ptd->dw3 & DW3_HALT_BIT) { in check_int_transfer()
1024 static int check_atl_transfer(struct usb_hcd *hcd, struct ptd *ptd, in check_atl_transfer() argument
1027 WARN_ON(!ptd); in check_atl_transfer()
1028 if (ptd->dw3 & DW3_HALT_BIT) { in check_atl_transfer()
1029 if (ptd->dw3 & DW3_BABBLE_BIT) in check_atl_transfer()
1031 else if (FROM_DW3_CERR(ptd->dw3)) in check_atl_transfer()
1046 if ((ptd->dw3 & DW3_ERROR_BIT) && (ptd->dw3 & DW3_ACTIVE_BIT)) { in check_atl_transfer()
1052 if (!FROM_DW3_NAKCOUNT(ptd->dw3) && (ptd->dw3 & DW3_ACTIVE_BIT)) { in check_atl_transfer()
1067 struct ptd ptd; in handle_done_ptds() local
1097 ptd_read(hcd->regs, INT_PTD_OFFSET, slot, &ptd); in handle_done_ptds()
1098 state = check_int_transfer(hcd, &ptd, in handle_done_ptds()
1112 ptd_read(hcd->regs, ATL_PTD_OFFSET, slot, &ptd); in handle_done_ptds()
1113 state = check_atl_transfer(hcd, &ptd, in handle_done_ptds()
1130 FROM_DW3_SCS_NRBYTESTRANSFERRED(ptd.dw3); in handle_done_ptds()
1133 FROM_DW3_NRBYTESTRANSFERRED(ptd.dw3); in handle_done_ptds()
1143 qh->toggle = FROM_DW3_DATA_TOGGLE(ptd.dw3); in handle_done_ptds()
1144 qh->ping = FROM_DW3_PING(ptd.dw3); in handle_done_ptds()
1149 ptd.dw0 |= DW0_VALID_BIT; in handle_done_ptds()
1151 ptd.dw3 &= ~TO_DW3_NAKCOUNT(0xf); in handle_done_ptds()
1152 ptd.dw3 |= TO_DW3_NAKCOUNT(FROM_DW2_RL(ptd.dw2)); in handle_done_ptds()
1153 ptd.dw3 &= ~TO_DW3_CERR(3); in handle_done_ptds()
1154 ptd.dw3 |= TO_DW3_CERR(ERR_COUNTER); in handle_done_ptds()
1155 qh->toggle = FROM_DW3_DATA_TOGGLE(ptd.dw3); in handle_done_ptds()
1156 qh->ping = FROM_DW3_PING(ptd.dw3); in handle_done_ptds()
1187 create_ptd_int(qh, qtd, &ptd); in handle_done_ptds()
1190 create_ptd_atl(qh, qtd, &ptd); in handle_done_ptds()
1194 qh, &ptd); in handle_done_ptds()
1265 struct ptd ptd; in errata2_function() local
1274 ptd_read(hcd->regs, ATL_PTD_OFFSET, slot, &ptd); in errata2_function()
1275 if (!FROM_DW0_VALID(ptd.dw0) && in errata2_function()
1276 !FROM_DW3_ACTIVE(ptd.dw3)) in errata2_function()