From: Stefan Agner Date: Wed, 16 Aug 2017 18:00:56 +0000 (-0700) Subject: apalis/colibri_imx6: use independent USB PID for SPL X-Git-Tag: v2017.09-rc4~39^2~16 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2b2f6782805dddc2060f7436e1c911eb98ab86e4;p=oweals%2Fu-boot.git apalis/colibri_imx6: use independent USB PID for SPL Use a completely independent USB Product ID for SPL. This allows to differentiate a SDP running in SPL and SDP running in a U-Boot which could not read the config block successfully. Signed-off-by: Stefan Agner Acked-by: Max Krummenacher Reviewed-by: Ɓukasz Majewski --- diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 7a3e493faf..2fd96232bd 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -1234,6 +1235,18 @@ void reset_cpu(ulong addr) { } +#ifdef CONFIG_SPL_USB_GADGET_SUPPORT +int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) +{ + unsigned short usb_pid; + + usb_pid = TORADEX_USB_PRODUCT_NUM_OFFSET + 0xfff; + put_unaligned(usb_pid, &dev->idProduct); + + return 0; +} +#endif + #endif static struct mxc_serial_platdata mxc_serial_plat = { diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index dbcd233782..d30391fa63 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -1118,6 +1119,18 @@ void reset_cpu(ulong addr) { } +#ifdef CONFIG_SPL_USB_GADGET_SUPPORT +int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) +{ + unsigned short usb_pid; + + usb_pid = TORADEX_USB_PRODUCT_NUM_OFFSET + 0xfff; + put_unaligned(usb_pid, &dev->idProduct); + + return 0; +} +#endif + #endif static struct mxc_serial_platdata mxc_serial_plat = {