usb: gadget: don't change ep name for dwc3 while ep autoconfig
authorLi Jun <jun.li@nxp.com>
Mon, 25 Jan 2021 13:43:45 +0000 (21:43 +0800)
committerMarek Vasut <marex@denx.de>
Sun, 31 Jan 2021 13:08:56 +0000 (14:08 +0100)
As the SDP protocol use the predefined ep num for communication, we can't
change its name hence reset its ep num while do ep autoconfig, this is
only apply for SPL.

Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/usb/gadget/epautoconf.c

index 3f88429..7da334f 100644 (file)
@@ -262,6 +262,7 @@ struct usb_ep *usb_ep_autoconfig(
                ep = find_ep(gadget, "ep1-bulk");
                if (ep && ep_matches(gadget, ep, desc))
                        return ep;
+#ifndef CONFIG_SPL_BUILD
        } else if (gadget_is_dwc3(gadget)) {
                const char *name = NULL;
                /*
@@ -284,6 +285,7 @@ struct usb_ep *usb_ep_autoconfig(
                        ep = find_ep(gadget, name);
                if (ep && ep_matches(gadget, ep, desc))
                        return ep;
+#endif
        }
 
        if (gadget->ops->match_ep)