Lines Matching refs:ep0

5  * ep0.c - Endpoint 0 handling
31 struct usb_request *req = &ep->ep0.req.req;
36 if (WARN_ON(!ep->ep0.dir_in))
92 memcpy_fromio(&crq, ep->ep0.setup, sizeof(crq));
100 ep->ep0.state);
112 if (ep->ep0.state != ep0_state_token &&
113 ep->ep0.state != ep0_state_stall) {
119 ep->ep0.state = ep0_state_data;
120 ep->ep0.dir_in = !!(crq.bRequestType & USB_DIR_IN);
163 writel(VHUB_EP0_CTRL_STALL, ep->ep0.ctlstat);
164 ep->ep0.state = ep0_state_stall;
165 ep->ep0.dir_in = false;
170 writel(VHUB_EP0_TX_BUFF_RDY, ep->ep0.ctlstat);
171 ep->ep0.state = ep0_state_status;
172 ep->ep0.dir_in = false;
192 ep->ep0.state = ep0_state_status;
193 writel(VHUB_EP0_RX_BUFF_RDY, ep->ep0.ctlstat);
222 writel(reg, ep->ep0.ctlstat);
223 writel(reg | VHUB_EP0_TX_BUFF_RDY, ep->ep0.ctlstat);
232 writel(VHUB_EP0_RX_BUFF_RDY, ep->ep0.ctlstat);
266 ep->ep0.state = ep0_state_status;
267 writel(VHUB_EP0_TX_BUFF_RDY, ep->ep0.ctlstat);
282 stat = readl(ep->ep0.ctlstat);
288 stat, ep->ep0.state, ep->ep0.dir_in, in_ack, req);
290 switch(ep->ep0.state) {
302 if ((ep->ep0.dir_in && (stat & VHUB_EP0_TX_BUFF_RDY)) ||
303 (!ep->ep0.dir_in && (stat & VHUB_EP0_RX_BUFF_RDY)) ||
304 (ep->ep0.dir_in != in_ack)) {
320 if (ep->ep0.dir_in)
337 if (ep->ep0.dir_in == in_ack) {
353 writel(VHUB_EP0_CTRL_STALL, ep->ep0.ctlstat);
354 ep->ep0.state = ep0_state_stall;
356 ep->ep0.state = ep0_state_token;
395 u_req->short_not_ok, ep->ep0.dir_in);
407 ep->ep0.state == ep0_state_token ||
408 ep->ep0.state == ep0_state_stall) {
411 list_empty(&ep->queue), ep->ep0.state);
419 if (ep->ep0.dir_in) {
425 ep->ep0.state = ep0_state_status;
426 writel(VHUB_EP0_TX_BUFF_RDY, ep->ep0.ctlstat);
462 writel(VHUB_EP0_CTRL_STALL, ep->ep0.ctlstat);
463 ep->ep0.state = ep0_state_status;
464 ep->ep0.dir_in = false;
481 struct ast_vhub_ep *ep = &dev->ep0;
484 ep->ep0.state = ep0_state_token;
496 ep->ep.name = "ep0";
502 ep->ep0.state = ep0_state_token;
503 INIT_LIST_HEAD(&ep->ep0.req.queue);
504 ep->ep0.req.internal = true;
508 ep->ep0.ctlstat = dev->regs + AST_VHUB_DEV_EP0_CTRL;
509 ep->ep0.setup = vhub->regs +
516 ep->ep0.ctlstat = vhub->regs + AST_VHUB_EP0_CTRL;
517 ep->ep0.setup = vhub->regs + AST_VHUB_SETUP0;