USB: gadget: Add DEVTYPE support for Ethernet functions
[pandora-kernel.git] / drivers / usb / gadget / epautoconf.c
index cd0914e..949ebe5 100644 (file)
@@ -275,6 +275,25 @@ struct usb_ep * __init usb_ep_autoconfig (
                ep = find_ep (gadget, "ep1-bulk");
                if (ep && ep_matches (gadget, ep, desc))
                        return ep;
+
+#ifdef CONFIG_BLACKFIN
+       } else if (gadget_is_musbhsfc(gadget) || gadget_is_musbhdrc(gadget)) {
+               if ((USB_ENDPOINT_XFER_BULK == type) ||
+                   (USB_ENDPOINT_XFER_ISOC == type)) {
+                       if (USB_DIR_IN & desc->bEndpointAddress)
+                               ep = find_ep (gadget, "ep5in");
+                       else
+                               ep = find_ep (gadget, "ep6out");
+               } else if (USB_ENDPOINT_XFER_INT == type) {
+                       if (USB_DIR_IN & desc->bEndpointAddress)
+                               ep = find_ep(gadget, "ep1in");
+                       else
+                               ep = find_ep(gadget, "ep2out");
+               } else
+                       ep = NULL;
+               if (ep && ep_matches (gadget, ep, desc))
+                       return ep;
+#endif
        }
 
        /* Second, look at endpoints until an unclaimed one looks usable */