Skip to contentSkip to conversation

USB:Changed omap2plus_defconfig to support OMAP USB static driver

PATCH In review manjunath.goudar at linaro.org 11 participants 21 messages Feb 7, 2013 – Jun 12, 2013 1 message not in the archive

Subsystems (6)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1360258447-27247-1-git-send-email-yes

#1 lore raw

PATCH 1/10 USB:Changed omap2plus_defconfig to support OMAP USB static driver

From: Manjunath Goudar <[email protected]>

Selected EHCI and OMAP driver as static drivers using omap2plus_defconfig configuration

Cc Felipe Balbi <[email protected]>
Cc Greg KH <[email protected]>
Cc Alan Stern <[email protected]>
Cc linux-usb at vger.kernel.org
Cc Tony Lindgren <[email protected]>
---
 arch/arm/configs/omap2plus_defconfig |    4 ++++
 1 file changed, 4 insertions(+)
arch/arm/configs/omap2plus_defconfig +4 -0
index 82ce8d7..9ea7a9c 100644
@@ -182,6 +182,10 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
 CONFIG_USB_DEVICEFS=y
 CONFIG_USB_SUSPEND=y
 CONFIG_USB_MON=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_TT_NEWSCHED=y
+CONFIG_USB_EHCI_HCD_OMAP=y
 CONFIG_USB_WDM=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_LIBUSUAL=y
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/10 USB: EHCI: make ehci-omap a separate driver

In reply to a message not in the archive

From: Manjunath Goudar <[email protected]>

Separate the OMAP host controller driver from ehci-hcd host code into its own driver module.

Cc Felipe Balbi <[email protected]>
Cc Greg KH <[email protected]>
Cc Alan Stern <[email protected]>
Cc linux-usb at vger.kernel.org
Cc Tony Lindgren <[email protected]>
---
 drivers/usb/host/Kconfig     |    2 +-
 drivers/usb/host/Makefile    |    2 +-
 drivers/usb/host/ehci-hcd.c  |    6 +---
 drivers/usb/host/ehci-omap.c |   69 ++++++++++++++++++------------------------
 4 files changed, 32 insertions(+), 47 deletions(-)
drivers/usb/host/Kconfig +1 -1
index 3a21c5d..11e102e 100644
@@ -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---
drivers/usb/host/Makefile +1 -1
index 001fbff..b54a597 100644
@@ -27,7 +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
 obj-$(CONFIG_USB_ISP1362_HCD)	+= isp1362-hcd.o
drivers/usb/host/ehci-hcd.c +1 -5
index b416a3f..aaf93ca 100644
@@ -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
@@ -1347,6 +1342,7 @@ MODULE_LICENSE ("GPL");
 	!IS_ENABLED(CONFIG_USB_CHIPIDEA_HOST) && \
 	!IS_ENABLED(CONFIG_USB_EHCI_MXC) && \
 	!defined(PLATFORM_DRIVER) && \
+	!IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) && \
 	!defined(PS3_SYSTEM_BUS_DRIVER) && \
 	!defined(OF_PLATFORM_DRIVER) && \
 	!defined(XILINX_OF_PLATFORM_DRIVER)
drivers/usb/host/ehci-omap.c +29 -40

100 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 2/10 USB: EHCI: make ehci-omap a separate driver

HI,

Quoted 5 lines · manjunath.goudar at linaro.org

From: Manjunath Goudar <[email protected]>

Separate the OMAP host controller driver from ehci-hcd host code into its own driver module.

Quoted 7 lines
Cc Felipe Balbi <[email protected]>
Cc Greg KH <[email protected]>
Cc Alan Stern <[email protected]>
Cc linux-usb at vger.kernel.org
Cc Tony Lindgren <[email protected]>

Alan and Roger have already been working on this for ehci-omap. Their patches might already be in Greg's queue...

Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130208/736d8670/attachment.sig>
#4 lore raw

PATCH 2/10 USB: EHCI: make ehci-omap a separate driver

Quoted 16 lines · Felipe Balbi

HI,

Quoted 5 lines · manjunath.goudar at linaro.org

From: Manjunath Goudar <[email protected]>

Separate the OMAP host controller driver from ehci-hcd host code into its own driver module.

Quoted 7 lines
Cc Felipe Balbi <[email protected]>
Cc Greg KH <[email protected]>
Cc Alan Stern <[email protected]>
Cc linux-usb at vger.kernel.org
Cc Tony Lindgren <[email protected]>
Quoted 3 lines

Alan and Roger have already been working on this for ehci-omap. Their patches might already be in Greg's queue...

Manjunath,

ehci-omap will be taken care of so in [1] so you can please skip it from your patches. Thanks.

cheers,
-roger

[1] https://patchwork.kernel.org/patch/2055131/

#5 lore raw

PATCH 3/10 USB: EHCI: make ehci-spear a separate driver

In reply to a message not in the archive

From: Manjunath Goudar <[email protected]>

Separate the Spear host controller driver from ehci-hcd host code into its own driver module.

Cc Greg KH <[email protected]>
Cc Alan Stern <[email protected]>
Cc Viresh Kumar <[email protected]>
Cc Shiraz Hashim <[email protected]>
Cc linux-usb at vger.kernel.org
Cc spear-devel at list.st.com
---
 drivers/usb/host/Kconfig      |    8 +++++
 drivers/usb/host/Makefile     |    1 +
 drivers/usb/host/ehci-hcd.c   |    6 +---
 drivers/usb/host/ehci-spear.c |   77 ++++++++++++++++++++++-------------------
 4 files changed, 51 insertions(+), 41 deletions(-)
drivers/usb/host/Kconfig +8 -0
index 11e102e..4413075 100644
@@ -162,6 +162,14 @@ config USB_EHCI_HCD_OMAP
 	  Enables support for the on-chip EHCI controller on
 	  OMAP3 and later chips.
 
+config USB_EHCI_HCD_SPEAR
+        tristate "Support for ST spear on-chip EHCI USB controller"
+        depends on USB_EHCI_HCD && PLAT_SPEAR
+        default y
+        ---help---
+          Enables support for the on-chip EHCI controller on
+          ST spear chips.
+
 config USB_EHCI_MSM
 	bool "Support for MSM on-chip EHCI USB controller"
 	depends on USB_EHCI_HCD && ARCH_MSM
drivers/usb/host/Makefile +1 -0
index b54a597..c97f4ab 100644
@@ -28,6 +28,7 @@ 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_EHCI_HCD_SPEAR)+= ehci-spear.o
 obj-$(CONFIG_USB_OXU210HP_HCD)	+= oxu210hp-hcd.o
 obj-$(CONFIG_USB_ISP116X_HCD)	+= isp116x-hcd.o
 obj-$(CONFIG_USB_ISP1362_HCD)	+= isp1362-hcd.o
drivers/usb/host/ehci-hcd.c +1 -5
index aaf93ca..68cea63 100644
@@ -1292,11 +1292,6 @@ MODULE_LICENSE ("GPL");
 #define	PLATFORM_DRIVER		vt8500_ehci_driver
 #endif
 
-#ifdef CONFIG_PLAT_SPEAR
-#include "ehci-spear.c"
-#define PLATFORM_DRIVER		spear_ehci_hcd_driver
-#endif
-
 #ifdef CONFIG_USB_EHCI_MSM
 #include "ehci-msm.c"
 #define PLATFORM_DRIVER		ehci_msm_driver
@@ -1343,6 +1338,7 @@ MODULE_LICENSE ("GPL");
 	!IS_ENABLED(CONFIG_USB_EHCI_MXC) && \
 	!defined(PLATFORM_DRIVER) && \
 	!IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) && \
+	!IS_ENABLED(CONFIG_PLAT_SPEAR) && \
 	!defined(PS3_SYSTEM_BUS_DRIVER) && \
 	!defined(OF_PLATFORM_DRIVER) && \
 	!defined(XILINX_OF_PLATFORM_DRIVER)
drivers/usb/host/ehci-spear.c +41 -36

103 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#6 lore raw

