aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-06-12 20:02:04 -0400
committerTom Rini <trini@konsulko.com>2022-06-28 17:11:48 -0400
commit3371eddaa10212b1303b2de305e1d976fe7770ca (patch)
tree1328087906bd0b877adb77a563c750544149855d /drivers
parent525fbfabf1f91bde3bd8fc8aa3ec8504e77c074f (diff)
downloadu-boot-3371eddaa10212b1303b2de305e1d976fe7770ca.zip
u-boot-3371eddaa10212b1303b2de305e1d976fe7770ca.tar.gz
u-boot-3371eddaa10212b1303b2de305e1d976fe7770ca.tar.bz2
Convert CONFIG_USB_MAX_CONTROLLER_COUNT to Kconfig
This converts the following to Kconfig: CONFIG_USB_MAX_CONTROLLER_COUNT Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/common/fsl-dt-fixup.c4
-rw-r--r--drivers/usb/host/Kconfig6
-rw-r--r--drivers/usb/host/ehci-hcd.c4
3 files changed, 6 insertions, 8 deletions
diff --git a/drivers/usb/common/fsl-dt-fixup.c b/drivers/usb/common/fsl-dt-fixup.c
index 4d7a2ac..00b8cd3 100644
--- a/drivers/usb/common/fsl-dt-fixup.c
+++ b/drivers/usb/common/fsl-dt-fixup.c
@@ -16,10 +16,6 @@
#include <fsl_usb.h>
#include <fdt_support.h>
-#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
-#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
-#endif
-
/* USB Controllers */
#define FSL_USB2_MPH "fsl-usb2-mph"
#define FSL_USB2_DR "fsl-usb2-dr"
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 8240ed8..7d5bde5 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -364,3 +364,9 @@ config USB_R8A66597_HCD
---help---
This enables support for the on-chip Renesas R8A66597 USB 2.0
controller, present in various RZ and SH SoCs.
+
+config USB_MAX_CONTROLLER_COUNT
+ int "Maximum number of USB host controllers"
+ depends on USB_EHCI_FSL || USB_XHCI_FSL || \
+ (SPL_USB_HOST && !DM_SPL_USB) || (USB_HOST && !DM_USB)
+ default 1
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index e635526..f033198 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -25,10 +25,6 @@
#include "ehci.h"
-#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
-#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
-#endif
-
/*
* EHCI spec page 20 says that the HC may take up to 16 uFrames (= 4ms) to halt.
* Let's time out after 8 to have a little safety margin on top of that.