diff options
author | luka <luka@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-07-28 20:34:19 +0000 |
---|---|---|
committer | luka <luka@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-07-28 20:34:19 +0000 |
commit | 49584fea6df75716a5c14d2aecc432eae3855232 (patch) | |
tree | e6a42ac7b098b50e794d338e6f618d54fe4d029e | |
parent | 8f8159d1046bdc1c4e9570e131553fefbeb0fc42 (diff) |
imx6: add support for EHCI USB
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37581 3c298f89-4303-0410-b956-a3cf2f4a3e73
3 files changed, 124 insertions, 0 deletions
diff --git a/target/linux/imx6/config-3.10 b/target/linux/imx6/config-3.10 index 7226e057dc..5883d93d74 100644 --- a/target/linux/imx6/config-3.10 +++ b/target/linux/imx6/config-3.10 @@ -271,6 +271,9 @@ CONFIG_REGMAP_MMIO=y CONFIG_REGMAP_SPI=y CONFIG_RFS_ACCEL=y CONFIG_RPS=y +# CONFIG_SAMSUNG_USB2PHY is not set +# CONFIG_SAMSUNG_USB3PHY is not set +# CONFIG_SAMSUNG_USBPHY is not set CONFIG_SCHED_HRTICK=y # CONFIG_SCSI_DMA is not set CONFIG_SERIAL_IMX=y @@ -301,6 +304,9 @@ CONFIG_UID16=y CONFIG_UIDGID_CONVERTED=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" CONFIG_USB_ARCH_HAS_XHCI=y +# CONFIG_USB_MXS_PHY is not set +CONFIG_USB_PHY=y +CONFIG_USB_SUPPORT=y CONFIG_USE_GENERIC_SMP_HELPERS=y CONFIG_USE_OF=y CONFIG_VECTORS_BASE=0xffff0000 diff --git a/target/linux/imx6/patches-3.10/0001-usb-chipidea-improve-kconfig.patch b/target/linux/imx6/patches-3.10/0001-usb-chipidea-improve-kconfig.patch new file mode 100644 index 0000000000..2956bd9898 --- /dev/null +++ b/target/linux/imx6/patches-3.10/0001-usb-chipidea-improve-kconfig.patch @@ -0,0 +1,87 @@ +From 20a677fd63c57edd5b0c463baa44f133b2f2d4a0 Mon Sep 17 00:00:00 2001 +From: Peter Chen <peter.chen@freescale.com> +Date: Thu, 13 Jun 2013 17:59:52 +0300 +Subject: [PATCH] usb: chipidea: improve kconfig + +Randy Dunlap <rdunlap@infradead.org> reported this problem +on i386: + +> drivers/built-in.o: In function `ci_hdrc_host_init': +> (.text+0x2ce75c): undefined reference to `ehci_init_driver' +> +> When USB_EHCI_HCD=m and USB_CHIPIDEA=y. + +In fact, this problem is existed on all platforms which are using +chipidea driver. The root cause of this problem is the chipidea host +uses symbol exported from ehci-hcd, but chipidea core +does not depends on USB_EHCI_HCD. So, chipidea driver +will not be compiled as module if USB_EHCI_HCD=m. + +It is very hard to give a perfect solution since chipidea core +depends on USB || USB_GADGET, and chipdiea host depends on +both USB_EHCI_HCD and USB_CHIPIDEA, the same problem exists for +gadget. + +To fix this problem, we had to have below assumptions: + +- If USB_EHCI_HCD=y && USB_GADGET=y, USB_CHIPIDEA can be 'y'. + +- If USB_EHCI_HCD=m && USB_GADGET=y, USB_CHIPIDEA=m +or USB_CHIPIDEA_HOST can't be seen if USB_CHIPIDEA=y. +It will cause compile error due to no glue layer for ehci: + +> error: #error "missing bus glue for ehci-hcd" + +So, we had to compile USB_CHIPIDEA=m if USB_EHCI_HCD=m, +current ehci hcd core guarantee it. + +- If USB_EHCI_HCD=y && USB_GADGET=m, USB_CHIPIDEA=m +or USB_CHIPIDEA_UDC can't be seen if USB_CHIPIDEA=y. +Of cos, the gadget will out of working at this situation, +so the user had to compile USB_CHIPIDEA=m. + +- USB_EHCI_HCD=m && USB_GADGET=m, we can't see +USB_CHIPIDEA_HOST and USB_CHIPIDEA_UDC unless +USB_CHIPIDEA=m. + +The reason why it has above assumptions: +- If both ehci core and gadget core build as module, +the chipidea has to build as module. +- If one of ehci core or gadget core is built in, another +is built as module, we can only enable the function which +is built in, or enable both roles as modules (USB_CHIPIDEA=m), +since chipidea core driver takes care of both host and device roles. + +Signed-off-by: Peter Chen <peter.chen@freescale.com> +Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/usb/chipidea/Kconfig | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig +index b2df442..eb2aa2e 100644 +--- a/drivers/usb/chipidea/Kconfig ++++ b/drivers/usb/chipidea/Kconfig +@@ -12,15 +12,15 @@ if USB_CHIPIDEA + + config USB_CHIPIDEA_UDC + bool "ChipIdea device controller" +- depends on USB_GADGET=y || USB_GADGET=USB_CHIPIDEA ++ depends on USB_GADGET=y || USB_CHIPIDEA=m + help + Say Y here to enable device controller functionality of the + ChipIdea driver. + + config USB_CHIPIDEA_HOST + bool "ChipIdea host controller" +- depends on USB=y || USB=USB_CHIPIDEA +- depends on USB_EHCI_HCD=y ++ depends on USB=y ++ depends on USB_EHCI_HCD=y || USB_CHIPIDEA=m + select USB_EHCI_ROOT_HUB_TT + help + Say Y here to enable host controller functionality of the +-- +1.8.3.3 + diff --git a/target/linux/imx6/patches-3.10/0002-usb-chipidea-enable-to-build-host-support-as-module.patch b/target/linux/imx6/patches-3.10/0002-usb-chipidea-enable-to-build-host-support-as-module.patch new file mode 100644 index 0000000000..e2db7ca4f7 --- /dev/null +++ b/target/linux/imx6/patches-3.10/0002-usb-chipidea-enable-to-build-host-support-as-module.patch @@ -0,0 +1,31 @@ +From f4087fcf07cce987f5ce3c42d6aee87b7b4f82b8 Mon Sep 17 00:00:00 2001 +From: Luka Perkov <luka@openwrt.org> +Date: Sun, 28 Jul 2013 20:33:01 +0200 +Subject: [PATCH] usb: chipidea: enable to build host support as module + +USB_CHIPIDEA_HOST does not need to depend on USB=y, USB_CHIPIDEA_HOST will work +just fine even if USB=m is used. The depends line can be safely removed since +USB_CHIPIDEA already depends on USB. + +Tested on Gateworks imx6 Ventana board (gw-5400-a). + +Signed-off-by: Luka Perkov <luka@openwrt.org> +--- + drivers/usb/chipidea/Kconfig | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig +index eb2aa2e..c9477e3 100644 +--- a/drivers/usb/chipidea/Kconfig ++++ b/drivers/usb/chipidea/Kconfig +@@ -19,7 +19,6 @@ config USB_CHIPIDEA_UDC + + config USB_CHIPIDEA_HOST + bool "ChipIdea host controller" +- depends on USB=y + depends on USB_EHCI_HCD=y || USB_CHIPIDEA=m + select USB_EHCI_ROOT_HUB_TT + help +-- +1.8.3.3 + |