|
@@ -1042,6 +1042,8 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
|
|
struct usbhsg_gpriv *gpriv;
|
|
struct usbhsg_gpriv *gpriv;
|
|
struct usbhsg_uep *uep;
|
|
struct usbhsg_uep *uep;
|
|
struct device *dev = usbhs_priv_to_dev(priv);
|
|
struct device *dev = usbhs_priv_to_dev(priv);
|
|
|
|
+ struct renesas_usbhs_driver_pipe_config *pipe_configs =
|
|
|
|
+ usbhs_get_dparam(priv, pipe_configs);
|
|
int pipe_size = usbhs_get_dparam(priv, pipe_size);
|
|
int pipe_size = usbhs_get_dparam(priv, pipe_size);
|
|
int i;
|
|
int i;
|
|
int ret;
|
|
int ret;
|
|
@@ -1111,13 +1113,16 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
|
|
gpriv->gadget.ep0 = &uep->ep;
|
|
gpriv->gadget.ep0 = &uep->ep;
|
|
usb_ep_set_maxpacket_limit(&uep->ep, 64);
|
|
usb_ep_set_maxpacket_limit(&uep->ep, 64);
|
|
uep->ep.caps.type_control = true;
|
|
uep->ep.caps.type_control = true;
|
|
- }
|
|
|
|
- /* init normal pipe */
|
|
|
|
- else {
|
|
|
|
- usb_ep_set_maxpacket_limit(&uep->ep, 512);
|
|
|
|
- uep->ep.caps.type_iso = true;
|
|
|
|
- uep->ep.caps.type_bulk = true;
|
|
|
|
- uep->ep.caps.type_int = true;
|
|
|
|
|
|
+ } else {
|
|
|
|
+ /* init normal pipe */
|
|
|
|
+ if (pipe_configs[i].type == USB_ENDPOINT_XFER_ISOC)
|
|
|
|
+ uep->ep.caps.type_iso = true;
|
|
|
|
+ if (pipe_configs[i].type == USB_ENDPOINT_XFER_BULK)
|
|
|
|
+ uep->ep.caps.type_bulk = true;
|
|
|
|
+ if (pipe_configs[i].type == USB_ENDPOINT_XFER_INT)
|
|
|
|
+ uep->ep.caps.type_int = true;
|
|
|
|
+ usb_ep_set_maxpacket_limit(&uep->ep,
|
|
|
|
+ pipe_configs[i].bufsize);
|
|
list_add_tail(&uep->ep.ep_list, &gpriv->gadget.ep_list);
|
|
list_add_tail(&uep->ep.ep_list, &gpriv->gadget.ep_list);
|
|
}
|
|
}
|
|
uep->ep.caps.dir_in = true;
|
|
uep->ep.caps.dir_in = true;
|