PATCH 3/10 USB: EHCI: make ehci-spear a separate driver

Quoted 4 lines · On Thu, Feb 7, 2013 at 11:04 PM, <[email protected]> wrote:

From: Manjunath Goudar <[email protected]>

Separate the Spear host controller driver from ehci-hcd host code into its own driver module.

Please write spear as SPEAr everywhere, leaving
functions/variables/config options.

Quoted 75 lines
Cc Greg KH <[email protected]>
Cc Alan Stern <[email protected]>
Cc Viresh Kumar <[email protected]>
Cc Shiraz Hashim <[email protected]>
Cc linux-usb at vger.kernel.org
Cc spear-devel at list.st.com
---
 drivers/usb/host/Kconfig      |    8 +++++
 drivers/usb/host/Makefile     |    1 +
 drivers/usb/host/ehci-hcd.c   |    6 +---
 drivers/usb/host/ehci-spear.c |   77 ++++++++++++++++++++++-------------------
 4 files changed, 51 insertions(+), 41 deletions(-)
drivers/usb/host/Kconfig +8 -0
index 11e102e..4413075 100644
@@ -162,6 +162,14 @@ config USB_EHCI_HCD_OMAP
          Enables support for the on-chip EHCI controller on
          OMAP3 and later chips.
 
+config USB_EHCI_HCD_SPEAR
+        tristate "Support for ST spear on-chip EHCI USB controller"
+        depends on USB_EHCI_HCD && PLAT_SPEAR
+        default y
+        ---help---
+          Enables support for the on-chip EHCI controller on
+          ST spear chips.
+
 config USB_EHCI_MSM
        bool "Support for MSM on-chip EHCI USB controller"
        depends on USB_EHCI_HCD && ARCH_MSM
drivers/usb/host/Makefile +1 -0
index b54a597..c97f4ab 100644
@@ -28,6 +28,7 @@ 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_EHCI_HCD_SPEAR)+= ehci-spear.o
 obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o
 obj-$(CONFIG_USB_ISP116X_HCD)  += isp116x-hcd.o
 obj-$(CONFIG_USB_ISP1362_HCD)  += isp1362-hcd.o
drivers/usb/host/ehci-hcd.c +1 -5
index aaf93ca..68cea63 100644
@@ -1292,11 +1292,6 @@ MODULE_LICENSE ("GPL");
 #define        PLATFORM_DRIVER         vt8500_ehci_driver
 #endif
 
-#ifdef CONFIG_PLAT_SPEAR
-#include "ehci-spear.c"
-#define PLATFORM_DRIVER                spear_ehci_hcd_driver
-#endif
-
 #ifdef CONFIG_USB_EHCI_MSM
 #include "ehci-msm.c"
 #define PLATFORM_DRIVER                ehci_msm_driver
@@ -1343,6 +1338,7 @@ MODULE_LICENSE ("GPL");
        !IS_ENABLED(CONFIG_USB_EHCI_MXC) && \
        !defined(PLATFORM_DRIVER) && \
        !IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) && \
+       !IS_ENABLED(CONFIG_PLAT_SPEAR) && \
        !defined(PS3_SYSTEM_BUS_DRIVER) && \
        !defined(OF_PLATFORM_DRIVER) && \
        !defined(XILINX_OF_PLATFORM_DRIVER)
drivers/usb/host/ehci-spear.c +0 -0
index 466c1bb..6e42cee 100644

drivers/usb/host/ehci-spear.c line 20

Quoted 10 lines
drivers/usb/host/ehci-spear.c +7 -0
@@ -11,11 +11,25 @@
 * more details.
 */
 
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+#include <linux/usb/hcd.h>
+#include <linux/io.h>
+
+

remove these blank lines.

drivers/usb/host/ehci-spear.c line 26

Quoted 6 lines
drivers/usb/host/ehci-spear.c +1 -0
 #include <linux/clk.h>
 #include <linux/jiffies.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm.h>
+#include <linux/dma-mapping.h>

Keep all of them in alphabetical order.

Quoted 91 lines
drivers/usb/host/ehci-spear.c +32 -37
+#include "ehci.h"
+
+#define DRIVER_DESC "EHCI spear driver"
+
+static const char hcd_name[] = "ehci-spear";
 
 struct spear_ehci {
        struct ehci_hcd ehci;
@@ -43,40 +57,7 @@ static int ehci_spear_setup(struct usb_hcd *hcd)
 
        return ehci_setup(hcd);
 }
