[kernel/f19] Add upstream usb-next OMAP patch to fix usb on omap/mvebu

Peter Robinson pbrobinson at fedoraproject.org
Wed Apr 3 10:59:02 UTC 2013


commit 925399a2635da6ed2a8dacb4667243551908c617
Author: Peter Robinson <pbrobinson at gmail.com>
Date:   Wed Apr 3 11:55:29 2013 +0100

    Add upstream usb-next OMAP patch to fix usb on omap/mvebu

 arm-omap-ehci-fix.patch               |  190 +++++++++++++++++++++++++++++++++
 arm-omap-fix-usb-mvebu-conflict.patch |   85 ---------------
 config-armv7                          |    1 -
 config-armv7-lpae                     |    2 +-
 kernel.spec                           |    7 +-
 5 files changed, 196 insertions(+), 89 deletions(-)
---
diff --git a/arm-omap-ehci-fix.patch b/arm-omap-ehci-fix.patch
new file mode 100644
index 0000000..f6fc0a9
--- /dev/null
+++ b/arm-omap-ehci-fix.patch
@@ -0,0 +1,190 @@
+From 54a419668b0f27b7982807fb2376d237e0a0ce05 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern at rowland.harvard.edu>
+Date: Tue, 12 Mar 2013 10:44:39 +0000
+Subject: USB: EHCI: split ehci-omap out to a separate driver
+
+This patch (as1645) converts ehci-omap over to the new "ehci-hcd is a
+library" approach, so that it can coexist peacefully with other EHCI
+platform drivers and can make use of the private area allocated at
+the end of struct ehci_hcd.
+
+Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+---
+diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
+index c59a112..62f4e9a 100644
+--- a/drivers/usb/host/Kconfig
++++ b/drivers/usb/host/Kconfig
+@@ -155,7 +155,7 @@ config USB_EHCI_MXC
+ 	  Variation of ARC USB block used in some Freescale chips.
+ 
+ config USB_EHCI_HCD_OMAP
+-	bool "EHCI support for OMAP3 and later chips"
++	tristate "EHCI support for OMAP3 and later chips"
+ 	depends on USB_EHCI_HCD && ARCH_OMAP
+ 	default y
+ 	---help---
+diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
+index 001fbff..56de410 100644
+--- a/drivers/usb/host/Makefile
++++ b/drivers/usb/host/Makefile
+@@ -27,6 +27,7 @@ obj-$(CONFIG_USB_EHCI_HCD)	+= ehci-hcd.o
+ obj-$(CONFIG_USB_EHCI_PCI)	+= ehci-pci.o
+ obj-$(CONFIG_USB_EHCI_HCD_PLATFORM)	+= ehci-platform.o
+ obj-$(CONFIG_USB_EHCI_MXC)	+= ehci-mxc.o
++obj-$(CONFIG_USB_EHCI_HCD_OMAP)	+= ehci-omap.o
+ 
+ obj-$(CONFIG_USB_OXU210HP_HCD)	+= oxu210hp-hcd.o
+ obj-$(CONFIG_USB_ISP116X_HCD)	+= isp116x-hcd.o
+diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
+index b416a3f..303b022 100644
+--- a/drivers/usb/host/ehci-hcd.c
++++ b/drivers/usb/host/ehci-hcd.c
+@@ -1252,11 +1252,6 @@ MODULE_LICENSE ("GPL");
+ #define PLATFORM_DRIVER		ehci_hcd_sh_driver
+ #endif
+ 
+-#ifdef CONFIG_USB_EHCI_HCD_OMAP
+-#include "ehci-omap.c"
+-#define        PLATFORM_DRIVER         ehci_hcd_omap_driver
+-#endif
+-
+ #ifdef CONFIG_PPC_PS3
+ #include "ehci-ps3.c"
+ #define	PS3_SYSTEM_BUS_DRIVER	ps3_ehci_driver
+@@ -1346,6 +1341,7 @@ MODULE_LICENSE ("GPL");
+ 	!IS_ENABLED(CONFIG_USB_EHCI_HCD_PLATFORM) && \
+ 	!IS_ENABLED(CONFIG_USB_CHIPIDEA_HOST) && \
+ 	!IS_ENABLED(CONFIG_USB_EHCI_MXC) && \
++	!IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) && \
+ 	!defined(PLATFORM_DRIVER) && \
+ 	!defined(PS3_SYSTEM_BUS_DRIVER) && \
+ 	!defined(OF_PLATFORM_DRIVER) && \
+diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
+index 0555ee4..fa66757 100644
+--- a/drivers/usb/host/ehci-omap.c
++++ b/drivers/usb/host/ehci-omap.c
+@@ -36,6 +36,9 @@
+  *	- convert to use hwmod and runtime PM
+  */
+ 
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/io.h>
+ #include <linux/platform_device.h>
+ #include <linux/slab.h>
+ #include <linux/usb/ulpi.h>
+@@ -43,6 +46,10 @@
+ #include <linux/pm_runtime.h>
+ #include <linux/gpio.h>
+ #include <linux/clk.h>
++#include <linux/usb.h>
++#include <linux/usb/hcd.h>
++
++#include "ehci.h"
+ 
+ #include <linux/platform_data/usb-omap.h>
+ 
+@@ -57,9 +64,11 @@
+ #define	EHCI_INSNREG05_ULPI_EXTREGADD_SHIFT		8
+ #define	EHCI_INSNREG05_ULPI_WRDATA_SHIFT		0
+ 
+-/*-------------------------------------------------------------------------*/
++#define DRIVER_DESC "OMAP-EHCI Host Controller driver"
+ 
+-static const struct hc_driver ehci_omap_hc_driver;
++static const char hcd_name[] = "ehci-omap";
++
++/*-------------------------------------------------------------------------*/
+ 
+ 
+ static inline void ehci_write(void __iomem *base, u32 reg, u32 val)
+@@ -166,6 +175,12 @@ static void disable_put_regulator(
+ /* configure so an HC device and id are always provided */
+ /* always called with process context; sleeping is OK */
+ 
++static struct hc_driver __read_mostly ehci_omap_hc_driver;
++
++static const struct ehci_driver_overrides ehci_omap_overrides __initdata = {
++	.reset =		omap_ehci_init,
++};
++
+ /**
+  * ehci_hcd_omap_probe - initialize TI-based HCDs
+  *
+@@ -315,56 +330,33 @@ static struct platform_driver ehci_hcd_omap_driver = {
+ 	/*.suspend		= ehci_hcd_omap_suspend, */
+ 	/*.resume		= ehci_hcd_omap_resume, */
+ 	.driver = {
+-		.name		= "ehci-omap",
++		.name		= hcd_name,
+ 	}
+ };
+ 
+ /*-------------------------------------------------------------------------*/
+ 
+-static const struct hc_driver ehci_omap_hc_driver = {
+-	.description		= hcd_name,
+-	.product_desc		= "OMAP-EHCI Host Controller",
+-	.hcd_priv_size		= sizeof(struct ehci_hcd),
+-
+-	/*
+-	 * generic hardware linkage
+-	 */
+-	.irq			= ehci_irq,
+-	.flags			= HCD_MEMORY | HCD_USB2,
+-
+-	/*
+-	 * basic lifecycle operations
+-	 */
+-	.reset			= omap_ehci_init,
+-	.start			= ehci_run,
+-	.stop			= ehci_stop,
+-	.shutdown		= ehci_shutdown,
+-
+-	/*
+-	 * managing i/o requests and associated device resources
+-	 */
+-	.urb_enqueue		= ehci_urb_enqueue,
+-	.urb_dequeue		= ehci_urb_dequeue,
+-	.endpoint_disable	= ehci_endpoint_disable,
+-	.endpoint_reset		= ehci_endpoint_reset,
++static int __init ehci_omap_init(void)
++{
++	if (usb_disabled())
++		return -ENODEV;
+ 
+-	/*
+-	 * scheduling support
+-	 */
+-	.get_frame_number	= ehci_get_frame,
++	pr_info("%s: " DRIVER_DESC "\n", hcd_name);
+ 
+-	/*
+-	 * root hub support
+-	 */
+-	.hub_status_data	= ehci_hub_status_data,
+-	.hub_control		= ehci_hub_control,
+-	.bus_suspend		= ehci_bus_suspend,
+-	.bus_resume		= ehci_bus_resume,
++	ehci_init_driver(&ehci_omap_hc_driver, &ehci_omap_overrides);
++	return platform_driver_register(&ehci_hcd_omap_driver);
++}
++module_init(ehci_omap_init);
+ 
+-	.clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
+-};
++static void __exit ehci_omap_cleanup(void)
++{
++	platform_driver_unregister(&ehci_hcd_omap_driver);
++}
++module_exit(ehci_omap_cleanup);
+ 
+ MODULE_ALIAS("platform:ehci-omap");
+ MODULE_AUTHOR("Texas Instruments, Inc.");
+ MODULE_AUTHOR("Felipe Balbi <felipe.balbi at nokia.com>");
+ 
++MODULE_DESCRIPTION(DRIVER_DESC);
++MODULE_LICENSE("GPL");
+--
+cgit v0.9.1
diff --git a/config-armv7 b/config-armv7
index 7494060..507b732 100644
--- a/config-armv7
+++ b/config-armv7
@@ -441,7 +441,6 @@ CONFIG_REGULATOR_LP8755=m
 # CONFIG_PID_IN_CONTEXTIDR is not set
 # CONFIG_DEPRECATED_PARAM_STRUCT is not set
 
