Lines Matching refs:ptd

51 struct ptd {  struct
280 struct ptd *ptd) in ptd_read() argument
283 ISP_BANK(0) + ptd_offset + slot*sizeof(*ptd)); in ptd_read()
285 bank_reads8(base, ptd_offset + slot*sizeof(*ptd), ISP_BANK(0), in ptd_read()
286 (void *) ptd, sizeof(*ptd)); in ptd_read()
290 struct ptd *ptd) in ptd_write() argument
292 mem_writes8(base, ptd_offset + slot*sizeof(*ptd) + sizeof(ptd->dw0), in ptd_write()
293 &ptd->dw1, 7*sizeof(ptd->dw1)); in ptd_write()
297 mem_writes8(base, ptd_offset + slot*sizeof(*ptd), &ptd->dw0, in ptd_write()
298 sizeof(ptd->dw0)); in ptd_write()
537 struct isp1760_qtd *qtd, struct ptd *ptd) in create_ptd_atl() argument
544 memset(ptd, 0, sizeof(*ptd)); in create_ptd_atl()
553 ptd->dw0 = DW0_VALID_BIT; in create_ptd_atl()
554 ptd->dw0 |= TO_DW0_LENGTH(qtd->length); in create_ptd_atl()
555 ptd->dw0 |= TO_DW0_MAXPACKET(maxpacket); in create_ptd_atl()
556 ptd->dw0 |= TO_DW0_ENDPOINT(usb_pipeendpoint(qtd->urb->pipe)); in create_ptd_atl()
559 ptd->dw1 = usb_pipeendpoint(qtd->urb->pipe) >> 1; in create_ptd_atl()
560 ptd->dw1 |= TO_DW1_DEVICE_ADDR(usb_pipedevice(qtd->urb->pipe)); in create_ptd_atl()
561 ptd->dw1 |= TO_DW1_PID_TOKEN(qtd->packet_type); in create_ptd_atl()
564 ptd->dw1 |= DW1_TRANS_BULK; in create_ptd_atl()
566 ptd->dw1 |= DW1_TRANS_INT; in create_ptd_atl()
571 ptd->dw1 |= DW1_TRANS_SPLIT; in create_ptd_atl()
573 ptd->dw1 |= DW1_SE_USB_LOSPEED; in create_ptd_atl()
575 ptd->dw1 |= TO_DW1_PORT_NUM(qtd->urb->dev->ttport); in create_ptd_atl()
576 ptd->dw1 |= TO_DW1_HUB_NUM(qtd->urb->dev->tt->hub->devnum); in create_ptd_atl()
581 ptd->dw1 |= 2 << 16; in create_ptd_atl()
586 ptd->dw0 |= TO_DW0_MULTI(multi); in create_ptd_atl()
589 ptd->dw3 |= TO_DW3_PING(qh->ping); in create_ptd_atl()
592 ptd->dw2 = 0; in create_ptd_atl()
593 ptd->dw2 |= TO_DW2_DATA_START_ADDR(base_to_chip(qtd->payload_addr)); in create_ptd_atl()
594 ptd->dw2 |= TO_DW2_RL(rl); in create_ptd_atl()
597 ptd->dw3 |= TO_DW3_NAKCOUNT(nak); in create_ptd_atl()
598 ptd->dw3 |= TO_DW3_DATA_TOGGLE(qh->toggle); in create_ptd_atl()
601 ptd->dw3 &= ~TO_DW3_DATA_TOGGLE(1); in create_ptd_atl()
603 ptd->dw3 |= TO_DW3_DATA_TOGGLE(1); in create_ptd_atl()
606 ptd->dw3 |= DW3_ACTIVE_BIT; in create_ptd_atl()
608 ptd->dw3 |= TO_DW3_CERR(ERR_COUNTER); in create_ptd_atl()
612 struct isp1760_qtd *qtd, struct ptd *ptd) in transform_add_int() argument
653 ptd->dw5 = 0xff; /* Execute Complete Split on any uFrame */ in transform_add_int()
659 ptd->dw2 |= period; in transform_add_int()
660 ptd->dw4 = usof; in transform_add_int()
664 struct isp1760_qtd *qtd, struct ptd *ptd) in create_ptd_int() argument
666 create_ptd_atl(qh, qtd, ptd); in create_ptd_int()
667 transform_add_int(qh, qtd, ptd); in create_ptd_int()
723 struct ptd *ptd) in start_bus_transfer() argument
750 ptd_write(hcd->regs, ptd_offset, slot, ptd); in start_bus_transfer()
839 struct ptd ptd; in enqueue_qtds() local
895 create_ptd_int(qh, qtd, &ptd); in enqueue_qtds()
897 create_ptd_atl(qh, qtd, &ptd); in enqueue_qtds()
900 slots, qtd, qh, &ptd); in enqueue_qtds()
980 static int check_int_transfer(struct usb_hcd *hcd, struct ptd *ptd, in check_int_transfer() argument
986 dw4 = ptd->dw4; in check_int_transfer()
992 if (ptd->dw3 & DW3_HALT_BIT) { in check_int_transfer()
1027 static int check_atl_transfer(struct usb_hcd *hcd, struct ptd *ptd, in check_atl_transfer() argument
1030 WARN_ON(!ptd); in check_atl_transfer()
1031 if (ptd->dw3 & DW3_HALT_BIT) { in check_atl_transfer()
1032 if (ptd->dw3 & DW3_BABBLE_BIT) in check_atl_transfer()
1034 else if (FROM_DW3_CERR(ptd->dw3)) in check_atl_transfer()
1036 else if (ptd->dw3 & DW3_ERROR_BIT) in check_atl_transfer()
1051 if ((ptd->dw3 & DW3_ERROR_BIT) && (ptd->dw3 & DW3_ACTIVE_BIT)) { in check_atl_transfer()
1057 if (!FROM_DW3_NAKCOUNT(ptd->dw3) && (ptd->dw3 & DW3_ACTIVE_BIT)) { in check_atl_transfer()
1072 struct ptd ptd; in handle_done_ptds() local
1102 ptd_read(hcd->regs, INT_PTD_OFFSET, slot, &ptd); in handle_done_ptds()
1103 state = check_int_transfer(hcd, &ptd, in handle_done_ptds()
1117 ptd_read(hcd->regs, ATL_PTD_OFFSET, slot, &ptd); in handle_done_ptds()
1118 state = check_atl_transfer(hcd, &ptd, in handle_done_ptds()
1135 FROM_DW3_SCS_NRBYTESTRANSFERRED(ptd.dw3); in handle_done_ptds()
1138 FROM_DW3_NRBYTESTRANSFERRED(ptd.dw3); in handle_done_ptds()
1148 qh->toggle = FROM_DW3_DATA_TOGGLE(ptd.dw3); in handle_done_ptds()
1149 qh->ping = FROM_DW3_PING(ptd.dw3); in handle_done_ptds()
1154 ptd.dw0 |= DW0_VALID_BIT; in handle_done_ptds()
1156 ptd.dw3 &= ~TO_DW3_NAKCOUNT(0xf); in handle_done_ptds()
1157 ptd.dw3 |= TO_DW3_NAKCOUNT(FROM_DW2_RL(ptd.dw2)); in handle_done_ptds()
1158 ptd.dw3 &= ~TO_DW3_CERR(3); in handle_done_ptds()
1159 ptd.dw3 |= TO_DW3_CERR(ERR_COUNTER); in handle_done_ptds()
1160 qh->toggle = FROM_DW3_DATA_TOGGLE(ptd.dw3); in handle_done_ptds()
1161 qh->ping = FROM_DW3_PING(ptd.dw3); in handle_done_ptds()
1192 create_ptd_int(qh, qtd, &ptd); in handle_done_ptds()
1195 create_ptd_atl(qh, qtd, &ptd); in handle_done_ptds()
1199 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()