From 6f4ae7beb7a549d70a2b12fbd6f022825dab3831 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 3 Apr 2013 11:55:29 +0100 Subject: 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(-) create mode 100644 arm-omap-ehci-fix.patch delete mode 100644 arm-omap-fix-usb-mvebu-conflict.patch diff --git a/arm-omap-ehci-fix.patch b/arm-omap-ehci-fix.patch new file mode 100644 index 000000000..f6fc0a934 --- /dev/null +++ b/arm-omap-ehci-fix.patch @@ -0,0 +1,190 @@ +From 54a419668b0f27b7982807fb2376d237e0a0ce05 Mon Sep 17 00:00:00 2001 +From: Alan Stern +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 +Signed-off-by: Greg Kroah-Hartman +--- +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 ++#include ++#include + #include + #include + #include +@@ -43,6 +46,10 @@ + #include + #include + #include ++#include ++#include ++ ++#include "ehci.h" + + #include + +@@ -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 "); + ++MODULE_DESCRIPTION(DRIVER_DESC); ++MODULE_LICENSE("GPL"); +-- +cgit v0.9.1 diff --git a/arm-omap-fix-usb-mvebu-conflict.patch b/arm-omap-fix-usb-mvebu-conflict.patch deleted file mode 100644 index 7ef76619f..000000000 --- a/arm-omap-fix-usb-mvebu-conflict.patch +++ /dev/null @@ -1,85 +0,0 @@ ---- linux-3.9.0-0.rc3.git1.4.fc19.x86_64/drivers/usb/host/ehci-hcd.c.orig 2013-03-23 18:52:52.576674960 +0000 -+++ linux-3.9.0-0.rc3.git1.4.fc19.x86_64/drivers/usb/host/ehci-hcd.c 2013-03-24 12:46:49.149621810 +0000 -@@ -1252,7 +1252,7 @@ - - #ifdef CONFIG_USB_EHCI_HCD_OMAP - #include "ehci-omap.c" --#define PLATFORM_DRIVER ehci_hcd_omap_driver -+#define OMAP_PLATFORM_DRIVER ehci_hcd_omap_driver - #endif - - #ifdef CONFIG_PPC_PS3 -@@ -1272,7 +1272,7 @@ - - #ifdef CONFIG_PLAT_ORION - #include "ehci-orion.c" --#define PLATFORM_DRIVER ehci_orion_driver -+#define ORION_PLATFORM_DRIVER ehci_orion_driver - #endif - - #ifdef CONFIG_USB_W90X900_EHCI -@@ -1384,6 +1384,12 @@ - goto clean0; - #endif - -+#ifdef ORION_PLATFORM_DRIVER -+ retval = platform_driver_register(&ORION_PLATFORM_DRIVER); -+ if (retval < 0) -+ goto clean1; -+#endif -+ - #ifdef PS3_SYSTEM_BUS_DRIVER - retval = ps3_ehci_driver_register(&PS3_SYSTEM_BUS_DRIVER); - if (retval < 0) -@@ -1401,10 +1407,20 @@ - if (retval < 0) - goto clean4; - #endif -+ -+#ifdef OMAP_PLATFORM_DRIVER -+ retval = platform_driver_register(&OMAP_PLATFORM_DRIVER); -+ if (retval < 0) -+ goto clean5; -+#endif - return retval; - -+#ifdef OMAP_PLATFORM_DRIVER -+ /* platform_driver_unregister(&OMAP_PLATFORM_DRIVER); */ -+clean5: -+#endif - #ifdef XILINX_OF_PLATFORM_DRIVER -- /* platform_driver_unregister(&XILINX_OF_PLATFORM_DRIVER); */ -+ platform_driver_unregister(&XILINX_OF_PLATFORM_DRIVER); - clean4: - #endif - #ifdef OF_PLATFORM_DRIVER -@@ -1415,6 +1431,10 @@ - ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); - clean2: - #endif -+#ifdef ORION_PLATFORM_DRIVER -+ platform_driver_unregister(&ORION_PLATFORM_DRIVER); -+clean1: -+#endif - #ifdef PLATFORM_DRIVER - platform_driver_unregister(&PLATFORM_DRIVER); - clean0: -@@ -1431,12 +1451,18 @@ - - static void __exit ehci_hcd_cleanup(void) - { -+#ifdef OMAP_PLATFORM_DRIVER -+ platform_driver_unregister(&OMAP_PLATFORM_DRIVER); -+#endif - #ifdef XILINX_OF_PLATFORM_DRIVER - platform_driver_unregister(&XILINX_OF_PLATFORM_DRIVER); - #endif - #ifdef OF_PLATFORM_DRIVER - platform_driver_unregister(&OF_PLATFORM_DRIVER); - #endif -+#ifdef ORION_PLATFORM_DRIVER -+ platform_driver_unregister(&ORION_PLATFORM_DRIVER); -+#endif - #ifdef PLATFORM_DRIVER - platform_driver_unregister(&PLATFORM_DRIVER); - #endif diff --git a/config-armv7 b/config-armv7 index 749406051..507b73225 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 8732c4bcd..7bae32788 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 082c9a705..961636659 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 @@ -1298,7 +1298,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 @@ -2271,6 +2271,9 @@ fi # ||----w | # || || %changelog +* Wed Apr 3 2013 Peter Robinson +- Add upstream usb-next OMAP patch to fix usb on omap/mvebu + * Tue Apr 02 2013 Josh Boyer - Enable CONFIG_FB_MATROX_G on powerpc -- cgit