Lines Matching refs:crq
553 static int s3c2410_udc_read_fifo_crq(struct usb_ctrlrequest *crq) in s3c2410_udc_read_fifo_crq() argument
555 unsigned char *outbuf = (unsigned char*)crq; in s3c2410_udc_read_fifo_crq()
570 bytes_read, crq->bRequest, crq->bRequestType, in s3c2410_udc_read_fifo_crq()
571 crq->wValue, crq->wIndex, crq->wLength); in s3c2410_udc_read_fifo_crq()
577 struct usb_ctrlrequest *crq) in s3c2410_udc_get_status() argument
580 u8 ep_num = crq->wIndex & 0x7F; in s3c2410_udc_get_status()
581 u8 is_in = crq->wIndex & USB_DIR_IN; in s3c2410_udc_get_status()
583 switch (crq->bRequestType & USB_RECIP_MASK) { in s3c2410_udc_get_status()
592 if (ep_num > 4 || crq->wLength > 2) in s3c2410_udc_get_status()
630 struct usb_ctrlrequest *crq, in s3c2410_udc_handle_ep0_idle() argument
641 len = s3c2410_udc_read_fifo_crq(crq); in s3c2410_udc_handle_ep0_idle()
642 if (len != sizeof(*crq)) { in s3c2410_udc_handle_ep0_idle()
645 sizeof(*crq), len); in s3c2410_udc_handle_ep0_idle()
651 crq->bRequest, crq->bRequestType, crq->wLength); in s3c2410_udc_handle_ep0_idle()
654 dev->req_std = (crq->bRequestType & USB_TYPE_MASK) in s3c2410_udc_handle_ep0_idle()
659 switch (crq->bRequest) { in s3c2410_udc_handle_ep0_idle()
663 if (crq->bRequestType == USB_RECIP_DEVICE) { in s3c2410_udc_handle_ep0_idle()
672 if (crq->bRequestType == USB_RECIP_INTERFACE) { in s3c2410_udc_handle_ep0_idle()
681 if (crq->bRequestType == USB_RECIP_DEVICE) { in s3c2410_udc_handle_ep0_idle()
682 tmp = crq->wValue & 0x7F; in s3c2410_udc_handle_ep0_idle()
696 if (!s3c2410_udc_get_status(dev, crq)) { in s3c2410_udc_handle_ep0_idle()
705 if (crq->bRequestType != USB_RECIP_ENDPOINT) in s3c2410_udc_handle_ep0_idle()
708 if (crq->wValue != USB_ENDPOINT_HALT || crq->wLength != 0) in s3c2410_udc_handle_ep0_idle()
711 s3c2410_udc_set_halt(&dev->ep[crq->wIndex & 0x7f].ep, 0); in s3c2410_udc_handle_ep0_idle()
718 if (crq->bRequestType != USB_RECIP_ENDPOINT) in s3c2410_udc_handle_ep0_idle()
721 if (crq->wValue != USB_ENDPOINT_HALT || crq->wLength != 0) in s3c2410_udc_handle_ep0_idle()
724 s3c2410_udc_set_halt(&dev->ep[crq->wIndex & 0x7f].ep, 1); in s3c2410_udc_handle_ep0_idle()
733 if (crq->bRequestType & USB_DIR_IN) in s3c2410_udc_handle_ep0_idle()
742 ret = dev->driver->setup(&dev->gadget, crq); in s3c2410_udc_handle_ep0_idle()
746 crq->bRequest, ret); in s3c2410_udc_handle_ep0_idle()
774 struct usb_ctrlrequest crq; in s3c2410_udc_handle_ep0() local
809 s3c2410_udc_handle_ep0_idle(dev, ep, &crq, ep0csr); in s3c2410_udc_handle_ep0()