-
-static const struct hc_driver ehci_spear_hc_driver = {
-       .description                    = hcd_name,
-       .product_desc                   = "SPEAr EHCI",
-       .hcd_priv_size                  = sizeof(struct spear_ehci),
-
-       /* generic hardware linkage */
-       .irq                            = ehci_irq,
-       .flags                          = HCD_MEMORY | HCD_USB2,
-
-       /* basic lifecycle operations */
-       .reset                          = ehci_spear_setup,
-       .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,
-
-       /* scheduling support */
-       .get_frame_number               = ehci_get_frame,
-
-       /* 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,
-       .relinquish_port                = ehci_relinquish_port,
-       .port_handed_over               = ehci_port_handed_over,
-       .clear_tt_buffer_complete       = ehci_clear_tt_buffer_complete,
-};
+static struct hc_driver __read_mostly ehci_spear_hc_driver;
 
 #ifdef CONFIG_PM
 static int ehci_spear_drv_suspend(struct device *dev)
@@ -209,11 +190,35 @@ static struct platform_driver spear_ehci_hcd_driver = {
        .remove         = spear_ehci_hcd_drv_remove,
        .shutdown       = usb_hcd_platform_shutdown,
        .driver         = {
-               .name = "spear-ehci",
+               .name = hcd_name,
                .bus = &platform_bus_type,
                .pm = &ehci_spear_pm_ops,
                .of_match_table = of_match_ptr(spear_ehci_id_table),
        }
 };
 
-MODULE_ALIAS("platform:spear-ehci");
+
+static const struct ehci_driver_overrides spear_overrides __initdata = {
+       .reset = ehci_spear_setup,
+};
+
+static int __init ehci_spear_init(void)
+{
+       if (usb_disabled())
+               return -ENODEV;
+
+       pr_info("%s: " DRIVER_DESC "\n", hcd_name);
+
+       ehci_init_driver(&ehci_spear_hc_driver, &spear_overrides);
+       return platform_driver_register(&spear_ehci_hcd_driver);
+}
+module_init(ehci_spear_init);
+
+static void __exit ehci_spear_cleanup(void)
+{
+       platform_driver_unregister(&spear_ehci_hcd_driver);
+}
+module_exit(ehci_spear_cleanup);
+
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
--

1.7.9.5

#7 lore raw

PATCH 4/10 USB: EHCI: make ehci-orion a separate driver

In reply to a message not in the archive

From: Manjunath Goudar <[email protected]>

Separate the Marvell Orion host controller driver from ehci-hcd host code into its own driver module.

Cc Greg KH <[email protected]>
Cc Alan Stern <[email protected]>
Cc Jason Cooper <[email protected]>
Cc Andrew Lunn <[email protected]>
Cc Russell King <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 drivers/usb/host/Kconfig      |    7 +++
 drivers/usb/host/Makefile     |    1 +
 drivers/usb/host/ehci-hcd.c   |   27 +++++-------
 drivers/usb/host/ehci-orion.c |   98 +++++++++++++++++++++--------------------
 4 files changed, 69 insertions(+), 64 deletions(-)
drivers/usb/host/Kconfig +7 -0
index 4413075..3689b7b 100644
@@ -169,6 +169,13 @@ config USB_EHCI_HCD_SPEAR
         ---help---
           Enables support for the on-chip EHCI controller on
           ST spear chips.
+config USB_EHCI_HCD_ORION
+        tristate  "Support for Marvell Orion on-chip EHCI USB controller"
+        depends on USB_EHCI_HCD && PLAT_ORION
+        default y
+        ---help---
+          Enables support for the on-chip EHCI controller on
+          Morvell Orion chips.
 
 config USB_EHCI_MSM
 	bool "Support for MSM on-chip EHCI USB controller"
drivers/usb/host/Makefile +1 -0
index c97f4ab..23b07dd 100644
@@ -29,6 +29,7 @@ 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_EHCI_HCD_SPEAR)+= ehci-spear.o
+obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o
 obj-$(CONFIG_USB_OXU210HP_HCD)	+= oxu210hp-hcd.o
 obj-$(CONFIG_USB_ISP116X_HCD)	+= isp116x-hcd.o
 obj-$(CONFIG_USB_ISP1362_HCD)	+= isp1362-hcd.o
drivers/usb/host/ehci-hcd.c +11 -16
index 68cea63..5a19a57 100644
@@ -155,7 +155,7 @@ static inline unsigned ehci_read_frame_index(struct ehci_hcd *ehci)
  * before driver shutdown. But it also seems to be caused by bugs in cardbus
  * bridge shutdown:  shutting down the bridge before the devices using it.
  */
-static int handshake (struct ehci_hcd *ehci, void __iomem *ptr,
+int handshake(struct ehci_hcd *ehci, void __iomem *ptr,
 		      u32 mask, u32 done, int usec)
 {
 	u32	result;
@@ -172,9 +172,9 @@ static int handshake (struct ehci_hcd *ehci, void __iomem *ptr,
 	} while (usec > 0);
 	return -ETIMEDOUT;
 }
-
+EXPORT_SYMBOL_GPL(handshake);
 /* check TDI/ARC silicon is in host mode */
-static int tdi_in_host_mode (struct ehci_hcd *ehci)
+static int tdi_in_host_mode(struct ehci_hcd *ehci)
 {
 	u32		tmp;
 
@@ -186,7 +186,7 @@ static int tdi_in_host_mode (struct ehci_hcd *ehci)
  * Force HC to halt state from unknown (EHCI spec section 2.3).
  * Must be called with interrupts enabled and the lock not held.
  */
-static int ehci_halt (struct ehci_hcd *ehci)
+int ehci_halt(struct ehci_hcd *ehci)
 {
 	u32	temp;
 
@@ -215,9 +215,9 @@ static int ehci_halt (struct ehci_hcd *ehci)
 	return handshake(ehci, &ehci->regs->status,
 			  STS_HALT, STS_HALT, 16 * 125);
 }
-
+EXPORT_SYMBOL_GPL(ehci_halt);
 /* put TDI/ARC silicon into EHCI mode */
-static void tdi_reset (struct ehci_hcd *ehci)
+void tdi_reset(struct ehci_hcd *ehci)
 {
 	u32		tmp;
 
@@ -231,12 +231,12 @@ static void tdi_reset (struct ehci_hcd *ehci)
 		tmp |= USBMODE_BE;
 	ehci_writel(ehci, tmp, &ehci->regs->usbmode);
 }
-
+EXPORT_SYMBOL_GPL(tdi_reset);
 /*
  * Reset a non-running (STS_HALT == 1) controller.
  * Must be called with interrupts enabled and the lock not held.
  */
-static int ehci_reset (struct ehci_hcd *ehci)
+int ehci_reset(struct ehci_hcd *ehci)
 {
 	int	retval;
 	u32	command = ehci_readl(ehci, &ehci->regs->command);
@@ -272,7 +272,7 @@ static int ehci_reset (struct ehci_hcd *ehci)
 			ehci->resuming_ports = 0;
 	return retval;
 }
-
+EXPORT_SYMBOL_GPL(ehci_reset);
 /*
  * Idle the controller (turn off the schedules).
  * Must be called with interrupts enabled and the lock not held.
@@ -352,7 +352,7 @@ static void ehci_silence_controller(struct ehci_hcd *ehci)
  * This forcibly disables dma and IRQs, helping kexec and other cases
  * where the next system software may expect clean state.
  */
-static void ehci_shutdown(struct usb_hcd *hcd)
+void ehci_shutdown(struct usb_hcd *hcd)
 {
 	struct ehci_hcd	*ehci = hcd_to_ehci(hcd);
 
@@ -366,7 +366,7 @@ static void ehci_shutdown(struct usb_hcd *hcd)
 
 	hrtimer_cancel(&ehci->hrtimer);
 }
-
+EXPORT_SYMBOL_GPL(ehci_shutdown);
 /*-------------------------------------------------------------------------*/
 
 /*
@@ -1267,11 +1267,6 @@ MODULE_LICENSE ("GPL");
 #define XILINX_OF_PLATFORM_DRIVER	ehci_hcd_xilinx_of_driver
 #endif
 
-#ifdef CONFIG_PLAT_ORION
-#include "ehci-orion.c"
-#define	PLATFORM_DRIVER		ehci_orion_driver
-#endif
-
 #ifdef CONFIG_USB_W90X900_EHCI
 #include "ehci-w90x900.c"
 #define	PLATFORM_DRIVER		ehci_hcd_w90x900_driver
drivers/usb/host/ehci-orion.c +50 -48

135 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#8 lore raw

Re: [PATCH 04/10] USB: EHCI: make ehci-orion a separate driver

drivers/usb/host/ehci-hcd.c static inline unsigned ehci_read_frame_index(struct ehci_hcd *ehci) · line 161

Quoted 9 lines · manjunath.goudar at linaro.org
drivers/usb/host/ehci-hcd.c +1 -1
@@ -155,7 +155,7 @@ static inline unsigned ehci_read_frame_index(struct ehci_hcd *ehci)
  * before driver shutdown. But it also seems to be caused by bugs in cardbus
  * bridge shutdown:  shutting down the bridge before the devices using it.
  */
-static int handshake (struct ehci_hcd *ehci, void __iomem *ptr,
+int handshake(struct ehci_hcd *ehci, void __iomem *ptr,
                      u32 mask, u32 done, int usec)
 {
        u32     result;

I had not noticed this before, but apparently it belongs into the tegra patch that you dropped, rather than this patch.

Same thing for all the changes below.

Quoted 67 lines
drivers/usb/host/ehci-hcd.c +9 -9
@@ -172,9 +172,9 @@ static int handshake (struct ehci_hcd *ehci, void __iomem *ptr,
        } while (usec > 0);
        return -ETIMEDOUT;
 }
-
+EXPORT_SYMBOL_GPL(handshake);
 /* check TDI/ARC silicon is in host mode */
-static int tdi_in_host_mode (struct ehci_hcd *ehci)
+static int tdi_in_host_mode(struct ehci_hcd *ehci)
 {
        u32             tmp;
 
@@ -186,7 +186,7 @@ static int tdi_in_host_mode (struct ehci_hcd *ehci)
  * Force HC to halt state from unknown (EHCI spec section 2.3).
  * Must be called with interrupts enabled and the lock not held.
  */
-static int ehci_halt (struct ehci_hcd *ehci)
+int ehci_halt(struct ehci_hcd *ehci)
 {
        u32     temp;
 
@@ -215,9 +215,9 @@ static int ehci_halt (struct ehci_hcd *ehci)
        return handshake(ehci, &ehci->regs->status,
                          STS_HALT, STS_HALT, 16 * 125);
 }
-
+EXPORT_SYMBOL_GPL(ehci_halt);
 /* put TDI/ARC silicon into EHCI mode */
-static void tdi_reset (struct ehci_hcd *ehci)
+void tdi_reset(struct ehci_hcd *ehci)
 {
        u32             tmp;
 
@@ -231,12 +231,12 @@ static void tdi_reset (struct ehci_hcd *ehci)
                tmp |= USBMODE_BE;
        ehci_writel(ehci, tmp, &ehci->regs->usbmode);
 }
-
+EXPORT_SYMBOL_GPL(tdi_reset);
 /*
  * Reset a non-running (STS_HALT == 1) controller.
  * Must be called with interrupts enabled and the lock not held.
  */
-static int ehci_reset (struct ehci_hcd *ehci)
+int ehci_reset(struct ehci_hcd *ehci)
 {
        int     retval;
        u32     command = ehci_readl(ehci, &ehci->regs->command);
@@ -272,7 +272,7 @@ static int ehci_reset (struct ehci_hcd *ehci)
                        ehci->resuming_ports = 0;
        return retval;
 }
-
+EXPORT_SYMBOL_GPL(ehci_reset);
 /*
  * Idle the controller (turn off the schedules).
  * Must be called with interrupts enabled and the lock not held.
@@ -352,7 +352,7 @@ static void ehci_silence_controller(struct ehci_hcd *ehci)
  * This forcibly disables dma and IRQs, helping kexec and other cases
  * where the next system software may expect clean state.
  */
-static void ehci_shutdown(struct usb_hcd *hcd)
+void ehci_shutdown(struct usb_hcd *hcd)
 {
        struct ehci_hcd *ehci = hcd_to_ehci(hcd);
 

drivers/usb/host/ehci-hcd.c static void ehci_shutdown(struct usb_hcd *hcd) · line 369

Quoted 5 lines
drivers/usb/host/ehci-hcd.c +1 -1
@@ -366,7 +366,7 @@ static void ehci_shutdown(struct usb_hcd *hcd)
 
        hrtimer_cancel(&ehci->hrtimer);
 }
-
+EXPORT_SYMBOL_GPL(ehci_shutdown);

Arnd

#9 lore raw

Re: [PATCH 04/10] USB: EHCI: make ehci-orion a separate driver

In reply to [email protected]

Hello Manjunath,

Quoted 5 lines · manjunath.goudar at linaro.org

From: Manjunath Goudar <[email protected]>

Separate the Marvell Orion host controller driver from ehci-hcd host code into its own driver module.

[snip]

The changes you introduce in ehci-hcd.c would certainly deserve their own preliminary patch in this serie and not be squashed into this one imho.

Quoted 12 lines
drivers/usb/host/ehci-hcd.c +1 -1
@@ -155,7 +155,7 @@ static inline unsigned ehci_read_frame_index(struct ehci_hcd *ehci)
   * before driver shutdown. But it also seems to be caused by bugs in cardbus
   * bridge shutdown:  shutting down the bridge before the devices using it.
   */
-static int handshake (struct ehci_hcd *ehci, void __iomem *ptr,
+int handshake(struct ehci_hcd *ehci, void __iomem *ptr,
  		      u32 mask, u32 done, int usec)
  {
  	u32	result;

drivers/usb/host/ehci-hcd.c static int handshake (struct ehci_hcd *ehci, void __iomem *ptr, · line 175

Quoted 5 lines
drivers/usb/host/ehci-hcd.c +1 -1
@@ -172,9 +172,9 @@ static int handshake (struct ehci_hcd *ehci, void __iomem *ptr,
  	} while (usec > 0);
  	return -ETIMEDOUT;
  }
-
+EXPORT_SYMBOL_GPL(handshake);

This sounds way too generic as a name to be exported as is, so please namespace this with ehci_hcd_ at least.

drivers/usb/host/ehci-hcd.c static int handshake (struct ehci_hcd *ehci, void __iomem *ptr, · line 177

Quoted 3 lines
drivers/usb/host/ehci-hcd.c +1 -1
  /* check TDI/ARC silicon is in host mode */
-static int tdi_in_host_mode (struct ehci_hcd *ehci)
+static int tdi_in_host_mode(struct ehci_hcd *ehci)

Looks unrelated to the goals of your patches.

Quoted 13 lines
drivers/usb/host/ehci-hcd.c +1 -1
  {
  	u32		tmp;
 
@@ -186,7 +186,7 @@ static int tdi_in_host_mode (struct ehci_hcd *ehci)
   * Force HC to halt state from unknown (EHCI spec section 2.3).
   * Must be called with interrupts enabled and the lock not held.
   */
-static int ehci_halt (struct ehci_hcd *ehci)
+int ehci_halt(struct ehci_hcd *ehci)
  {
  	u32	temp;
 

drivers/usb/host/ehci-hcd.c static int ehci_halt (struct ehci_hcd *ehci) · line 218

Quoted 5 lines
drivers/usb/host/ehci-hcd.c +1 -1
@@ -215,9 +215,9 @@ static int ehci_halt (struct ehci_hcd *ehci)
  	return handshake(ehci, &ehci->regs->status,
  			  STS_HALT, STS_HALT, 16 * 125);
  }
-
+EXPORT_SYMBOL_GPL(ehci_halt);

I would rename this to ehci_hcd_halt to express the fact that it takes an ehci_hcd structure pointer as parameter, can be addressed later.

drivers/usb/host/ehci-hcd.c static void tdi_reset (struct ehci_hcd *ehci) · line 234

Quoted 12 lines
drivers/usb/host/ehci-hcd.c +2 -2
  /* put TDI/ARC silicon into EHCI mode */
-static void tdi_reset (struct ehci_hcd *ehci)
+void tdi_reset(struct ehci_hcd *ehci)
  {
  	u32		tmp;
 
@@ -231,12 +231,12 @@ static void tdi_reset (struct ehci_hcd *ehci)
  		tmp |= USBMODE_BE;
  	ehci_writel(ehci, tmp, &ehci->regs->usbmode);
  }
-
+EXPORT_SYMBOL_GPL(tdi_reset);

Same here, way too generic to be exported as is as a symbol name. --
Florian

#10 lore raw

PATCH 5/10 USB: EHCI: make ehci-atmel a separate driver

In reply to a message not in the archive

From: Manjunath Goudar <[email protected]>

Separate the Atmel host controller driver from ehci-hcd host code into its own driver module.

Cc Alan Stern <[email protected]>
Cc Greg KH <[email protected]>
Cc Grant Likely <[email protected]>
Cc Rob Herring <[email protected]>
Cc Andrew Victor <[email protected]>
Cc Nicolas Ferre <[email protected]>
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc linux-usb at vger.kernel.org
Cc linux-kernel at vger.kernel.org
---
 drivers/usb/host/Kconfig      |    7 ++++
 drivers/usb/host/Makefile     |    1 +
 drivers/usb/host/ehci-atmel.c |   78 ++++++++++++++++++++++-------------------
 drivers/usb/host/ehci-hcd.c   |    6 +---
 4 files changed, 51 insertions(+), 41 deletions(-)
drivers/usb/host/Kconfig +7 -0
index 3689b7b..5a13f9d 100644
@@ -176,6 +176,13 @@ config USB_EHCI_HCD_ORION
         ---help---
           Enables support for the on-chip EHCI controller on
           Morvell Orion chips.
+config USB_EHCI_HCD_AT91
+        tristate  "Support for Atmel on-chip EHCI USB controller"
+        depends on USB_EHCI_HCD && ARCH_AT91
+        default y
+        ---help---
+          Enables support for the on-chip EHCI controller on
+          Atmel chips.
 
 config USB_EHCI_MSM
 	bool "Support for MSM on-chip EHCI USB controller"
drivers/usb/host/Makefile +1 -0
index 23b07dd..96b4839 100644
@@ -31,6 +31,7 @@ obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o
 obj-$(CONFIG_USB_EHCI_HCD_SPEAR)+= ehci-spear.o
 obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o
 obj-$(CONFIG_USB_OXU210HP_HCD)	+= oxu210hp-hcd.o
+obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o
 obj-$(CONFIG_USB_ISP116X_HCD)	+= isp116x-hcd.o
 obj-$(CONFIG_USB_ISP1362_HCD)	+= isp1362-hcd.o
 obj-$(CONFIG_USB_OHCI_HCD)	+= ohci-hcd.o
drivers/usb/host/ehci-atmel.c +42 -36

96 lines not on this page · raw message

drivers/usb/host/ehci-hcd.c +1 -5
index 5a19a57..628ed139 100644
@@ -1272,11 +1272,6 @@ MODULE_LICENSE ("GPL");
 #define	PLATFORM_DRIVER		ehci_hcd_w90x900_driver
 #endif
 
-#ifdef CONFIG_ARCH_AT91
-#include "ehci-atmel.c"
-#define	PLATFORM_DRIVER		ehci_atmel_driver
-#endif
-
 #ifdef CONFIG_USB_OCTEON_EHCI
 #include "ehci-octeon.c"
 #define PLATFORM_DRIVER		ehci_octeon_driver
@@ -1334,6 +1329,7 @@ MODULE_LICENSE ("GPL");
 	!defined(PLATFORM_DRIVER) && \
 	!IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) && \
 	!IS_ENABLED(CONFIG_PLAT_SPEAR) && \
+	!IS_ENABLED(CONFIG_ARCH_AT91) && \
 	!defined(PS3_SYSTEM_BUS_DRIVER) && \
 	!defined(OF_PLATFORM_DRIVER) && \
 	!defined(XILINX_OF_PLATFORM_DRIVER)
Signature · 1 line
1.7.9.5
#11 lore raw

Re: [PATCH 05/10] USB: EHCI: make ehci-atmel a separate driver

Hi Manjunath Goudar,
I test this patch based on linux master branch, the commit id is:
6bacaa9ddacb71c691d32c678d37bc59ffc71fac. (I am not sure this is the right place for testing).
First, it has an compile error as following. After fix it, and
tested, the EHCI doesn't work.
---<8---
drivers/usb/host/ehci-atmel.c: In function 'ehci_atmel_drv_remove':
drivers/usb/host/ehci-atmel.c:167: error: implicit declaration of function 'ehci_shutdown'
--->8---

And a little code style comments as following.

Quoted 27 lines · manjunath.goudar at linaro.org

From: Manjunath Goudar <[email protected]>

Separate the Atmel host controller driver from ehci-hcd host code into its own driver module.

Cc Alan Stern <[email protected]>
Cc Greg KH <[email protected]>
Cc Grant Likely <[email protected]>
Cc Rob Herring <[email protected]>
Cc Andrew Victor <[email protected]>
Cc Nicolas Ferre <[email protected]>
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc linux-usb at vger.kernel.org
Cc linux-kernel at vger.kernel.org
---
  drivers/usb/host/Kconfig      |    7 ++++
  drivers/usb/host/Makefile     |    1 +
  drivers/usb/host/ehci-atmel.c |   78 ++++++++++++++++++++++-------------------
  drivers/usb/host/ehci-hcd.c   |    6 +---
  4 files changed, 51 insertions(+), 41 deletions(-)
drivers/usb/host/Kconfig +0 -0
index 3689b7b..5a13f9d 100644

drivers/usb/host/Kconfig config USB_EHCI_HCD_ORION · line 178

Quoted 3 lines
drivers/usb/host/Kconfig +0 -0
@@ -176,6 +176,13 @@ config USB_EHCI_HCD_ORION
          ---help---
            Enables support for the on-chip EHCI controller on
            Morvell Orion chips.

Need blank line here.

Quoted 10 lines
drivers/usb/host/Kconfig +7 -0
+config USB_EHCI_HCD_AT91
+        tristate  "Support for Atmel on-chip EHCI USB controller"
+        depends on USB_EHCI_HCD && ARCH_AT91
+        default y
+        ---help---
+          Enables support for the on-chip EHCI controller on
+          Atmel chips.
 
  config USB_EHCI_MSM
  	bool "Support for MSM on-chip EHCI USB controller"

[snip]

drivers/usb/host/Kconfig

Quoted 12 lines
drivers/usb/host/Kconfig +12 -0
+static void __exit ehci_atmel_cleanup(void)
+{
+	platform_driver_unregister(&ehci_atmel_driver);
+}
+module_exit(ehci_atmel_cleanup);
+
+MODULE_DESCRIPTION(DRIVER_DESC);
+
+MODULE_ALIAS("platform:ehci-atmel");
+MODULE_AUTHOR("Nicolas Ferre");
+MODULE_LICENSE("GPL");
+

Remove the blank line here. As to it is the EOF.

Best Regards,
Bo Shen

#12 lore raw

Re: [PATCH 05/10] USB: EHCI: make ehci-atmel a separate driver

In reply to [email protected]
Quoted 5 lines · manjunath.goudar at linaro.org

From: Manjunath Goudar <[email protected]>

Separate the Atmel host controller driver from ehci-hcd host code into its own driver module.

Quoted 10 lines
Cc Alan Stern <[email protected]>
Cc Greg KH <[email protected]>
Cc Grant Likely <[email protected]>
Cc Rob Herring <[email protected]>
Cc Andrew Victor <[email protected]>
Cc Nicolas Ferre <[email protected]>
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc linux-usb at vger.kernel.org
Cc linux-kernel at vger.kernel.org

Best Regards,
J.

Quoted 167 lines
---
 drivers/usb/host/Kconfig      |    7 ++++
 drivers/usb/host/Makefile     |    1 +
 drivers/usb/host/ehci-atmel.c |   78 ++++++++++++++++++++++-------------------
 drivers/usb/host/ehci-hcd.c   |    6 +---
 4 files changed, 51 insertions(+), 41 deletions(-)
drivers/usb/host/Kconfig +7 -0
index 3689b7b..5a13f9d 100644
@@ -176,6 +176,13 @@ config USB_EHCI_HCD_ORION
         ---help---
           Enables support for the on-chip EHCI controller on
           Morvell Orion chips.
+config USB_EHCI_HCD_AT91
+        tristate  "Support for Atmel on-chip EHCI USB controller"
+        depends on USB_EHCI_HCD && ARCH_AT91
+        default y
+        ---help---
+          Enables support for the on-chip EHCI controller on
+          Atmel chips.
 
 config USB_EHCI_MSM
 	bool "Support for MSM on-chip EHCI USB controller"
drivers/usb/host/Makefile +1 -0
index 23b07dd..96b4839 100644
@@ -31,6 +31,7 @@ obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o
 obj-$(CONFIG_USB_EHCI_HCD_SPEAR)+= ehci-spear.o
 obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o
 obj-$(CONFIG_USB_OXU210HP_HCD)	+= oxu210hp-hcd.o
+obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o
 obj-$(CONFIG_USB_ISP116X_HCD)	+= isp116x-hcd.o
 obj-$(CONFIG_USB_ISP1362_HCD)	+= isp1362-hcd.o
 obj-$(CONFIG_USB_OHCI_HCD)	+= ohci-hcd.o
drivers/usb/host/ehci-atmel.c +42 -36
index 27639487..2f06711 100644
@@ -15,6 +15,19 @@
 #include <linux/platform_device.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+#include <linux/usb/hcd.h>
+#include <linux/io.h>
+#include <linux/dma-mapping.h>
+
+#include "ehci.h"
+
+#define DRIVER_DESC "EHCI atmel driver"
+
+static const char hcd_name[] = "ehci-atmel";
+static struct hc_driver __read_mostly ehci_atmel_hc_driver;
 
 /* interface and function clocks */
 static struct clk *iclk, *fclk;
@@ -60,41 +73,6 @@ static int ehci_atmel_setup(struct usb_hcd *hcd)
 	return ehci_setup(hcd);
 }
 
-static const struct hc_driver ehci_atmel_hc_driver = {
-	.description		= hcd_name,
-	.product_desc		= "Atmel EHCI UHP HS",
-	.hcd_priv_size		= sizeof(struct ehci_hcd),
-
-	/* generic hardware linkage */
-	.irq			= ehci_irq,
-	.flags			= HCD_MEMORY | HCD_USB2,
-
-	/* basic lifecycle operations */
-	.reset			= ehci_atmel_setup,
-	.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,
-
-	/* scheduling support */
-	.get_frame_number	= ehci_get_frame,
-
-	/* 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,
-	.relinquish_port	= ehci_relinquish_port,
-	.port_handed_over	= ehci_port_handed_over,
-
-	.clear_tt_buffer_complete	= ehci_clear_tt_buffer_complete,
-};
-
 static u64 at91_ehci_dma_mask = DMA_BIT_MASK(32);
 
 static int ehci_atmel_drv_probe(struct platform_device *pdev)
@@ -210,7 +188,35 @@ static struct platform_driver ehci_atmel_driver = {
 	.remove		= ehci_atmel_drv_remove,
 	.shutdown	= usb_hcd_platform_shutdown,
 	.driver		= {
-		.name	= "atmel-ehci",
+		.name	= hcd_name,
 		.of_match_table	= of_match_ptr(atmel_ehci_dt_ids),
 	},
 };
+
+static const struct ehci_driver_overrides atmel_overrides __initdata = {
+	.reset = ehci_atmel_setup,
+};
+
+static int __init ehci_atmel_init(void)
+{
+	if (usb_disabled())
+		return -ENODEV;
+
+	pr_info("%s: " DRIVER_DESC "\n", hcd_name);
+	ehci_init_driver(&ehci_atmel_hc_driver, &atmel_overrides);
+	return platform_driver_register(&ehci_atmel_driver);
+}
+module_init(ehci_atmel_init);
+
+static void __exit ehci_atmel_cleanup(void)
+{
+	platform_driver_unregister(&ehci_atmel_driver);
+}
+module_exit(ehci_atmel_cleanup);
+
+MODULE_DESCRIPTION(DRIVER_DESC);
+
+MODULE_ALIAS("platform:ehci-atmel");
+MODULE_AUTHOR("Nicolas Ferre");
+MODULE_LICENSE("GPL");
+
drivers/usb/host/ehci-hcd.c +1 -5
index 5a19a57..628ed139 100644
@@ -1272,11 +1272,6 @@ MODULE_LICENSE ("GPL");
 #define	PLATFORM_DRIVER		ehci_hcd_w90x900_driver
 #endif
 
-#ifdef CONFIG_ARCH_AT91
-#include "ehci-atmel.c"
-#define	PLATFORM_DRIVER		ehci_atmel_driver
-#endif
-
 #ifdef CONFIG_USB_OCTEON_EHCI
 #include "ehci-octeon.c"
 #define PLATFORM_DRIVER		ehci_octeon_driver
@@ -1334,6 +1329,7 @@ MODULE_LICENSE ("GPL");
 	!defined(PLATFORM_DRIVER) && \
 	!IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) && \
 	!IS_ENABLED(CONFIG_PLAT_SPEAR) && \
+	!IS_ENABLED(CONFIG_ARCH_AT91) && \
 	!defined(PS3_SYSTEM_BUS_DRIVER) && \
 	!defined(OF_PLATFORM_DRIVER) && \
 	!defined(XILINX_OF_PLATFORM_DRIVER)
Signature · 1 line
1.7.9.5
#13 lore raw

PATCH 6/10 USB: EHCI: make ehci-s5p a separate driver

In reply to a message not in the archive

From: Manjunath Goudar <[email protected]>

Separate the s5p host controller driver from ehci-hcd host code into its own driver module.

Cc Greg KH <[email protected]>
Cc Alan Stern <[email protected]>
Cc Kukjin Kim <[email protected]>
Cc Kyungmin Park <[email protected]>
Cc Grant Likely <[email protected]>
Cc Rob Herring <[email protected]>
Cc linux-usb at vger.kernel.org
---
 drivers/usb/host/Kconfig    |    2 +-
 drivers/usb/host/Makefile   |    1 +
 drivers/usb/host/ehci-hcd.c |    6 +---
 drivers/usb/host/ehci-s5p.c |   69 +++++++++++++++++++++++--------------------
 4 files changed, 40 insertions(+), 38 deletions(-)
drivers/usb/host/Kconfig +1 -1
index 5a13f9d..f2e0ed3 100644
@@ -221,7 +221,7 @@ config USB_EHCI_SH
 	  If you use the PCI EHCI controller, this option is not necessary.
 
 config USB_EHCI_S5P
-       boolean "S5P EHCI support"
+       tristate "S5P EHCI support"
        depends on USB_EHCI_HCD && PLAT_S5P
        help
 	 Enable support for the S5P SOC's on-chip EHCI controller.
drivers/usb/host/Makefile +1 -0
index 96b4839..5c4f5e1 100644
@@ -32,6 +32,7 @@ obj-$(CONFIG_USB_EHCI_HCD_SPEAR)+= ehci-spear.o
 obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o
 obj-$(CONFIG_USB_OXU210HP_HCD)	+= oxu210hp-hcd.o
 obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o
+obj-$(CONFIG_USB_EHCI_S5P)      += ehci-s5p.o
 obj-$(CONFIG_USB_ISP116X_HCD)	+= isp116x-hcd.o
 obj-$(CONFIG_USB_ISP1362_HCD)	+= isp1362-hcd.o
 obj-$(CONFIG_USB_OHCI_HCD)	+= ohci-hcd.o
drivers/usb/host/ehci-hcd.c +1 -5
index 628ed139..36557e3 100644
@@ -1297,11 +1297,6 @@ MODULE_LICENSE ("GPL");
 #define	PLATFORM_DRIVER		ehci_hcd_msp_driver
 #endif
 
-#ifdef CONFIG_USB_EHCI_TEGRA
-#include "ehci-tegra.c"
-#define PLATFORM_DRIVER		tegra_ehci_driver
-#endif
-
 #ifdef CONFIG_USB_EHCI_S5P
 #include "ehci-s5p.c"
 #define PLATFORM_DRIVER		s5p_ehci_driver
@@ -1330,6 +1325,7 @@ MODULE_LICENSE ("GPL");
 	!IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) && \
 	!IS_ENABLED(CONFIG_PLAT_SPEAR) && \
 	!IS_ENABLED(CONFIG_ARCH_AT91) && \
+	!IS_ENABLED(CONFIG_USB_EHCI_S5P) && \
 	!defined(PS3_SYSTEM_BUS_DRIVER) && \
 	!defined(OF_PLATFORM_DRIVER) && \
 	!defined(XILINX_OF_PLATFORM_DRIVER)
drivers/usb/host/ehci-s5p.c +37 -32

91 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#14 lore raw

PATCH 6/10 USB: EHCI: make ehci-s5p a separate driver

Quoted 6 lines · manjunath.goudar at linaro.org

Separate the s5p host controller driver from ehci-hcd host code into its own driver module.

drivers/usb/host/ehci-hcd.c MODULE_LICENSE ("GPL"); · line 1304

Quoted 8 lines
drivers/usb/host/ehci-hcd.c +0 -5
@@ -1297,11 +1297,6 @@ MODULE_LICENSE ("GPL");
 #define	PLATFORM_DRIVER		ehci_hcd_msp_driver
 #endif
 
-#ifdef CONFIG_USB_EHCI_TEGRA
-#include "ehci-tegra.c"
-#define PLATFORM_DRIVER		tegra_ehci_driver
-#endif
-

That also looks wrong.

#15 lore raw

PATCH 7/10 USB: EHCI: make ehci-mv a separate driver

In reply to a message not in the archive

From: Manjunath Goudar <[email protected]>

Separate the mv(marvell) host controller driver from ehci-hcd host code into its own driver module.

Cc Greg KH <[email protected]>
Cc Alan Stern <[email protected]>
Cc Jason Cooper <[email protected]>
Cc Andrew Lunn <[email protected]>
Cc linux-usb at vger.kernel.org
Cc linux-kernel at vger.kernel.org
---
 drivers/usb/host/Kconfig    |    2 +-
 drivers/usb/host/Makefile   |    1 +
 drivers/usb/host/ehci-hcd.c |    6 +---
 drivers/usb/host/ehci-mv.c  |   81 ++++++++++++++++++++-----------------------
 4 files changed, 40 insertions(+), 50 deletions(-)
drivers/usb/host/Kconfig +1 -1
index f2e0ed3..e7c3ce0 100644
@@ -227,7 +227,7 @@ config USB_EHCI_S5P
 	 Enable support for the S5P SOC's on-chip EHCI controller.
 
 config USB_EHCI_MV
-	bool "EHCI support for Marvell on-chip controller"
+	tristate "EHCI support for Marvell on-chip controller"
 	depends on USB_EHCI_HCD && (ARCH_PXA || ARCH_MMP)
 	select USB_EHCI_ROOT_HUB_TT
 	---help---
drivers/usb/host/Makefile +1 -0
index 5c4f5e1..677f1d3 100644
@@ -33,6 +33,7 @@ obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o
 obj-$(CONFIG_USB_OXU210HP_HCD)	+= oxu210hp-hcd.o
 obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o
 obj-$(CONFIG_USB_EHCI_S5P)      += ehci-s5p.o
+obj-$(CONFIG_USB_EHCI_MV)       += ehci-mv.o
 obj-$(CONFIG_USB_ISP116X_HCD)	+= isp116x-hcd.o
 obj-$(CONFIG_USB_ISP1362_HCD)	+= isp1362-hcd.o
 obj-$(CONFIG_USB_OHCI_HCD)	+= ohci-hcd.o
drivers/usb/host/ehci-hcd.c +1 -5
index 36557e3..e636719 100644
@@ -1307,11 +1307,6 @@ MODULE_LICENSE ("GPL");
 #define PLATFORM_DRIVER		ehci_grlib_driver
 #endif
 
-#ifdef CONFIG_USB_EHCI_MV
-#include "ehci-mv.c"
-#define        PLATFORM_DRIVER         ehci_mv_driver
-#endif
-
 #ifdef CONFIG_MIPS_SEAD3
 #include "ehci-sead3.c"
 #define	PLATFORM_DRIVER		ehci_hcd_sead3_driver
@@ -1326,6 +1321,7 @@ MODULE_LICENSE ("GPL");
 	!IS_ENABLED(CONFIG_PLAT_SPEAR) && \
 	!IS_ENABLED(CONFIG_ARCH_AT91) && \
 	!IS_ENABLED(CONFIG_USB_EHCI_S5P) && \
+	!IS_ENABLED(CONFIG_USB_EHCI_MV) && \
 	!defined(PS3_SYSTEM_BUS_DRIVER) && \
 	!defined(OF_PLATFORM_DRIVER) && \
 	!defined(XILINX_OF_PLATFORM_DRIVER)
drivers/usb/host/ehci-mv.c +37 -44

107 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#16 lore raw

PATCH 8/10 USB: EHCI: make ehci-vt8500 a separate driver

In reply to a message not in the archive

From: Manjunath Goudar <[email protected]>

Separate the vt8500 host controller driver from ehci-hcd host code into its own driver module.

Cc Greg KH <[email protected]>
Cc Alan Stern <[email protected]>
Cc Tony Prisk <[email protected]>
Cc Alexey Charkov <[email protected]>
Cc linux-usb at vger.kernel.org
Cc linux-kernel at vger.kernel.org
---
 drivers/usb/host/Kconfig       |    8 +++++
 drivers/usb/host/Makefile      |    1 +
 drivers/usb/host/ehci-hcd.c    |    5 ---
 drivers/usb/host/ehci-vt8500.c |   73 ++++++++++++++++++----------------------
 4 files changed, 42 insertions(+), 45 deletions(-)
drivers/usb/host/Kconfig +8 -0
index e7c3ce0..d20d22c 100644
@@ -162,6 +162,14 @@ config USB_EHCI_HCD_OMAP
 	  Enables support for the on-chip EHCI controller on
 	  OMAP3 and later chips.
 
+config USB_EHCI_HCD_VT8500
+        tristate "Support for VT8500 on-chip EHCI USB controller"
+        depends on USB_EHCI_HCD && ARCH_VT8500
+        default y
+        ---help---
+          Enables support for the on-chip EHCI controller on
+          VT8500 chips.
+
 config USB_EHCI_HCD_SPEAR
         tristate "Support for ST spear on-chip EHCI USB controller"
         depends on USB_EHCI_HCD && PLAT_SPEAR
drivers/usb/host/Makefile +1 -0
index 677f1d3..cf71e5d 100644
@@ -34,6 +34,7 @@ obj-$(CONFIG_USB_OXU210HP_HCD)	+= oxu210hp-hcd.o
 obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o
 obj-$(CONFIG_USB_EHCI_S5P)      += ehci-s5p.o
 obj-$(CONFIG_USB_EHCI_MV)       += ehci-mv.o
+obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o
 obj-$(CONFIG_USB_ISP116X_HCD)	+= isp116x-hcd.o
 obj-$(CONFIG_USB_ISP1362_HCD)	+= isp1362-hcd.o
 obj-$(CONFIG_USB_OHCI_HCD)	+= ohci-hcd.o
drivers/usb/host/ehci-hcd.c +0 -5
index e636719..952f85e 100644
@@ -1277,11 +1277,6 @@ MODULE_LICENSE ("GPL");
 #define PLATFORM_DRIVER		ehci_octeon_driver
 #endif
 
-#ifdef CONFIG_ARCH_VT8500
-#include "ehci-vt8500.c"
-#define	PLATFORM_DRIVER		vt8500_ehci_driver
-#endif
-
 #ifdef CONFIG_USB_EHCI_MSM
 #include "ehci-msm.c"
 #define PLATFORM_DRIVER		ehci_msm_driver
drivers/usb/host/ehci-vt8500.c +33 -40

96 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#17 lore raw

Re: [PATCH 08/10] USB: EHCI: make ehci-vt8500 a separate driver

Quoted 19 lines · manjunath.goudar at linaro.org

From: Manjunath Goudar <[email protected]>

Separate the vt8500 host controller driver from ehci-hcd host code into its own driver module.

Cc Greg KH <[email protected]>
Cc Alan Stern <[email protected]>
Cc Tony Prisk <[email protected]>
Cc Alexey Charkov <[email protected]>
Cc linux-usb at vger.kernel.org
Cc linux-kernel at vger.kernel.org
---
 drivers/usb/host/Kconfig       |    8 +++++
 drivers/usb/host/Makefile      |    1 +
 drivers/usb/host/ehci-hcd.c    |    5 ---
 drivers/usb/host/ehci-vt8500.c |   73 ++++++++++++++++++----------------------
 4 files changed, 42 insertions(+), 45 deletions(-)

...

Quoted 5 lines
drivers/usb/host/ehci-vt8500.c +0 -0
index 11695d5..ff4e3ae 100644
@@ -16,52 +16,25 @@

...

drivers/usb/host/ehci-vt8500.c static struct platform_driver vt8500_ehci_driver = { · line 141

Quoted 3 lines
drivers/usb/host/ehci-vt8500.c +3 -0
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_AUTHOR("Alexey Charkov");
+MODULE_LICENSE("GPL");

Should be "GPL v2" as per the license header.

Quoted 2 lines

MODULE_ALIAS("platform:vt8500-ehci");
MODULE_DEVICE_TABLE(of, vt8500_ehci_ids);

Regards
Tony Prisk

#18 lore raw

PATCH 9/10 USB: EHCI: make ehci-msm a separate driver

In reply to a message not in the archive

From: Manjunath Goudar <[email protected]>

Separate the Qualcomm On-Chip host controller driver from ehci-hcd host code into its own driver module.

Cc Greg KH <[email protected]>
Cc Alan Stern <[email protected]>
Cc David Brown <[email protected]>
Cc Daniel Walker <[email protected]>
Cc Bryan Huntsman <[email protected]>
Cc Brian Swetland <[email protected]>
Cc linux-usb at vger.kernel.org
Cc linux-kernel at vger.kernel.org
---
 drivers/usb/host/Kconfig    |    5 +--
 drivers/usb/host/Makefile   |    1 +
 drivers/usb/host/ehci-hcd.c |    7 ++--
 drivers/usb/host/ehci-msm.c |   84 +++++++++++++++++++------------------------
 4 files changed, 43 insertions(+), 54 deletions(-)
drivers/usb/host/Kconfig +3 -2
index d20d22c..8d18a6c 100644
@@ -184,6 +184,7 @@ config USB_EHCI_HCD_ORION
         ---help---
           Enables support for the on-chip EHCI controller on
           Morvell Orion chips.
+
 config USB_EHCI_HCD_AT91
         tristate  "Support for Atmel on-chip EHCI USB controller"
         depends on USB_EHCI_HCD && ARCH_AT91
@@ -193,7 +194,7 @@ config USB_EHCI_HCD_AT91
           Atmel chips.
 
 config USB_EHCI_MSM
-	bool "Support for MSM on-chip EHCI USB controller"
+	tristate "Support for MSM on-chip EHCI USB controller"
 	depends on USB_EHCI_HCD && ARCH_MSM
 	select USB_EHCI_ROOT_HUB_TT
 	select USB_MSM_OTG
@@ -209,7 +210,7 @@ config USB_EHCI_TEGRA
        boolean "NVIDIA Tegra HCD support"
        depends on USB_EHCI_HCD && ARCH_TEGRA
        select USB_EHCI_ROOT_HUB_TT
-       help
+      --- help---
          This driver enables support for the internal USB Host Controllers
          found in NVIDIA Tegra SoCs. The controllers are EHCI compliant.
 
drivers/usb/host/Makefile +1 -0
index cf71e5d..6c1d0e0 100644
@@ -35,6 +35,7 @@ obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o
 obj-$(CONFIG_USB_EHCI_S5P)      += ehci-s5p.o
 obj-$(CONFIG_USB_EHCI_MV)       += ehci-mv.o
 obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o
+obj-$(CONFIG_USB_EHCI_MSM)      += ehci-msm.o
 obj-$(CONFIG_USB_ISP116X_HCD)	+= isp116x-hcd.o
 obj-$(CONFIG_USB_ISP1362_HCD)	+= isp1362-hcd.o
 obj-$(CONFIG_USB_OHCI_HCD)	+= ohci-hcd.o
drivers/usb/host/ehci-hcd.c +2 -5
index 952f85e..d44115b 100644
@@ -1277,11 +1277,6 @@ MODULE_LICENSE ("GPL");
 #define PLATFORM_DRIVER		ehci_octeon_driver
 #endif
 
-#ifdef CONFIG_USB_EHCI_MSM
-#include "ehci-msm.c"
-#define PLATFORM_DRIVER		ehci_msm_driver
-#endif
-
 #ifdef CONFIG_TILE_USB
 #include "ehci-tilegx.c"
 #define	PLATFORM_DRIVER		ehci_hcd_tilegx_driver
@@ -1317,6 +1312,8 @@ MODULE_LICENSE ("GPL");
 	!IS_ENABLED(CONFIG_ARCH_AT91) && \
 	!IS_ENABLED(CONFIG_USB_EHCI_S5P) && \
 	!IS_ENABLED(CONFIG_USB_EHCI_MV) && \
+	!IS_ENABLED(CONFIG_ARCH_VT8500) && \
+	!IS_ENABLED(CONFIG_USB_EHCI_MSM) && \
 	!defined(PS3_SYSTEM_BUS_DRIVER) && \
 	!defined(OF_PLATFORM_DRIVER) && \
 	!defined(XILINX_OF_PLATFORM_DRIVER)
drivers/usb/host/ehci-msm.c +37 -47

104 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#19 lore raw

Re: [PATCH 09/10] USB: EHCI: make ehci-msm a separate driver

drivers/usb/host/Kconfig config USB_EHCI_TEGRA · line 215

Quoted 13 lines · manjunath.goudar at linaro.org

Separate the Qualcomm On-Chip host controller driver from ehci-hcd host code into its own driver module.

drivers/usb/host/Kconfig +1 -1
@@ -209,7 +210,7 @@ config USB_EHCI_TEGRA
        boolean "NVIDIA Tegra HCD support"
        depends on USB_EHCI_HCD && ARCH_TEGRA
        select USB_EHCI_ROOT_HUB_TT
-       help
+      --- help---
          This driver enables support for the internal USB Host Controllers
          found in NVIDIA Tegra SoCs. The controllers are EHCI compliant.

That seems like an unrelated change. The indentation and space after first "---" looks wrong too. It looks pretty random which of "help" and "---help---" is used in this file; if you're going to fix that, I think fix them all, but in a separate patch.

#20 lore raw

Re: [PATCH 09/10] USB: EHCI: make ehci-msm a separate driver

In reply to [email protected]

drivers/usb/host/ehci-msm.c static struct platform_driver ehci_msm_driver = { · line 218

Quoted 3 lines · manjunath.goudar at linaro.org
drivers/usb/host/ehci-msm.c +3 -0
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_ALIAS("platform:omap-msm");
+MODULE_LICENSE("GPL");

omap-msm? I think you mean msm-ehci.

I don't have any hardware to test this on, so hopefully someone can chime in after testing it.

David

Signature · 3 lines
sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#21 lore raw

PATCH 10/10 USB: EHCI: make ehci-w90X900 a separate driver

In reply to a message not in the archive

From: Manjunath Goudar <[email protected]>

Separate the Nuvoton On-Chip host controller driver from ehci-hcd host code into its own driver module.

Cc Greg KH <[email protected]>
Cc Alan Stern <[email protected]>
Cc Wan ZongShun <[email protected]>
Cc linux-usb at vger.kernel.org
Cc linux-kernel at vger.kernel.org
---
 drivers/usb/host/Kconfig        |    2 +-
 drivers/usb/host/Makefile       |    1 +
 drivers/usb/host/ehci-hcd.c     |    6 +--
 drivers/usb/host/ehci-w90x900.c |   90 +++++++++++++++++----------------------
 4 files changed, 43 insertions(+), 56 deletions(-)
drivers/usb/host/Kconfig +1 -1
index 8d18a6c..1b5e30b 100644
@@ -245,7 +245,7 @@ config USB_EHCI_MV
 	  only be EHCI host. OTG is controller that can switch to host mode.
 
 config USB_W90X900_EHCI
-	bool "W90X900(W90P910) EHCI support"
+	 tristate "W90X900(W90P910) EHCI support"
 	depends on USB_EHCI_HCD && ARCH_W90X900
 	---help---
 		Enables support for the W90X900 USB controller
drivers/usb/host/Makefile +1 -0
index 6c1d0e0..74db4d4 100644
@@ -36,6 +36,7 @@ obj-$(CONFIG_USB_EHCI_S5P)      += ehci-s5p.o
 obj-$(CONFIG_USB_EHCI_MV)       += ehci-mv.o
 obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o
 obj-$(CONFIG_USB_EHCI_MSM)      += ehci-msm.o
+obj-$(CONFIG_USB_W90X900_EHCI)  += ehci-w90x900.o
 obj-$(CONFIG_USB_ISP116X_HCD)	+= isp116x-hcd.o
 obj-$(CONFIG_USB_ISP1362_HCD)	+= isp1362-hcd.o
 obj-$(CONFIG_USB_OHCI_HCD)	+= ohci-hcd.o
drivers/usb/host/ehci-hcd.c +1 -5
index d44115b..84ed7d7 100644
@@ -1267,11 +1267,6 @@ MODULE_LICENSE ("GPL");
 #define XILINX_OF_PLATFORM_DRIVER	ehci_hcd_xilinx_of_driver
 #endif
 
-#ifdef CONFIG_USB_W90X900_EHCI
-#include "ehci-w90x900.c"
-#define	PLATFORM_DRIVER		ehci_hcd_w90x900_driver
-#endif
-
 #ifdef CONFIG_USB_OCTEON_EHCI
 #include "ehci-octeon.c"
 #define PLATFORM_DRIVER		ehci_octeon_driver
@@ -1314,6 +1309,7 @@ MODULE_LICENSE ("GPL");
 	!IS_ENABLED(CONFIG_USB_EHCI_MV) && \
 	!IS_ENABLED(CONFIG_ARCH_VT8500) && \
 	!IS_ENABLED(CONFIG_USB_EHCI_MSM) && \
+	!IS_ENABLED(CONFIG_USB_W90X900_EHCI) && \
 	!defined(PS3_SYSTEM_BUS_DRIVER) && \
 	!defined(OF_PLATFORM_DRIVER) && \
 	!defined(XILINX_OF_PLATFORM_DRIVER)
drivers/usb/host/ehci-w90x900.c +40 -50

117 lines not on this page · raw message

Signature · 1 line
1.7.9.5