Lines Matching refs:ep0
32 struct usb_request *req = &ep->ep0.req.req; in ast_vhub_reply()
37 if (WARN_ON(!ep->ep0.dir_in)) in ast_vhub_reply()
93 memcpy_fromio(&crq, ep->ep0.setup, sizeof(crq)); in ast_vhub_ep0_handle_setup()
101 ep->ep0.state); in ast_vhub_ep0_handle_setup()
113 if (ep->ep0.state != ep0_state_token && in ast_vhub_ep0_handle_setup()
114 ep->ep0.state != ep0_state_stall) { in ast_vhub_ep0_handle_setup()
120 ep->ep0.state = ep0_state_data; in ast_vhub_ep0_handle_setup()
121 ep->ep0.dir_in = !!(crq.bRequestType & USB_DIR_IN); in ast_vhub_ep0_handle_setup()
164 writel(VHUB_EP0_CTRL_STALL, ep->ep0.ctlstat); in ast_vhub_ep0_handle_setup()
165 ep->ep0.state = ep0_state_stall; in ast_vhub_ep0_handle_setup()
166 ep->ep0.dir_in = false; in ast_vhub_ep0_handle_setup()
171 writel(VHUB_EP0_TX_BUFF_RDY, ep->ep0.ctlstat); in ast_vhub_ep0_handle_setup()
172 ep->ep0.state = ep0_state_status; in ast_vhub_ep0_handle_setup()
173 ep->ep0.dir_in = false; in ast_vhub_ep0_handle_setup()
193 ep->ep0.state = ep0_state_status; in ast_vhub_ep0_do_send()
194 writel(VHUB_EP0_RX_BUFF_RDY, ep->ep0.ctlstat); in ast_vhub_ep0_do_send()
223 writel(reg, ep->ep0.ctlstat); in ast_vhub_ep0_do_send()
224 writel(reg | VHUB_EP0_TX_BUFF_RDY, ep->ep0.ctlstat); in ast_vhub_ep0_do_send()
233 writel(VHUB_EP0_RX_BUFF_RDY, ep->ep0.ctlstat); in ast_vhub_ep0_rx_prime()
260 ep->ep0.state = ep0_state_status; in ast_vhub_ep0_do_receive()
261 writel(VHUB_EP0_TX_BUFF_RDY, ep->ep0.ctlstat); in ast_vhub_ep0_do_receive()
276 stat = readl(ep->ep0.ctlstat); in ast_vhub_ep0_handle_ack()
282 stat, ep->ep0.state, ep->ep0.dir_in, in_ack, req); in ast_vhub_ep0_handle_ack()
284 switch(ep->ep0.state) { in ast_vhub_ep0_handle_ack()
296 if ((ep->ep0.dir_in && (stat & VHUB_EP0_TX_BUFF_RDY)) || in ast_vhub_ep0_handle_ack()
297 (!ep->ep0.dir_in && (stat & VHUB_EP0_RX_BUFF_RDY)) || in ast_vhub_ep0_handle_ack()
298 (ep->ep0.dir_in != in_ack)) { in ast_vhub_ep0_handle_ack()
314 if (ep->ep0.dir_in) in ast_vhub_ep0_handle_ack()
331 if (ep->ep0.dir_in == in_ack) { in ast_vhub_ep0_handle_ack()
347 writel(VHUB_EP0_CTRL_STALL, ep->ep0.ctlstat); in ast_vhub_ep0_handle_ack()
348 ep->ep0.state = ep0_state_stall; in ast_vhub_ep0_handle_ack()
350 ep->ep0.state = ep0_state_token; in ast_vhub_ep0_handle_ack()
389 u_req->short_not_ok, ep->ep0.dir_in); in ast_vhub_ep0_queue()
401 ep->ep0.state == ep0_state_token || in ast_vhub_ep0_queue()
402 ep->ep0.state == ep0_state_stall) { in ast_vhub_ep0_queue()
405 list_empty(&ep->queue), ep->ep0.state); in ast_vhub_ep0_queue()
413 if (ep->ep0.dir_in) { in ast_vhub_ep0_queue()
419 ep->ep0.state = ep0_state_status; in ast_vhub_ep0_queue()
420 writel(VHUB_EP0_TX_BUFF_RDY, ep->ep0.ctlstat); in ast_vhub_ep0_queue()
456 writel(VHUB_EP0_CTRL_STALL, ep->ep0.ctlstat); in ast_vhub_ep0_dequeue()
457 ep->ep0.state = ep0_state_status; in ast_vhub_ep0_dequeue()
458 ep->ep0.dir_in = false; in ast_vhub_ep0_dequeue()
475 struct ast_vhub_ep *ep = &dev->ep0; in ast_vhub_reset_ep0()
478 ep->ep0.state = ep0_state_token; in ast_vhub_reset_ep0()
496 ep->ep0.state = ep0_state_token; in ast_vhub_init_ep0()
497 INIT_LIST_HEAD(&ep->ep0.req.queue); in ast_vhub_init_ep0()
498 ep->ep0.req.internal = true; in ast_vhub_init_ep0()
502 ep->ep0.ctlstat = dev->regs + AST_VHUB_DEV_EP0_CTRL; in ast_vhub_init_ep0()
503 ep->ep0.setup = vhub->regs + in ast_vhub_init_ep0()
510 ep->ep0.ctlstat = vhub->regs + AST_VHUB_EP0_CTRL; in ast_vhub_init_ep0()
511 ep->ep0.setup = vhub->regs + AST_VHUB_SETUP0; in ast_vhub_init_ep0()