From 1ca3d24cb2c779c5da977a9479a15b5ddeafa50d Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 15 Sep 2016 18:12:12 -0700 Subject: 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 --- board/toradex/apalis_imx6/apalis_imx6.c | 13 +++++++++++++ board/toradex/colibri_imx6/colibri_imx6.c | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index ec75a57a9d..93e777d6ce 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -1283,6 +1284,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 d5980b8ea2..1fa0bf6252 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -1116,6 +1117,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 = { -- cgit v1.2.3