-# CONFIG_DW_DMAC_BIG_ENDIAN_IO is not set
 # CONFIG_ARM_KPROBES_TEST is not set
 # CONFIG_LEDS_PWM is not set
 
diff --git a/config-armv7-lpae b/config-armv7-lpae
index 8732c4b..7bae327 100644
--- a/config-armv7-lpae
+++ b/config-armv7-lpae
@@ -57,7 +57,7 @@ CONFIG_VIDEO_SAMSUNG_S5P_G2D=m
 CONFIG_VIDEO_SAMSUNG_S5P_JPEG=m
 CONFIG_VIDEO_SAMSUNG_S5P_MFC=m
 CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC=m
-CONFIG_DRM_EXYNOS=m
+# CONFIG_DRM_EXYNOS is not set
 CONFIG_DRM_EXYNOS_IOMMU=y
 CONFIG_DRM_EXYNOS_DMABUF=y
 CONFIG_DRM_EXYNOS_FIMD=y
diff --git a/kernel.spec b/kernel.spec
index 2fde86c..50eb74f 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -703,7 +703,7 @@ Patch21000: arm-export-read_current_timer.patch
 Patch21001: arm-lpae-ax88796.patch
 
 # ARM omap
-Patch21002: arm-omap-fix-usb-mvebu-conflict.patch
+Patch21002: arm-omap-ehci-fix.patch
 
 # ARM tegra
 Patch21004: arm-tegra-nvec-kconfig.patch
@@ -1302,7 +1302,7 @@ ApplyPatch vmbugon-warnon.patch
 #
 ApplyPatch arm-export-read_current_timer.patch
 ApplyPatch arm-lpae-ax88796.patch
-# ApplyPatch arm-omap-fix-usb-mvebu-conflict.patch
+ApplyPatch arm-omap-ehci-fix.patch
 # ApplyPatch arm-tegra-nvec-kconfig.patch
 ApplyPatch arm-tegra-usb-no-reset-linux33.patch
 
@@ -2278,6 +2278,9 @@ fi
 # and build.
 
 %changelog
+* Wed Apr  3 2013 Peter Robinson <pbrobinson at fedoraproject.org> 
+- Add upstream usb-next OMAP patch to fix usb on omap/mvebu
+
 * Tue Apr 02 2013 Justin M. Forbes <jforbes at redhat.com> - 3.9.0-0.rc5.git1.301
 - Linux v3.9-rc5-108-g118c9a4
 - Reenable debugging options.


More information about the scm-commits mailing list