X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fusb%2Fgadget%2Fgadget_chips.h;h=973cd971ad19a0195dc8b6f18c9ab4fdcfcc5b3d;hb=8850c5d57c10aa6431d138d426e6e105c99cc7ba;hp=e5701422fa3de2e4cb48244fa65b4e63441356d1;hpb=612404c28a64a6df300642a1550a65dcc8e01f82;p=oweals%2Fu-boot.git diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h index e5701422fa..973cd971ad 100644 --- a/drivers/usb/gadget/gadget_chips.h +++ b/drivers/usb/gadget/gadget_chips.h @@ -11,7 +11,7 @@ * Some are available on 2.4 kernels; several are available, but not * yet pushed in the 2.6 mainline tree. * - * Ported to U-boot by: Thomas Smits and + * Ported to U-Boot by: Thomas Smits and * Remy Bohmer */ #ifdef CONFIG_USB_GADGET_NET2280 @@ -125,7 +125,7 @@ #endif /* Mentor high speed "dual role" controller, in peripheral role */ -#ifdef CONFIG_MUSB_GADGET +#ifdef CONFIG_USB_MUSB_GADGET #define gadget_is_musbhdrc(g) (!strcmp("musb-hdrc", (g)->name)) #else #define gadget_is_musbhdrc(g) 0 @@ -144,12 +144,26 @@ #define gadget_is_m66592(g) 0 #endif -#ifdef CONFIG_USB_GADGET_MV -#define gadget_is_mv(g) (!strcmp("mv_udc", (g)->name)) +#ifdef CONFIG_CI_UDC +#define gadget_is_ci(g) (!strcmp("ci_udc", (g)->name)) #else -#define gadget_is_mv(g) 0 +#define gadget_is_ci(g) 0 #endif +#ifdef CONFIG_USB_GADGET_FOTG210 +#define gadget_is_fotg210(g) (!strcmp("fotg210_udc", (g)->name)) +#else +#define gadget_is_fotg210(g) 0 +#endif + +#ifdef CONFIG_USB_DWC3_GADGET +#define gadget_is_dwc3(g) (!strcmp("dwc3-gadget", (g)->name)) +#else +#define gadget_is_dwc3(g) 0 +#endif + + + /* * CONFIG_USB_GADGET_SX2 * CONFIG_USB_GADGET_AU1X00 @@ -213,7 +227,9 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget) return 0x19; else if (gadget_is_m66592(gadget)) return 0x20; - else if (gadget_is_mv(gadget)) + else if (gadget_is_ci(gadget)) return 0x21; + else if (gadget_is_fotg210(gadget)) + return 0x22; return -ENOENT; }