On 08/16/2017 08:00 PM, Stefan Agner wrote:
From: Stefan Agner <stefan.ag...@toradex.com>
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.
Reviewed-by: Łukasz Majewski <lu...@denx.de>
Signed-off-by: Stefan Agner <stefan.ag...@toradex.com>
Acked-by: Max Krummenacher <max.krummenac...@toradex.com>
---
Changes in v2: None
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 8e5613cb12..edaca5d346 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -28,6 +28,7 @@
#include <dm/platform_data/serial_mxc.h>
#include <dm/platdata.h>
#include <fsl_esdhc.h>
+#include <g_dnl.h>
#include <i2c.h>
#include <imx_thermal.h>
#include <linux/errno.h>
@@ -1233,6 +1234,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 cbf7aa952a..0cc958a0a8 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -28,6 +28,7 @@
#include <dm/platform_data/serial_mxc.h>
#include <dm/platdata.h>
#include <fsl_esdhc.h>
+#include <g_dnl.h>
#include <i2c.h>
#include <imx_thermal.h>
#include <linux/errno.h>
@@ -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 = {
--
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot