summaryrefslogtreecommitdiff
path: root/nuttx/configs/sama5d3x-ek/src/sam_boot.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/configs/sama5d3x-ek/src/sam_boot.c')
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sam_boot.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/nuttx/configs/sama5d3x-ek/src/sam_boot.c b/nuttx/configs/sama5d3x-ek/src/sam_boot.c
index 4d4cb27e6..fda4c8354 100644
--- a/nuttx/configs/sama5d3x-ek/src/sam_boot.c
+++ b/nuttx/configs/sama5d3x-ek/src/sam_boot.c
@@ -90,6 +90,19 @@ void sam_boardinitialize(void)
#endif
+ /* Initialize USB if the 1) the HS host or device controller is in the
+ * configuration and 2) the weak function sam_usbinitialize() has been brought
+ * into the build. Presumeably either CONFIG_USBDEV or CONFIG_USBHOST is also
+ * selected.
+ */
+
+#if defined(CONFIG_SAMA5_UHPHS) || defined(CONFIG_SAMA5_UDPHS)
+ if (sam_usbinitialize)
+ {
+ sam_usbinitialize();
+ }
+#endif
+
#ifdef CONFIG_ARCH_LEDS
/* Configure on-board LEDs if LED support has been selected. */