* [U-Boot] [PATCH 0/3] usb: arrange Kconfig entries for USB host support
@ 2016-07-31 9:24 Masahiro Yamada
2016-07-31 9:24 ` [U-Boot] [PATCH 1/3] usb: add CONIFG_USB_OHCI_HCD in Kconfig Masahiro Yamada
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Masahiro Yamada @ 2016-07-31 9:24 UTC (permalink / raw)
To: u-boot
We have CONFIG_USB_GADGET, while we do not have an option to
turn on/off USB host support.
In Linux, CONFIG_USB is used to enable the USB host support,
but it is used in U-Boot to enable the whole USB sub-system.
So, as an alternative, this commit adds CONFIG_USB_HOST
and I think it makes sense enough.
Masahiro Yamada (3):
usb: add CONIFG_USB_OHCI_HCD in Kconfig
usb: add CONFIG_USB_UHCI_HCD in Kconfig
usb: add (move) CONFIG_USB_HOST to Kconfig
configs/axs103_defconfig | 1 +
drivers/usb/host/Kconfig | 59 +++++++++++++++++++++++++++++++++++--------
include/configs/am43xx_evm.h | 1 -
include/configs/am57xx_evm.h | 1 -
include/configs/cm_t43.h | 1 -
include/configs/cm_t54.h | 1 -
include/configs/dra7xx_evm.h | 1 -
include/configs/duovero.h | 1 -
include/configs/omap4_panda.h | 1 -
include/configs/omap5_uevm.h | 1 -
10 files changed, 50 insertions(+), 18 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/3] usb: add CONIFG_USB_OHCI_HCD in Kconfig
2016-07-31 9:24 [U-Boot] [PATCH 0/3] usb: arrange Kconfig entries for USB host support Masahiro Yamada
@ 2016-07-31 9:24 ` Masahiro Yamada
2016-07-31 9:38 ` Robert P. J. Day
2016-08-01 9:14 ` Alexey Brodkin
2016-07-31 9:24 ` [U-Boot] [PATCH 2/3] usb: add CONFIG_USB_UHCI_HCD " Masahiro Yamada
2016-07-31 9:24 ` [U-Boot] [PATCH 3/3] usb: add (move) CONFIG_USB_HOST to Kconfig Masahiro Yamada
2 siblings, 2 replies; 7+ messages in thread
From: Masahiro Yamada @ 2016-07-31 9:24 UTC (permalink / raw)
To: u-boot
Add this option as a common config for all OHCI controllers. Its
help message was copied from Linux. Also, I moved it below EHCI
to respect the order in Linux's Kconfig.
Add CONFIG_USB_OHCI_HCD=y to axs103_defconfig, which is the only
user of OHCI_GENERIC.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
configs/axs103_defconfig | 1 +
drivers/usb/host/Kconfig | 35 +++++++++++++++++++++++++----------
2 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/configs/axs103_defconfig b/configs/axs103_defconfig
index c8474de..109b021 100644
--- a/configs/axs103_defconfig
+++ b/configs/axs103_defconfig
@@ -25,6 +25,7 @@ CONFIG_ETH_DESIGNWARE=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_DM_USB=y
+CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
CONFIG_USB_STORAGE=y
CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 5092251..8e87f77 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -24,15 +24,7 @@ config USB_XHCI_DWC3
Say Y or if your system has a Dual Role SuperSpeed
USB controller based on the DesignWare USB3 IP Core.
-endif
-
-config USB_OHCI_GENERIC
- bool "Support for generic OHCI USB controller"
- depends on OF_CONTROL
- depends on DM_USB
- default n
- ---help---
- Enables support for generic OHCI controller.
+endif # USB_XHCI_HCD
config USB_EHCI_HCD
bool "EHCI HCD (USB 2.0) support"
@@ -100,4 +92,27 @@ config USB_EHCI_GENERIC
---help---
Enables support for generic EHCI controller.
-endif
+endif # USB_EHCI_HCD
+
+config USB_OHCI_HCD
+ bool "OHCI HCD (USB 1.1) support"
+ ---help---
+ The Open Host Controller Interface (OHCI) is a standard for accessing
+ USB 1.1 host controller hardware. It does more in hardware than Intel's
+ UHCI specification. If your USB host controller follows the OHCI spec,
+ say Y. On most non-x86 systems, and on x86 hardware that's not using a
+ USB controller from Intel or VIA, this is appropriate. If your host
+ controller doesn't use PCI, this is probably appropriate. For a PCI
+ based system where you're not sure, the "lspci -v" entry will list the
+ right "prog-if" for your USB controller(s): EHCI, OHCI, or UHCI.
+
+if USB_OHCI_HCD
+
+config USB_OHCI_GENERIC
+ bool "Support for generic OHCI USB controller"
+ depends on OF_CONTROL
+ depends on DM_USB
+ ---help---
+ Enables support for generic OHCI controller.
+
+endif # USB_OHCI_HCD
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 2/3] usb: add CONFIG_USB_UHCI_HCD in Kconfig
2016-07-31 9:24 [U-Boot] [PATCH 0/3] usb: arrange Kconfig entries for USB host support Masahiro Yamada
2016-07-31 9:24 ` [U-Boot] [PATCH 1/3] usb: add CONIFG_USB_OHCI_HCD in Kconfig Masahiro Yamada
@ 2016-07-31 9:24 ` Masahiro Yamada
2016-07-31 9:24 ` [U-Boot] [PATCH 3/3] usb: add (move) CONFIG_USB_HOST to Kconfig Masahiro Yamada
2 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2016-07-31 9:24 UTC (permalink / raw)
To: u-boot
There is no UHCI driver entry in Kconfig for now, but we have some
UHCI drivers, for example, LEON. This is a placeholder in case we
want to move them to Kconfig in the future.
The help message was copied from Linux.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
drivers/usb/host/Kconfig | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 8e87f77..156dae4 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -116,3 +116,20 @@ config USB_OHCI_GENERIC
Enables support for generic OHCI controller.
endif # USB_OHCI_HCD
+
+config USB_UHCI_HCD
+ bool "UHCI HCD (most Intel and VIA) support"
+ ---help---
+ The Universal Host Controller Interface is a standard by Intel for
+ accessing the USB hardware in the PC (which is also called the USB
+ host controller). If your USB host controller conforms to this
+ standard, you may want to say Y, but see below. All recent boards
+ with Intel PCI chipsets (like intel 430TX, 440FX, 440LX, 440BX,
+ i810, i820) conform to this standard. Also all VIA PCI chipsets
+ (like VIA VP2, VP3, MVP3, Apollo Pro, Apollo Pro II or Apollo Pro
+ 133) and LEON/GRLIB SoCs with the GRUSBHC controller.
+ If unsure, say Y.
+
+if USB_UHCI_HCD
+
+endif # USB_UHCI_HCD
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 3/3] usb: add (move) CONFIG_USB_HOST to Kconfig
2016-07-31 9:24 [U-Boot] [PATCH 0/3] usb: arrange Kconfig entries for USB host support Masahiro Yamada
2016-07-31 9:24 ` [U-Boot] [PATCH 1/3] usb: add CONIFG_USB_OHCI_HCD in Kconfig Masahiro Yamada
2016-07-31 9:24 ` [U-Boot] [PATCH 2/3] usb: add CONFIG_USB_UHCI_HCD " Masahiro Yamada
@ 2016-07-31 9:24 ` Masahiro Yamada
2 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2016-07-31 9:24 UTC (permalink / raw)
To: u-boot
The meaning of CONFIG_USB in U-Boot is different from that in Linux.
As you see in drivers/usb/Kconfig of Linux, CONFIG_USB enables the
USB host controller support, while CONFIG_USB_SUPPORT is used to
enable the whole of the USB sub-system.
When I added CONFIG_USB into Kconfig by commit 6e7e9294d321 ("usb:
add basic USB configs in Kconfig"), I planned to follow the Linux's
convention, i.e. CONFIG_USB to enable/disable the USB host support.
Then, commit 68f7c5db2d1e ("usb: Generic USB Kconfig option, that
fits both host and gadget and comments") changed the logic of the
CONFIG_USB to point to the whole of the USB sub-system. As a result,
currently we do not have an option for USB host.
This commit adds CONFIG_USB_HOST, which will be useful to compile
in the USB host support code.
CONFIG_USB_HOST is not referenced at all, but strangely some boards
define it in board headers. I removed them because USB_HOST will be
selected in Kconfig going forward.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
drivers/usb/host/Kconfig | 7 +++++++
include/configs/am43xx_evm.h | 1 -
include/configs/am57xx_evm.h | 1 -
include/configs/cm_t43.h | 1 -
include/configs/cm_t54.h | 1 -
include/configs/dra7xx_evm.h | 1 -
include/configs/duovero.h | 1 -
include/configs/omap4_panda.h | 1 -
include/configs/omap5_uevm.h | 1 -
9 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 156dae4..02ae5cc 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -3,8 +3,12 @@
#
comment "USB Host Controller Drivers"
+config USB_HOST
+ bool
+
config USB_XHCI_HCD
bool "xHCI HCD (USB 3.0) support"
+ select USB_HOST
---help---
The eXtensible Host Controller Interface (xHCI) is standard for USB 3.0
"SuperSpeed" host controller hardware.
@@ -28,6 +32,7 @@ endif # USB_XHCI_HCD
config USB_EHCI_HCD
bool "EHCI HCD (USB 2.0) support"
+ select USB_HOST
---help---
The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
"high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
@@ -112,6 +117,7 @@ config USB_OHCI_GENERIC
bool "Support for generic OHCI USB controller"
depends on OF_CONTROL
depends on DM_USB
+ select USB_HOST
---help---
Enables support for generic OHCI controller.
@@ -119,6 +125,7 @@ endif # USB_OHCI_HCD
config USB_UHCI_HCD
bool "UHCI HCD (most Intel and VIA) support"
+ select USB_HOST
---help---
The Universal Host Controller Interface is a standard by Intel for
accessing the USB hardware in the PC (which is also called the USB
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index 361704b..0467953 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -98,7 +98,6 @@
#if defined(CONFIG_SPL_USB_HOST_SUPPORT) || !defined(CONFIG_SPL_BUILD)
#define CONFIG_SYS_USB_FAT_BOOT_PARTITION 1
-#define CONFIG_USB_HOST
#define CONFIG_USB_XHCI_OMAP
#define CONFIG_USB_STORAGE
#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index 2db199d..c9dcfe5 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -63,7 +63,6 @@
#define CONFIG_SUPPORT_EMMC_BOOT
/* USB xHCI HOST */
-#define CONFIG_USB_HOST
#define CONFIG_USB_XHCI_OMAP
#define CONFIG_USB_STORAGE
#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h
index 9bb975a..5d94f13 100644
--- a/include/configs/cm_t43.h
+++ b/include/configs/cm_t43.h
@@ -60,7 +60,6 @@
#define CONFIG_SYS_RX_ETH_BUFFER 64
/* USB support */
-#define CONFIG_USB_HOST
#define CONFIG_USB_XHCI_OMAP
#define CONFIG_USB_STORAGE
#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
diff --git a/include/configs/cm_t54.h b/include/configs/cm_t54.h
index 68851ee..8e9444e 100644
--- a/include/configs/cm_t54.h
+++ b/include/configs/cm_t54.h
@@ -69,7 +69,6 @@
#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
CONFIG_SYS_SCSI_MAX_LUN)
/* USB UHH support options */
-#define CONFIG_USB_HOST
#define CONFIG_USB_EHCI
#define CONFIG_USB_EHCI_OMAP
#define CONFIG_USB_STORAGE
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 0d51aeb..c8f1d5f 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -210,7 +210,6 @@
#define CONFIG_SUPPORT_EMMC_BOOT
/* USB xHCI HOST */
-#define CONFIG_USB_HOST
#define CONFIG_USB_XHCI_OMAP
#define CONFIG_USB_STORAGE
#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
diff --git a/include/configs/duovero.h b/include/configs/duovero.h
index 98afe27..299c0d5 100644
--- a/include/configs/duovero.h
+++ b/include/configs/duovero.h
@@ -29,7 +29,6 @@
#define CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS
/* USB UHH support options */
-#define CONFIG_USB_HOST
#define CONFIG_USB_EHCI
#define CONFIG_USB_EHCI_OMAP
#define CONFIG_USB_STORAGE
diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h
index 0d62ccd..ffa22c3 100644
--- a/include/configs/omap4_panda.h
+++ b/include/configs/omap4_panda.h
@@ -17,7 +17,6 @@
*/
/* USB UHH support options */
-#define CONFIG_USB_HOST
#define CONFIG_USB_EHCI
#define CONFIG_USB_EHCI_OMAP
#define CONFIG_USB_STORAGE
diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h
index 4ddc492..2bf955a 100644
--- a/include/configs/omap5_uevm.h
+++ b/include/configs/omap5_uevm.h
@@ -88,7 +88,6 @@
#define CONFIG_SYS_I2C_TCA642X_ADDR 0x22
/* USB UHH support options */
-#define CONFIG_USB_HOST
#define CONFIG_USB_EHCI
#define CONFIG_USB_EHCI_OMAP
#define CONFIG_USB_STORAGE
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/3] usb: add CONIFG_USB_OHCI_HCD in Kconfig
2016-07-31 9:24 ` [U-Boot] [PATCH 1/3] usb: add CONIFG_USB_OHCI_HCD in Kconfig Masahiro Yamada
@ 2016-07-31 9:38 ` Robert P. J. Day
2016-07-31 15:15 ` Masahiro Yamada
2016-08-01 9:14 ` Alexey Brodkin
1 sibling, 1 reply; 7+ messages in thread
From: Robert P. J. Day @ 2016-07-31 9:38 UTC (permalink / raw)
To: u-boot
"CONIFG"?
rday
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/3] usb: add CONIFG_USB_OHCI_HCD in Kconfig
2016-07-31 9:38 ` Robert P. J. Day
@ 2016-07-31 15:15 ` Masahiro Yamada
0 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2016-07-31 15:15 UTC (permalink / raw)
To: u-boot
2016-07-31 18:38 GMT+09:00 Robert P. J. Day <rpjday@crashcourse.ca>:
>
> "CONIFG"?
>
I will fix it in v2.
Thanks!
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/3] usb: add CONIFG_USB_OHCI_HCD in Kconfig
2016-07-31 9:24 ` [U-Boot] [PATCH 1/3] usb: add CONIFG_USB_OHCI_HCD in Kconfig Masahiro Yamada
2016-07-31 9:38 ` Robert P. J. Day
@ 2016-08-01 9:14 ` Alexey Brodkin
1 sibling, 0 replies; 7+ messages in thread
From: Alexey Brodkin @ 2016-08-01 9:14 UTC (permalink / raw)
To: u-boot
Hi?Masahiro-san,
On Sun, 2016-07-31 at 18:24 +0900, Masahiro Yamada wrote:
> Add this option as a common config for all OHCI controllers.??Its
> help message was copied from Linux.??Also, I moved it below EHCI
> to respect the order in Linux's Kconfig.
>
> Add CONFIG_USB_OHCI_HCD=y to axs103_defconfig, which is the only
> user of OHCI_GENERIC.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
There's such a thing like "new OHCI driver" which is enabled by
CONFIG_USB_OHCI_NEW (as of today in config headers) and some OHCI
drivers rely on it.
I'd say it is a very good candidate to go to Kconfig especially for
those boards that use DM_USB.
Not sure if that makes sense for boards except axs103 in your change-set
though.
-Alexey
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-08-01 9:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-31 9:24 [U-Boot] [PATCH 0/3] usb: arrange Kconfig entries for USB host support Masahiro Yamada
2016-07-31 9:24 ` [U-Boot] [PATCH 1/3] usb: add CONIFG_USB_OHCI_HCD in Kconfig Masahiro Yamada
2016-07-31 9:38 ` Robert P. J. Day
2016-07-31 15:15 ` Masahiro Yamada
2016-08-01 9:14 ` Alexey Brodkin
2016-07-31 9:24 ` [U-Boot] [PATCH 2/3] usb: add CONFIG_USB_UHCI_HCD " Masahiro Yamada
2016-07-31 9:24 ` [U-Boot] [PATCH 3/3] usb: add (move) CONFIG_USB_HOST to Kconfig Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox