summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2017-09-05 20:46:39 -0300
committerStefano Babic <sbabic@denx.de>2017-09-20 15:34:59 +0200
commit511db3bf5a27a2f7eca0f60b6adb1eff74bd6df6 (patch)
tree14d7085382b10f35a76a3f35743f3593fb1e952e /arch/arm
parentbe2808c3b0671751827b39753e7abe7278d33c62 (diff)
toradex: imx6: Move g_dnl_bind_fixup() into common SPL code
Instead of having every board file to add its own g_dnl_bind_fixup() implementation, move it to the common imx6 SPL code. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Ɓukasz Majewski <lukma@denx.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-imx/spl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
index 82ea6b85d6..5944f99482 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -14,6 +14,7 @@
#include <asm/spl.h>
#include <spl.h>
#include <asm/mach-imx/hab.h>
+#include <g_dnl.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -94,6 +95,15 @@ u32 spl_boot_device(void)
}
return BOOT_DEVICE_NONE;
}
+
+#ifdef CONFIG_SPL_USB_GADGET_SUPPORT
+int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
+{
+ put_unaligned(CONFIG_G_DNL_PRODUCT_NUM + 0xfff, &dev->idProduct);
+
+ return 0;
+}
+#endif
#endif
#if defined(CONFIG_SPL_MMC_SUPPORT)