Lines Matching refs:ep0
5 * ep0.c - Endpoint 0 handling
37 struct usb_request *req = &ep->ep0.req.req;
42 if (WARN_ON(!ep->ep0.dir_in))
98 memcpy_fromio(&crq, ep->ep0.setup, sizeof(crq));
106 ep->ep0.state);
118 if (ep->ep0.state != ep0_state_token &&
119 ep->ep0.state != ep0_state_stall) {
125 ep->ep0.state = ep0_state_data;
126 ep->ep0.dir_in = !!(crq.bRequestType & USB_DIR_IN);
169 writel(VHUB_EP0_CTRL_STALL, ep->ep0.ctlstat);
170 ep->ep0.state = ep0_state_stall;
171 ep->ep0.dir_in = false;
176 writel(VHUB_EP0_TX_BUFF_RDY, ep->ep0.ctlstat);
177 ep->ep0.state = ep0_state_status;
178 ep->ep0.dir_in = false;
198 ep->ep0.state = ep0_state_status;
199 writel(VHUB_EP0_RX_BUFF_RDY, ep->ep0.ctlstat);
228 writel(reg, ep->ep0.ctlstat);
229 writel(reg | VHUB_EP0_TX_BUFF_RDY, ep->ep0.ctlstat);
238 writel(VHUB_EP0_RX_BUFF_RDY, ep->ep0.ctlstat);
265 ep->ep0.state = ep0_state_status;
266 writel(VHUB_EP0_TX_BUFF_RDY, ep->ep0.ctlstat);
281 stat = readl(ep->ep0.ctlstat);
287 stat, ep->ep0.state, ep->ep0.dir_in, in_ack, req);
289 switch(ep->ep0.state) {
301 if ((ep->ep0.dir_in && (stat & VHUB_EP0_TX_BUFF_RDY)) ||
302 (!ep->ep0.dir_in && (stat & VHUB_EP0_RX_BUFF_RDY)) ||
303 (ep->ep0.dir_in != in_ack)) {
319 if (ep->ep0.dir_in)
336 if (ep->ep0.dir_in == in_ack) {
352 writel(VHUB_EP0_CTRL_STALL, ep->ep0.ctlstat);
353 ep->ep0.state = ep0_state_stall;
355 ep->ep0.state = ep0_state_token;
394 u_req->short_not_ok, ep->ep0.dir_in);
406 ep->ep0.state == ep0_state_token ||
407 ep->ep0.state == ep0_state_stall) {
410 list_empty(&ep->queue), ep->ep0.state);
418 if (ep->ep0.dir_in) {
424 ep->ep0.state = ep0_state_status;
425 writel(VHUB_EP0_TX_BUFF_RDY, ep->ep0.ctlstat);
461 writel(VHUB_EP0_CTRL_STALL, ep->ep0.ctlstat);
462 ep->ep0.state = ep0_state_status;
463 ep->ep0.dir_in = false;
480 struct ast_vhub_ep *ep = &dev->ep0;
483 ep->ep0.state = ep0_state_token;
495 ep->ep.name = "ep0";
501 ep->ep0.state = ep0_state_token;
502 INIT_LIST_HEAD(&ep->ep0.req.queue);
503 ep->ep0.req.internal = true;
507 ep->ep0.ctlstat = dev->regs + AST_VHUB_DEV_EP0_CTRL;
508 ep->ep0.setup = vhub->regs +
515 ep->ep0.ctlstat = vhub->regs + AST_VHUB_EP0_CTRL;
516 ep->ep0.setup = vhub->regs + AST_VHUB_SETUP0;