usbhost: Do not disable usb monitor if usb host is enabled but dev is not

This commit is contained in:
Brennan Ashton
2021-03-28 12:45:15 -07:00
committed by Xiang Xiao
parent 6106557034
commit 4851d232c0
18 changed files with 224 additions and 66 deletions
@@ -62,13 +62,21 @@
# undef HAVE_USBHOST
#endif
/* Check if we need to support the USB monitor */
/* Check if we should enable the USB monitor before starting NSH */
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBMONITOR) || !defined(CONFIG_USBHOST_TRACE)
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
+9 -1
View File
@@ -115,11 +115,19 @@
/* Check if we should enable the USB monitor before starting NSH */
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#if !defined(CONFIG_USBMONITOR) || !defined(CONFIG_USBDEV_TRACE)
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -143,11 +143,19 @@
/* Check if we should enable the USB monitor before starting NSH */
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#if !defined(CONFIG_USBMONITOR) || !defined(CONFIG_USBDEV_TRACE)
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -151,11 +151,19 @@
/* Check if we should enable the USB monitor before starting NSH */
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#if !defined(CONFIG_USBMONITOR) || !defined(CONFIG_USBDEV_TRACE)
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -106,21 +106,25 @@
/* Can't support USB device feature if USB OTG FS is not enabled */
#ifndef CONFIG_STM32_OTGFS
#if defined(CONFIG_STM32_OTGFS) && defined(CONFIG_USBDEV)
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Can't support USB device monitor if USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR)
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -81,14 +81,12 @@
#ifndef CONFIG_STM32_OTGFS
# undef HAVE_USBDEV
# undef HAVE_USBHOST
# undef HAVE_USBMONITOR
#endif
/* Can't support USB device is USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Can't support USB host is USB host is not enabled */
@@ -99,7 +97,19 @@
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR)
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -65,14 +65,12 @@
#ifndef CONFIG_STM32_OTGFS
# undef HAVE_USBDEV
# undef HAVE_USBHOST
# undef HAVE_USBMONITOR
#endif
/* Can't support USB device monitor if USB device is not enabled */
/* Can't support USB device if USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Can't support USB host is USB host is not enabled */
@@ -83,7 +81,19 @@
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR)
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -68,14 +68,12 @@
#ifndef CONFIG_STM32_OTGHS
# undef HAVE_USBDEV
# undef HAVE_USBHOST
# undef HAVE_USBMONITOR
#endif
/* Can't support USB device monitor if USB device is not enabled */
/* Can't support USB device USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Can't support USB host is USB host is not enabled */
@@ -86,7 +84,19 @@
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR)
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -61,14 +61,12 @@
#ifndef CONFIG_STM32_OTGHS
# undef HAVE_USBDEV
# undef HAVE_USBHOST
# undef HAVE_USBMONITOR
#endif
/* Can't support USB device monitor if USB device is not enabled */
/* Can't support USB device if USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Can't support USB host is USB host is not enabled */
@@ -79,12 +77,20 @@
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR)
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#if !defined(CONFIG_STM32_CAN1) && !defined(CONFIG_STM32_CAN2)
# undef CONFIG_CAN
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
/* Can't support MMC/SD features if mountpoints are disabled or if SDIO
@@ -57,14 +57,12 @@
#ifndef CONFIG_STM32_OTGFS
# undef HAVE_USBDEV
# undef HAVE_USBHOST
# undef HAVE_USBMONITOR
#endif
/* Can't support USB device monitor if USB device is not enabled */
/* Can't support USB device if USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Can't support USB host is USB host is not enabled */
@@ -76,7 +74,19 @@
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR)
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -105,14 +105,12 @@
#ifndef CONFIG_STM32_OTGFS
# undef HAVE_USBDEV
# undef HAVE_USBHOST
# undef HAVE_USBMONITOR
#endif
/* Can't support USB device monitor if USB device is not enabled */
/* Can't support USB device if USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Can't support USB host is USB host is not enabled */
@@ -123,7 +121,19 @@
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR)
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -57,19 +57,29 @@
#ifndef CONFIG_STM32_USB
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Can't support USB device is USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR)
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -69,14 +69,12 @@
#ifndef CONFIG_STM32_OTGHS
# undef HAVE_USBDEV
# undef HAVE_USBHOST
# undef HAVE_USBMONITOR
#endif
/* Can't support USB device monitor if USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Can't support USB host is USB host is not enabled */
@@ -87,7 +85,19 @@
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR)
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -68,14 +68,12 @@
#ifndef CONFIG_STM32_OTGFS
# undef HAVE_USBDEV
# undef HAVE_USBHOST
# undef HAVE_USBMONITOR
#endif
/* Can't support USB device monitor if USB device is not enabled */
/* Can't support USB device if USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Can't support USB host is USB host is not enabled */
@@ -86,7 +84,19 @@
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR)
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -62,14 +62,12 @@
#ifndef CONFIG_STM32H7_OTGFS
# undef HAVE_USBDEV
# undef HAVE_USBHOST
# undef HAVE_USBMONITOR
#endif
/* Can't support USB device monitor if USB device is not enabled */
/* Can't support USB device if USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Can't support USB host is USB host is not enabled */
@@ -80,7 +78,19 @@
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR)
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -135,14 +135,12 @@
#ifndef CONFIG_STM32L4_OTGFS
# undef HAVE_USBDEV
# undef HAVE_USBHOST
# undef HAVE_USBMONITOR
#endif
/* Can't support USB device monitor if USB device is not enabled */
/* Can't support USB device if USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Can't support USB host is USB host is not enabled */
@@ -153,7 +151,19 @@
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_SYSTEM_USBMONITOR)
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -86,14 +86,12 @@
#ifndef CONFIG_STM32L4_OTGFS
# undef HAVE_USBDEV
# undef HAVE_USBHOST
# undef HAVE_USBMONITOR
#endif
/* Can't support USB device monitor if USB device is not enabled */
/* Can't support USB device if USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
# undef HAVE_USBMONITOR
#endif
/* Can't support USB host is USB host is not enabled */
@@ -104,7 +102,19 @@
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_SYSTEM_USBMONITOR)
#ifndef CONFIG_USBMONITOR
# undef HAVE_USBMONITOR
#endif
#ifndef HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#ifndef HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef HAVE_USBMONITOR
#endif
@@ -130,15 +130,21 @@
/* USB Monitor */
/* Can't support USB device monitor if USB device is not enabled */
/* Check if we should enable the USB monitor before starting NSH */
#ifndef CONFIG_USBDEV
#ifndef CONFIG_USBMONITOR
# undef NSH_HAVE_USBMONITOR
#endif
/* Check if we should enable the USB monitor before starting NSH */
#ifndef NSH_HAVE_USBDEV
# undef CONFIG_USBDEV_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR)
#ifndef NSH_HAVE_USBHOST
# undef CONFIG_USBHOST_TRACE
#endif
#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE)
# undef NSH_HAVE_USBMONITOR
#endif