Lines Matching refs:bep

215 	struct bcm63xx_ep		*bep;  member
306 struct bcm63xx_ep bep[BCM63XX_NUM_EP]; member
443 static void bcm63xx_set_stall(struct bcm63xx_udc *udc, struct bcm63xx_ep *bep, in bcm63xx_set_stall() argument
450 (bep->ep_num << USBD_STALL_EPNUM_SHIFT); in bcm63xx_set_stall()
568 usb_ep_set_maxpacket_limit(&udc->bep[idx].ep, max_pkt); in bcm63xx_ep_setup()
765 struct bcm63xx_ep *bep = NULL; in iudma_init_channel() local
771 bep = &udc->bep[iudma->ep_num]; in iudma_init_channel()
772 bep->iudma = iudma; in iudma_init_channel()
773 INIT_LIST_HEAD(&bep->queue); in iudma_init_channel()
776 iudma->bep = bep; in iudma_init_channel()
955 struct bcm63xx_ep *bep = &udc->bep[i]; in bcm63xx_init_udc_hw() local
957 bep->ep.name = bcm63xx_ep_info[i].name; in bcm63xx_init_udc_hw()
958 bep->ep.caps = bcm63xx_ep_info[i].caps; in bcm63xx_init_udc_hw()
959 bep->ep_num = i; in bcm63xx_init_udc_hw()
960 bep->ep.ops = &bcm63xx_udc_ep_ops; in bcm63xx_init_udc_hw()
961 list_add_tail(&bep->ep.ep_list, &udc->gadget.ep_list); in bcm63xx_init_udc_hw()
962 bep->halted = 0; in bcm63xx_init_udc_hw()
963 usb_ep_set_maxpacket_limit(&bep->ep, BCM63XX_MAX_CTRL_PKT); in bcm63xx_init_udc_hw()
964 bep->udc = udc; in bcm63xx_init_udc_hw()
965 bep->ep.desc = NULL; in bcm63xx_init_udc_hw()
966 INIT_LIST_HEAD(&bep->queue); in bcm63xx_init_udc_hw()
969 udc->gadget.ep0 = &udc->bep[0].ep; in bcm63xx_init_udc_hw()
970 list_del(&udc->bep[0].ep.ep_list); in bcm63xx_init_udc_hw()
1035 struct bcm63xx_ep *bep = our_ep(ep); in bcm63xx_ep_enable() local
1036 struct bcm63xx_udc *udc = bep->udc; in bcm63xx_ep_enable()
1037 struct iudma_ch *iudma = bep->iudma; in bcm63xx_ep_enable()
1053 BUG_ON(!list_empty(&bep->queue)); in bcm63xx_ep_enable()
1057 bep->halted = 0; in bcm63xx_ep_enable()
1058 bcm63xx_set_stall(udc, bep, false); in bcm63xx_ep_enable()
1059 clear_bit(bep->ep_num, &udc->wedgemap); in bcm63xx_ep_enable()
1074 struct bcm63xx_ep *bep = our_ep(ep); in bcm63xx_ep_disable() local
1075 struct bcm63xx_udc *udc = bep->udc; in bcm63xx_ep_disable()
1076 struct iudma_ch *iudma = bep->iudma; in bcm63xx_ep_disable()
1092 if (!list_empty(&bep->queue)) { in bcm63xx_ep_disable()
1093 list_for_each_entry_safe(breq, n, &bep->queue, queue) { in bcm63xx_ep_disable()
1100 usb_gadget_giveback_request(&iudma->bep->ep, &breq->req); in bcm63xx_ep_disable()
1155 struct bcm63xx_ep *bep = our_ep(ep); in bcm63xx_udc_queue() local
1156 struct bcm63xx_udc *udc = bep->udc; in bcm63xx_udc_queue()
1168 if (bep == &udc->bep[0]) { in bcm63xx_udc_queue()
1179 if (!bep->iudma->enabled) { in bcm63xx_udc_queue()
1184 rc = usb_gadget_map_request(&udc->gadget, req, bep->iudma->is_tx); in bcm63xx_udc_queue()
1186 list_add_tail(&breq->queue, &bep->queue); in bcm63xx_udc_queue()
1187 if (list_is_singular(&bep->queue)) in bcm63xx_udc_queue()
1188 iudma_write(udc, bep->iudma, breq); in bcm63xx_udc_queue()
1207 struct bcm63xx_ep *bep = our_ep(ep); in bcm63xx_udc_dequeue() local
1208 struct bcm63xx_udc *udc = bep->udc; in bcm63xx_udc_dequeue()
1214 if (list_empty(&bep->queue)) { in bcm63xx_udc_dequeue()
1219 cur = list_first_entry(&bep->queue, struct bcm63xx_req, queue); in bcm63xx_udc_dequeue()
1220 usb_gadget_unmap_request(&udc->gadget, &breq->req, bep->iudma->is_tx); in bcm63xx_udc_dequeue()
1223 iudma_reset_channel(udc, bep->iudma); in bcm63xx_udc_dequeue()
1226 if (!list_empty(&bep->queue)) { in bcm63xx_udc_dequeue()
1229 next = list_first_entry(&bep->queue, in bcm63xx_udc_dequeue()
1231 iudma_write(udc, bep->iudma, next); in bcm63xx_udc_dequeue()
1255 struct bcm63xx_ep *bep = our_ep(ep); in bcm63xx_udc_set_halt() local
1256 struct bcm63xx_udc *udc = bep->udc; in bcm63xx_udc_set_halt()
1260 bcm63xx_set_stall(udc, bep, !!value); in bcm63xx_udc_set_halt()
1261 bep->halted = value; in bcm63xx_udc_set_halt()
1275 struct bcm63xx_ep *bep = our_ep(ep); in bcm63xx_udc_set_wedge() local
1276 struct bcm63xx_udc *udc = bep->udc; in bcm63xx_udc_set_wedge()
1280 set_bit(bep->ep_num, &udc->wedgemap); in bcm63xx_udc_set_wedge()
1281 bcm63xx_set_stall(udc, bep, true); in bcm63xx_udc_set_wedge()
1412 req->complete(&udc->bep[0].ep, req); in bcm63xx_ep0_complete()
1510 bcm63xx_set_stall(udc, &udc->bep[0], true); in bcm63xx_ep0_do_setup()
1780 bcm63xx_set_stall(udc, &udc->bep[i], false); in bcm63xx_udc_pullup()
1956 bcm63xx_set_stall(udc, &udc->bep[i], new_status); in bcm63xx_update_wedge()
2045 struct bcm63xx_ep *bep; in bcm63xx_udc_data_isr() local
2055 bep = iudma->bep; in bcm63xx_udc_data_isr()
2080 } else if (!list_empty(&bep->queue)) { in bcm63xx_udc_data_isr()
2081 breq = list_first_entry(&bep->queue, struct bcm63xx_req, queue); in bcm63xx_udc_data_isr()
2093 if (!list_empty(&bep->queue)) { in bcm63xx_udc_data_isr()
2096 next = list_first_entry(&bep->queue, in bcm63xx_udc_data_isr()
2110 req->complete(&bep->ep, req); in bcm63xx_udc_data_isr()
2210 if (iudma->bep) { in bcm63xx_iudma_dbg_show()
2212 list_for_each(pos, &iudma->bep->queue) in bcm63xx_iudma_dbg_show()