USB: OHCI: more bus glues as separate modules
Subsystems (6)
cover USB: OHCI: more bus glues as separate modules
These patches are for separating the SOC On-Chip ohci host controller from ohci-hcd host code into its own driver module.
This work is part of enabling multi-platform kernels on ARM.
Manjunath Goudar (7):
USB: OHCI: make ohci-exynos a separate driver
USB: OHCI: make ohci-omap a separate driver
USB: OHCI: make ohci-omap3 a separate driver
USB: OHCI: make ohci-spear a separate driver
USB: OHCI: export ohci_hub_control and ohci_hub_status_data
USB: OHCI: make ohci-at91 a separate driver
USB: OHCI: make ohci-s3c2410 a separate driver
drivers/usb/host/Kconfig | 30 +++++++- drivers/usb/host/Makefile | 6 ++ drivers/usb/host/ohci-at91.c | 135 +++++++++++++++------------------- drivers/usb/host/ohci-exynos.c | 154 +++++++++++++++++---------------------- drivers/usb/host/ohci-hcd.c | 122 ++----------------------------- drivers/usb/host/ohci-hub.c | 8 +- drivers/usb/host/ohci-omap.c | 142 +++++++++++++----------------------- drivers/usb/host/ohci-omap3.c | 122 +++++++++++-------------------- drivers/usb/host/ohci-s3c2410.c | 116 ++++++++++++----------------- drivers/usb/host/ohci-spear.c | 149 ++++++++++++++++--------------------- drivers/usb/host/ohci.h | 9 +++ 11 files changed, 383 insertions(+), 610 deletions(-)
Signature · 1 line
1.7.9.5
RFC PATCH 1/7 USB: OHCI: make ohci-exynos a separate driver
Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-exynos.c | 154 +++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 20 +----- 4 files changed, 70 insertions(+), 107 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -484,7 +484,7 @@ config USB_OHCI_SH If you use the PCI OHCI controller, this option is not necessary. config USB_OHCI_EXYNOS - boolean "OHCI support for Samsung EXYNOS SoC Series" + tristate "OHCI support for Samsung EXYNOS SoC Series" depends on ARCH_EXYNOS help Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
drivers/usb/host/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o +obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-exynos.c +67 -87
289 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +1 -19
@@ -1178,11 +1178,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_EXYNOS -#include "ohci-exynos.c" -#define EXYNOS_PLATFORM_DRIVER exynos_ohci_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 #include "ohci-omap.c" #define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver
@@ -1260,6 +1255,7 @@ MODULE_LICENSE ("GPL"); #if !IS_ENABLED(CONFIG_USB_OHCI_HCD_PCI) && \ !IS_ENABLED(CONFIG_USB_OHCI_HCD_PLATFORM) && \ + !IS_ENABLED(CONFIG_USB_OHCI_EXYNOS) && \ !defined(PLATFORM_DRIVER) && \ !defined(OMAP1_PLATFORM_DRIVER) && \ !defined(OMAP3_PLATFORM_DRIVER) && \
@@ -1269,7 +1265,6 @@ MODULE_LICENSE ("GPL"); !defined (SM501_OHCI_DRIVER ) && \ !defined (TMIO_OHCI_DRIVER ) && \ !defined (S3C2410_PLATFORM_DRIVER ) && \ - !defined (EXYNOS_PLATFORM_DRIVER ) && \ !defined (EP93XX_PLATFORM_DRIVER ) && \ !defined (AT91_PLATFORM_DRIVER ) && \ !defined(NXP_PLATFORM_DRIVER) && \
@@ -1352,12 +1347,6 @@ static int __init ohci_hcd_mod_init(void) goto error_s3c2410;#endif -#ifdef EXYNOS_PLATFORM_DRIVER - retval =platform_driver_register (&EXYNOS_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_exynos; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1411,10 +1400,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); - error_exynos: -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); error_s3c2410:
@@ -1479,9 +1464,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
RFC PATCH 1/7 USB: OHCI: make ohci-exynos a separate driver
Quoted 8 lines · On Friday 07 June 2013 11:33:27 Manjunath Goudar wrote:
#if !IS_ENABLED(CONFIG_USB_OHCI_HCD_PCI) && \ !IS_ENABLED(CONFIG_USB_OHCI_HCD_PLATFORM) && \drivers/usb/host/ohci-hcd.c +1
-0+ !IS_ENABLED (CONFIG_USB_OHCI_EXYNOS ) && \ !defined (PLATFORM_DRIVER ) && \ !defined (OMAP1_PLATFORM_DRIVER ) && \ !defined(OMAP3_PLATFORM_DRIVER) && \
drivers/usb/host/ohci-hcd.c MODULE_LICENSE ("GPL"); · line 1270
Quoted 7 lines
drivers/usb/host/ohci-hcd.c +0
-1@@ -1269,7 +1265,6 @@ MODULE_LICENSE ("GPL"); !defined (SM501_OHCI_DRIVER ) && \ !defined (TMIO_OHCI_DRIVER ) && \ !defined (S3C2410_PLATFORM_DRIVER ) && \ - !defined (EXYNOS_PLATFORM_DRIVER ) && \ !defined (EP93XX_PLATFORM_DRIVER ) && \ !defined (AT91_PLATFORM_DRIVER ) && \ !defined(NXP_PLATFORM_DRIVER) && \
Hi Manjunath,
please note that Greg just merged my patch to remove this entire list and the #error statement. The next time you rebase your patch, you will have to remove this hunk in each of your patches.
Arnd
Alan Stern
maintainerRFC PATCH 1/7 USB: OHCI: make ohci-exynos a separate driver
In reply to Manjunath Goudardrivers/usb/host/ohci-exynos.c line 46
Quoted 9 lines · Manjunath Goudar
Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
drivers/usb/host/ohci-exynos.c +2
-2-static void exynos_ohci_phy_enable (struct exynos_ohci_hcd *exynos_ohci) +static void exynos_ohci_phy_enable (struct platform_device *pdev) { -struct platform_device *pdev =to_platform_device (exynos_ohci->dev); +struct exynos_ohci_hcd *exynos_ohci =platform_get_drvdata (pdev);
This is wrong. platform_get_drvdata() will return the hcd, not the exynos_ohci_hcd structure.
drivers/usb/host/ohci-exynos.c static void exynos_ohci_phy_enable(struct exynos_ohci_hcd *exynos_ohci) · line 56
Quoted 9 lines
drivers/usb/host/ohci-exynos.c +2
-2@@ -37,9 +51,9 @@ static void exynos_ohci_phy_enable(struct exynos_ohci_hcd *exynos_ohci) exynos_ohci->pdata->phy_init (pdev,USB_PHY_TYPE_HOST ); } -static void exynos_ohci_phy_disable (struct exynos_ohci_hcd *exynos_ohci) +static void exynos_ohci_phy_disable (struct platform_device *pdev) { -struct platform_device *pdev =to_platform_device (exynos_ohci->dev); +struct exynos_ohci_hcd *exynos_ohci =platform_get_drvdata (pdev);
Same problem here.
Quoted 8 lines
drivers/usb/host/ohci-exynos.c +1
-3@@ -121,15 +83,18 @@ static int exynos_ohci_probe(struct platform_device *pdev)if (!pdev->dev.coherent_dma_mask) pdev->dev.coherent_dma_mask =DMA_BIT_MASK (32 ); - exynos_ohci =devm_kzalloc (&pdev->dev,sizeof (struct exynos_ohci_hcd ), -GFP_KERNEL ); -if (!exynos_ohci) + hcd = usb_create_hcd(&exynos_ohci_hc_driver,
drivers/usb/host/ohci-exynos.c static int exynos_ohci_probe(struct platform_device *pdev) · line 96
Quoted 10 lines
drivers/usb/host/ohci-exynos.c +4
-0+ &pdev->dev, dev_name(&pdev->dev)); +if (!hcd) { +dev_err (&pdev->dev,"Unable to create HCD\n" );return -ENOMEM ;if (of_device_is_compatible (pdev->dev.of_node,"samsung,exynos5440-ohci" )) goto skip_phy; + }
This close brace belongs with the previous "if" statement.
drivers/usb/host/ohci-exynos.c static int exynos_ohci_probe(struct platform_device *pdev) · line 116
Quoted 8 lines
drivers/usb/host/ohci-exynos.c +0
-1@@ -146,7 +111,6 @@ static int exynos_ohci_probe(struct platform_device *pdev) skip_phy: - exynos_ohci->dev = &pdev->dev; hcd =usb_create_hcd (&exynos_ohci_hc_driver, &pdev->dev,dev_name (&pdev->dev));
This needs to be deleted, because it was done already.
Manjunath, I have already asked you to proof-read your patches before posting them. Please do so. New patches should _not_ have this kind of error.
drivers/usb/host/ohci-exynos.c skip_phy: · line 160
Quoted 10 lines
drivers/usb/host/ohci-exynos.c +2
-3@@ -192,13 +155,11 @@ skip_phy: }if (exynos_ohci->otg) - exynos_ohci->otg->set_host (exynos_ohci->otg, - &exynos_ohci->hcd->self); + exynos_ohci->otg->set_host (exynos_ohci->otg, &hcd->self); -exynos_ohci_phy_enable (exynos_ohci); +exynos_ohci_phy_enable (pdev);
This call will not work, because you don't set pdev's platform_data until later. The call to platform_set_drvdata() must be moved before this line.
drivers/usb/host/ohci-exynos.c skip_phy: · line 162
Quoted 4 lines
drivers/usb/host/ohci-exynos.c +1
-2- ohci =hcd_to_ohci (hcd); -ohci_hcd_init (ohci); +ohci_setup (hcd);
There's no need to call ohci_setup(), because it will get called anyway as the .reset member of the ohci_hc_driver structure.
Alan Stern
RFC PATCH 2/7 USB: OHCI: make ohci-omap a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 20 +----- drivers/usb/host/ohci-omap.c | 142 ++++++++++++++++-------------------------- 4 files changed, 55 insertions(+), 110 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -397,7 +397,7 @@ config USB_OHCI_HCD if USB_OHCI_HCD config USB_OHCI_HCD_OMAP1 - bool "OHCI support for OMAP1/2 chips" + tristate "OHCI support for OMAP1/2 chips" depends on ARCH_OMAP1 default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -47,6 +47,7 @@ obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +1 -19
@@ -1178,11 +1178,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 -#include "ohci-omap.c" -#define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 #include "ohci-omap3.c" #define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver
@@ -1256,8 +1251,8 @@ MODULE_LICENSE ("GPL"); #if !IS_ENABLED(CONFIG_USB_OHCI_HCD_PCI) && \ !IS_ENABLED(CONFIG_USB_OHCI_HCD_PLATFORM) && \ !IS_ENABLED(CONFIG_USB_OHCI_EXYNOS) && \ + !IS_ENABLED(CONFIG_USB_OHCI_HCD_OMAP1) && \ !defined(PLATFORM_DRIVER) && \ - !defined(OMAP1_PLATFORM_DRIVER) && \ !defined(OMAP3_PLATFORM_DRIVER) && \ !defined(OF_PLATFORM_DRIVER) && \ !defined(SA1111_DRIVER) && \
@@ -1305,12 +1300,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP1_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP1_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap1_platform; -#endif -#ifdef OMAP3_PLATFORM_DRIVER retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER );if (retval <0 )
@@ -1424,10 +1413,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); error_omap3_platform:#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); - error_omap1_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1482,9 +1467,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OMAP3_PLATFORM_DRIVER platform_driver_unregister (&OMAP3_PLATFORM_DRIVER );#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap.c +52 -90
211 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerRFC PATCH 2/7 USB: OHCI: make ohci-omap a separate driver
drivers/usb/host/ohci-omap.c static struct clk *usb_dc_ck; · line 78
Quoted 7 lines · Manjunath Goudar
Separate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
drivers/usb/host/ohci-omap.c +0
-0@@ -71,6 +77,10 @@ static struct clk *usb_dc_ck;static int host_enabled;static int host_initialized;
These two variables aren't used for anything. You should get rid of them.
drivers/usb/host/ohci-omap.c static int ohci_omap_init(struct usb_hcd *hcd) · line 221
Quoted 12 lines
drivers/usb/host/ohci-omap.c +6
-0@@ -201,8 +211,14 @@ static int ohci_omap_init(struct usb_hcd *hcd)ohci_to_hcd (ohci)->self.otg_port = config->otg;/* default/minimum OTG power budget: 8 mA */ ohci_to_hcd (ohci)->power_budget =8 ; + ohci->hc_control =OHCI_CTRL_RWC ; +writel (OHCI_CTRL_RWC , &ohci->regs->control); } +if (config->rwc) { + ohci->hc_control =OHCI_CTRL_RWC ; +writel (OHCI_CTRL_RWC , &ohci->regs->control); + }
It's better to have two tests. Remove the two lines added to the previous "if" block, and change this test to
if (config->otg || config->rwc) {drivers/usb/host/ohci-omap.c static int ohci_omap_init(struct usb_hcd *hcd) · line 288
Quoted 9 lines
drivers/usb/host/ohci-omap.c +0
-5@@ -281,14 +298,6 @@ static int ohci_omap_init(struct usb_hcd *hcd)return 0 ; } -static void ohci_omap_stop (struct usb_hcd *hcd) -{ -dev_dbg (hcd->self.controller,"stopping USB Controller\n" ); -ohci_stop (hcd); -omap_ohci_clock_power (0 );
This last line seems to have gotten lost. You need to add it to usb_hcd_omap_remove().
drivers/usb/host/ohci-omap.c static int usb_hcd_omap_probe (const struct hc_driver *driver, · line 365
Quoted 7 lines
drivers/usb/host/ohci-omap.c +1
-2@@ -354,8 +362,7 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver, goto err2; } - ohci =hcd_to_ohci (hcd); -ohci_hcd_init (ohci); +ohci_setup (hcd);
Not needed, since you call ohci_setup() from within ohci_omap_reset().
Alan Stern
RFC PATCH 3/7 USB: OHCI: make ohci-omap3 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 20 +------ drivers/usb/host/ohci-omap3.c | 122 ++++++++++++++--------------------------- 4 files changed, 45 insertions(+), 100 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -404,7 +404,7 @@ config USB_OHCI_HCD_OMAP1 Enables support for the OHCI controller on OMAP1/2 chips. config USB_OHCI_HCD_OMAP3 - bool "OHCI support for OMAP3 and later chips" + tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4) default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +1 -19
@@ -1178,11 +1178,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 -#include "ohci-omap3.c" -#define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1252,8 +1247,8 @@ MODULE_LICENSE ("GPL"); !IS_ENABLED (CONFIG_USB_OHCI_HCD_PLATFORM ) && \ !IS_ENABLED (CONFIG_USB_OHCI_EXYNOS ) && \ !IS_ENABLED (CONFIG_USB_OHCI_HCD_OMAP1 ) && \ + !IS_ENABLED (CONFIG_USB_OHCI_HCD_OMAP3 ) && \ !defined (PLATFORM_DRIVER ) && \ - !defined (OMAP3_PLATFORM_DRIVER ) && \ !defined (OF_PLATFORM_DRIVER ) && \ !defined (SA1111_DRIVER ) && \ !defined(PS3_SYSTEM_BUS_DRIVER) && \
@@ -1300,12 +1295,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP3_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap3_platform; -#endif -#ifdef OF_PLATFORM_DRIVER retval =platform_driver_register (&OF_PLATFORM_DRIVER );if (retval <0 )
@@ -1409,10 +1398,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OF_PLATFORM_DRIVER ); error_of_platform:#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); - error_omap3_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1464,9 +1449,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OF_PLATFORM_DRIVER platform_driver_unregister (&OF_PLATFORM_DRIVER );#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap3.c +42 -80
150 lines not on this page · raw message
Signature · 1 line
1.7.9.5
RFC PATCH 3/7 USB: OHCI: make ohci-omap3 a separate driver
drivers/usb/host/ohci-omap3.c static int ohci_hcd_omap3_probe(struct platform_device *pdev) · line 125
Quoted 4 lines · On Friday 07 June 2013 11:33:29 Manjunath Goudar wrote:
drivers/usb/host/ohci-omap3.c +4
-0+/* +* RemoteWakeupConnected has to be set explicitly before +* calling ohci_run. The reset value of RWC is 0. +*/
Just nitpicking, but you still use the wrong commenting style occasionally. The '*' characters should always be aligned vertically, like
/*
* RemoteWakeupConnected has to be set explicitly before
* calling ohci_run. The reset value of RWC is 0. */
Arnd
Alan Stern
maintainerRFC PATCH 3/7 USB: OHCI: make ohci-omap3 a separate driver
In reply to Manjunath GoudarQuoted 9 lines · Manjunath Goudar
Separate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
drivers/usb/host/ohci-omap3.c +0
-1@@ -185,7 +118,16 @@ static int ohci_hcd_omap3_probe(struct platform_device *pdev)pm_runtime_enable (dev);pm_runtime_get_sync (dev); -ohci_hcd_init (hcd_to_ohci (hcd));
drivers/usb/host/ohci-omap3.c static int ohci_hcd_omap3_probe(struct platform_device *pdev) · line 130
Quoted 10 lines
drivers/usb/host/ohci-omap3.c +10
-0+ ohci =hcd_to_ohci (hcd); +/* +* RemoteWakeupConnected has to be set explicitly before +* calling ohci_run. The reset value of RWC is 0. +*/ + ohci->hc_control =OHCI_CTRL_RWC ; +writel (OHCI_CTRL_RWC , &ohci->regs->control); +dev_dbg (hcd->self.controller,"starting OHCI controller\n" ); + +ohci_setup (hcd);
Don't call ohci_setup().
Apart from that (and the comment format), this is okay.
Alan Stern
RFC PATCH 4/7 USB: OHCI: make ohci-spear a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI SPEAr host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 22 +----- drivers/usb/host/ohci-spear.c | 149 ++++++++++++++++++----------------------- 4 files changed, 75 insertions(+), 105 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -403,6 +403,14 @@ config USB_OHCI_HCD_OMAP1 ---help--- Enables support for the OHCI controller on OMAP1/2 chips. +config USB_OHCI_HCD_SPEAR + tristate "Support for ST SPEAr on-chip OHCI USB controller" + depends on USB_OHCI_HCD && PLAT_SPEAR + default y + ---help--- + Enables support for the on-chip OHCI controller on + ST SPEAr chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o +obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +2 -20
@@ -1208,11 +1208,6 @@ MODULE_LICENSE ("GPL");#define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver#endif -#ifdef CONFIG_PLAT_SPEAR -#include "ohci-spear.c" -#define SPEAR_PLATFORM_DRIVER spear_ohci_hcd_driver -#endif -#ifdef CONFIG_PPC_PS3 #include "ohci-ps3.c" #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver
@@ -1248,6 +1243,7 @@ MODULE_LICENSE ("GPL"); !IS_ENABLED (CONFIG_USB_OHCI_EXYNOS ) && \ !IS_ENABLED (CONFIG_USB_OHCI_HCD_OMAP1 ) && \ !IS_ENABLED (CONFIG_USB_OHCI_HCD_OMAP3 ) && \ + !IS_ENABLED (CONFIG_USB_OHCI_HCD_SPEAR ) && \ !defined (PLATFORM_DRIVER ) && \ !defined (OF_PLATFORM_DRIVER ) && \ !defined(SA1111_DRIVER) && \
@@ -1258,8 +1254,7 @@ MODULE_LICENSE ("GPL"); !defined (EP93XX_PLATFORM_DRIVER ) && \ !defined (AT91_PLATFORM_DRIVER ) && \ !defined (NXP_PLATFORM_DRIVER ) && \ - !defined (DAVINCI_PLATFORM_DRIVER ) && \ - !defined(SPEAR_PLATFORM_DRIVER) + !defined(DAVINCI_PLATFORM_DRIVER)#error "missing bus glue for ohci-hcd"#endif
@@ -1349,19 +1344,9 @@ static int __init ohci_hcd_mod_init(void) goto error_davinci;#endif -#ifdef SPEAR_PLATFORM_DRIVER - retval =platform_driver_register (&SPEAR_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_spear; -#endif -return retval;/* Error path */ -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); - error_spear: -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:
@@ -1419,9 +1404,6 @@ module_init(ohci_hcd_mod_init); static void __exit ohci_hcd_mod_exit(void) { -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-spear.c +64 -85
215 lines not on this page · raw message
Signature · 1 line
1.7.9.5
RFC PATCH 4/7 USB: OHCI: make ohci-spear a separate driver
you need to cc spear-devel at list.st.com list for SPEAr patches.
Quoted 1 line · Manjunath Goudar
Separate the TI OHCI SPEAr host controller driver from ohci-hcd
TI ??
Quoted 123 lines
host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
Signed-off-by Manjunath Goudar <[email protected]>Cc Viresh Kumar <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Greg KH <[email protected]>Cc Alan Stern <[email protected]>Cc linux-usb at vger.kernel.org--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 22 +----- drivers/usb/host/ohci-spear.c | 149 ++++++++++++++++++----------------------- 4 files changed, 75 insertions(+), 105 deletions(-)drivers/usb/host/Kconfig +8
-0@@ -403,6 +403,14 @@ config USB_OHCI_HCD_OMAP1 ---help--- Enables support for the OHCI controller on OMAP1/2 chips. +config USB_OHCI_HCD_SPEAR + tristate "Support for ST SPEAr on-chip OHCI USB controller" + depends on USB_OHCI_HCD && PLAT_SPEAR + default y + ---help--- + Enables support for the on-chip OHCI controller on + ST SPEAr chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)drivers/usb/host/Makefile +1
-0@@ -49,6 +49,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o +obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.odrivers/usb/host/ohci-hcd.c +2
-20@@ -1208,11 +1208,6 @@ MODULE_LICENSE ("GPL");#define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver#endif -#ifdef CONFIG_PLAT_SPEAR -#include "ohci-spear.c" -#define SPEAR_PLATFORM_DRIVER spear_ohci_hcd_driver -#endif -#ifdef CONFIG_PPC_PS3 #include "ohci-ps3.c" #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver@@ -1248,6 +1243,7 @@ MODULE_LICENSE ("GPL"); !IS_ENABLED (CONFIG_USB_OHCI_EXYNOS ) && \ !IS_ENABLED (CONFIG_USB_OHCI_HCD_OMAP1 ) && \ !IS_ENABLED (CONFIG_USB_OHCI_HCD_OMAP3 ) && \ + !IS_ENABLED (CONFIG_USB_OHCI_HCD_SPEAR ) && \ !defined (PLATFORM_DRIVER ) && \ !defined (OF_PLATFORM_DRIVER ) && \ !defined(SA1111_DRIVER) && \@@ -1258,8 +1254,7 @@ MODULE_LICENSE ("GPL"); !defined (EP93XX_PLATFORM_DRIVER ) && \ !defined (AT91_PLATFORM_DRIVER ) && \ !defined (NXP_PLATFORM_DRIVER ) && \ - !defined (DAVINCI_PLATFORM_DRIVER ) && \ - !defined(SPEAR_PLATFORM_DRIVER) + !defined(DAVINCI_PLATFORM_DRIVER)#error "missing bus glue for ohci-hcd"#endif @@ -1349,19 +1344,9 @@ static int __init ohci_hcd_mod_init(void) goto error_davinci;#endif -#ifdef SPEAR_PLATFORM_DRIVER - retval =platform_driver_register (&SPEAR_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_spear; -#endif -return retval;/* Error path */ -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); - error_spear: -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:@@ -1419,9 +1404,6 @@ module_init(ohci_hcd_mod_init); static void __exit ohci_hcd_mod_exit(void) { -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif drivers/usb/host/ohci-spear.c +1
-2@@ -11,94 +11,41 @@* warranty of any kind, whether express or implied. */ -#include <linux/signal.h> -#include <linux/platform_device.h> +#include <linux/dma-mapping.h> #include <linux/clk.h>
drivers/usb/host/ohci-spear.c line 25
Quoted 10 lines
drivers/usb/host/ohci-spear.c +9
-0+#include <linux/io.h> +#include <linux/kernel.h> +#include <linux/module.h> #include <linux/of.h> +#include <linux/platform_device.h> +#include <linux/signal.h> +#include <linux/usb.h> +#include <linux/usb/hcd.h> +#include <linux/debugfs.h> +#include <linux/errno.h>
In alphabetical order please. And please which ones of these are must to have.
Quoted 84 lines
drivers/usb/host/ohci-spear.c +8
-70-struct spear_ohci { -struct ohci_hcd ohci; -struct clk *clk; -}; - -#define to_spear_ohci (hcd) (struct spear_ohci *)hcd_to_ohci(hcd) - -static void spear_start_ohci (struct spear_ohci *ohci) -{ -clk_prepare_enable (ohci->clk); -} - -static void spear_stop_ohci (struct spear_ohci *ohci) -{ -clk_disable_unprepare (ohci->clk); -} - -static int ohci_spear_start (struct usb_hcd *hcd) -{ -struct ohci_hcd *ohci =hcd_to_ohci (hcd); -int ret; - - ret =ohci_init (ohci); -if (ret <0 ) -return ret; - ohci->regs = hcd->regs; - - ret =ohci_run (ohci); -if (ret <0 ) { -dev_err (hcd->self.controller,"can't start\n" ); -ohci_stop (hcd); -return ret; - } - -create_debug_files (ohci); - -#ifdef DEBUG -ohci_dump (ohci,1 ); -#endif -return 0 ; -} - -static const struct hc_driver ohci_spear_hc_driver = { - .description = hcd_name, - .product_desc ="SPEAr OHCI" , - .hcd_priv_size =sizeof (struct spear_ohci ), - -/* generic hardware linkage */ - .irq = ohci_irq, - .flags =HCD_USB11 |HCD_MEMORY , - -/* basic lifecycle operations */ - .start = ohci_spear_start, - .stop = ohci_stop, - .shutdown = ohci_shutdown, -#ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, -#endif - -/* managing i/o requests and associated device resources */ - .urb_enqueue = ohci_urb_enqueue, - .urb_dequeue = ohci_urb_dequeue, - .endpoint_disable = ohci_endpoint_disable, -/* scheduling support */ - .get_frame_number = ohci_get_frame, +#include "ohci.h" -/* root hub support */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, +#define DRIVER_DESC "OHCI SPEAr driver" - .start_port_reset = ohci_start_port_reset, +static const char hcd_name[] ="SPEAr-ohci" ; +struct spear_ohci { +struct clk *clk; }; +#define to_spear_ohci (hcd) (struct spear_ohci *)(hcd_to_ohci(hcd)->priv) + +static struct hc_driver __read_mostly ohci_spear_hc_driver;
drivers/usb/host/ohci-spear.c line 48
Quoted 10 lines
drivers/usb/host/ohci-spear.c +2
-1static u64 spear_ohci_dma_mask =DMA_BIT_MASK (32 );static int spear_ohci_hcd_drv_probe (struct platform_device *pdev) {const struct hc_driver *driver = &ohci_spear_hc_driver; +struct ohci_hcd *ohci;struct usb_hcd *hcd =NULL ;struct clk *usbh_clk; -struct spear_ohci *ohci_p; +struct spear_ohci *sohci_p;
why rename this?
Quoted 99 lines
drivers/usb/host/ohci-spear.c +35
-12struct resource *res;int retval, irq;@@ -151,16 +98,24 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev) goto err_put_hcd; } - ohci_p = (struct spear_ohci *)hcd_to_ohci (hcd); - ohci_p->clk = usbh_clk; -spear_start_ohci (ohci_p); -ohci_hcd_init (hcd_to_ohci (hcd)); + sohci_p =to_spear_ohci (hcd); + sohci_p->clk = usbh_clk; +hcd_to_ohci (hcd)->regs = hcd->regs; + +ohci_setup (hcd); +clk_prepare_enable (sohci_p->clk); + + ohci =hcd_to_ohci (hcd); + +#ifdef DEBUG +ohci_dump (ohci,1 ); +#endif retval =usb_add_hcd (hcd,platform_get_irq (pdev,0 ),0 );if (retval ==0 )return retval; -spear_stop_ohci (ohci_p); +clk_disable_unprepare (sohci_p->clk); err_put_hcd:usb_put_hcd (hcd); fail:@@ -172,11 +127,11 @@ fail:static int spear_ohci_hcd_drv_remove (struct platform_device *pdev) {struct usb_hcd *hcd =platform_get_drvdata (pdev); -struct spear_ohci *ohci_p =to_spear_ohci (hcd); +struct spear_ohci *sohci_p =to_spear_ohci (hcd);usb_remove_hcd (hcd); -if (ohci_p->clk) -spear_stop_ohci (ohci_p); +if (sohci_p->clk) +clk_disable_unprepare (sohci_p->clk);usb_put_hcd (hcd);return 0 ;@@ -188,13 +143,13 @@ static int spear_ohci_hcd_drv_suspend(struct platform_device *dev, {struct usb_hcd *hcd =platform_get_drvdata (dev);struct ohci_hcd *ohci =hcd_to_ohci (hcd); -struct spear_ohci *ohci_p =to_spear_ohci (hcd); +struct spear_ohci *sohci_p =to_spear_ohci (hcd);if (time_before (jiffies, ohci->next_statechange))msleep (5 ); ohci->next_statechange = jiffies; -spear_stop_ohci (ohci_p); +clk_disable_unprepare (sohci_p->clk);return 0 ; }@@ -202,13 +157,13 @@ static int spear_ohci_hcd_drv_resume(struct platform_device *dev) {struct usb_hcd *hcd =platform_get_drvdata (dev);struct ohci_hcd *ohci =hcd_to_ohci (hcd); -struct spear_ohci *ohci_p =to_spear_ohci (hcd); +struct spear_ohci *sohci_p =to_spear_ohci (hcd);if (time_before (jiffies, ohci->next_statechange))msleep (5 ); ohci->next_statechange = jiffies; -spear_start_ohci (ohci_p); +clk_prepare_enable (sohci_p->clk);ohci_resume (hcd, false);return 0 ; }@@ -234,4 +189,28 @@ static struct platform_driver spear_ohci_hcd_driver = { }, }; +static const struct ohci_driver_overrides spear_overrides__initconst = { + .extra_priv_size =sizeof (struct spear_ohci ), +}; +static int __init ohci_spear_init (void ) +{ +if (usb_disabled ()) +return -ENODEV ; + +pr_info ("%s: " DRIVER_DESC "\n" , hcd_name); + +ohci_init_driver (&ohci_spear_hc_driver, &spear_overrides); +return platform_driver_register (&spear_ohci_hcd_driver); +} +module_init (ohci_spear_init); +
drivers/usb/host/ohci-spear.c static struct platform_driver spear_ohci_hcd_driver = { · line 216
Quoted 10 lines
drivers/usb/host/ohci-spear.c +9
-0+static void __exit ohci_spear_cleanup(void) +{ +platform_driver_unregister (&spear_ohci_hcd_driver); +} +module_exit (ohci_spear_cleanup); + +MODULE_DESCRIPTION (DRIVER_DESC ); +MODULE_AUTHOR ("Deepak Sikri" ); +MODULE_LICENSE ("GPL v2" );MODULE_ALIAS ("platform:spear-ohci" );
I can't really review it functionally.
@Deepak: Can you?
Alan Stern
maintainerRFC PATCH 4/7 USB: OHCI: make ohci-spear a separate driver
In reply to Manjunath GoudarQuoted 5 lines · Manjunath Goudar
Separate the TI OHCI SPEAr host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
drivers/usb/host/ohci-spear.c static int spear_ohci_hcd_drv_probe(struct platform_device *pdev) · line 103
Quoted 10 lines
drivers/usb/host/ohci-spear.c +3
-4@@ -151,16 +98,24 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev) goto err_put_hcd; } - ohci_p = (struct spear_ohci *)hcd_to_ohci (hcd); - ohci_p->clk = usbh_clk; -spear_start_ohci (ohci_p); -ohci_hcd_init (hcd_to_ohci (hcd)); + sohci_p =to_spear_ohci (hcd); + sohci_p->clk = usbh_clk; +hcd_to_ohci (hcd)->regs = hcd->regs;
This line isn't needed. It is one of the first things that ohci_init() does.
drivers/usb/host/ohci-spear.c static int spear_ohci_hcd_drv_probe(struct platform_device *pdev) · line 105
Quoted 2 lines
drivers/usb/host/ohci-spear.c +2
-0+ +ohci_setup (hcd);
Don't call ohci_setup().
drivers/usb/host/ohci-spear.c static int spear_ohci_hcd_drv_probe(struct platform_device *pdev) · line 112
Quoted 7 lines
drivers/usb/host/ohci-spear.c +7
-0+clk_prepare_enable (sohci_p->clk); + + ohci =hcd_to_ohci (hcd); + +#ifdef DEBUG +ohci_dump (ohci,1 ); +#endif
I suspect this debugging stuff isn't needed any more. You can get rid of it.
Quoted 5 lines
drivers/usb/host/ohci-spear.c +0
-1@@ -188,13 +143,13 @@ static int spear_ohci_hcd_drv_suspend(struct platform_device *dev, {struct usb_hcd *hcd =platform_get_drvdata (dev);struct ohci_hcd *ohci =hcd_to_ohci (hcd); -struct spear_ohci *ohci_p =to_spear_ohci (hcd);
drivers/usb/host/ohci-spear.c static int spear_ohci_hcd_drv_suspend(struct platform_device *dev, · line 154
Quoted 10 lines
drivers/usb/host/ohci-spear.c +2
-1+struct spear_ohci *sohci_p =to_spear_ohci (hcd);if (time_before (jiffies, ohci->next_statechange))msleep (5 ); ohci->next_statechange = jiffies; -spear_stop_ohci (ohci_p); +clk_disable_unprepare (sohci_p->clk);return 0 ; }
This routine needs to call ohci_suspend() just before the clk_disable_unprepare(). I don't know how that got left out, but it looks like the same problem exists in several of the ohci glue files. I guess they should all be fixed at once, in a separate patch.
Quoted 4 lines
drivers/usb/host/ohci-spear.c +0
-0@@ -202,13 +157,13 @@ static int spear_ohci_hcd_drv_resume(struct platform_device *dev) {struct usb_hcd *hcd =platform_get_drvdata (dev);
drivers/usb/host/ohci-spear.c static int spear_ohci_hcd_drv_resume(struct platform_device *dev) · line 166
Quoted 10 lines
drivers/usb/host/ohci-spear.c +2
-2struct ohci_hcd *ohci =hcd_to_ohci (hcd); -struct spear_ohci *ohci_p =to_spear_ohci (hcd); +struct spear_ohci *sohci_p =to_spear_ohci (hcd);if (time_before (jiffies, ohci->next_statechange))msleep (5 ); ohci->next_statechange = jiffies; -spear_start_ohci (ohci_p); +clk_prepare_enable (sohci_p->clk);
You got an extra space character after the tab.
Alan Stern
RFC PATCH 5/7 USB: OHCI: export ohci_hub_control and ohci_hub_status_data
In reply to Manjunath GoudarIn order to make ohci-at91 and ohci-s3c2410 as a separate driver, ohci_hub_control and ohci_hub_status_data symbol needs to be exported. This work is part of enabling multi-platform kernels on ARM.
--- drivers/usb/host/ohci-hub.c | 8 ++++---- drivers/usb/host/ohci.h | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-)
drivers/usb/host/ohci-hub.c +4 -4
@@ -437,8 +437,7 @@ static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,/* build "status change" packet (one or two bytes) from HC registers */ -static int -ohci_hub_status_data (struct usb_hcd *hcd,char *buf) +int ohci_hub_status_data (struct usb_hcd *hcd,char *buf) {struct ohci_hcd *ohci =hcd_to_ohci (hcd);int i, changed =0 , length =1 ;
@@ -503,6 +502,7 @@ done:return changed ? length :0 ; } +EXPORT_SYMBOL_GPL (ohci_hub_status_data);/*-------------------------------------------------------------------------*/
@@ -645,7 +645,7 @@ static inline int root_port_reset (struct ohci_hcd *ohci, unsigned port)return 0 ; } -static int ohci_hub_control ( +int ohci_hub_control( struct usb_hcd *hcd, u16 typeReq, u16 wValue,
@@ -773,4 +773,4 @@ error: }return retval; } - +EXPORT_SYMBOL_GPL (ohci_hub_control);
drivers/usb/host/ohci.h +9 -0
@@ -738,3 +738,12 @@ extern int ohci_setup(struct usb_hcd *hcd);extern int ohci_suspend (struct usb_hcd *hcd,bool do_wakeup);extern int ohci_resume (struct usb_hcd *hcd,bool hibernated);#endif +extern int ohci_hub_control ( +struct usb_hcd *hcd, +u16 typeReq, +u16 wValue, +u16 wIndex, +char *buf, +u16 wLength +); +extern int ohci_hub_status_data (struct usb_hcd *hcd,char *buf);
Signature · 1 line
1.7.9.5
Alan Stern
maintainerRFC PATCH 5/7 USB: OHCI: export ohci_hub_control and ohci_hub_status_data
Quoted 3 lines · Manjunath Goudar
In order to make ohci-at91 and ohci-s3c2410 as a separate driver,
ohci_hub_controlandohci_hub_status_datasymbol needs to be exported. This work is part of enabling multi-platform kernels on ARM.
No, we are not going to export those two routines. You can copy the approach used by Stephen Warren in the ehci-tegra conversion.
Alan Stern
RFC PATCH 6/7 USB: OHCI: make ohci-at91 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-at91.c | 135 ++++++++++++++++++------------------------ drivers/usb/host/ohci-hcd.c | 20 +------ 4 files changed, 67 insertions(+), 97 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -411,6 +411,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_AT91 + tristate "Support for Atmel on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_AT91 + default y + ---help--- + Enables support for the on-chip OHCI controller on + Atmel chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -50,6 +50,7 @@ obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o +obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-at91.c +57 -78
190 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +1 -19
@@ -1188,11 +1188,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_AT91 -#include "ohci-at91.c" -#define AT91_PLATFORM_DRIVER ohci_hcd_at91_driver -#endif -#ifdef CONFIG_ARCH_LPC32XX #include "ohci-nxp.c" #define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver
@@ -1244,6 +1239,7 @@ MODULE_LICENSE ("GPL"); !IS_ENABLED (CONFIG_USB_OHCI_HCD_OMAP1 ) && \ !IS_ENABLED (CONFIG_USB_OHCI_HCD_OMAP3 ) && \ !IS_ENABLED (CONFIG_USB_OHCI_HCD_SPEAR ) && \ + !IS_ENABLED (CONFIG_USB_OHCI_HCD_AT91 ) && \ !defined (PLATFORM_DRIVER ) && \ !defined (OF_PLATFORM_DRIVER ) && \ !defined(SA1111_DRIVER) && \
@@ -1252,7 +1248,6 @@ MODULE_LICENSE ("GPL"); !defined (TMIO_OHCI_DRIVER ) && \ !defined (S3C2410_PLATFORM_DRIVER ) && \ !defined (EP93XX_PLATFORM_DRIVER ) && \ - !defined (AT91_PLATFORM_DRIVER ) && \ !defined (NXP_PLATFORM_DRIVER ) && \ !defined(DAVINCI_PLATFORM_DRIVER)#error "missing bus glue for ohci-hcd"
@@ -1326,12 +1321,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef AT91_PLATFORM_DRIVER - retval =platform_driver_register (&AT91_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_at91; -#endif -#ifdef NXP_PLATFORM_DRIVER retval =platform_driver_register (&NXP_PLATFORM_DRIVER );if (retval <0 )
@@ -1355,10 +1344,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&NXP_PLATFORM_DRIVER ); error_nxp:#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); - error_at91: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1410,9 +1395,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef NXP_PLATFORM_DRIVER platform_driver_unregister (&NXP_PLATFORM_DRIVER );#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
Alan Stern
maintainerRFC PATCH 6/7 USB: OHCI: make ohci-at91 a separate driver
Quoted 7 lines · Manjunath Goudar
Separate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
drivers/usb/host/Kconfig config USB_OHCI_HCD_SPEAR · line 420
Quoted 10 lines
drivers/usb/host/Kconfig +7
-0@@ -411,6 +411,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_AT91 + tristate "Support for Atmel on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_AT91 + default y + ---help--- + Enables support for the on-chip OHCI controller on + Atmel chips.
Notice the "depends on" line you added here?
Quoted 5 lines
drivers/usb/host/ohci-at91.c +0
-0@@ -13,16 +13,25 @@
...
Quoted 3 lines
#ifndef
CONFIG_ARCH_AT91
#error "CONFIG_ARCH_AT91must be defined."
#endif
As a result of the "depends on" line, this test will never succeed. You can remove these three lines.
drivers/usb/host/ohci-at91.c static void usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *); · line 129
Quoted 5 lines
drivers/usb/host/ohci-at91.c +1
-0@@ -111,6 +126,8 @@ static void usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *);static int usb_hcd_at91_probe (const struct hc_driver *driver,struct platform_device *pdev) { +struct at91_usbh_data *board;
Tab character where it should be a space.
Quoted 5 lines
drivers/usb/host/ohci-at91.c +1
-0+struct ohci_hcd *ohci;int retval;struct usb_hcd *hcd =NULL ;
drivers/usb/host/ohci-at91.c static int usb_hcd_at91_probe(const struct hc_driver *driver, · line 187
Quoted 9 lines
drivers/usb/host/ohci-at91.c +4
-1@@ -163,8 +180,11 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver, goto err5; } + board = hcd->self.controller->platform_data; + ohci =hcd_to_ohci (hcd); + ohci->num_ports = board->ports;at91_start_hc (pdev); -ohci_hcd_init (hcd_to_ohci (hcd)); +ohci_setup (hcd);
Don't call ohci_setup().
Quoted 14 lines
drivers/usb/host/ohci-at91.c +10
-0@@ -727,3 +672,37 @@ static struct platform_driver ohci_hcd_at91_driver = { .of_match_table = of_match_ptr(at91_ohci_dt_ids), }, }; + +static int __init ohci_at91_init (void ) +{ +if (usb_disabled ()) +return -ENODEV ; + +pr_info ("%s: " DRIVER_DESC "\n" , hcd_name); +ohci_init_driver (&ohci_at91_hc_driver,NULL ); + +/*
drivers/usb/host/ohci-at91.c static struct platform_driver ohci_hcd_at91_driver = { · line 694
Quoted 10 lines
drivers/usb/host/ohci-at91.c +10
-0+* The Atmel HW has some unusual quirks, which require Atmel-specific +* workarounds. We override certain hc_driver functions here to +* achieve that. We explicitly do not enhance ohci_driver_overrides to +* allow this more easily, since this is an unusual case, and we don't +* want to encourage others to override these functions by making it +* too easy. +*/ + + ohci_at91_hc_driver.hub_status_data = ohci_at91_hub_status_data; + ohci_at91_hc_driver.hub_control = ohci_at91_hub_control;
Since the hub_status_data and hub_control routines aren't going to be exported, you can't do it like this. Instead, save the values of ohci_at91_hc_driver.hub_status_data and ohci_at91_hc_driver.hub_control before overwriting them.
Alan Stern
RFC PATCH 7/7 USB: OHCI: make ohci-s3c2410 a separate driver
In reply to Manjunath GoudarSeparate the Samsung OHCI S3CXXXX host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 20 +------ drivers/usb/host/ohci-s3c2410.c | 116 ++++++++++++++++----------------------- 4 files changed, 58 insertions(+), 87 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -411,6 +411,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_S3CXXXX + tristate "Support for S3CXXXX on-chip OHCI USB controller" + depends on USB_OHCI_HCD && (ARCH_S3C24XX) || (ARCH_S3C64XX) + default y + ---help--- + Enables support for the on-chip OHCI controller on + S3CXXXX chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -51,6 +51,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o +obj-$(CONFIG_USB_OHCI_HCD_S3CXXXX) += ohci-s3c2410.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +1 -19
@@ -1173,11 +1173,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_ARCH_S3C24XX ) || defined(CONFIG_ARCH_S3C64XX ) -#include "ohci-s3c2410.c" -#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1240,13 +1235,13 @@ MODULE_LICENSE ("GPL"); !IS_ENABLED (CONFIG_USB_OHCI_HCD_OMAP3 ) && \ !IS_ENABLED (CONFIG_USB_OHCI_HCD_SPEAR ) && \ !IS_ENABLED (CONFIG_USB_OHCI_HCD_AT91 ) && \ + !IS_ENABLED (CONFIG_USB_OHCI_HCD_S3CXXXX ) && \ !defined (PLATFORM_DRIVER ) && \ !defined (OF_PLATFORM_DRIVER ) && \ !defined (SA1111_DRIVER ) && \ !defined (PS3_SYSTEM_BUS_DRIVER ) && \ !defined (SM501_OHCI_DRIVER ) && \ !defined (TMIO_OHCI_DRIVER ) && \ - !defined (S3C2410_PLATFORM_DRIVER ) && \ !defined (EP93XX_PLATFORM_DRIVER ) && \ !defined (NXP_PLATFORM_DRIVER ) && \ !defined (DAVINCI_PLATFORM_DRIVER )
@@ -1309,12 +1304,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef S3C2410_PLATFORM_DRIVER - retval =platform_driver_register (&S3C2410_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_s3c2410; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1348,10 +1337,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); - error_s3c2410: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:
@@ -1398,9 +1383,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif
drivers/usb/host/ohci-s3c2410.c +48 -68
147 lines not on this page · raw message
Signature · 1 line
1.7.9.5
RFC PATCH 7/7 USB: OHCI: make ohci-s3c2410 a separate driver
drivers/usb/host/ohci-s3c2410.c static int usb_hcd_s3c2410_probe(const struct hc_driver *driver, · line 377
Quoted 6 lines · On Friday 07 June 2013 11:33:33 Manjunath Goudar wrote:
drivers/usb/host/ohci-s3c2410.c +1
-2+ohci_setup (hcd);s3c2410_start_hc (dev, hcd); -ohci_hcd_init (hcd_to_ohci (hcd)); -
I'm not sure about this part: s3c2410_start_hc is where the clock gets enabled, presumable we are not supposed to touch the ohci registers before it gets called, so ohci_init() being called implicitly by ohci_setup() seems like a bad idea.
Arnd
Alan Stern
maintainerRFC PATCH 7/7 USB: OHCI: make ohci-s3c2410 a separate driver
In reply to Manjunath Goudardrivers/usb/host/ohci-s3c2410.c static int usb_hcd_s3c2410_probe(const struct hc_driver *driver, · line 387
Quoted 9 lines · Manjunath Goudar
Separate the Samsung OHCI S3CXXXX host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
drivers/usb/host/ohci-s3c2410.c +1
-0@@ -371,10 +384,9 @@ static int usb_hcd_s3c2410_probe(const struct hc_driver *driver, goto err_put; } +ohci_setup (hcd);
Don't call ohci_setup().
Quoted 13 lines
drivers/usb/host/ohci-s3c2410.c +9
-0@@ -532,4 +480,36 @@ static struct platform_driver ohci_hcd_s3c2410_driver = { }, }; +static int __init ohci_s3cxxxx_init (void ) +{ +if (usb_disabled ()) +return -ENODEV ; + +pr_info ("%s: " DRIVER_DESC "\n" , hcd_name); +ohci_init_driver (&ohci_s3c2410_hc_driver,NULL ); + +/*
drivers/usb/host/ohci-s3c2410.c static struct platform_driver ohci_hcd_s3c2410_driver = { · line 501
Quoted 10 lines
drivers/usb/host/ohci-s3c2410.c +10
-0+* The Samsung HW has some unusual quirks, which require Sumsung-specific +* workarounds. We override certain hc_driver functions here to +* achieve that. We explicitly do not enhance ohci_driver_overrides to +* allow this more easily, since this is an unusual case, and we don't +* want to encourage others to override these functions by making it +* too easy. +*/ + + ohci_s3c2410_hc_driver.hub_status_data = ohci_s3c2410_hub_status_data; + ohci_s3c2410_hc_driver.hub_control = ohci_s3c2410_hub_control;
Like in ohci-at91, save the pointers before overwriting them.
Alan Stern
v2 cover USB: OHCI: more bus glues as separate modules
In reply to Manjunath GoudarThese patches are for separating the SOC On-Chip ohci host controller from ohci-hcd host code into its own driver module.
This work is part of enabling multi-platform kernels on ARM.
V2:
In patch 5/6 and 6/6:
-Set non-standard fields in hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
In patch 1/6 to 4/6
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
Manjunath Goudar (6):
USB: OHCI: make ohci-exynos a separate driver
USB: OHCI: make ohci-omap a separate driver
USB: OHCI: make ohci-omap3 a separate driver
USB: OHCI: make ohci-spear a separate driver
USB: OHCI: make ohci-at91 a separate driver
USB: OHCI: make ohci-s3c2410 a separate driver
drivers/usb/host/Kconfig | 30 ++++++- drivers/usb/host/Makefile | 6 ++ drivers/usb/host/ohci-at91.c | 148 +++++++++++++++------------------- drivers/usb/host/ohci-exynos.c | 167 ++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 108 ------------------------- drivers/usb/host/ohci-omap.c | 156 ++++++++++++------------------------ drivers/usb/host/ohci-omap3.c | 120 ++++++++++------------------ drivers/usb/host/ohci-s3c2410.c | 129 ++++++++++++++---------------- drivers/usb/host/ohci-spear.c | 140 +++++++++++++------------------- 9 files changed, 370 insertions(+), 634 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v2 1/6 USB: OHCI: make ohci-exynos a separate driver
Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-exynos_ohci_hcd structure assignment error fixed. -Removed multiple usb_create_hcd() from prob funtion. -platform_set_drvdata() called before exynos_ohci_phy_enable(). -ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-exynos.c | 167 +++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 71 insertions(+), 117 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -463,7 +463,7 @@ config USB_OHCI_SH If you use the PCI OHCI controller, this option is not necessary. config USB_OHCI_EXYNOS - boolean "OHCI support for Samsung EXYNOS SoC Series" + tristate "OHCI support for Samsung EXYNOS SoC Series" depends on ARCH_EXYNOS help Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
drivers/usb/host/Makefile +1 -0
@@ -45,6 +45,7 @@ obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o +obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-exynos.c +69 -98
289 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_EXYNOS -#include "ohci-exynos.c" -#define EXYNOS_PLATFORM_DRIVER exynos_ohci_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 #include "ohci-omap.c" #define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver
@@ -1336,12 +1331,6 @@ static int __init ohci_hcd_mod_init(void) goto error_s3c2410;#endif -#ifdef EXYNOS_PLATFORM_DRIVER - retval =platform_driver_register (&EXYNOS_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_exynos; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1395,10 +1384,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); - error_exynos: -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); error_s3c2410:
@@ -1463,9 +1448,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH v2 1/6 USB: OHCI: make ohci-exynos a separate driver
Quoted 24 lines · Manjunath Goudar
Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-exynos_ohci_hcd structure assignment error fixed. -Removed multipleusb_create_hcd()from prob funtion. -platform_set_drvdata() called beforeexynos_ohci_phy_enable(). -ohci_setup() removed because it is called in .reset member
of theohci_hc_driverstructuredrivers/usb/host/ohci-exynos.c +4
-0@@ -12,24 +12,39 @@*/ #include <linux/clk.h> +#include <linux/dma-mapping.h> +#include <linux/io.h> +#include <linux/kernel.h> +#include <linux/module.h> #include <linux/of.h> #include <linux/platform_device.h>
drivers/usb/host/ohci-exynos.c line 30
Quoted 10 lines
drivers/usb/host/ohci-exynos.c +7
-0#include <linux/platform_data/usb-ohci-exynos.h> #include <linux/usb/phy.h> #include <linux/usb/samsung_usb_phy.h> +#include <linux/usb.h> +#include <linux/usb/hcd.h> +#include <linux/usb/otg.h> + +#include "ohci.h" + +#define DRIVER_DESC "OHCI exynos driver"
I think the word "EXYNOS" is supposed to be in all capital letters. Apart from that,
PATCH v2 1/6 USB: OHCI: make ohci-exynos a separate driver
In reply to Manjunath GoudarQuoted 20 lines · Manjunath Goudar
Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-exynos_ohci_hcd structure assignment error fixed. -Removed multipleusb_create_hcd()from prob funtion. -platform_set_drvdata() called beforeexynos_ohci_phy_enable(). -ohci_setup() removed because it is called in .reset member
of theohci_hc_driverstructureSigned-off-by Manjunath Goudar <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Jingoo Han <[email protected]>Cc Kukjin Kim <[email protected]>Cc Greg KH <[email protected]>Cc Alan Stern <[email protected]>Cc linux-usb at vger.kernel.org
Quoted 6 lines
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-exynos.c | 167 +++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 71 insertions(+), 117 deletions(-)
CC'ed Vivek Gautam
Hi Manjunath Goudar,
It looks good.
I tested this patch on Exynos4210. It works properly. I really appreciate your work.
Also, I agree on Alan's opinion.
Quoted 1 line
+#define
DRIVER_DESC"OHCI exynos driver"
Please, replace 'exynos' with 'EXYNOS'.
Best regards,
Jingoo Han
PATCH v2 2/6 USB: OHCI: make ohci-omap a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-omap_ohci_clock_power(0) called in usb_hcd_omap_remove(). -Removed ohci_setup() call from usb_hcd_omap_probe() and ohci_omap_reset(). -host_enabled and host_initialized variables aren't used for anything
thats what removed.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ----- drivers/usb/host/ohci-omap.c | 156 +++++++++++++----------------------------- 4 files changed, 51 insertions(+), 126 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -376,7 +376,7 @@ config USB_OHCI_HCD if USB_OHCI_HCD config USB_OHCI_HCD_OMAP1 - bool "OHCI support for OMAP1/2 chips" + tristate "OHCI support for OMAP1/2 chips" depends on ARCH_OMAP1 default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 -#include "ohci-omap.c" -#define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 #include "ohci-omap3.c" #define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver
@@ -1289,12 +1284,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP1_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP1_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap1_platform; -#endif -#ifdef OMAP3_PLATFORM_DRIVER retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER );if (retval <0 )
@@ -1408,10 +1397,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); error_omap3_platform:#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); - error_omap1_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1466,9 +1451,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OMAP3_PLATFORM_DRIVER platform_driver_unregister (&OMAP3_PLATFORM_DRIVER );#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap.c +49 -107
240 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH v2 2/6 USB: OHCI: make ohci-omap a separate driver
Quoted 8 lines · Manjunath Goudar
Separate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-omap_ohci_clock_power(0) called inusb_hcd_omap_remove(). -Removedohci_setup()call fromusb_hcd_omap_probe()andohci_omap_reset().
You were supposed to remove the call from usb_hcd_omap_probe but leave in the call from ohci_omap_reset.
Quoted 13 lines
-host_enabled and
host_initializedvariables aren't used for anything
thats what removed.drivers/usb/host/ohci-omap.c +1
-1@@ -188,21 +195,21 @@ static void start_hnp(struct ohci_hcd *ohci)/*-------------------------------------------------------------------------*/ -static int ohci_omap_init (struct usb_hcd *hcd) +static int ohci_omap_reset (struct usb_hcd *hcd) {struct ohci_hcd *ohci =hcd_to_ohci (hcd);struct omap_usb_config *config = hcd->self.controller->platform_data;
drivers/usb/host/ohci-omap.c static void start_hnp(struct ohci_hcd *ohci) · line 209
Quoted 10 lines
drivers/usb/host/ohci-omap.c +1
-2int need_transceiver = (config->otg !=0 ); -int ret;dev_dbg (hcd->self.controller,"starting USB Controller\n" ); -if (config->otg) { +if (config->otg || config->rwc) {ohci_to_hcd (ohci)->self.otg_port = config->otg;/* default/minimum OTG power budget: 8 mA */ ohci_to_hcd (ohci)->power_budget =8 ;
These three lines are supposed to run only when config->otg is set, not when config->rwc is set. The next two lines can run when either one is set.
Also, "ohci_to_hcd(ohci)" should be replaced by "hcd".
drivers/usb/host/ohci-omap.c static void start_hnp(struct ohci_hcd *ohci) · line 205
Quoted 4 lines
drivers/usb/host/ohci-omap.c +2
-1+ ohci->hc_control =OHCI_CTRL_RWC ; +writel (OHCI_CTRL_RWC , &ohci->regs->control); } -
Don't remove this blank line.
drivers/usb/host/ohci-omap.c static int ohci_omap_init(struct usb_hcd *hcd) · line 243
Quoted 10 lines
drivers/usb/host/ohci-omap.c +0
-3/* boards can use OTG transceivers in non-OTG modes */ need_transceiver = need_transceiver ||machine_is_omap_h2 () ||machine_is_omap_h3 ();@@ -238,9 +245,6 @@ static int ohci_omap_init(struct usb_hcd *hcd)omap_1510_local_bus_init (); } -if ((ret =ohci_init (ohci)) <0 ) -return ret; -
This should call ohci_setup instead of ohci_init.
Alan Stern
Alan Stern
maintainerPATCH v2 2/6 USB: OHCI: make ohci-omap a separate driver
In reply to Manjunath GoudarQuoted 10 lines · Manjunath Goudar
Separate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-omap_ohci_clock_power(0) called inusb_hcd_omap_remove(). -Removedohci_setup()call fromusb_hcd_omap_probe()andohci_omap_reset(). -host_enabled andhost_initializedvariables aren't used for anything
thats what removed.
There's one more thing I just noticed.
Quoted 11 lines
drivers/usb/host/ohci-omap.c +1
-2@@ -188,21 +195,21 @@ static void start_hnp(struct ohci_hcd *ohci)/*-------------------------------------------------------------------------*/ -static int ohci_omap_init (struct usb_hcd *hcd) +static int ohci_omap_reset (struct usb_hcd *hcd) {struct ohci_hcd *ohci =hcd_to_ohci (hcd);struct omap_usb_config *config = hcd->self.controller->platform_data;int need_transceiver = (config->otg !=0 ); -int ret;
drivers/usb/host/ohci-omap.c static void start_hnp(struct ohci_hcd *ohci) · line 211
Quoted 10 lines
drivers/usb/host/ohci-omap.c +3
-1dev_dbg (hcd->self.controller,"starting USB Controller\n" ); -if (config->otg) { +if (config->otg || config->rwc) {ohci_to_hcd (ohci)->self.otg_port = config->otg;/* default/minimum OTG power budget: 8 mA */ ohci_to_hcd (ohci)->power_budget =8 ; + ohci->hc_control =OHCI_CTRL_RWC ; +writel (OHCI_CTRL_RWC , &ohci->regs->control);
This last line must not appear here, because ohci->regs doesn't get set until ohci_setup() calls ohci_init(). Removing it entirely is safe because ohci_run() does the same thing later on. Or you can move both of these last two lines after the call to ohci_setup().
Alan Stern
PATCH v2 3/6 USB: OHCI: make ohci-omap3 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-The improper multi-line commenting style written in proper way.
('*' characters aligned in vertically).
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-omap3.c | 120 ++++++++++++++--------------------------- 4 files changed, 42 insertions(+), 99 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -383,7 +383,7 @@ config USB_OHCI_HCD_OMAP1 Enables support for the OHCI controller on OMAP1/2 chips. config USB_OHCI_HCD_OMAP3 - bool "OHCI support for OMAP3 and later chips" + tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4) default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -47,6 +47,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 -#include "ohci-omap3.c" -#define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1284,12 +1279,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP3_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap3_platform; -#endif -#ifdef OF_PLATFORM_DRIVER retval =platform_driver_register (&OF_PLATFORM_DRIVER );if (retval <0 )
@@ -1393,10 +1382,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OF_PLATFORM_DRIVER ); error_of_platform:#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); - error_omap3_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1448,9 +1433,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OF_PLATFORM_DRIVER platform_driver_unregister (&OF_PLATFORM_DRIVER );#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap3.c +40 -80
148 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH v2 3/6 USB: OHCI: make ohci-omap3 a separate driver
Quoted 10 lines · Manjunath Goudar
Separate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of theohci_hc_driverstructure.
-The improper multi-line commenting style written in proper way.
('*' characters aligned in vertically).
Generally okay, just one problem...
drivers/usb/host/ohci-omap3.c static int ohci_hcd_omap3_probe(struct platform_device *pdev) · line 127
Quoted 12 lines
drivers/usb/host/ohci-omap3.c +7
-1@@ -185,7 +118,14 @@ static int ohci_hcd_omap3_probe(struct platform_device *pdev)pm_runtime_enable (dev);pm_runtime_get_sync (dev); -ohci_hcd_init (hcd_to_ohci (hcd)); + ohci =hcd_to_ohci (hcd); +/* +* RemoteWakeupConnected has to be set explicitly before +* calling ohci_run. The reset value of RWC is 0. +*/ + ohci->hc_control =OHCI_CTRL_RWC ; +writel (OHCI_CTRL_RWC , &ohci->regs->control);
ohci->regs doesn't get set until usb_add_hcd, so this line must not appear here. You can simply remove it.
drivers/usb/host/ohci-omap3.c static int ohci_hcd_omap3_probe(struct platform_device *pdev) · line 131
Quoted 4 lines
drivers/usb/host/ohci-omap3.c +1
-0+dev_dbg (hcd->self.controller,"starting OHCI controller\n" ); ret =usb_add_hcd (hcd, irq,0 );if (ret) {
Alan Stern
PATCH v2 4/6 USB: OHCI: make ohci-spear a separate driver
In reply to Manjunath GoudarSeparate the ST OHCI SPEAr host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-debugging stuff isn't needed any more that's what removed.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-spear.c | 140 +++++++++++++++++------------------------ 4 files changed, 65 insertions(+), 102 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -382,6 +382,14 @@ config USB_OHCI_HCD_OMAP1 ---help--- Enables support for the OHCI controller on OMAP1/2 chips. +config USB_OHCI_HCD_SPEAR + tristate "Support for ST SPEAr on-chip OHCI USB controller" + depends on USB_OHCI_HCD && PLAT_SPEAR + default y + ---help--- + Enables support for the on-chip OHCI controller on + ST SPEAr chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o +obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1212,11 +1212,6 @@ MODULE_LICENSE ("GPL");#define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver#endif -#ifdef CONFIG_PLAT_SPEAR -#include "ohci-spear.c" -#define SPEAR_PLATFORM_DRIVER spear_ohci_hcd_driver -#endif -#ifdef CONFIG_PPC_PS3 #include "ohci-ps3.c" #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver
@@ -1333,19 +1328,9 @@ static int __init ohci_hcd_mod_init(void) goto error_davinci;#endif -#ifdef SPEAR_PLATFORM_DRIVER - retval =platform_driver_register (&SPEAR_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_spear; -#endif -return retval;/* Error path */ -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); - error_spear: -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:
@@ -1403,9 +1388,6 @@ module_init(ohci_hcd_mod_init); static void __exit ohci_hcd_mod_exit(void) { -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-spear.c +56 -84
205 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH v2 4/6 USB: OHCI: make ohci-spear a separate driver
Quoted 9 lines · Manjunath Goudar
Separate the ST OHCI SPEAr host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of theohci_hc_driverstructure.
-debugging stuff isn't needed any more that's what removed.
PATCH v2 5/6 USB: OHCI: make ohci-at91 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-Set non-standard fields in ohci_at91_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-at91.c | 148 +++++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 74 insertions(+), 101 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_AT91 + tristate "Support for Atmel on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_AT91 + default y + ---help--- + Enables support for the on-chip OHCI controller on + Atmel chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o +obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-at91.c +65 -83
217 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1192,11 +1192,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_AT91 -#include "ohci-at91.c" -#define AT91_PLATFORM_DRIVER ohci_hcd_at91_driver -#endif -#ifdef CONFIG_ARCH_LPC32XX #include "ohci-nxp.c" #define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver
@@ -1310,12 +1305,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef AT91_PLATFORM_DRIVER - retval =platform_driver_register (&AT91_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_at91; -#endif -#ifdef NXP_PLATFORM_DRIVER retval =platform_driver_register (&NXP_PLATFORM_DRIVER );if (retval <0 )
@@ -1339,10 +1328,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&NXP_PLATFORM_DRIVER ); error_nxp:#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); - error_at91: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1394,9 +1379,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef NXP_PLATFORM_DRIVER platform_driver_unregister (&NXP_PLATFORM_DRIVER );#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH v2 5/6 USB: OHCI: make ohci-at91 a separate driver
Quoted 14 lines · Manjunath Goudar
Separate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-Set non-standard fields inohci_at91_hc_drivermanually, rather than
relying on an expanded structohci_driver_overrides.
-Saveorig_ohci_hub_controlandorig_ohci_hub_status_datarather than
relying onohci_hub_controlandhub_status_databeing exported.
-ohci_setup() has been removed because it is called in .reset member
of theohci_hc_driverstructure.
drivers/usb/host/ohci-at91.c static void usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *); · line 129
Quoted 5 lines
drivers/usb/host/ohci-at91.c +2
-0@@ -111,6 +125,8 @@ static void usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *);static int usb_hcd_at91_probe (const struct hc_driver *driver,struct platform_device *pdev) { +struct at91_usbh_data *board; +struct ohci_hcd *ohci;
Variables are supposed to be not aligned at all (in which case you don't use tabs) or all aligned the same way. In this case you put a tab before the "*board"; therefore the "*ohci" should line up with it.
No, this isn't an artifact of my email program. They really are not aligned.
drivers/usb/host/ohci-at91.c static int usb_hcd_at91_probe(const struct hc_driver *driver, · line 186
Quoted 10 lines
drivers/usb/host/ohci-at91.c +4
-1@@ -163,8 +179,11 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver, goto err5; } + board = hcd->self.controller->platform_data; + ohci =hcd_to_ohci (hcd); + ohci->num_ports = board->ports;at91_start_hc (pdev); -ohci_hcd_init (hcd_to_ohci (hcd)); +ohci_setup (hcd);
Didn't you say above that this version of the patch removes the call to ohci_setup()?
drivers/usb/host/ohci-at91.c ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg) · line 634
Quoted 6 lines
drivers/usb/host/ohci-at91.c +1
-1@@ -686,7 +631,7 @@ ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg)* REVISIT: some boards will be able to turn VBUS off... */ if (at91_suspend_entering_slow_clock ()) { -ohci_usb_reset (ohci); +ohci_restart (ohci);
Why did you change this? Did we discuss it earlier?
Alan Stern
PATCH v2 6/6 USB: OHCI: make ohci-s3c2410 a separate driver
In reply to Manjunath GoudarSeparate the Samsung OHCI S3CXXXX host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-Set non-standard fields in ohci_s3c2410_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-s3c2410.c | 129 ++++++++++++++++++--------------------- 4 files changed, 67 insertions(+), 89 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_S3CXXXX + tristate "Support for S3CXXXX on-chip OHCI USB controller" + depends on USB_OHCI_HCD && (ARCH_S3C24XX) || (ARCH_S3C64XX) + default y + ---help--- + Enables support for the on-chip OHCI controller on + S3CXXXX chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -50,6 +50,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o +obj-$(CONFIG_USB_OHCI_HCD_S3CXXXX) += ohci-s3c2410.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1177,11 +1177,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_ARCH_S3C24XX ) || defined(CONFIG_ARCH_S3C64XX ) -#include "ohci-s3c2410.c" -#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1293,12 +1288,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef S3C2410_PLATFORM_DRIVER - retval =platform_driver_register (&S3C2410_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_s3c2410; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1332,10 +1321,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); - error_s3c2410: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:
@@ -1382,9 +1367,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif
drivers/usb/host/ohci-s3c2410.c +58 -71
181 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH v2 6/6 USB: OHCI: make ohci-s3c2410 a separate driver
Quoted 18 lines · Manjunath Goudar
Separate the Samsung OHCI S3CXXXX host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-Set non-standard fields inohci_s3c2410_hc_drivermanually, rather than
relying on an expanded structohci_driver_overrides.
-Saveorig_ohci_hub_controlandorig_ohci_hub_status_datarather than
relying onohci_hub_controlandhub_status_databeing exported.
-ohci_setup() has been removed because it is called in .reset member
of theohci_hc_driverstructure.drivers/usb/host/Kconfig +0
-0
drivers/usb/host/Kconfig config USB_OHCI_HCD_SPEAR · line 395
Quoted 6 lines
drivers/usb/host/Kconfig +3
-0@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_S3CXXXX + tristate "Support for S3CXXXX on-chip OHCI USB controller" + depends on USB_OHCI_HCD && (ARCH_S3C24XX) || (ARCH_S3C64XX)
The use of parentheses here is wrong.
drivers/usb/host/Kconfig config USB_OHCI_HCD_SPEAR · line 397
Quoted 2 lines
drivers/usb/host/Kconfig +2
-0+static int (*orig_ohci_hub_control)(struct usb_hcd *hcd, u16 typeReq, u16 wValue, + u16 wIndex, char *buf, u16 wLength);
Avoid having more than 80 columns in a line.
drivers/usb/host/Kconfig static int usb_hcd_s3c2410_probe(const struct hc_driver *driver, · line 392
Quoted 6 lines
drivers/usb/host/Kconfig +1
-0@@ -371,10 +388,9 @@ static int usb_hcd_s3c2410_probe(const struct hc_driver *driver, goto err_put; } + ohci_setup(hcd); s3c2410_start_hc(dev, hcd);
I thought this patch was supposed to get rid of the call to ohci_setup()?
Alan Stern
v3 cover USB: OHCI: more bus glues as separate modules
In reply to Manjunath GoudarThese patches are for separating the SOC On-Chip ohci host controller from ohci-hcd host code into its own driver module.
This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
In patch 5/6 and 6/6:
-Set non-standard fields in hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
In patch 1/6 to 4/6
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V3:
In patch 5/6 and 6/6:
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
In patch 5/6:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handling ohci->hc_control.
In patch 2/6 :
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this scenario should be handled only after ohci_setup()
In patch 1/6 and 4/6:
No change.
Manjunath Goudar (6):
USB: OHCI: make ohci-exynos a separate driver
USB: OHCI: make ohci-omap a separate driver
USB: OHCI: make ohci-omap3 a separate driver
USB: OHCI: make ohci-spear a separate driver
USB: OHCI: make ohci-at91 a separate driver
USB: OHCI: make ohci-s3c2410 a separate driver
drivers/usb/host/Kconfig | 30 ++++++- drivers/usb/host/Makefile | 6 ++ drivers/usb/host/ohci-at91.c | 151 ++++++++++++++++------------------- drivers/usb/host/ohci-exynos.c | 167 ++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 108 ------------------------- drivers/usb/host/ohci-omap.c | 157 +++++++++++++----------------------- drivers/usb/host/ohci-omap3.c | 113 ++++++++------------------ drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++----------------- drivers/usb/host/ohci-spear.c | 140 +++++++++++++------------------- 9 files changed, 369 insertions(+), 631 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v3 1/6 USB: OHCI: make ohci-exynos a separate driver
Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-exynos_ohci_hcd structure assignment error fixed. -Removed multiple usb_create_hcd() from prob funtion. -platform_set_drvdata() called before exynos_ohci_phy_enable(). -ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure
V3:
-No major changes only "exynos" written in capital letters
in "OHCI exynos driver".
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-exynos.c | 167 +++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 71 insertions(+), 117 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -463,7 +463,7 @@ config USB_OHCI_SH If you use the PCI OHCI controller, this option is not necessary. config USB_OHCI_EXYNOS - boolean "OHCI support for Samsung EXYNOS SoC Series" + tristate "OHCI support for Samsung EXYNOS SoC Series" depends on ARCH_EXYNOS help Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
drivers/usb/host/Makefile +1 -0
@@ -45,6 +45,7 @@ obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o +obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-exynos.c +69 -98
289 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_EXYNOS -#include "ohci-exynos.c" -#define EXYNOS_PLATFORM_DRIVER exynos_ohci_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 #include "ohci-omap.c" #define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver
@@ -1336,12 +1331,6 @@ static int __init ohci_hcd_mod_init(void) goto error_s3c2410;#endif -#ifdef EXYNOS_PLATFORM_DRIVER - retval =platform_driver_register (&EXYNOS_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_exynos; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1395,10 +1384,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); - error_exynos: -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); error_s3c2410:
@@ -1463,9 +1448,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH v3 2/6 USB: OHCI: make ohci-omap a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-omap_ohci_clock_power(0) called in usb_hcd_omap_remove(). -Removed ohci_setup() call from usb_hcd_omap_probe(). -host_enabled and host_initialized variables aren't used for anything
thats what removed.
V3:
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this scenario should be handled only after ohci_setup()
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ----- drivers/usb/host/ohci-omap.c | 157 +++++++++++++++--------------------------- 4 files changed, 56 insertions(+), 122 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -376,7 +376,7 @@ config USB_OHCI_HCD if USB_OHCI_HCD config USB_OHCI_HCD_OMAP1 - bool "OHCI support for OMAP1/2 chips" + tristate "OHCI support for OMAP1/2 chips" depends on ARCH_OMAP1 default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 -#include "ohci-omap.c" -#define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 #include "ohci-omap3.c" #define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver
@@ -1289,12 +1284,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP1_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP1_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap1_platform; -#endif -#ifdef OMAP3_PLATFORM_DRIVER retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER );if (retval <0 )
@@ -1408,10 +1397,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); error_omap3_platform:#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); - error_omap1_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1466,9 +1451,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OMAP3_PLATFORM_DRIVER platform_driver_unregister (&OMAP3_PLATFORM_DRIVER );#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap.c +54 -103
239 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH v3 2/6 USB: OHCI: make ohci-omap a separate driver
Quoted 4 lines · Manjunath Goudar
Separate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
I'm sorry it took so long to review this; I have been very busy.
This patch is almost right. There are just a couple of problems involving the clock_power calls.
Quoted 14 lines
drivers/usb/host/ohci-omap.c +0
-6@@ -354,12 +358,6 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver, goto err2; } - ohci =hcd_to_ohci (hcd); -ohci_hcd_init (ohci); - - host_initialized =0 ; - host_enabled =1 ; - irq =platform_get_irq (pdev,0 );if (irq <0 ) { retval = -ENXIO ;
drivers/usb/host/ohci-omap.c static int usb_hcd_omap_probe (const struct hc_driver *driver, · line 370
Quoted 9 lines
drivers/usb/host/ohci-omap.c +1
-5@@ -369,11 +367,7 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver,if (retval) goto err3; - host_initialized =1 ; - -if (!host_enabled) -omap_ohci_clock_power (0 ); - +omap_ohci_clock_power (0 );
Since host_enabled was always 1 at this point, omap_ohci_clock_power() would never be called. You should remove it.
drivers/usb/host/ohci-omap.c err0: · line 403
Quoted 9 lines
drivers/usb/host/ohci-omap.c +2
-0@@ -402,6 +396,8 @@ err0:static inline void usb_hcd_omap_remove (struct usb_hcd *hcd,struct platform_device *pdev) { +dev_dbg (hcd->self.controller,"stopping USB Controller\n" ); +omap_ohci_clock_power (0 );usb_remove_hcd (hcd);if (!IS_ERR_OR_NULL (hcd->phy)) { (void )otg_set_host (hcd->phy->otg,0 );
omap_ohci_clock_power() should be called after usb_remove_hcd(), not before. This reason is simple: Until usb_remove_hcd() is called, the controller is still running and therefore needs to have a valid clock signal.
Alan Stern
PATCH v3 3/6 USB: OHCI: make ohci-omap3 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-The improper multi-line commenting style written in proper way.
('*' characters aligned in vertically).
V3:
-RemoteWakeupConnected setting has been removed.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-omap3.c | 113 ++++++++++++----------------------------- 4 files changed, 34 insertions(+), 100 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -383,7 +383,7 @@ config USB_OHCI_HCD_OMAP1 Enables support for the OHCI controller on OMAP1/2 chips. config USB_OHCI_HCD_OMAP3 - bool "OHCI support for OMAP3 and later chips" + tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4) default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -47,6 +47,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 -#include "ohci-omap3.c" -#define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1284,12 +1279,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP3_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap3_platform; -#endif -#ifdef OF_PLATFORM_DRIVER retval =platform_driver_register (&OF_PLATFORM_DRIVER );if (retval <0 )
@@ -1393,10 +1382,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OF_PLATFORM_DRIVER ); error_of_platform:#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); - error_omap3_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1448,9 +1433,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OF_PLATFORM_DRIVER platform_driver_unregister (&OF_PLATFORM_DRIVER );#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap3.c +32 -81
141 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH v3 3/6 USB: OHCI: make ohci-omap3 a separate driver
Quoted 13 lines · Manjunath Goudar
Separate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
Signed-off-by Manjunath Goudar <[email protected]>Cc Anand Gadiyar <[email protected]>Cc Felipe Balbi <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Greg KH <[email protected]>Cc Alan Stern <[email protected]>Cc linux-usb at vger.kernel.org
Quoted 8 lines
V2:
-ohci_setup() removed because it is called in .reset member
of theohci_hc_driverstructure.
-The improper multi-line commenting style written in proper way.
('*' characters aligned in vertically).V3:
-RemoteWakeupConnected setting has been removed.
You weren't supposed to remove it! I told you to remove this one line:
writel(OHCI_CTRL_RWC, &ohci->regs->control);
The preceding lines:
/* * RemoteWakeupConnected has to be set explicitly before * calling ohci_run. The reset value of RWC is 0. */ ohci->hc_control = OHCI_CTRL_RWC;
should remain.
Alan Stern
PATCH v3 4/6 USB: OHCI: make ohci-spear a separate driver
In reply to Manjunath GoudarSeparate the ST OHCI SPEAr host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-debugging stuff isn't needed any more that's what removed.
V3:
No change.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-spear.c | 140 +++++++++++++++++------------------------ 4 files changed, 65 insertions(+), 102 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -382,6 +382,14 @@ config USB_OHCI_HCD_OMAP1 ---help--- Enables support for the OHCI controller on OMAP1/2 chips. +config USB_OHCI_HCD_SPEAR + tristate "Support for ST SPEAr on-chip OHCI USB controller" + depends on USB_OHCI_HCD && PLAT_SPEAR + default y + ---help--- + Enables support for the on-chip OHCI controller on + ST SPEAr chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o +obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1212,11 +1212,6 @@ MODULE_LICENSE ("GPL");#define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver#endif -#ifdef CONFIG_PLAT_SPEAR -#include "ohci-spear.c" -#define SPEAR_PLATFORM_DRIVER spear_ohci_hcd_driver -#endif -#ifdef CONFIG_PPC_PS3 #include "ohci-ps3.c" #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver
@@ -1333,19 +1328,9 @@ static int __init ohci_hcd_mod_init(void) goto error_davinci;#endif -#ifdef SPEAR_PLATFORM_DRIVER - retval =platform_driver_register (&SPEAR_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_spear; -#endif -return retval;/* Error path */ -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); - error_spear: -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:
@@ -1403,9 +1388,6 @@ module_init(ohci_hcd_mod_init); static void __exit ohci_hcd_mod_exit(void) { -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-spear.c +56 -84
205 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v3 5/6 USB: OHCI: make ohci-at91 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-Set non-standard fields in ohci_at91_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V3:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handling ohci->hc_control.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-at91.c | 151 +++++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 77 insertions(+), 101 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_AT91 + tristate "Support for Atmel on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_AT91 + default y + ---help--- + Enables support for the on-chip OHCI controller on + Atmel chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o +obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-at91.c +68 -83
220 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1192,11 +1192,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_AT91 -#include "ohci-at91.c" -#define AT91_PLATFORM_DRIVER ohci_hcd_at91_driver -#endif -#ifdef CONFIG_ARCH_LPC32XX #include "ohci-nxp.c" #define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver
@@ -1310,12 +1305,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef AT91_PLATFORM_DRIVER - retval =platform_driver_register (&AT91_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_at91; -#endif -#ifdef NXP_PLATFORM_DRIVER retval =platform_driver_register (&NXP_PLATFORM_DRIVER );if (retval <0 )
@@ -1339,10 +1328,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&NXP_PLATFORM_DRIVER ); error_nxp:#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); - error_at91: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1394,9 +1379,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef NXP_PLATFORM_DRIVER platform_driver_unregister (&NXP_PLATFORM_DRIVER );#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH v3 5/6 USB: OHCI: make ohci-at91 a separate driver
Quoted 4 lines · Manjunath Goudar
Separate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
This looks okay except for some very minor issues.
Quoted 5 lines
drivers/usb/host/Kconfig +0
-0
drivers/usb/host/Kconfig config USB_OHCI_HCD_SPEAR · line 399
Quoted 10 lines
drivers/usb/host/Kconfig +7
-0@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_AT91 + tristate "Support for Atmel on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_AT91 + default y + ---help--- + Enables support for the on-chip OHCI controller on + Atmel chips.
Get rid of the extra space after "tristate".
drivers/usb/host/Kconfig ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg) · line 636
Quoted 9 lines
drivers/usb/host/Kconfig +4
-1@@ -686,7 +630,11 @@ ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg) * REVISIT: some boards will be able to turn VBUS off... */ if (at91_suspend_entering_slow_clock()) { - ohci_usb_reset (ohci); + ohci->hc_control = ohci_readl (ohci, &ohci->regs->control); + ohci->hc_control &= OHCI_CTRL_RWC; + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); + ohci->rh_state = OHCI_RH_HALTED;
Even though you're just copying the code, don't also copy its mistakes. Get rid of the extra spaces before the '(' characters.
drivers/usb/host/Kconfig ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg)
Quoted 8 lines
drivers/usb/host/Kconfig +8
-0+static void __exit ohci_at91_cleanup(void) +{ + platform_driver_unregister(&ohci_hcd_at91_driver); +} +module_exit(ohci_at91_cleanup); + +MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_LICENSE("GPL");
Please move the existing MODULE_ALIAS line down here with these lines.
Alan Stern
PATCH v3 6/6 USB: OHCI: make ohci-s3c2410 a separate driver
In reply to Manjunath GoudarSeparate the Samsung OHCI S3CXXXX host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-Set non-standard fields in ohci_s3c2410_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
V3:
-Kconfig wrong parentheses discription fixed. -ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++++++---------------------- 4 files changed, 66 insertions(+), 89 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_S3CXXXX + tristate "Support for S3CXXXX on-chip OHCI USB controller" + depends on USB_OHCI_HCD && (ARCH_S3C24XX || ARCH_S3C64XX) + default y + ---help--- + Enables support for the on-chip OHCI controller on + S3CXXXX chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -50,6 +50,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o +obj-$(CONFIG_USB_OHCI_HCD_S3CXXXX) += ohci-s3c2410.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1177,11 +1177,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_ARCH_S3C24XX ) || defined(CONFIG_ARCH_S3C64XX ) -#include "ohci-s3c2410.c" -#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1293,12 +1288,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef S3C2410_PLATFORM_DRIVER - retval =platform_driver_register (&S3C2410_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_s3c2410; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1332,10 +1321,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); - error_s3c2410: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:
@@ -1382,9 +1367,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif
drivers/usb/host/ohci-s3c2410.c +57 -71
178 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH v3 6/6 USB: OHCI: make ohci-s3c2410 a separate driver
Quoted 4 lines · Manjunath Goudar
Separate the Samsung OHCI S3CXXXX host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
This patch looks very good. I have only two very small nits:
Quoted 28 lines
drivers/usb/host/ohci-s3c2410.c +12
-1@@ -19,17 +19,34 @@* This file is licenced under the GPL. */ -#include <linux/platform_device.h> #include <linux/clk.h> +#include <linux/io.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> #include <linux/platform_data/usb-ohci-s3c2410.h> +#include <linux/usb.h> +#include <linux/usb/hcd.h> + +#include "ohci.h" +#define valid_port (idx) ((idx) == 1 || (idx) == 2)/* clock device associated with the hcd */ + +#define DRIVER_DESC "OHCI S3CXXXX driver" +
drivers/usb/host/ohci-s3c2410.c line 50
Quoted 10 lines
drivers/usb/host/ohci-s3c2410.c +6
-0+static const char hcd_name[] ="ohci-s3cxxxx" ; +static struct clk *clk;static struct clk *usb_clk; +static int (*orig_ohci_hub_control)(struct usb_hcd *hcd,u16 typeReq, +u16 wValue,u16 wIndex,char *buf,u16 wLength); +static int (*orig_ohci_hub_status_data)(struct usb_hcd *hcd,char *buf); +/* forward definitions */
Do you understand what "forward definitions" means? It refers to declarations of functions whose actual code is given later. In other words, your declarations of orig_ohci_hub_control and orig_ohci_hub_status_data belong just after this comment, not just before it.
drivers/usb/host/ohci-s3c2410.c ohci_s3c2410_hub_status_data(struct usb_hcd *hcd, char *buf) · line 113
Quoted 6 lines
drivers/usb/host/ohci-s3c2410.c +1
-1@@ -93,7 +110,7 @@ ohci_s3c2410_hub_status_data(struct usb_hcd *hcd, char *buf)int orig;int portno; - orig =ohci_hub_status_data (hcd, buf); + orig =orig_ohci_hub_status_data (hcd, buf);
Since you're changing the line anyway, you should get rid of the extra space before the '='.
After you make those two changes, you can add my Acked-by.
Alan Stern
cover USB: OHCI: more bus glues as separate modules
In reply to Manjunath GoudarThese patches are for separating the SOC On-Chip ohci host controller from ohci-hcd host code into its own driver module.
This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
V2:
In patch 5/6 and 6/6:
-Set non-standard fields in hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
In patch 1/6 to 4/6
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V3:
In patch 5/6 and 6/6:
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
In patch 5/6:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handling ohci->hc_control.
In patch 2/6 :
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this scenario should be handled only after ohci_setup()
In patch 1/6 and 4/6:
No change.
V4:
In patch 1/6 and 4/6:
No change.
In patch 2/6 :
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0) is called after hcd shutdown.
In patch 3/6 :
-V3 modification revert back, only ohci->regs setting write()
function has been removed because ohci->regs doesn't get set until usb_add_hcd.
In patch 5/6 :
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
- MODULE_ALIAS line moved to last statement of ohci-at91 file.
In patch 6/6 :
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of functions.
Manjunath Goudar (6):
USB: OHCI: make ohci-exynos a separate driver
USB: OHCI: make ohci-omap a separate driver
USB: OHCI: make ohci-omap3 a separate driver
USB: OHCI: make ohci-spear a separate driver
USB: OHCI: make ohci-at91 a separate driver
USB: OHCI: make ohci-s3c2410 a separate driver
drivers/usb/host/Kconfig | 30 ++++++- drivers/usb/host/Makefile | 6 ++ drivers/usb/host/ohci-at91.c | 153 ++++++++++++++++------------------- drivers/usb/host/ohci-exynos.c | 167 ++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 108 ------------------------- drivers/usb/host/ohci-omap.c | 156 +++++++++++++----------------------- drivers/usb/host/ohci-omap3.c | 118 +++++++++------------------ drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++----------------- drivers/usb/host/ohci-spear.c | 140 +++++++++++++------------------- 9 files changed, 374 insertions(+), 632 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/6 USB: OHCI: make ohci-exynos a separate driver
Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-exynos_ohci_hcd structure assignment error fixed. -Removed multiple usb_create_hcd() from prob funtion. -platform_set_drvdata() called before exynos_ohci_phy_enable(). -ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure
V3:
-No major changes only "exynos" written in capital letters
in "OHCI exynos driver".
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-exynos.c | 167 +++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 71 insertions(+), 117 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -463,7 +463,7 @@ config USB_OHCI_SH If you use the PCI OHCI controller, this option is not necessary. config USB_OHCI_EXYNOS - boolean "OHCI support for Samsung EXYNOS SoC Series" + tristate "OHCI support for Samsung EXYNOS SoC Series" depends on ARCH_EXYNOS help Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
drivers/usb/host/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o +obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-exynos.c +69 -98
289 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_EXYNOS -#include "ohci-exynos.c" -#define EXYNOS_PLATFORM_DRIVER exynos_ohci_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 #include "ohci-omap.c" #define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver
@@ -1336,12 +1331,6 @@ static int __init ohci_hcd_mod_init(void) goto error_s3c2410;#endif -#ifdef EXYNOS_PLATFORM_DRIVER - retval =platform_driver_register (&EXYNOS_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_exynos; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1395,10 +1384,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); - error_exynos: -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); error_s3c2410:
@@ -1463,9 +1448,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH 2/6 USB: OHCI: make ohci-omap a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-omap_ohci_clock_power(0) called in usb_hcd_omap_remove(). -Removed ohci_setup() call from usb_hcd_omap_probe(). -host_enabled and host_initialized variables aren't used for anything
thats what removed.
V3:
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this scenario should be handled only after ohci_setup()
V4:
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0) is called after hcd shutdown.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ----- drivers/usb/host/ohci-omap.c | 156 ++++++++++++++---------------------------- 4 files changed, 55 insertions(+), 122 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -376,7 +376,7 @@ config USB_OHCI_HCD if USB_OHCI_HCD config USB_OHCI_HCD_OMAP1 - bool "OHCI support for OMAP1/2 chips" + tristate "OHCI support for OMAP1/2 chips" depends on ARCH_OMAP1 default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -47,6 +47,7 @@ obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 -#include "ohci-omap.c" -#define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 #include "ohci-omap3.c" #define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver
@@ -1289,12 +1284,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP1_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP1_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap1_platform; -#endif -#ifdef OMAP3_PLATFORM_DRIVER retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER );if (retval <0 )
@@ -1408,10 +1397,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); error_omap3_platform:#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); - error_omap1_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1466,9 +1451,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OMAP3_PLATFORM_DRIVER platform_driver_unregister (&OMAP3_PLATFORM_DRIVER );#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap.c +53 -103
239 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH 2/6 USB: OHCI: make ohci-omap a separate driver
Quoted 31 lines · Manjunath Goudar
Separate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
Signed-off-by Manjunath Goudar <[email protected]>Cc Felipe Balbi <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Greg KH <[email protected]>Cc Alan Stern <[email protected]>Cc linux-usb at vger.kernel.orgV2:
-omap_ohci_clock_power(0) called inusb_hcd_omap_remove(). -Removedohci_setup()call fromusb_hcd_omap_probe(). -host_enabled andhost_initializedvariables aren't used for anything
thats what removed.V3:
-rewritten if (config->otg||config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1.config->otgset scenario.
2. if any of these (config->otg,config->rwc) are set, this scenario should be handled only afterohci_setup()V4:
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0)is called after hcd shutdown.drivers/usb/host/ohci-omap.c +0
-0@@ -369,11 +367,6 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver,if (retval)
drivers/usb/host/ohci-omap.c static int usb_hcd_omap_probe (const struct hc_driver *driver, · line 372
Quoted 10 lines
drivers/usb/host/ohci-omap.c +0
-5goto err3; - host_initialized =1 ; - -if (!host_enabled) -omap_ohci_clock_power (0 ); -return 0 ; err3:iounmap (hcd->regs);
I suspect there's a mistake here, and the omap_ohci_clock_power() call perhaps should be moved after the "err3:" label. But that mistake (if it is a mistake) was present in the original code, and this patch shouldn't change it.
PATCH 3/6 USB: OHCI: make ohci-omap3 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-The improper multi-line commenting style written in proper way.
('*' characters aligned in vertically).
V3:
-RemoteWakeupConnected setting has been removed.
V4:
-V3 modification revert back, only ohci->regs setting write()
function has been removed because ohci->regs doesn't get set until usb_add_hcd.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-omap3.c | 118 +++++++++++++---------------------------- 4 files changed, 40 insertions(+), 99 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -383,7 +383,7 @@ config USB_OHCI_HCD_OMAP1 Enables support for the OHCI controller on OMAP1/2 chips. config USB_OHCI_HCD_OMAP3 - bool "OHCI support for OMAP3 and later chips" + tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4) default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 -#include "ohci-omap3.c" -#define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1284,12 +1279,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP3_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap3_platform; -#endif -#ifdef OF_PLATFORM_DRIVER retval =platform_driver_register (&OF_PLATFORM_DRIVER );if (retval <0 )
@@ -1393,10 +1382,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OF_PLATFORM_DRIVER ); error_of_platform:#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); - error_omap3_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1448,9 +1433,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OF_PLATFORM_DRIVER platform_driver_unregister (&OF_PLATFORM_DRIVER );#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap3.c +38 -80
146 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH 3/6 USB: OHCI: make ohci-omap3 a separate driver
Quoted 19 lines · Manjunath Goudar
Separate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
Signed-off-by Manjunath Goudar <[email protected]>Cc Anand Gadiyar <[email protected]>Cc Felipe Balbi <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Greg KH <[email protected]>Cc Alan Stern <[email protected]>Cc linux-usb at vger.kernel.orgV2:
-ohci_setup() removed because it is called in .reset member
of theohci_hc_driverstructure.
-The improper multi-line commenting style written in proper way.
('*' characters aligned in vertically).
Quoted 7 lines
V3:
-RemoteWakeupConnected setting has been removed.V4:
-V3 modification revert back, onlyohci->regssettingwrite()
function has been removed becauseohci->regsdoesn't get set untilusb_add_hcd.
PATCH 4/6 USB: OHCI: make ohci-spear a separate driver
In reply to Manjunath GoudarSeparate the ST OHCI SPEAr host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-debugging stuff isn't needed any more that's what removed.
V3:
No change.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-spear.c | 140 +++++++++++++++++------------------------ 4 files changed, 65 insertions(+), 102 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -382,6 +382,14 @@ config USB_OHCI_HCD_OMAP1 ---help--- Enables support for the OHCI controller on OMAP1/2 chips. +config USB_OHCI_HCD_SPEAR + tristate "Support for ST SPEAr on-chip OHCI USB controller" + depends on USB_OHCI_HCD && PLAT_SPEAR + default y + ---help--- + Enables support for the on-chip OHCI controller on + ST SPEAr chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o +obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1212,11 +1212,6 @@ MODULE_LICENSE ("GPL");#define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver#endif -#ifdef CONFIG_PLAT_SPEAR -#include "ohci-spear.c" -#define SPEAR_PLATFORM_DRIVER spear_ohci_hcd_driver -#endif -#ifdef CONFIG_PPC_PS3 #include "ohci-ps3.c" #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver
@@ -1333,19 +1328,9 @@ static int __init ohci_hcd_mod_init(void) goto error_davinci;#endif -#ifdef SPEAR_PLATFORM_DRIVER - retval =platform_driver_register (&SPEAR_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_spear; -#endif -return retval;/* Error path */ -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); - error_spear: -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:
@@ -1403,9 +1388,6 @@ module_init(ohci_hcd_mod_init); static void __exit ohci_hcd_mod_exit(void) { -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-spear.c +56 -84
205 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 5/6 USB: OHCI: make ohci-at91 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
V2:
-Set non-standard fields in ohci_at91_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V3:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handling ohci->hc_control.
V4:
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
- MODULE_ALIAS line moved to last statement of ohci-at91 file.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-at91.c | 153 +++++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 77 insertions(+), 103 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_AT91 + tristate "Support for Atmel on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_AT91 + default y + ---help--- + Enables support for the on-chip OHCI controller on + Atmel chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -50,6 +50,7 @@ obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o +obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-at91.c +68 -85
228 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1192,11 +1192,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_AT91 -#include "ohci-at91.c" -#define AT91_PLATFORM_DRIVER ohci_hcd_at91_driver -#endif -#ifdef CONFIG_ARCH_LPC32XX #include "ohci-nxp.c" #define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver
@@ -1310,12 +1305,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef AT91_PLATFORM_DRIVER - retval =platform_driver_register (&AT91_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_at91; -#endif -#ifdef NXP_PLATFORM_DRIVER retval =platform_driver_register (&NXP_PLATFORM_DRIVER );if (retval <0 )
@@ -1339,10 +1328,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&NXP_PLATFORM_DRIVER ); error_nxp:#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); - error_at91: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1394,9 +1379,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef NXP_PLATFORM_DRIVER platform_driver_unregister (&NXP_PLATFORM_DRIVER );#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH 5/6 USB: OHCI: make ohci-at91 a separate driver
Quoted 24 lines · Manjunath Goudar
Separate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
Signed-off-by Manjunath Goudar <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Alan Stern <[email protected]>Cc Greg KH <[email protected]>Cc linux-usb at vger.kernel.orgV2:
-Set non-standard fields inohci_at91_hc_drivermanually, rather than
relying on an expanded structohci_driver_overrides.
-Saveorig_ohci_hub_controlandorig_ohci_hub_status_datarather than
relying onohci_hub_controlandhub_status_databeing exported.
-ohci_setup() has been removed because it is called in .reset member
of theohci_hc_driverstructure.V3:
-Theohci_restart()function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handlingohci->hc_control.
Quoted 4 lines
V4:
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
-MODULE_ALIASline moved to last statement of ohci-at91 file.
PATCH 6/6 USB: OHCI: make ohci-s3c2410 a separate driver
In reply to Manjunath GoudarSeparate the Samsung OHCI S3CXXXX host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
V2:
-Set non-standard fields in ohci_s3c2410_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
V3:
-Kconfig wrong parentheses discription fixed. -ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V4:
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of functions.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++++++---------------------- 4 files changed, 66 insertions(+), 89 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_S3CXXXX + tristate "Support for S3CXXXX on-chip OHCI USB controller" + depends on USB_OHCI_HCD && (ARCH_S3C24XX || ARCH_S3C64XX) + default y + ---help--- + Enables support for the on-chip OHCI controller on + S3CXXXX chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -51,6 +51,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o +obj-$(CONFIG_USB_OHCI_HCD_S3CXXXX) += ohci-s3c2410.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1177,11 +1177,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_ARCH_S3C24XX ) || defined(CONFIG_ARCH_S3C64XX ) -#include "ohci-s3c2410.c" -#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1293,12 +1288,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef S3C2410_PLATFORM_DRIVER - retval =platform_driver_register (&S3C2410_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_s3c2410; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1332,10 +1321,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); - error_s3c2410: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:
@@ -1382,9 +1367,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif
drivers/usb/host/ohci-s3c2410.c +57 -71
180 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 6/6 USB: OHCI: make ohci-s3c2410 a separate driver
Hi Manjunath,
Please see some comments inline.
Quoted 39 lines · On Monday 22 of July 2013 14:49:30 Manjunath Goudar wrote:
Separate the Samsung OHCI S3CXXXX host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
Signed-off-by Manjunath Goudar <[email protected]>Acked-by Alan Stern <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Greg KH <[email protected]>Cc linux-usb at vger.kernel.orgV2:
-Set non-standard fields inohci_s3c2410_hc_drivermanually, rather
than relying on an expanded structohci_driver_overrides.
-Saveorig_ohci_hub_controlandorig_ohci_hub_status_datarather than
relying onohci_hub_controlandhub_status_databeing exported.V3:
-Kconfig wrong parentheses discription fixed. -ohci_setup() has been removed because it is called in .reset member
of theohci_hc_driverstructure.V4:
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of
functions. ---drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-s3c2410.c | 128+++++++++++++++++---------------------- 4 files changed, 66 insertions(+), 89 deletions(-)
drivers/usb/host/Kconfig +0
-0@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on
drivers/usb/host/Kconfig config USB_OHCI_HCD_SPEAR · line 400
Quoted 10 lines
drivers/usb/host/Kconfig +8
-0ST SPEAr chips. +config USB_OHCI_HCD_S3CXXXX + tristate "Support for S3CXXXX on-chip OHCI USB controller" + depends on USB_OHCI_HCD && (ARCH_S3C24XX || ARCH_S3C64XX) + default y + ---help--- + Enables support for the on-chip OHCI controller on + S3CXXXX chips. +
Please keep the name s3c2410 for consistency. Having all the names come from the first SoC with this hardware is somewhat deterministic as opposed to some other naming methods, e.g. ohci-exynos2, while later on a different SoC from Exynos 2 shows up that needs a different driver.
Quoted 85 lines
drivers/usb/host/Kconfig +0
-0config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91drivers/usb/host/Makefile +1
-0@@ -51,6 +51,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o +obj-$(CONFIG_USB_OHCI_HCD_S3CXXXX) += ohci-s3c2410.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.odrivers/usb/host/ohci-hcd.c +0
-18@@ -1177,11 +1177,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_ARCH_S3C24XX ) || defined(CONFIG_ARCH_S3C64XX ) -#include "ohci-s3c2410.c" -#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver@@ -1293,12 +1288,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef S3C2410_PLATFORM_DRIVER - retval =platform_driver_register (&S3C2410_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_s3c2410; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )@@ -1332,10 +1321,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); - error_s3c2410: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:@@ -1382,9 +1367,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif (quoted diff) +0
-0
b/drivers/usb/host/ohci-s3c2410.cindex e125770..48b5948 100644drivers/usb/host/ohci-s3c2410.c +9
-1@@ -19,19 +19,36 @@* This file is licenced under the GPL. */ -#include <linux/platform_device.h> #include <linux/clk.h> +#include <linux/io.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> #include <linux/platform_data/usb-ohci-s3c2410.h> +#include <linux/usb.h> +#include <linux/usb/hcd.h> + +#include "ohci.h" +
drivers/usb/host/ohci-s3c2410.c line 42
Quoted 10 lines
drivers/usb/host/ohci-s3c2410.c +5
-0#define valid_port (idx) ((idx) == 1 || (idx) == 2)/* clock device associated with the hcd */ + +#define DRIVER_DESC "OHCI S3CXXXX driver" + +static const char hcd_name[] ="ohci-s3cxxxx" ; +
Ditto.
Quoted 31 lines
drivers/usb/host/ohci-s3c2410.c +5
-2static struct clk *clk;static struct clk *usb_clk;/* forward definitions */ +static int (*orig_ohci_hub_control)(struct usb_hcd *hcd,u16 typeReq, +u16 wValue,u16 wIndex,char *buf,u16 wLength); +static int (*orig_ohci_hub_status_data)(struct usb_hcd *hcd,char *buf); + static void s3c2410_hcd_oc(struct s3c2410_hcd_info *info, int port_oc);/* conversion functions */ @@ -93,7 +110,7 @@ ohci_s3c2410_hub_status_data(struct usb_hcd *hcd, char *buf) int orig;int portno; - orig =ohci_hub_status_data (hcd, buf); + orig =orig_ohci_hub_status_data (hcd, buf);if (info ==NULL )return orig;@@ -164,7 +181,7 @@ static int ohci_s3c2410_hub_control(* process the request straight away and exit */ if (info ==NULL ) { - ret =ohci_hub_control (hcd, typeReq, wValue, + ret =orig_ohci_hub_control (hcd, typeReq, wValue, wIndex, buf, wLength); goto out; }
drivers/usb/host/ohci-s3c2410.c static int ohci_s3c2410_hub_control( · line 217
Quoted 4 lines
drivers/usb/host/ohci-s3c2410.c +0
-1@@ -214,7 +231,7 @@ static int ohci_s3c2410_hub_control(break ; } - ret = ohci_hub_control(hcd, typeReq, wValue, wIndex, buf,
wLength);
Quoted 102 lines
drivers/usb/host/ohci-s3c2410.c +1
-2+ ret =orig_ohci_hub_control (hcd, typeReq, wValue, wIndex, buf, wLength);if (ret) goto out;@@ -373,8 +390,6 @@ static int usb_hcd_s3c2410_probe(const structhc_driver *driver,s3c2410_start_hc (dev ,hcd ); -ohci_hcd_init (hcd_to_ohci (hcd)); - retval =usb_add_hcd (hcd, dev->resource[1 ].start,0 );if (retval !=0 )drivers/usb/host/ohci-s3c2410.c +10
-66goto err_ioremap;@@ -391,71 +406,7 @@ static int usb_hcd_s3c2410_probe(const struct hc_driver *driver,/*--------------------------------------------------------------------- ----*/ -static int -ohci_s3c2410_start(struct usb_hcd *hcd) -{ - struct ohci_hcd *ohci = hcd_to_ohci(hcd); -int ret; - - ret =ohci_init (ohci); -if (ret <0 ) -return ret; - - ret =ohci_run (ohci); -if (ret <0 ) { -dev_err (hcd->self.controller,"can't start %s\n" , - hcd->self.bus_name); -ohci_stop (hcd); -return ret; - } - -return 0 ; -} - - -static const struct hc_driver ohci_s3c2410_hc_driver = { - .description = hcd_name, - .product_desc ="S3C24XX OHCI" , - .hcd_priv_size =sizeof (struct ohci_hcd ), - -/* -* generic hardware linkage -*/ - .irq = ohci_irq, - .flags =HCD_USB11 |HCD_MEMORY , - -/* -* basic lifecycle operations -*/ - .start = ohci_s3c2410_start, - .stop = ohci_stop, - .shutdown = ohci_shutdown, - -/* -* managing i/o requests and associated device resources -*/ - .urb_enqueue = ohci_urb_enqueue, - .urb_dequeue = ohci_urb_dequeue, - .endpoint_disable = ohci_endpoint_disable, - -/* -* scheduling support -*/ - .get_frame_number = ohci_get_frame, - -/* -* root hub support -*/ - .hub_status_data = ohci_s3c2410_hub_status_data, - .hub_control = ohci_s3c2410_hub_control, -#ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, -#endif - .start_port_reset = ohci_start_port_reset, -}; - -/* device driver */ +static struct hc_driver __read_mostly ohci_s3c2410_hc_driver; static int ohci_hcd_s3c2410_drv_probe(struct platform_device *pdev) { @@ -532,4 +483,39 @@ static struct platform_driver ohci_hcd_s3c2410_driver = { }, }; +static int __init ohci_s3cxxxx_init (void ) +{ +if (usb_disabled ()) +return -ENODEV ; + +pr_info ("%s: " DRIVER_DESC "\n" , hcd_name); +ohci_init_driver (&ohci_s3c2410_hc_driver,NULL ); + +/*
drivers/usb/host/ohci-s3c2410.c static struct platform_driver · line 504
Quoted 10 lines
drivers/usb/host/ohci-s3c2410.c +10
-0+* The Samsung HW has some unusual quirks, which require +* Sumsung-specific workarounds. We override certain hc_driver +* functions here to achieve that. We explicitly do not enhance +* ohci_driver_overrides to allow this more easily, since this +* is an unusual case, and we don't want to encourage others to +* override these functions by making it too easy. +*/ + + orig_ohci_hub_control = ohci_s3c2410_hc_driver.hub_control; + orig_ohci_hub_status_data =
ohci_s3c2410_hc_driver.hub_status_data;
drivers/usb/host/ohci-s3c2410.c static struct platform_driver · line 506
Quoted 2 lines
drivers/usb/host/ohci-s3c2410.c +2
-0+ + ohci_s3c2410_hc_driver.hub_status_data =
ohci_s3c2410_hub_status_data;
drivers/usb/host/ohci-s3c2410.c static struct platform_driver · line 507
Quoted 1 line
drivers/usb/host/ohci-s3c2410.c +1
-0+ ohci_s3c2410_hc_driver.hub_control =
ohci_s3c2410_hub_control; +
drivers/usb/host/ohci-s3c2410.c static struct platform_driver ohci_hcd_s3c2410_driver = { · line 521
Quoted 13 lines
drivers/usb/host/ohci-s3c2410.c +12
-0+return platform_driver_register (&ohci_hcd_s3c2410_driver); +} +module_init (ohci_s3cxxxx_init); + +static void __exit ohci_s3cxxxx_cleanup(void) +{ +platform_driver_unregister (&ohci_hcd_s3c2410_driver); +} +module_exit (ohci_s3cxxxx_cleanup); + +MODULE_DESCRIPTION (DRIVER_DESC ); +MODULE_LICENSE ("GPL" );MODULE_ALIAS ("platform:s3c2410-ohci" );
Otherwise looks good to me. I will try to test this on S3C6410 in next days.
Best regards,
Tomasz
v4 cover USB: OHCI: more bus glues as separate modules
In reply to Manjunath GoudarQuoted 66 lines · Manjunath Goudar
These patches are for separating the SOC On-Chip ohci host controller from ohci-hcd host code into its own driver module.
This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.V2:
In patch 5/6 and 6/6:
-Set non-standard fields inhc_drivermanually, rather than
relying on an expanded structohci_driver_overrides.
-Saveorig_ohci_hub_controlandorig_ohci_hub_status_datarather than
relying onohci_hub_controlandhub_status_databeing exported.In patch 1/6 to 4/6
-ohci_setup() has been removed because it is called in .reset member
of theohci_hc_driverstructure.V3:
In patch 5/6 and 6/6:
-ohci_setup() has been removed because it is called in .reset member
of theohci_hc_driverstructure.In patch 5/6:
-Theohci_restart()function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handlingohci->hc_control.In patch 2/6 :
-rewritten if (config->otg||config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1.config->otgset scenario.
2. if any of these (config->otg,config->rwc) are set, this scenario should be handled only afterohci_setup()In patch 1/6 and 4/6:
No change.V4:
In patch 1/6 and 4/6:
No change.In patch 2/6 :
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0)is called after hcd shutdown.In patch 3/6 :
-V3 modification revert back, onlyohci->regssettingwrite()
function has been removed becauseohci->regsdoesn't get set untilusb_add_hcd.In patch 5/6 :
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
-MODULE_ALIASline moved to last statement of ohci-at91 file.In patch 6/6 :
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of functions.Manjunath Goudar (6):
USB: OHCI: make ohci-exynos a separate driver
USB: OHCI: make ohci-omap a separate driver
USB: OHCI: make ohci-omap3 a separate driver
USB: OHCI: make ohci-spear a separate driver
USB: OHCI: make ohci-at91 a separate driver
USB: OHCI: make ohci-s3c2410 a separate driver
Quoted 11 lines
drivers/usb/host/Kconfig | 30 ++++++- drivers/usb/host/Makefile | 6 ++ drivers/usb/host/ohci-at91.c | 153 ++++++++++++++++------------------- drivers/usb/host/ohci-exynos.c | 167 ++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 108 ------------------------- drivers/usb/host/ohci-omap.c | 156 +++++++++++++----------------------- drivers/usb/host/ohci-omap3.c | 118 +++++++++------------------ drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++----------------- drivers/usb/host/ohci-spear.c | 140 +++++++++++++------------------- 9 files changed, 374 insertions(+), 632 deletions(-)
I am very sorry, this is patch V4 series.
Thanks
Manjunath Goudar
v4 cover USB: OHCI: more bus glues as separate modules
In reply to Manjunath GoudarThese patches are for separating the SOC On-Chip ohci host controller from ohci-hcd host code into its own driver module.
This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
V2:
In patch 5/6 and 6/6:
-Set non-standard fields in hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
In patch 1/6 to 4/6
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V3:
In patch 5/6 and 6/6:
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
In patch 5/6:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handling ohci->hc_control.
In patch 2/6 :
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this scenario should be handled only after ohci_setup()
In patch 1/6 and 4/6:
No change.
V4:
In patch 1/6 and 4/6:
No change.
In patch 2/6 :
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0) is called after hcd shutdown.
In patch 3/6 :
-V3 modification revert back, only ohci->regs setting write()
function has been removed because ohci->regs doesn't get set until usb_add_hcd.
In patch 5/6 :
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
- MODULE_ALIAS line moved to last statement of ohci-at91 file.
In patch 6/6 :
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of functions.
Manjunath Goudar (6):
USB: OHCI: make ohci-exynos a separate driver
USB: OHCI: make ohci-omap a separate driver
USB: OHCI: make ohci-omap3 a separate driver
USB: OHCI: make ohci-spear a separate driver
USB: OHCI: make ohci-at91 a separate driver
USB: OHCI: make ohci-s3c2410 a separate driver
drivers/usb/host/Kconfig | 30 ++++++- drivers/usb/host/Makefile | 6 ++ drivers/usb/host/ohci-at91.c | 153 ++++++++++++++++------------------- drivers/usb/host/ohci-exynos.c | 167 ++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 108 ------------------------- drivers/usb/host/ohci-omap.c | 156 +++++++++++++----------------------- drivers/usb/host/ohci-omap3.c | 118 +++++++++------------------ drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++----------------- drivers/usb/host/ohci-spear.c | 140 +++++++++++++------------------- 9 files changed, 374 insertions(+), 632 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v4 1/6 USB: OHCI: make ohci-exynos a separate driver
Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-exynos_ohci_hcd structure assignment error fixed. -Removed multiple usb_create_hcd() from prob funtion. -platform_set_drvdata() called before exynos_ohci_phy_enable(). -ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure
V3:
-No major changes only "exynos" written in capital letters
in "OHCI exynos driver".
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-exynos.c | 167 +++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 71 insertions(+), 117 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -463,7 +463,7 @@ config USB_OHCI_SH If you use the PCI OHCI controller, this option is not necessary. config USB_OHCI_EXYNOS - boolean "OHCI support for Samsung EXYNOS SoC Series" + tristate "OHCI support for Samsung EXYNOS SoC Series" depends on ARCH_EXYNOS help Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
drivers/usb/host/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o +obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-exynos.c +69 -98
289 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_EXYNOS -#include "ohci-exynos.c" -#define EXYNOS_PLATFORM_DRIVER exynos_ohci_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 #include "ohci-omap.c" #define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver
@@ -1336,12 +1331,6 @@ static int __init ohci_hcd_mod_init(void) goto error_s3c2410;#endif -#ifdef EXYNOS_PLATFORM_DRIVER - retval =platform_driver_register (&EXYNOS_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_exynos; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1395,10 +1384,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); - error_exynos: -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); error_s3c2410:
@@ -1463,9 +1448,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH v4 2/6 USB: OHCI: make ohci-omap a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-omap_ohci_clock_power(0) called in usb_hcd_omap_remove(). -Removed ohci_setup() call from usb_hcd_omap_probe(). -host_enabled and host_initialized variables aren't used for anything
thats what removed.
V3:
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this scenario should be handled only after ohci_setup()
V4:
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0) is called after hcd shutdown.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ----- drivers/usb/host/ohci-omap.c | 156 ++++++++++++++---------------------------- 4 files changed, 55 insertions(+), 122 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -376,7 +376,7 @@ config USB_OHCI_HCD if USB_OHCI_HCD config USB_OHCI_HCD_OMAP1 - bool "OHCI support for OMAP1/2 chips" + tristate "OHCI support for OMAP1/2 chips" depends on ARCH_OMAP1 default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -47,6 +47,7 @@ obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 -#include "ohci-omap.c" -#define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 #include "ohci-omap3.c" #define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver
@@ -1289,12 +1284,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP1_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP1_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap1_platform; -#endif -#ifdef OMAP3_PLATFORM_DRIVER retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER );if (retval <0 )
@@ -1408,10 +1397,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); error_omap3_platform:#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); - error_omap1_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1466,9 +1451,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OMAP3_PLATFORM_DRIVER platform_driver_unregister (&OMAP3_PLATFORM_DRIVER );#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap.c +53 -103
239 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v4 3/6 USB: OHCI: make ohci-omap3 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-The improper multi-line commenting style written in proper way.
('*' characters aligned in vertically).
V3:
-RemoteWakeupConnected setting has been removed.
V4:
-V3 modification revert back, only ohci->regs setting write()
function has been removed because ohci->regs doesn't get set until usb_add_hcd.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-omap3.c | 118 +++++++++++++---------------------------- 4 files changed, 40 insertions(+), 99 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -383,7 +383,7 @@ config USB_OHCI_HCD_OMAP1 Enables support for the OHCI controller on OMAP1/2 chips. config USB_OHCI_HCD_OMAP3 - bool "OHCI support for OMAP3 and later chips" + tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4) default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 -#include "ohci-omap3.c" -#define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1284,12 +1279,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP3_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap3_platform; -#endif -#ifdef OF_PLATFORM_DRIVER retval =platform_driver_register (&OF_PLATFORM_DRIVER );if (retval <0 )
@@ -1393,10 +1382,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OF_PLATFORM_DRIVER ); error_of_platform:#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); - error_omap3_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1448,9 +1433,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OF_PLATFORM_DRIVER platform_driver_unregister (&OF_PLATFORM_DRIVER );#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap3.c +38 -80
146 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v4 4/6 USB: OHCI: make ohci-spear a separate driver
In reply to Manjunath GoudarSeparate the ST OHCI SPEAr host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-debugging stuff isn't needed any more that's what removed.
V3:
No change.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-spear.c | 140 +++++++++++++++++------------------------ 4 files changed, 65 insertions(+), 102 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -382,6 +382,14 @@ config USB_OHCI_HCD_OMAP1 ---help--- Enables support for the OHCI controller on OMAP1/2 chips. +config USB_OHCI_HCD_SPEAR + tristate "Support for ST SPEAr on-chip OHCI USB controller" + depends on USB_OHCI_HCD && PLAT_SPEAR + default y + ---help--- + Enables support for the on-chip OHCI controller on + ST SPEAr chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o +obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1212,11 +1212,6 @@ MODULE_LICENSE ("GPL");#define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver#endif -#ifdef CONFIG_PLAT_SPEAR -#include "ohci-spear.c" -#define SPEAR_PLATFORM_DRIVER spear_ohci_hcd_driver -#endif -#ifdef CONFIG_PPC_PS3 #include "ohci-ps3.c" #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver
@@ -1333,19 +1328,9 @@ static int __init ohci_hcd_mod_init(void) goto error_davinci;#endif -#ifdef SPEAR_PLATFORM_DRIVER - retval =platform_driver_register (&SPEAR_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_spear; -#endif -return retval;/* Error path */ -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); - error_spear: -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:
@@ -1403,9 +1388,6 @@ module_init(ohci_hcd_mod_init); static void __exit ohci_hcd_mod_exit(void) { -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-spear.c +56 -84
205 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v4 5/6 USB: OHCI: make ohci-at91 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
V2:
-Set non-standard fields in ohci_at91_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V3:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handling ohci->hc_control.
V4:
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
- MODULE_ALIAS line moved to last statement of ohci-at91 file.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-at91.c | 153 +++++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 77 insertions(+), 103 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_AT91 + tristate "Support for Atmel on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_AT91 + default y + ---help--- + Enables support for the on-chip OHCI controller on + Atmel chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -50,6 +50,7 @@ obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o +obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-at91.c +68 -85
228 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1192,11 +1192,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_AT91 -#include "ohci-at91.c" -#define AT91_PLATFORM_DRIVER ohci_hcd_at91_driver -#endif -#ifdef CONFIG_ARCH_LPC32XX #include "ohci-nxp.c" #define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver
@@ -1310,12 +1305,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef AT91_PLATFORM_DRIVER - retval =platform_driver_register (&AT91_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_at91; -#endif -#ifdef NXP_PLATFORM_DRIVER retval =platform_driver_register (&NXP_PLATFORM_DRIVER );if (retval <0 )
@@ -1339,10 +1328,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&NXP_PLATFORM_DRIVER ); error_nxp:#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); - error_at91: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1394,9 +1379,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef NXP_PLATFORM_DRIVER platform_driver_unregister (&NXP_PLATFORM_DRIVER );#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH v4 6/6 USB: OHCI: make ohci-s3c2410 a separate driver
In reply to Manjunath GoudarSeparate the Samsung OHCI S3CXXXX host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
V2:
-Set non-standard fields in ohci_s3c2410_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
V3:
-Kconfig wrong parentheses discription fixed. -ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V4:
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of functions.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++++++---------------------- 4 files changed, 66 insertions(+), 89 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_S3CXXXX + tristate "Support for S3CXXXX on-chip OHCI USB controller" + depends on USB_OHCI_HCD && (ARCH_S3C24XX || ARCH_S3C64XX) + default y + ---help--- + Enables support for the on-chip OHCI controller on + S3CXXXX chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -51,6 +51,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o +obj-$(CONFIG_USB_OHCI_HCD_S3CXXXX) += ohci-s3c2410.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1177,11 +1177,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_ARCH_S3C24XX ) || defined(CONFIG_ARCH_S3C64XX ) -#include "ohci-s3c2410.c" -#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1293,12 +1288,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef S3C2410_PLATFORM_DRIVER - retval =platform_driver_register (&S3C2410_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_s3c2410; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1332,10 +1321,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); - error_s3c2410: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:
@@ -1382,9 +1367,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif
drivers/usb/host/ohci-s3c2410.c +57 -71
180 lines not on this page · raw message
Signature · 1 line
1.7.9.5
v4 cover USB: OHCI: more bus glues as separate modules
In reply to Manjunath GoudarThese patches are for separating the SOC On-Chip ohci host controller from ohci-hcd host code into its own driver module.
This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
V2:
In patch 5/6 and 6/6:
-Set non-standard fields in hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
In patch 1/6 to 4/6
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V3:
In patch 5/6 and 6/6:
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
In patch 5/6:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handling ohci->hc_control.
In patch 2/6 :
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this scenario should be handled only after ohci_setup()
In patch 1/6 and 4/6:
No change.
V4:
In patch 1/6 and 4/6:
No change.
In patch 2/6 :
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0) is called after hcd shutdown.
In patch 3/6 :
-V3 modification revert back, only ohci->regs setting write()
function has been removed because ohci->regs doesn't get set until usb_add_hcd.
In patch 5/6 :
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
- MODULE_ALIAS line moved to last statement of ohci-at91 file.
In patch 6/6 :
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of functions.
Manjunath Goudar (6):
USB: OHCI: make ohci-exynos a separate driver
USB: OHCI: make ohci-omap a separate driver
USB: OHCI: make ohci-omap3 a separate driver
USB: OHCI: make ohci-spear a separate driver
USB: OHCI: make ohci-at91 a separate driver
USB: OHCI: make ohci-s3c2410 a separate driver
drivers/usb/host/Kconfig | 30 ++++++- drivers/usb/host/Makefile | 6 ++ drivers/usb/host/ohci-at91.c | 153 ++++++++++++++++------------------- drivers/usb/host/ohci-exynos.c | 167 ++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 108 ------------------------- drivers/usb/host/ohci-omap.c | 156 +++++++++++++----------------------- drivers/usb/host/ohci-omap3.c | 118 +++++++++------------------ drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++----------------- drivers/usb/host/ohci-spear.c | 140 +++++++++++++------------------- 9 files changed, 374 insertions(+), 632 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v4 1/6 USB: OHCI: make ohci-exynos a separate driver
Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-exynos_ohci_hcd structure assignment error fixed. -Removed multiple usb_create_hcd() from prob funtion. -platform_set_drvdata() called before exynos_ohci_phy_enable(). -ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure
V3:
-No major changes only "exynos" written in capital letters
in "OHCI exynos driver".
V4:
-No changes.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-exynos.c | 167 +++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 71 insertions(+), 117 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -463,7 +463,7 @@ config USB_OHCI_SH If you use the PCI OHCI controller, this option is not necessary. config USB_OHCI_EXYNOS - boolean "OHCI support for Samsung EXYNOS SoC Series" + tristate "OHCI support for Samsung EXYNOS SoC Series" depends on ARCH_EXYNOS help Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
drivers/usb/host/Makefile +1 -0
@@ -44,6 +44,7 @@ obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o +obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-exynos.c +69 -98
289 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_EXYNOS -#include "ohci-exynos.c" -#define EXYNOS_PLATFORM_DRIVER exynos_ohci_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 #include "ohci-omap.c" #define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver
@@ -1336,12 +1331,6 @@ static int __init ohci_hcd_mod_init(void) goto error_s3c2410;#endif -#ifdef EXYNOS_PLATFORM_DRIVER - retval =platform_driver_register (&EXYNOS_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_exynos; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1395,10 +1384,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); - error_exynos: -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); error_s3c2410:
@@ -1463,9 +1448,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH v4 2/6 USB: OHCI: make ohci-omap a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-omap_ohci_clock_power(0) called in usb_hcd_omap_remove(). -Removed ohci_setup() call from usb_hcd_omap_probe(). -host_enabled and host_initialized variables aren't used for anything
thats what removed.
V3:
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this scenario should be handled only after ohci_setup()
V4:
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0) is called after hcd shutdown.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ----- drivers/usb/host/ohci-omap.c | 156 ++++++++++++++---------------------------- 4 files changed, 55 insertions(+), 122 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -376,7 +376,7 @@ config USB_OHCI_HCD if USB_OHCI_HCD config USB_OHCI_HCD_OMAP1 - bool "OHCI support for OMAP1/2 chips" + tristate "OHCI support for OMAP1/2 chips" depends on ARCH_OMAP1 default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -45,6 +45,7 @@ obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 -#include "ohci-omap.c" -#define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 #include "ohci-omap3.c" #define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver
@@ -1289,12 +1284,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP1_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP1_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap1_platform; -#endif -#ifdef OMAP3_PLATFORM_DRIVER retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER );if (retval <0 )
@@ -1408,10 +1397,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); error_omap3_platform:#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); - error_omap1_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1466,9 +1451,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OMAP3_PLATFORM_DRIVER platform_driver_unregister (&OMAP3_PLATFORM_DRIVER );#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap.c +53 -103
239 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v4 3/6 USB: OHCI: make ohci-omap3 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-The improper multi-line commenting style written in proper way.
('*' characters aligned in vertically).
V3:
-RemoteWakeupConnected setting has been removed.
V4:
-V3 modification revert back, only ohci->regs setting write()
function has been removed because ohci->regs doesn't get set until usb_add_hcd.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-omap3.c | 118 +++++++++++++---------------------------- 4 files changed, 40 insertions(+), 99 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -383,7 +383,7 @@ config USB_OHCI_HCD_OMAP1 Enables support for the OHCI controller on OMAP1/2 chips. config USB_OHCI_HCD_OMAP3 - bool "OHCI support for OMAP3 and later chips" + tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4) default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 -#include "ohci-omap3.c" -#define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1284,12 +1279,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP3_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap3_platform; -#endif -#ifdef OF_PLATFORM_DRIVER retval =platform_driver_register (&OF_PLATFORM_DRIVER );if (retval <0 )
@@ -1393,10 +1382,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OF_PLATFORM_DRIVER ); error_of_platform:#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); - error_omap3_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1448,9 +1433,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OF_PLATFORM_DRIVER platform_driver_unregister (&OF_PLATFORM_DRIVER );#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap3.c +38 -80
146 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v4 4/6 USB: OHCI: make ohci-spear a separate driver
In reply to Manjunath GoudarSeparate the ST OHCI SPEAr host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-debugging stuff isn't needed any more that's what removed.
V3:
No change.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-spear.c | 140 +++++++++++++++++------------------------ 4 files changed, 65 insertions(+), 102 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -382,6 +382,14 @@ config USB_OHCI_HCD_OMAP1 ---help--- Enables support for the OHCI controller on OMAP1/2 chips. +config USB_OHCI_HCD_SPEAR + tristate "Support for ST SPEAr on-chip OHCI USB controller" + depends on USB_OHCI_HCD && PLAT_SPEAR + default y + ---help--- + Enables support for the on-chip OHCI controller on + ST SPEAr chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -47,6 +47,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o +obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1212,11 +1212,6 @@ MODULE_LICENSE ("GPL");#define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver#endif -#ifdef CONFIG_PLAT_SPEAR -#include "ohci-spear.c" -#define SPEAR_PLATFORM_DRIVER spear_ohci_hcd_driver -#endif -#ifdef CONFIG_PPC_PS3 #include "ohci-ps3.c" #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver
@@ -1333,19 +1328,9 @@ static int __init ohci_hcd_mod_init(void) goto error_davinci;#endif -#ifdef SPEAR_PLATFORM_DRIVER - retval =platform_driver_register (&SPEAR_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_spear; -#endif -return retval;/* Error path */ -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); - error_spear: -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:
@@ -1403,9 +1388,6 @@ module_init(ohci_hcd_mod_init); static void __exit ohci_hcd_mod_exit(void) { -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-spear.c +56 -84
205 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v4 5/6 USB: OHCI: make ohci-at91 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
V2:
-Set non-standard fields in ohci_at91_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V3:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handling ohci->hc_control.
V4:
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
- MODULE_ALIAS line moved to last statement of ohci-at91 file.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-at91.c | 153 +++++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 77 insertions(+), 103 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_AT91 + tristate "Support for Atmel on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_AT91 + default y + ---help--- + Enables support for the on-chip OHCI controller on + Atmel chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o +obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-at91.c +68 -85
228 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1192,11 +1192,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_AT91 -#include "ohci-at91.c" -#define AT91_PLATFORM_DRIVER ohci_hcd_at91_driver -#endif -#ifdef CONFIG_ARCH_LPC32XX #include "ohci-nxp.c" #define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver
@@ -1310,12 +1305,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef AT91_PLATFORM_DRIVER - retval =platform_driver_register (&AT91_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_at91; -#endif -#ifdef NXP_PLATFORM_DRIVER retval =platform_driver_register (&NXP_PLATFORM_DRIVER );if (retval <0 )
@@ -1339,10 +1328,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&NXP_PLATFORM_DRIVER ); error_nxp:#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); - error_at91: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1394,9 +1379,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef NXP_PLATFORM_DRIVER platform_driver_unregister (&NXP_PLATFORM_DRIVER );#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH v4 6/6 USB: OHCI: make ohci-s3c2410 a separate driver
In reply to Manjunath GoudarSeparate the Samsung OHCI S3CXXXX host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
V2:
-Set non-standard fields in ohci_s3c2410_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
V3:
-Kconfig wrong parentheses discription fixed. -ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V4:
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of functions.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++++++---------------------- 4 files changed, 66 insertions(+), 89 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_S3CXXXX + tristate "Support for S3CXXXX on-chip OHCI USB controller" + depends on USB_OHCI_HCD && (ARCH_S3C24XX || ARCH_S3C64XX) + default y + ---help--- + Enables support for the on-chip OHCI controller on + S3CXXXX chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o +obj-$(CONFIG_USB_OHCI_HCD_S3CXXXX) += ohci-s3c2410.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1177,11 +1177,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_ARCH_S3C24XX ) || defined(CONFIG_ARCH_S3C64XX ) -#include "ohci-s3c2410.c" -#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1293,12 +1288,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef S3C2410_PLATFORM_DRIVER - retval =platform_driver_register (&S3C2410_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_s3c2410; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1332,10 +1321,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); - error_s3c2410: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:
@@ -1382,9 +1367,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif
drivers/usb/host/ohci-s3c2410.c +57 -71
180 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v4 6/6 USB: OHCI: make ohci-s3c2410 a separate driver
Hi Manjunath,
Quoted 39 lines · On Saturday 10 of August 2013 13:07:36 Manjunath Goudar wrote:
Separate the Samsung OHCI S3CXXXX host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
Signed-off-by Manjunath Goudar <[email protected]>Signed-off-by Deepak Saxena <[email protected]>Acked-by Alan Stern <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Greg KH <[email protected]>Cc linux-usb at vger.kernel.orgV2:
-Set non-standard fields inohci_s3c2410_hc_drivermanually, rather
than relying on an expanded structohci_driver_overrides.
-Saveorig_ohci_hub_controlandorig_ohci_hub_status_datarather than
relying onohci_hub_controlandhub_status_databeing exported.V3:
-Kconfig wrong parentheses discription fixed. -ohci_setup() has been removed because it is called in .reset member
of theohci_hc_driverstructure.V4:
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of
functions. ---drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-s3c2410.c | 128+++++++++++++++++---------------------- 4 files changed, 66 insertions(+), 89 deletions(-)
drivers/usb/host/Kconfig +0
-0
drivers/usb/host/Kconfig config USB_OHCI_HCD_SPEAR · line 394
Quoted 5 lines
drivers/usb/host/Kconfig +2
-0@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_S3CXXXX + tristate "Support for S3CXXXX on-chip OHCI USB controller"
As far as I remember, you were supposed to keep the original name of this driver, as I suggested in previous iteration of this patch and you agreed. S3CXXXX is totally confusing when it's about Samsung SoC naming.
So here the config entry would be USB_OHCI_HCD_S3C2410 and I would call it "OHCI support for Samsung S3C24xx/S3C64xx SoC series".
drivers/usb/host/Kconfig config USB_OHCI_HCD_SPEAR · line 399
Quoted 5 lines
drivers/usb/host/Kconfig +5
-0+ depends on USB_OHCI_HCD && (ARCH_S3C24XX || ARCH_S3C64XX) + default y + ---help--- + Enables support for the on-chip OHCI controller on + S3CXXXX chips.
S3C24xx/S3C64xx chips
drivers/usb/host/Makefile obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o · line 52
Quoted 13 lines
drivers/usb/host/Kconfig +1
-0+ config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91drivers/usb/host/Makefile +1
-0@@ -49,6 +49,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o +obj-$(CONFIG_USB_OHCI_HCD_S3CXXXX) += ohci-s3c2410.o
CONFIG_USB_OHCI_HCD_S3C2410
Quoted 70 lines
drivers/usb/host/Makefile +0
-0obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.odrivers/usb/host/ohci-hcd.c +0
-18@@ -1177,11 +1177,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_ARCH_S3C24XX ) || defined(CONFIG_ARCH_S3C64XX ) -#include "ohci-s3c2410.c" -#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver@@ -1293,12 +1288,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef S3C2410_PLATFORM_DRIVER - retval =platform_driver_register (&S3C2410_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_s3c2410; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )@@ -1332,10 +1321,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); - error_s3c2410: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:@@ -1382,9 +1367,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif (quoted diff) +0
-0
b/drivers/usb/host/ohci-s3c2410.cindex e125770..48b5948 100644drivers/usb/host/ohci-s3c2410.c +6
-1@@ -19,19 +19,36 @@* This file is licenced under the GPL. */ -#include <linux/platform_device.h> #include <linux/clk.h> +#include <linux/io.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> #include <linux/platform_data/usb-ohci-s3c2410.h> +#include <linux/usb.h> +#include <linux/usb/hcd.h>
drivers/usb/host/ohci-s3c2410.c line 39
Quoted 10 lines
drivers/usb/host/ohci-s3c2410.c +5
-0+ +#include "ohci.h" +#define valid_port (idx) ((idx) == 1 || (idx) == 2)/* clock device associated with the hcd */ + +#define DRIVER_DESC "OHCI S3CXXXX driver"
OHCI S3C2410 driver
drivers/usb/host/ohci-s3c2410.c line 41
Quoted 2 lines
drivers/usb/host/ohci-s3c2410.c +2
-0+ +static const char hcd_name[] ="ohci-s3cxxxx" ;
ohci-s3c2410
Quoted 32 lines
drivers/usb/host/ohci-s3c2410.c +6
-2+static struct clk *clk;static struct clk *usb_clk;/* forward definitions */ +static int (*orig_ohci_hub_control)(struct usb_hcd *hcd,u16 typeReq, +u16 wValue,u16 wIndex,char *buf,u16 wLength); +static int (*orig_ohci_hub_status_data)(struct usb_hcd *hcd,char *buf); + static void s3c2410_hcd_oc(struct s3c2410_hcd_info *info, int port_oc);/* conversion functions */ @@ -93,7 +110,7 @@ ohci_s3c2410_hub_status_data(struct usb_hcd *hcd, char *buf) int orig;int portno; - orig =ohci_hub_status_data (hcd, buf); + orig =orig_ohci_hub_status_data (hcd, buf);if (info ==NULL )return orig;@@ -164,7 +181,7 @@ static int ohci_s3c2410_hub_control(* process the request straight away and exit */ if (info ==NULL ) { - ret =ohci_hub_control (hcd, typeReq, wValue, + ret =orig_ohci_hub_control (hcd, typeReq, wValue, wIndex, buf, wLength); goto out; }
drivers/usb/host/ohci-s3c2410.c static int ohci_s3c2410_hub_control( · line 217
Quoted 4 lines
drivers/usb/host/ohci-s3c2410.c +0
-1@@ -214,7 +231,7 @@ static int ohci_s3c2410_hub_control(break ; } - ret = ohci_hub_control(hcd, typeReq, wValue, wIndex, buf,
wLength);
Quoted 90 lines
drivers/usb/host/ohci-s3c2410.c +1
-2+ ret =orig_ohci_hub_control (hcd, typeReq, wValue, wIndex, buf, wLength);if (ret) goto out;@@ -373,8 +390,6 @@ static int usb_hcd_s3c2410_probe(const structhc_driver *driver,s3c2410_start_hc (dev ,hcd ); -ohci_hcd_init (hcd_to_ohci (hcd)); - retval =usb_add_hcd (hcd, dev->resource[1 ].start,0 );if (retval !=0 )drivers/usb/host/ohci-s3c2410.c +1
-66goto err_ioremap;@@ -391,71 +406,7 @@ static int usb_hcd_s3c2410_probe(const struct hc_driver *driver,/*--------------------------------------------------------------------- ----*/ -static int -ohci_s3c2410_start(struct usb_hcd *hcd) -{ - struct ohci_hcd *ohci = hcd_to_ohci(hcd); -int ret; - - ret =ohci_init (ohci); -if (ret <0 ) -return ret; - - ret =ohci_run (ohci); -if (ret <0 ) { -dev_err (hcd->self.controller,"can't start %s\n" , - hcd->self.bus_name); -ohci_stop (hcd); -return ret; - } - -return 0 ; -} - - -static const struct hc_driver ohci_s3c2410_hc_driver = { - .description = hcd_name, - .product_desc ="S3C24XX OHCI" , - .hcd_priv_size =sizeof (struct ohci_hcd ), - -/* -* generic hardware linkage -*/ - .irq = ohci_irq, - .flags =HCD_USB11 |HCD_MEMORY , - -/* -* basic lifecycle operations -*/ - .start = ohci_s3c2410_start, - .stop = ohci_stop, - .shutdown = ohci_shutdown, - -/* -* managing i/o requests and associated device resources -*/ - .urb_enqueue = ohci_urb_enqueue, - .urb_dequeue = ohci_urb_dequeue, - .endpoint_disable = ohci_endpoint_disable, - -/* -* scheduling support -*/ - .get_frame_number = ohci_get_frame, - -/* -* root hub support -*/ - .hub_status_data = ohci_s3c2410_hub_status_data, - .hub_control = ohci_s3c2410_hub_control, -#ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, -#endif - .start_port_reset = ohci_start_port_reset, -}; - -/* device driver */ +static struct hc_driver __read_mostly ohci_s3c2410_hc_driver; static int ohci_hcd_s3c2410_drv_probe(struct platform_device *pdev) {
drivers/usb/host/ohci-s3c2410.c static struct platform_driver · line 486
Quoted 4 lines
drivers/usb/host/ohci-s3c2410.c +1
-0@@ -532,4 +483,39 @@ static struct platform_driver ohci_hcd_s3c2410_driver = { }, }; +static int __init ohci_s3cxxxx_init (void )
ohci_s3c2410_init
Quoted 8 lines
drivers/usb/host/ohci-s3c2410.c +8
-0+{ +if (usb_disabled ()) +return -ENODEV ; + +pr_info ("%s: " DRIVER_DESC "\n" , hcd_name); +ohci_init_driver (&ohci_s3c2410_hc_driver,NULL ); + +/*
drivers/usb/host/ohci-s3c2410.c static struct platform_driver ohci_hcd_s3c2410_driver = {
Quoted 10 lines
drivers/usb/host/ohci-s3c2410.c +10
-0+* The Samsung HW has some unusual quirks, which require +* Sumsung-specific workarounds. We override certain hc_driver +* functions here to achieve that. We explicitly do not enhance +* ohci_driver_overrides to allow this more easily, since this +* is an unusual case, and we don't want to encourage others to +* override these functions by making it too easy. +*/ + + orig_ohci_hub_control = ohci_s3c2410_hc_driver.hub_control; + orig_ohci_hub_status_data =
ohci_s3c2410_hc_driver.hub_status_data;
drivers/usb/host/ohci-s3c2410.c static struct platform_driver · line 506
Quoted 2 lines
drivers/usb/host/ohci-s3c2410.c +2
-0+ + ohci_s3c2410_hc_driver.hub_status_data =
ohci_s3c2410_hub_status_data;
drivers/usb/host/ohci-s3c2410.c static struct platform_driver · line 507
Quoted 1 line
drivers/usb/host/ohci-s3c2410.c +1
-0+ ohci_s3c2410_hc_driver.hub_control =
ohci_s3c2410_hub_control; +
drivers/usb/host/ohci-s3c2410.c static struct platform_driver ohci_hcd_s3c2410_driver = { · line 513
Quoted 5 lines
drivers/usb/host/ohci-s3c2410.c +5
-0+return platform_driver_register (&ohci_hcd_s3c2410_driver); +} +module_init (ohci_s3cxxxx_init); + +static void __exit ohci_s3cxxxx_cleanup(void)
ohci_s3c2410_cleanup
drivers/usb/host/ohci-s3c2410.c static struct platform_driver ohci_hcd_s3c2410_driver = { · line 521
Quoted 8 lines
drivers/usb/host/ohci-s3c2410.c +7
-0+{ +platform_driver_unregister (&ohci_hcd_s3c2410_driver); +} +module_exit (ohci_s3cxxxx_cleanup); + +MODULE_DESCRIPTION (DRIVER_DESC ); +MODULE_LICENSE ("GPL" );MODULE_ALIAS ("platform:s3c2410-ohci" );
Best regards,
Tomasz
v5 cover USB: OHCI: more bus glues as separate modules
In reply to Manjunath GoudarThese patches are for separating the SOC On-Chip ohci host controller from ohci-hcd host code into its own driver module.
This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
V2:
In patch 5/6 and 6/6:
-Set non-standard fields in hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
In patch 1/6 to 4/6
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V3:
In patch 5/6 and 6/6:
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
In patch 5/6:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handling ohci->hc_control.
In patch 2/6 :
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this scenario should be handled only after ohci_setup()
In patch 1/6 and 4/6:
No change.
V4:
In patch 1/6 and 4/6:
No change.
In patch 2/6 :
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0) is called after hcd shutdown.
In patch 3/6 :
-V3 modification revert back, only ohci->regs setting write()
function has been removed because ohci->regs doesn't get set until usb_add_hcd.
In patch 5/6 :
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
- MODULE_ALIAS line moved to last statement of ohci-at91 file.
In patch 6/6 :
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of functions.
V5:
In patch 1/6 to 5/6
- No change.
In patch 6/6:
- String "s3cxxxx" is replaced by "s3c2410".
Manjunath Goudar (6):
USB: OHCI: make ohci-exynos a separate driver
USB: OHCI: make ohci-omap a separate driver
USB: OHCI: make ohci-omap3 a separate driver
USB: OHCI: make ohci-spear a separate driver
USB: OHCI: make ohci-at91 a separate driver
USB: OHCI: make ohci-s3c2410 a separate driver
drivers/usb/host/Kconfig | 30 ++++++- drivers/usb/host/Makefile | 6 ++ drivers/usb/host/ohci-at91.c | 153 ++++++++++++++++------------------- drivers/usb/host/ohci-exynos.c | 167 ++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 108 ------------------------- drivers/usb/host/ohci-omap.c | 156 +++++++++++++----------------------- drivers/usb/host/ohci-omap3.c | 118 +++++++++------------------ drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++----------------- drivers/usb/host/ohci-spear.c | 140 +++++++++++++------------------- 9 files changed, 374 insertions(+), 632 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v5 1/6 USB: OHCI: make ohci-exynos a separate driver
Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
V2:
-exynos_ohci_hcd structure assignment error fixed. -Removed multiple usb_create_hcd() from prob funtion. -platform_set_drvdata() called before exynos_ohci_phy_enable(). -ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure
V3:
-No major changes only "exynos" written in capital letters
in "OHCI exynos driver".
V4:
-No change.
V5:
-No Change.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-exynos.c | 167 +++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 71 insertions(+), 117 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -463,7 +463,7 @@ config USB_OHCI_SH If you use the PCI OHCI controller, this option is not necessary. config USB_OHCI_EXYNOS - boolean "OHCI support for Samsung EXYNOS SoC Series" + tristate "OHCI support for Samsung EXYNOS SoC Series" depends on ARCH_EXYNOS help Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
drivers/usb/host/Makefile +1 -0
@@ -44,6 +44,7 @@ obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o +obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-exynos.c +69 -98
289 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_EXYNOS -#include "ohci-exynos.c" -#define EXYNOS_PLATFORM_DRIVER exynos_ohci_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 #include "ohci-omap.c" #define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver
@@ -1336,12 +1331,6 @@ static int __init ohci_hcd_mod_init(void) goto error_s3c2410;#endif -#ifdef EXYNOS_PLATFORM_DRIVER - retval =platform_driver_register (&EXYNOS_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_exynos; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1395,10 +1384,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); - error_exynos: -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); error_s3c2410:
@@ -1463,9 +1448,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH v5 2/6 USB: OHCI: make ohci-omap a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-omap_ohci_clock_power(0) called in usb_hcd_omap_remove(). -Removed ohci_setup() call from usb_hcd_omap_probe(). -host_enabled and host_initialized variables aren't used for anything
thats what removed.
V3:
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this scenario should be handled only after ohci_setup()
V4:
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0) is called after hcd shutdown.
V5:
-No change.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ----- drivers/usb/host/ohci-omap.c | 156 ++++++++++++++---------------------------- 4 files changed, 55 insertions(+), 122 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -376,7 +376,7 @@ config USB_OHCI_HCD if USB_OHCI_HCD config USB_OHCI_HCD_OMAP1 - bool "OHCI support for OMAP1/2 chips" + tristate "OHCI support for OMAP1/2 chips" depends on ARCH_OMAP1 default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -45,6 +45,7 @@ obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 -#include "ohci-omap.c" -#define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 #include "ohci-omap3.c" #define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver
@@ -1289,12 +1284,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP1_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP1_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap1_platform; -#endif -#ifdef OMAP3_PLATFORM_DRIVER retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER );if (retval <0 )
@@ -1408,10 +1397,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); error_omap3_platform:#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); - error_omap1_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1466,9 +1451,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OMAP3_PLATFORM_DRIVER platform_driver_unregister (&OMAP3_PLATFORM_DRIVER );#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap.c +53 -103
239 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 3/6 USB: OHCI: make ohci-omap3 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-The improper multi-line commenting style written in proper way.
('*' characters aligned in vertically).
V3:
-RemoteWakeupConnected setting has been removed.
V4:
-V3 modification revert back, only ohci->regs setting write()
function has been removed because ohci->regs doesn't get set until usb_add_hcd.
V5:
- No change.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-omap3.c | 118 +++++++++++++---------------------------- 4 files changed, 40 insertions(+), 99 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -383,7 +383,7 @@ config USB_OHCI_HCD_OMAP1 Enables support for the OHCI controller on OMAP1/2 chips. config USB_OHCI_HCD_OMAP3 - bool "OHCI support for OMAP3 and later chips" + tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4) default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 -#include "ohci-omap3.c" -#define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1284,12 +1279,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP3_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap3_platform; -#endif -#ifdef OF_PLATFORM_DRIVER retval =platform_driver_register (&OF_PLATFORM_DRIVER );if (retval <0 )
@@ -1393,10 +1382,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OF_PLATFORM_DRIVER ); error_of_platform:#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); - error_omap3_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1448,9 +1433,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OF_PLATFORM_DRIVER platform_driver_unregister (&OF_PLATFORM_DRIVER );#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap3.c +38 -80
146 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 4/6 USB: OHCI: make ohci-spear a separate driver
In reply to Manjunath GoudarSeparate the ST OHCI SPEAr host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-debugging stuff isn't needed any more that's what removed.
V3:
No change.
V4:
No change.
V5:
No change.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-spear.c | 140 +++++++++++++++++------------------------ 4 files changed, 65 insertions(+), 102 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -382,6 +382,14 @@ config USB_OHCI_HCD_OMAP1 ---help--- Enables support for the OHCI controller on OMAP1/2 chips. +config USB_OHCI_HCD_SPEAR + tristate "Support for ST SPEAr on-chip OHCI USB controller" + depends on USB_OHCI_HCD && PLAT_SPEAR + default y + ---help--- + Enables support for the on-chip OHCI controller on + ST SPEAr chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -47,6 +47,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o +obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1212,11 +1212,6 @@ MODULE_LICENSE ("GPL");#define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver#endif -#ifdef CONFIG_PLAT_SPEAR -#include "ohci-spear.c" -#define SPEAR_PLATFORM_DRIVER spear_ohci_hcd_driver -#endif -#ifdef CONFIG_PPC_PS3 #include "ohci-ps3.c" #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver
@@ -1333,19 +1328,9 @@ static int __init ohci_hcd_mod_init(void) goto error_davinci;#endif -#ifdef SPEAR_PLATFORM_DRIVER - retval =platform_driver_register (&SPEAR_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_spear; -#endif -return retval;/* Error path */ -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); - error_spear: -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:
@@ -1403,9 +1388,6 @@ module_init(ohci_hcd_mod_init); static void __exit ohci_hcd_mod_exit(void) { -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-spear.c +56 -84
205 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 4/6 USB: OHCI: make ohci-spear a separate driver
Quoted 2 lines · Manjunath Goudar
This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
You really want it in 3.11, we are already at 3.11-rc5 :)
Whatever you write here gets in git history with your patch and I am sure you never wanted this to be commited. :)
So, both the above lines must be removed from each of your patches and must be present only once in the cover-letter.
Don't resend your patches now with this.. Unless Greg wants you to.
Greg KH
maintainerPATCH v5 4/6 USB: OHCI: make ohci-spear a separate driver
Quoted 6 lines · Viresh Kumar
Quoted 2 lines · Manjunath Goudar
This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.
You really want it in 3.11, we are already at 3.11-rc5 :)
Quoted 8 lines
Whatever you write here gets in git history with your patch and I am sure you never wanted this to be commited. :)
So, both the above lines must be removed from each of your patches and must be present only once in the cover-letter.
Don't resend your patches now with this.. Unless Greg wants you to.
Yes, they all need to be resent as they don't seem to apply :(
Please just delete that part of the sentance from all of the patches in this series. It does not matter which tree it would be "nice" to have them in, once they are accepted the changelog will show where it was accepted.
thanks,
greg k-h
PATCH v5 5/6 USB: OHCI: make ohci-at91 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.12.
V2:
-Set non-standard fields in ohci_at91_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V3:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handling ohci->hc_control.
V4:
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
- MODULE_ALIAS line moved to last statement of ohci-at91 file.
V5:
-No change.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-at91.c | 153 +++++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 77 insertions(+), 103 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_AT91 + tristate "Support for Atmel on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_AT91 + default y + ---help--- + Enables support for the on-chip OHCI controller on + Atmel chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o +obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-at91.c +68 -85
228 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1192,11 +1192,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_AT91 -#include "ohci-at91.c" -#define AT91_PLATFORM_DRIVER ohci_hcd_at91_driver -#endif -#ifdef CONFIG_ARCH_LPC32XX #include "ohci-nxp.c" #define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver
@@ -1310,12 +1305,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef AT91_PLATFORM_DRIVER - retval =platform_driver_register (&AT91_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_at91; -#endif -#ifdef NXP_PLATFORM_DRIVER retval =platform_driver_register (&NXP_PLATFORM_DRIVER );if (retval <0 )
@@ -1339,10 +1328,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&NXP_PLATFORM_DRIVER ); error_nxp:#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); - error_at91: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1394,9 +1379,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef NXP_PLATFORM_DRIVER platform_driver_unregister (&NXP_PLATFORM_DRIVER );#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH v5 6/6 USB: OHCI: make ohci-s3c2410 a separate driver
In reply to Manjunath GoudarSeparate the Samsung OHCI S3C24xx/S3C64xx host controller driver from ohci-hcd host code so that it can be built as a separate driver module.This work is part of enabling multi-platform kernels on ARM;it would be nice to have in 3.12.
V2:
-Set non-standard fields in ohci_s3c2410_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
V3:
-Kconfig wrong parentheses discription fixed. -ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V4:
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of functions.
V5:
- String "s3cxxxx" is replaced by "s3c2410".
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++++++---------------------- 4 files changed, 66 insertions(+), 89 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_S3C2410 + tristate "OHCI support for Samsung S3C24xx/S3C64xx SoC series" + depends on USB_OHCI_HCD && (ARCH_S3C24XX || ARCH_S3C64XX) + default y + ---help--- + Enables support for the on-chip OHCI controller on + S3C24xx/S3C64xx chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o +obj-$(CONFIG_USB_OHCI_HCD_S3C2410) += ohci-s3c2410.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1177,11 +1177,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_ARCH_S3C24XX ) || defined(CONFIG_ARCH_S3C64XX ) -#include "ohci-s3c2410.c" -#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1293,12 +1288,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef S3C2410_PLATFORM_DRIVER - retval =platform_driver_register (&S3C2410_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_s3c2410; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1332,10 +1321,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); - error_s3c2410: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:
@@ -1382,9 +1367,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif
drivers/usb/host/ohci-s3c2410.c +57 -71
180 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 6/6 USB: OHCI: make ohci-s3c2410 a separate driver
Hi Manjunath,
Quoted 180 lines · On Monday 12 of August 2013 12:17:00 Manjunath Goudar wrote:
Separate the Samsung OHCI S3C24xx/S3C64xx host controller driver from ohci-hcd host code so that it can be built as a separate driver module.This work is part of enabling multi-platform kernels on ARM;it would be nice to have in 3.12.
Signed-off-by Manjunath Goudar <[email protected]>Signed-off-by Deepak Saxena <[email protected]>Acked-by Alan Stern <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Greg KH <[email protected]>Cc linux-usb at vger.kernel.orgV2:
-Set non-standard fields inohci_s3c2410_hc_drivermanually, rather
than relying on an expanded structohci_driver_overrides.
-Saveorig_ohci_hub_controlandorig_ohci_hub_status_datarather than
relying onohci_hub_controlandhub_status_databeing exported.V3:
-Kconfig wrong parentheses discription fixed. -ohci_setup() has been removed because it is called in .reset member
of theohci_hc_driverstructure.V4:
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of
functions.V5:
- String "s3cxxxx" is replaced by "s3c2410".--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-s3c2410.c | 128+++++++++++++++++---------------------- 4 files changed, 66 insertions(+), 89 deletions(-)
drivers/usb/host/Kconfig +8
-0@@ -390,6 +390,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_S3C2410 + tristate "OHCI support for Samsung S3C24xx/S3C64xx SoC series" + depends on USB_OHCI_HCD && (ARCH_S3C24XX || ARCH_S3C64XX) + default y + ---help--- + Enables support for the on-chip OHCI controller on + S3C24xx/S3C64xx chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91drivers/usb/host/Makefile +1
-0@@ -49,6 +49,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o +obj-$(CONFIG_USB_OHCI_HCD_S3C2410) += ohci-s3c2410.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.odrivers/usb/host/ohci-hcd.c +0
-18@@ -1177,11 +1177,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_ARCH_S3C24XX ) || defined(CONFIG_ARCH_S3C64XX ) -#include "ohci-s3c2410.c" -#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver@@ -1293,12 +1288,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef S3C2410_PLATFORM_DRIVER - retval =platform_driver_register (&S3C2410_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_s3c2410; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )@@ -1332,10 +1321,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); - error_s3c2410: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:@@ -1382,9 +1367,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif (quoted diff) +0
-0
b/drivers/usb/host/ohci-s3c2410.cindex e125770..61f9aea 100644drivers/usb/host/ohci-s3c2410.c +19
-3@@ -19,19 +19,36 @@* This file is licenced under the GPL. */ -#include <linux/platform_device.h> #include <linux/clk.h> +#include <linux/io.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> #include <linux/platform_data/usb-ohci-s3c2410.h> +#include <linux/usb.h> +#include <linux/usb/hcd.h> + +#include "ohci.h" +#define valid_port (idx) ((idx) == 1 || (idx) == 2)/* clock device associated with the hcd */ + +#define DRIVER_DESC "OHCI S3C2410 driver" + +static const char hcd_name[] ="ohci-s3c2410" ; +static struct clk *clk;static struct clk *usb_clk;/* forward definitions */ +static int (*orig_ohci_hub_control)(struct usb_hcd *hcd,u16 typeReq, +u16 wValue,u16 wIndex,char *buf,u16 wLength); +static int (*orig_ohci_hub_status_data)(struct usb_hcd *hcd,char *buf); + static void s3c2410_hcd_oc(struct s3c2410_hcd_info *info, int port_oc);/* conversion functions */ @@ -93,7 +110,7 @@ ohci_s3c2410_hub_status_data(struct usb_hcd *hcd, char *buf) int orig;int portno; - orig =ohci_hub_status_data (hcd, buf); + orig =orig_ohci_hub_status_data (hcd, buf);if (info ==NULL )return orig;@@ -164,7 +181,7 @@ static int ohci_s3c2410_hub_control(* process the request straight away and exit */ if (info ==NULL ) { - ret =ohci_hub_control (hcd, typeReq, wValue, + ret =orig_ohci_hub_control (hcd, typeReq, wValue, wIndex, buf, wLength); goto out; }
drivers/usb/host/ohci-s3c2410.c static int ohci_s3c2410_hub_control( · line 217
Quoted 4 lines
drivers/usb/host/ohci-s3c2410.c +0
-1@@ -214,7 +231,7 @@ static int ohci_s3c2410_hub_control(break ; } - ret = ohci_hub_control(hcd, typeReq, wValue, wIndex, buf,
wLength);
Quoted 102 lines
drivers/usb/host/ohci-s3c2410.c +1
-2+ ret =orig_ohci_hub_control (hcd, typeReq, wValue, wIndex, buf, wLength);if (ret) goto out;@@ -373,8 +390,6 @@ static int usb_hcd_s3c2410_probe(const structhc_driver *driver,s3c2410_start_hc (dev ,hcd ); -ohci_hcd_init (hcd_to_ohci (hcd)); - retval =usb_add_hcd (hcd, dev->resource[1 ].start,0 );if (retval !=0 )drivers/usb/host/ohci-s3c2410.c +10
-66goto err_ioremap;@@ -391,71 +406,7 @@ static int usb_hcd_s3c2410_probe(const struct hc_driver *driver,/*--------------------------------------------------------------------- ----*/ -static int -ohci_s3c2410_start(struct usb_hcd *hcd) -{ - struct ohci_hcd *ohci = hcd_to_ohci(hcd); -int ret; - - ret =ohci_init (ohci); -if (ret <0 ) -return ret; - - ret =ohci_run (ohci); -if (ret <0 ) { -dev_err (hcd->self.controller,"can't start %s\n" , - hcd->self.bus_name); -ohci_stop (hcd); -return ret; - } - -return 0 ; -} - - -static const struct hc_driver ohci_s3c2410_hc_driver = { - .description = hcd_name, - .product_desc ="S3C24XX OHCI" , - .hcd_priv_size =sizeof (struct ohci_hcd ), - -/* -* generic hardware linkage -*/ - .irq = ohci_irq, - .flags =HCD_USB11 |HCD_MEMORY , - -/* -* basic lifecycle operations -*/ - .start = ohci_s3c2410_start, - .stop = ohci_stop, - .shutdown = ohci_shutdown, - -/* -* managing i/o requests and associated device resources -*/ - .urb_enqueue = ohci_urb_enqueue, - .urb_dequeue = ohci_urb_dequeue, - .endpoint_disable = ohci_endpoint_disable, - -/* -* scheduling support -*/ - .get_frame_number = ohci_get_frame, - -/* -* root hub support -*/ - .hub_status_data = ohci_s3c2410_hub_status_data, - .hub_control = ohci_s3c2410_hub_control, -#ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, -#endif - .start_port_reset = ohci_start_port_reset, -}; - -/* device driver */ +static struct hc_driver __read_mostly ohci_s3c2410_hc_driver; static int ohci_hcd_s3c2410_drv_probe(struct platform_device *pdev) { @@ -532,4 +483,39 @@ static struct platform_driver ohci_hcd_s3c2410_driver = { }, }; +static int __init ohci_s3c2410_init (void ) +{ +if (usb_disabled ()) +return -ENODEV ; + +pr_info ("%s: " DRIVER_DESC "\n" , hcd_name); +ohci_init_driver (&ohci_s3c2410_hc_driver,NULL ); + +/*
drivers/usb/host/ohci-s3c2410.c static struct platform_driver · line 504
Quoted 10 lines
drivers/usb/host/ohci-s3c2410.c +10
-0+* The Samsung HW has some unusual quirks, which require +* Sumsung-specific workarounds. We override certain hc_driver +* functions here to achieve that. We explicitly do not enhance +* ohci_driver_overrides to allow this more easily, since this +* is an unusual case, and we don't want to encourage others to +* override these functions by making it too easy. +*/ + + orig_ohci_hub_control = ohci_s3c2410_hc_driver.hub_control; + orig_ohci_hub_status_data =
ohci_s3c2410_hc_driver.hub_status_data;
drivers/usb/host/ohci-s3c2410.c static struct platform_driver · line 506
Quoted 2 lines
drivers/usb/host/ohci-s3c2410.c +2
-0+ + ohci_s3c2410_hc_driver.hub_status_data =
ohci_s3c2410_hub_status_data;
drivers/usb/host/ohci-s3c2410.c static struct platform_driver · line 507
Quoted 1 line
drivers/usb/host/ohci-s3c2410.c +1
-0+ ohci_s3c2410_hc_driver.hub_control =
ohci_s3c2410_hub_control; +
drivers/usb/host/ohci-s3c2410.c static struct platform_driver ohci_hcd_s3c2410_driver = { · line 521
Quoted 13 lines
drivers/usb/host/ohci-s3c2410.c +12
-0+return platform_driver_register (&ohci_hcd_s3c2410_driver); +} +module_init (ohci_s3c2410_init); + +static void __exit ohci_s3c2410_cleanup(void) +{ +platform_driver_unregister (&ohci_hcd_s3c2410_driver); +} +module_exit (ohci_s3c2410_cleanup); + +MODULE_DESCRIPTION (DRIVER_DESC ); +MODULE_LICENSE ("GPL" );MODULE_ALIAS ("platform:s3c2410-ohci" );
Looks good.
Best regards,
Tomasz
v5 cover USB: OHCI: more bus glues as separate modules
In reply to Manjunath GoudarQuoted 6 lines · Manjunath Goudar
V5:
In patch 1/6 to 5/6
- No change.In patch 6/6:
- String "s3cxxxx" is replaced by "s3c2410".
In such cases its better to just send only one patch and that can be done by pasting your patch as a reply to earlier review..
Also, In the version log mention recent changes first, as people are more interested in them.. So, it should be like:
V4->V5
...
V3->V4
...
V2->V3
...
...
v5 cover USB: OHCI: more bus glues as separate modules
In reply to Manjunath GoudarThese patches are for separating the SOC On-Chip ohci host controller from ohci-hcd host code and making per SOC driver module similar to EHCI module available in the kernel. This work is part of enabling multi-platform kernel on ARM.
Before I was sending three different ohci patch set as below.
1. Six series patch set is having exynos, omap, omap3, spear, at91 and s3c2410.
2. ohci-nxp a separate driver patch.
3. Two series patch set is having ep93xx and pxa27x.
In this patch set all three previous ohci series have been combined into single series as all these patches are related to OHCI.
Manjunath Goudar (9):
USB: OHCI: make ohci-exynos a separate driver
USB: OHCI: make ohci-omap a separate driver
USB: OHCI: make ohci-omap3 a separate driver
USB: OHCI: make ohci-spear a separate driver
USB: OHCI: make ohci-at91 a separate driver
USB: OHCI: make ohci-s3c2410 a separate driver
USB: OHCI: make ohci-nxp a separate driver
USB: OHCI: make ohci-ep93xx a separate driver
USB: OHCI: make ohci-pxa27x a separate driver
drivers/usb/host/Kconfig | 56 ++++++++- drivers/usb/host/Makefile | 9 ++ drivers/usb/host/ohci-at91.c | 156 ++++++++++++------------- drivers/usb/host/ohci-ep93xx.c | 72 +++++------- drivers/usb/host/ohci-exynos.c | 167 +++++++++++---------------- drivers/usb/host/ohci-hcd.c | 149 ------------------------ drivers/usb/host/ohci-nxp.c | 123 ++++++++------------ drivers/usb/host/ohci-omap.c | 156 +++++++++---------------- drivers/usb/host/ohci-omap3.c | 118 +++++++------------ drivers/usb/host/ohci-pxa27x.c | 240 +++++++++++++++++---------------------- drivers/usb/host/ohci-s3c2410.c | 128 ++++++++++----------- drivers/usb/host/ohci-spear.c | 140 +++++++++-------------- 12 files changed, 587 insertions(+), 927 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v5 1/9 USB: OHCI: make ohci-exynos a separate driver
Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V2->V3:
-No major changes only "exynos" written in capital letters
in "OHCI exynos driver".
V1->V2:
-exynos_ohci_hcd structure assignment error fixed. -Removed multiple usb_create_hcd() from prob funtion. -platform_set_drvdata() called before exynos_ohci_phy_enable(). -ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure
--- drivers/usb/host/Kconfig | 4 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-exynos.c | 167 +++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 72 insertions(+), 118 deletions(-)
drivers/usb/host/Kconfig +2 -2
@@ -455,8 +455,8 @@ config USB_OHCI_SH If you use the PCI OHCI controller, this option is not necessary. config USB_OHCI_EXYNOS - boolean "OHCI support for Samsung EXYNOS SoC Series" - depends on ARCH_EXYNOS + tristate "OHCI support for Samsung S5P/EXYNOS SoC Series" + depends on PLAT_S5P || ARCH_EXYNOS help Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
drivers/usb/host/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o +obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-exynos.c +69 -98
289 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_EXYNOS -#include "ohci-exynos.c" -#define EXYNOS_PLATFORM_DRIVER exynos_ohci_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 #include "ohci-omap.c" #define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver
@@ -1336,12 +1331,6 @@ static int __init ohci_hcd_mod_init(void) goto error_s3c2410;#endif -#ifdef EXYNOS_PLATFORM_DRIVER - retval =platform_driver_register (&EXYNOS_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_exynos; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1395,10 +1384,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); - error_exynos: -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); error_s3c2410:
@@ -1463,9 +1448,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH v5 2/9 USB: OHCI: make ohci-omap a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V3->V4:
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0) is called after hcd shutdown.
V2->V3:
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this scenario should be handled only after ohci_setup()
V1->V2:
-omap_ohci_clock_power(0) called in usb_hcd_omap_remove(). -Removed ohci_setup() call from usb_hcd_omap_probe(). -host_enabled and host_initialized variables aren't used for anything
thats what removed.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ----- drivers/usb/host/ohci-omap.c | 156 ++++++++++++++---------------------------- 4 files changed, 55 insertions(+), 122 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -368,7 +368,7 @@ config USB_OHCI_HCD if USB_OHCI_HCD config USB_OHCI_HCD_OMAP1 - bool "OHCI support for OMAP1/2 chips" + tristate "OHCI support for OMAP1/2 chips" depends on ARCH_OMAP1 default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -47,6 +47,7 @@ obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 -#include "ohci-omap.c" -#define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 #include "ohci-omap3.c" #define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver
@@ -1289,12 +1284,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP1_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP1_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap1_platform; -#endif -#ifdef OMAP3_PLATFORM_DRIVER retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER );if (retval <0 )
@@ -1408,10 +1397,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); error_omap3_platform:#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); - error_omap1_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1466,9 +1451,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OMAP3_PLATFORM_DRIVER platform_driver_unregister (&OMAP3_PLATFORM_DRIVER );#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap.c +53 -103
239 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 3/9 USB: OHCI: make ohci-omap3 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V3->V4:
-V3 modification revert back, only ohci->regs setting write()
function has been removed because ohci->regs doesn't get set until usb_add_hcd.
V2->V3:
-RemoteWakeupConnected setting has been removed.
V1->V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-The improper multi-line commenting style written in proper way.
('*' characters aligned in vertically).
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-omap3.c | 118 +++++++++++++---------------------------- 4 files changed, 40 insertions(+), 99 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -375,7 +375,7 @@ config USB_OHCI_HCD_OMAP1 Enables support for the OHCI controller on OMAP1/2 chips. config USB_OHCI_HCD_OMAP3 - bool "OHCI support for OMAP3 and later chips" + tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4) default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 -#include "ohci-omap3.c" -#define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1284,12 +1279,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP3_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap3_platform; -#endif -#ifdef OF_PLATFORM_DRIVER retval =platform_driver_register (&OF_PLATFORM_DRIVER );if (retval <0 )
@@ -1393,10 +1382,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OF_PLATFORM_DRIVER ); error_of_platform:#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); - error_omap3_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1448,9 +1433,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OF_PLATFORM_DRIVER platform_driver_unregister (&OF_PLATFORM_DRIVER );#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap3.c +38 -80
146 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 4/9 USB: OHCI: make ohci-spear a separate driver
In reply to Manjunath GoudarSeparate the ST OHCI SPEAr host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V2->V3:
-No change.
V1->V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-debugging stuff isn't needed any more that's what removed.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-spear.c | 140 +++++++++++++++++------------------------ 4 files changed, 65 insertions(+), 102 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -374,6 +374,14 @@ config USB_OHCI_HCD_OMAP1 ---help--- Enables support for the OHCI controller on OMAP1/2 chips. +config USB_OHCI_HCD_SPEAR + tristate "Support for ST SPEAr on-chip OHCI USB controller" + depends on USB_OHCI_HCD && PLAT_SPEAR + default y + ---help--- + Enables support for the on-chip OHCI controller on + ST SPEAr chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o +obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1212,11 +1212,6 @@ MODULE_LICENSE ("GPL");#define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver#endif -#ifdef CONFIG_PLAT_SPEAR -#include "ohci-spear.c" -#define SPEAR_PLATFORM_DRIVER spear_ohci_hcd_driver -#endif -#ifdef CONFIG_PPC_PS3 #include "ohci-ps3.c" #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver
@@ -1333,19 +1328,9 @@ static int __init ohci_hcd_mod_init(void) goto error_davinci;#endif -#ifdef SPEAR_PLATFORM_DRIVER - retval =platform_driver_register (&SPEAR_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_spear; -#endif -return retval;/* Error path */ -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); - error_spear: -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:
@@ -1403,9 +1388,6 @@ module_init(ohci_hcd_mod_init); static void __exit ohci_hcd_mod_exit(void) { -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-spear.c +56 -84
205 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 5/9 USB: OHCI: make ohci-at91 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V3->V4:
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
- MODULE_ALIAS line moved to last statement of ohci-at91 file.
V2->V3:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handling ohci->hc_control.
V1->V2:
-Set non-standard fields in ohci_at91_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-at91.c | 156 +++++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 79 insertions(+), 104 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -382,6 +382,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_AT91 + tristate "Support for Atmel on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_AT91 + default y + ---help--- + Enables support for the on-chip OHCI controller on + Atmel chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -50,6 +50,7 @@ obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o +obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-at91.c +70 -86
230 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1192,11 +1192,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_AT91 -#include "ohci-at91.c" -#define AT91_PLATFORM_DRIVER ohci_hcd_at91_driver -#endif -#ifdef CONFIG_ARCH_LPC32XX #include "ohci-nxp.c" #define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver
@@ -1310,12 +1305,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef AT91_PLATFORM_DRIVER - retval =platform_driver_register (&AT91_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_at91; -#endif -#ifdef NXP_PLATFORM_DRIVER retval =platform_driver_register (&NXP_PLATFORM_DRIVER );if (retval <0 )
@@ -1339,10 +1328,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&NXP_PLATFORM_DRIVER ); error_nxp:#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); - error_at91: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1394,9 +1379,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef NXP_PLATFORM_DRIVER platform_driver_unregister (&NXP_PLATFORM_DRIVER );#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH v5 6/9 USB: OHCI: make ohci-s3c2410 a separate driver
In reply to Manjunath GoudarSeparate the Samsung OHCI S3C24xx/S3C64xx host controller driver from ohci-hcd host code so that it can be built as a separate driver module.This work is part of enabling multi-platform.
V4->V5:
- String "s3cxxxx" is replaced by "s3c2410".
V3->V4:
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of functions.
V2->V3:
-Kconfig wrong parentheses discription fixed. -ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V1->V2:
-Set non-standard fields in ohci_s3c2410_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++++++---------------------- 4 files changed, 66 insertions(+), 89 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -382,6 +382,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_S3C2410 + tristate "OHCI support for Samsung S3C24xx/S3C64xx SoC series" + depends on USB_OHCI_HCD && (ARCH_S3C24XX || ARCH_S3C64XX) + default y + ---help--- + Enables support for the on-chip OHCI controller on + S3C24xx/S3C64xx chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -51,6 +51,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o +obj-$(CONFIG_USB_OHCI_HCD_S3C2410) += ohci-s3c2410.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1177,11 +1177,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_ARCH_S3C24XX ) || defined(CONFIG_ARCH_S3C64XX ) -#include "ohci-s3c2410.c" -#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1293,12 +1288,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef S3C2410_PLATFORM_DRIVER - retval =platform_driver_register (&S3C2410_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_s3c2410; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1332,10 +1321,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); - error_s3c2410: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:
@@ -1382,9 +1367,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif
drivers/usb/host/ohci-s3c2410.c +57 -71
180 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 7/9 USB: OHCI: make ohci-nxp a separate driver
In reply to Manjunath GoudarSeparate the OHCI NXP host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
Many place function name and struct name started with usb, current scenario replaced usb with ohci for proper naming.
V1->V2:
- Directive check NXP_PLATFORM_DRIVER block has been removed.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-nxp.c | 123 +++++++++++++++++-------------------------- 4 files changed, 57 insertions(+), 93 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_S3C2410 Enables support for the on-chip OHCI controller on S3C24xx/S3C64xx chips. +config USB_OHCI_HCD_LPC32XX + tristate "Support for LPC on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_LPC32XX + default y + ---help--- + Enables support for the on-chip OHCI controller on + NXP chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -52,6 +52,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_OHCI_HCD_S3C2410) += ohci-s3c2410.o +obj-$(CONFIG_USB_OHCI_HCD_LPC32XX) += ohci-nxp.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1187,11 +1187,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_LPC32XX -#include "ohci-nxp.c" -#define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver -#endif -#ifdef CONFIG_ARCH_DAVINCI_DA8XX #include "ohci-da8xx.c" #define DAVINCI_PLATFORM_DRIVER ohci_hcd_da8xx_driver
@@ -1294,12 +1289,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef NXP_PLATFORM_DRIVER - retval =platform_driver_register (&NXP_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_nxp; -#endif -#ifdef DAVINCI_PLATFORM_DRIVER retval =platform_driver_register (&DAVINCI_PLATFORM_DRIVER );if (retval <0 )
@@ -1313,10 +1302,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:#endif -#ifdef NXP_PLATFORM_DRIVER -platform_driver_unregister (&NXP_PLATFORM_DRIVER ); - error_nxp: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1361,9 +1346,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif -#ifdef NXP_PLATFORM_DRIVER -platform_driver_unregister (&NXP_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-nxp.c +48 -75
195 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 8/9 USB: OHCI: make ohci-ep93xx a separate driver
In reply to Manjunath GoudarSeparate the OHCI EP93XX host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V2->V3:
-Unused *ohci variable has been removed.
V1->V2:
-ohci_hcd_init() statements are removed,
because by default it is called in ohci_setup().
--- drivers/usb/host/Kconfig | 8 +++++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-ep93xx.c | 72 +++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ---------- 4 files changed, 40 insertions(+), 59 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -398,6 +398,14 @@ config USB_OHCI_HCD_LPC32XX Enables support for the on-chip OHCI controller on NXP chips. +config USB_OHCI_HCD_EP93XX + tristate "Support for EP93XX on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_EP93XX + default y + ---help--- + Enables support for the on-chip OHCI controller on + EP93XX chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -53,6 +53,7 @@ obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_OHCI_HCD_S3C2410) += ohci-s3c2410.o obj-$(CONFIG_USB_OHCI_HCD_LPC32XX) += ohci-nxp.o +obj-$(CONFIG_USB_OHCI_HCD_EP93XX) += ohci-ep93xx.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-ep93xx.c +31 -41
100 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define PLATFORM_DRIVER ohci_hcd_pxa27x_driver#endif -#ifdef CONFIG_ARCH_EP93XX -#include "ohci-ep93xx.c" -#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver -#endif -#ifdef CONFIG_ARCH_DAVINCI_DA8XX #include "ohci-da8xx.c" #define DAVINCI_PLATFORM_DRIVER ohci_hcd_da8xx_driver
@@ -1283,12 +1278,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef EP93XX_PLATFORM_DRIVER - retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_ep93xx; -#endif -#ifdef DAVINCI_PLATFORM_DRIVER retval =platform_driver_register (&DAVINCI_PLATFORM_DRIVER );if (retval <0 )
@@ -1302,10 +1291,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:#endif -#ifdef EP93XX_PLATFORM_DRIVER -platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); - error_ep93xx: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:
@@ -1346,9 +1331,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif -#ifdef EP93XX_PLATFORM_DRIVER -platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH v5 9/9 USB: OHCI: make ohci-pxa27x a separate driver
In reply to Manjunath GoudarSeparate the OHCI pxa27x/pxa3xx host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V2->V3:
-Rewrite the macro definition of to_pxa27x_ohci. -clk_put() function has been called before usb_put_hcd().
V1->V2:
-Changed ohci_hcd and pxa27x_ohci struct variable names.
1 ohci_hcd struct variable name is ohci.
2 pxa27x_ohci struct variable name is pxa_ohci.
--- drivers/usb/host/Kconfig | 8 ++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 5 - drivers/usb/host/ohci-pxa27x.c | 240 +++++++++++++++++----------------------- 4 files changed, 113 insertions(+), 141 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -406,6 +406,14 @@ config USB_OHCI_HCD_EP93XX Enables support for the on-chip OHCI controller on EP93XX chips. +config USB_OHCI_HCD_PXA27X + tristate "Support for PXA27X/PXA3XX on-chip OHCI USB controller" + depends on USB_OHCI_HCD && (PXA27x || PXA3xx) + default y + ---help--- + Enables support for the on-chip OHCI controller on + PXA27x/PXA3xx chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -54,6 +54,7 @@ obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_OHCI_HCD_S3C2410) += ohci-s3c2410.o obj-$(CONFIG_USB_OHCI_HCD_LPC32XX) += ohci-nxp.o obj-$(CONFIG_USB_OHCI_HCD_EP93XX) += ohci-ep93xx.o +obj-$(CONFIG_USB_OHCI_HCD_PXA27X) += ohci-pxa27x.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -5
@@ -1177,11 +1177,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) -#include "ohci-pxa27x.c" -#define PLATFORM_DRIVER ohci_hcd_pxa27x_driver -#endif -#ifdef CONFIG_ARCH_DAVINCI_DA8XX #include "ohci-da8xx.c" #define DAVINCI_PLATFORM_DRIVER ohci_hcd_da8xx_driver
drivers/usb/host/ohci-pxa27x.c +104 -136
413 lines not on this page · raw message
Signature · 1 line
1.7.9.5
v5 cover USB: OHCI: more bus glues as separate modules
In reply to Manjunath GoudarThese patches are for separating the SOC On-Chip ohci host controller from ohci-hcd host code and making per SOC driver module similar to EHCI module available in the kernel. This work is part of enabling multi-platform kernel on ARM.
Before I was sending three different ohci patch set as below.
1. Six series patch set is having exynos, omap, omap3, spear, at91 and s3c2410.
2. ohci-nxp a separate driver patch.
3. Two series patch set is having ep93xx and pxa27x.
In this patch set all three previous ohci series have been combined into single series as all these patches are related to OHCI.
This patch series is rebased on greghk/usb-next 3.12 rc1.
Manjunath Goudar (9):
USB: OHCI: make ohci-exynos a separate driver
USB: OHCI: make ohci-omap a separate driver
USB: OHCI: make ohci-omap3 a separate driver
USB: OHCI: make ohci-spear a separate driver
USB: OHCI: make ohci-at91 a separate driver
USB: OHCI: make ohci-s3c2410 a separate driver
USB: OHCI: make ohci-nxp a separate driver
USB: OHCI: make ohci-ep93xx a separate driver
USB: OHCI: make ohci-pxa27x a separate driver
drivers/usb/host/Kconfig | 56 ++++++++- drivers/usb/host/Makefile | 9 ++ drivers/usb/host/ohci-at91.c | 156 ++++++++++++------------- drivers/usb/host/ohci-ep93xx.c | 72 +++++------- drivers/usb/host/ohci-exynos.c | 167 +++++++++++---------------- drivers/usb/host/ohci-hcd.c | 149 ------------------------ drivers/usb/host/ohci-nxp.c | 123 ++++++++------------ drivers/usb/host/ohci-omap.c | 156 +++++++++---------------- drivers/usb/host/ohci-omap3.c | 118 +++++++------------ drivers/usb/host/ohci-pxa27x.c | 240 +++++++++++++++++---------------------- drivers/usb/host/ohci-s3c2410.c | 128 ++++++++++----------- drivers/usb/host/ohci-spear.c | 140 +++++++++-------------- 12 files changed, 587 insertions(+), 927 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v5 1/9 USB: OHCI: make ohci-exynos a separate driver
Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V2->V3:
-No major changes only "exynos" written in capital letters
in "OHCI exynos driver".
V1->V2:
-exynos_ohci_hcd structure assignment error fixed. -Removed multiple usb_create_hcd() from prob funtion. -platform_set_drvdata() called before exynos_ohci_phy_enable(). -ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure
--- drivers/usb/host/Kconfig | 4 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-exynos.c | 167 +++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 72 insertions(+), 118 deletions(-)
drivers/usb/host/Kconfig +2 -2
@@ -455,8 +455,8 @@ config USB_OHCI_SH If you use the PCI OHCI controller, this option is not necessary. config USB_OHCI_EXYNOS - boolean "OHCI support for Samsung EXYNOS SoC Series" - depends on ARCH_EXYNOS + tristate "OHCI support for Samsung S5P/EXYNOS SoC Series" + depends on PLAT_S5P || ARCH_EXYNOS help Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
drivers/usb/host/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o +obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-exynos.c +69 -98
289 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_EXYNOS -#include "ohci-exynos.c" -#define EXYNOS_PLATFORM_DRIVER exynos_ohci_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 #include "ohci-omap.c" #define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver
@@ -1336,12 +1331,6 @@ static int __init ohci_hcd_mod_init(void) goto error_s3c2410;#endif -#ifdef EXYNOS_PLATFORM_DRIVER - retval =platform_driver_register (&EXYNOS_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_exynos; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1395,10 +1384,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); - error_exynos: -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); error_s3c2410:
@@ -1463,9 +1448,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef EXYNOS_PLATFORM_DRIVER -platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); -#endif #ifdef S3C2410_PLATFORM_DRIVER platform_driver_unregister (&S3C2410_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH v5 1/9 USB: OHCI: make ohci-exynos a separate driver
Quoted 18 lines · Manjunath Goudar
Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
Signed-off-by Manjunath Goudar <[email protected]>Signed-off-by Deepak Saxena <[email protected]>Acked-by Alan Stern <[email protected]>Acked-by Jingoo Han <[email protected]>Cc Vivek Gautam <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Kukjin Kim <[email protected]>Cc Greg KH <[email protected]>Cc linux-usb at vger.kernel.org
V2->V3:
-No major changes only "exynos" written in capital letters
in "OHCI exynos driver".
Quoted 7 lines
V1->V2:
-exynos_ohci_hcd structure assignment error fixed. -Removed multipleusb_create_hcd()from prob funtion. -platform_set_drvdata() called beforeexynos_ohci_phy_enable(). -ohci_setup() removed because it is called in .reset member
of theohci_hc_driverstructure
---
In the future, these "version" lines need to go below the cut ("---"), not above it, as I need to edit these patches by hand to remove them now :(
thanks,
greg k-h
PATCH v5 2/9 USB: OHCI: make ohci-omap a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V3->V4:
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0) is called after hcd shutdown.
V2->V3:
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this scenario should be handled only after ohci_setup()
V1->V2:
-omap_ohci_clock_power(0) called in usb_hcd_omap_remove(). -Removed ohci_setup() call from usb_hcd_omap_probe(). -host_enabled and host_initialized variables aren't used for anything
thats what removed.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ----- drivers/usb/host/ohci-omap.c | 156 ++++++++++++++---------------------------- 4 files changed, 55 insertions(+), 122 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -368,7 +368,7 @@ config USB_OHCI_HCD if USB_OHCI_HCD config USB_OHCI_HCD_OMAP1 - bool "OHCI support for OMAP1/2 chips" + tristate "OHCI support for OMAP1/2 chips" depends on ARCH_OMAP1 default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -47,6 +47,7 @@ obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP1 -#include "ohci-omap.c" -#define OMAP1_PLATFORM_DRIVER ohci_hcd_omap_driver -#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 #include "ohci-omap3.c" #define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver
@@ -1289,12 +1284,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP1_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP1_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap1_platform; -#endif -#ifdef OMAP3_PLATFORM_DRIVER retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER );if (retval <0 )
@@ -1408,10 +1397,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); error_omap3_platform:#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); - error_omap1_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1466,9 +1451,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OMAP3_PLATFORM_DRIVER platform_driver_unregister (&OMAP3_PLATFORM_DRIVER );#endif -#ifdef OMAP1_PLATFORM_DRIVER -platform_driver_unregister (&OMAP1_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap.c +53 -103
239 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 3/9 USB: OHCI: make ohci-omap3 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V3->V4:
-V3 modification revert back, only ohci->regs setting write()
function has been removed because ohci->regs doesn't get set until usb_add_hcd.
V2->V3:
-RemoteWakeupConnected setting has been removed.
V1->V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-The improper multi-line commenting style written in proper way.
('*' characters aligned in vertically).
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-omap3.c | 118 +++++++++++++---------------------------- 4 files changed, 40 insertions(+), 99 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -375,7 +375,7 @@ config USB_OHCI_HCD_OMAP1 Enables support for the OHCI controller on OMAP1/2 chips. config USB_OHCI_HCD_OMAP3 - bool "OHCI support for OMAP3 and later chips" + tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4) default y ---help---
drivers/usb/host/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PCI) += ohci-pci.o obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o +obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver#endif -#ifdef CONFIG_USB_OHCI_HCD_OMAP3 -#include "ohci-omap3.c" -#define OMAP3_PLATFORM_DRIVER ohci_hcd_omap3_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1284,12 +1279,6 @@ static int __init ohci_hcd_mod_init(void) goto error_platform;#endif -#ifdef OMAP3_PLATFORM_DRIVER - retval =platform_driver_register (&OMAP3_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_omap3_platform; -#endif -#ifdef OF_PLATFORM_DRIVER retval =platform_driver_register (&OF_PLATFORM_DRIVER );if (retval <0 )
@@ -1393,10 +1382,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&OF_PLATFORM_DRIVER ); error_of_platform:#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); - error_omap3_platform: -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER ); error_platform:
@@ -1448,9 +1433,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef OF_PLATFORM_DRIVER platform_driver_unregister (&OF_PLATFORM_DRIVER );#endif -#ifdef OMAP3_PLATFORM_DRIVER -platform_driver_unregister (&OMAP3_PLATFORM_DRIVER ); -#endif #ifdef PLATFORM_DRIVER platform_driver_unregister (&PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-omap3.c +38 -80
146 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 4/9 USB: OHCI: make ohci-spear a separate driver
In reply to Manjunath GoudarSeparate the ST OHCI SPEAr host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V2->V3:
-No change.
V1->V2:
-ohci_setup() removed because it is called in .reset member
of the ohci_hc_driver structure.
-debugging stuff isn't needed any more that's what removed.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-spear.c | 140 +++++++++++++++++------------------------ 4 files changed, 65 insertions(+), 102 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -374,6 +374,14 @@ config USB_OHCI_HCD_OMAP1 ---help--- Enables support for the OHCI controller on OMAP1/2 chips. +config USB_OHCI_HCD_SPEAR + tristate "Support for ST SPEAr on-chip OHCI USB controller" + depends on USB_OHCI_HCD && PLAT_SPEAR + default y + ---help--- + Enables support for the on-chip OHCI controller on + ST SPEAr chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_USB_OHCI_HCD_PLATFORM) += ohci-platform.o obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o +obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1212,11 +1212,6 @@ MODULE_LICENSE ("GPL");#define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver#endif -#ifdef CONFIG_PLAT_SPEAR -#include "ohci-spear.c" -#define SPEAR_PLATFORM_DRIVER spear_ohci_hcd_driver -#endif -#ifdef CONFIG_PPC_PS3 #include "ohci-ps3.c" #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver
@@ -1333,19 +1328,9 @@ static int __init ohci_hcd_mod_init(void) goto error_davinci;#endif -#ifdef SPEAR_PLATFORM_DRIVER - retval =platform_driver_register (&SPEAR_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_spear; -#endif -return retval;/* Error path */ -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); - error_spear: -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:
@@ -1403,9 +1388,6 @@ module_init(ohci_hcd_mod_init); static void __exit ohci_hcd_mod_exit(void) { -#ifdef SPEAR_PLATFORM_DRIVER -platform_driver_unregister (&SPEAR_PLATFORM_DRIVER ); -#endif #ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-spear.c +56 -84
205 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 5/9 USB: OHCI: make ohci-at91 a separate driver
In reply to Manjunath GoudarSeparate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V3->V4:
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
- MODULE_ALIAS line moved to last statement of ohci-at91 file.
V2->V3:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handling ohci->hc_control.
V1->V2:
-Set non-standard fields in ohci_at91_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-at91.c | 156 +++++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 79 insertions(+), 104 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -382,6 +382,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_AT91 + tristate "Support for Atmel on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_AT91 + default y + ---help--- + Enables support for the on-chip OHCI controller on + Atmel chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)
drivers/usb/host/Makefile +1 -0
@@ -50,6 +50,7 @@ obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o +obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-at91.c +70 -86
230 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1192,11 +1192,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_AT91 -#include "ohci-at91.c" -#define AT91_PLATFORM_DRIVER ohci_hcd_at91_driver -#endif -#ifdef CONFIG_ARCH_LPC32XX #include "ohci-nxp.c" #define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver
@@ -1310,12 +1305,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef AT91_PLATFORM_DRIVER - retval =platform_driver_register (&AT91_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_at91; -#endif -#ifdef NXP_PLATFORM_DRIVER retval =platform_driver_register (&NXP_PLATFORM_DRIVER );if (retval <0 )
@@ -1339,10 +1328,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&NXP_PLATFORM_DRIVER ); error_nxp:#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); - error_at91: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1394,9 +1379,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef NXP_PLATFORM_DRIVER platform_driver_unregister (&NXP_PLATFORM_DRIVER );#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH v5 5/9 USB: OHCI: make ohci-at91 a separate driver
On 21/09/2013 13:08, Manjunath Goudar :
Quoted 1 line
Separate the TI OHCI Atmel host controller driver from ohci-hcd
Why "TI" here? ?
Quoted 6 lines
host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
Signed-off-by Manjunath Goudar <[email protected]>Signed-off-by Deepak Saxena <[email protected]>Acked-by Alan Stern <[email protected]>
Otherwise, seems correct.
Quoted 355 lines
V3->V4:
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
-MODULE_ALIASline moved to last statement of ohci-at91 file.
V2->V3:
-Theohci_restart()function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient, for this directly handlingohci->hc_control.
V1->V2:
-Set non-standard fields inohci_at91_hc_drivermanually, rather than
relying on an expanded structohci_driver_overrides.
-Saveorig_ohci_hub_controlandorig_ohci_hub_status_datarather than
relying onohci_hub_controlandhub_status_databeing exported.
-ohci_setup() has been removed because it is called in .reset member
of theohci_hc_driverstructure.--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-at91.c | 156 +++++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ----- 4 files changed, 79 insertions(+), 104 deletions(-)drivers/usb/host/Kconfig +8
-0@@ -382,6 +382,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_AT91 + tristate "Support for Atmel on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_AT91 + default y + ---help--- + Enables support for the on-chip OHCI controller on + Atmel chips. + config USB_OHCI_HCD_OMAP3 tristate "OHCI support for OMAP3 and later chips" depends on (ARCH_OMAP3 || ARCH_OMAP4)drivers/usb/host/Makefile +1
-0@@ -50,6 +50,7 @@ obj-$(CONFIG_USB_OHCI_EXYNOS) += ohci-exynos.o obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o +obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.odrivers/usb/host/ohci-at91.c +70
-86@@ -13,19 +13,24 @@*/ #include <linux/clk.h> -#include <linux/platform_device.h> +#include <linux/dma-mapping.h> #include <linux/of_platform.h> #include <linux/of_gpio.h> +#include <linux/platform_device.h> #include <linux/platform_data/atmel.h> +#include <linux/io.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/usb.h> +#include <linux/usb/hcd.h> #include <mach/hardware.h> #include <asm/gpio.h> #include <mach/cpu.h> -#ifndef CONFIG_ARCH_AT91 -#error "CONFIG_ARCH_AT91 must be defined." -#endif + +#include "ohci.h" #define valid_port (index) ((index) >= 0 && (index) < AT91_MAX_USBH_PORTS)#define at91_for_each_port (index) \@@ -33,7 +38,17 @@/* interface, function and usb clocks; sometimes also an AHB clock */ static struct clk *iclk, *fclk, *uclk, *hclk; +/* interface and function clocks; sometimes also an AHB clock */ + +#define DRIVER_DESC "OHCI Atmel driver" + +static const char hcd_name[] ="ohci-atmel" ; + +static struct hc_driver __read_mostly ohci_at91_hc_driver;static int clocked; +static int (*orig_ohci_hub_control)(struct usb_hcd *hcd,u16 typeReq, +u16 wValue,u16 wIndex,char *buf,u16 wLength); +static int (*orig_ohci_hub_status_data)(struct usb_hcd *hcd,char *buf);extern int usb_disabled (void );@@ -117,6 +132,8 @@ static void usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *);static int usb_hcd_at91_probe (const struct hc_driver *driver,struct platform_device *pdev) { +struct at91_usbh_data *board; +struct ohci_hcd *ohci;int retval;struct usb_hcd *hcd =NULL ;@@ -177,8 +194,10 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver, } } + board = hcd->self.controller->platform_data; + ohci =hcd_to_ohci (hcd); + ohci->num_ports = board->ports;at91_start_hc (pdev); -ohci_hcd_init (hcd_to_ohci (hcd)); retval =usb_add_hcd (hcd, pdev->resource[1 ].start,IRQF_SHARED );if (retval ==0 )@@ -238,36 +257,6 @@ static void usb_hcd_at91_remove(struct usb_hcd *hcd, }/*-------------------------------------------------------------------------*/ - -static int -ohci_at91_reset (struct usb_hcd *hcd) -{ -struct at91_usbh_data *board =dev_get_platdata (hcd->self.controller); -struct ohci_hcd *ohci =hcd_to_ohci (hcd); -int ret; - -if ((ret =ohci_init (ohci)) <0 ) -return ret; - - ohci->num_ports = board->ports; -return 0 ; -} - -static int -ohci_at91_start (struct usb_hcd *hcd) -{ -struct ohci_hcd *ohci =hcd_to_ohci (hcd); -int ret; - -if ((ret =ohci_run (ohci)) <0 ) { -dev_err (hcd->self.controller,"can't start %s\n" , - hcd->self.bus_name); -ohci_stop (hcd); -return ret; - } -return 0 ; -} -static void ohci_at91_usb_set_power (struct at91_usbh_data *pdata,int port,int enable) {if (!valid_port (port))@@ -297,8 +286,8 @@ static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port)*/ static int ohci_at91_hub_status_data (struct usb_hcd *hcd,char *buf) { -struct at91_usbh_data *pdata =dev_get_platdata (hcd->self.controller); -int length =ohci_hub_status_data (hcd, buf); +struct at91_usbh_data *pdata = hcd->self.controller->platform_data; +int length =orig_ohci_hub_status_data (hcd, buf);int port;at91_for_each_port (port) {@@ -376,7 +365,8 @@ static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,break ; } - ret =ohci_hub_control (hcd, typeReq, wValue, wIndex +1 , buf, wLength); + ret =orig_ohci_hub_control (hcd, typeReq, wValue, wIndex +1 , + buf, wLength);if (ret) goto out;@@ -430,51 +420,6 @@ static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,/*-------------------------------------------------------------------------*/ -static const struct hc_driver ohci_at91_hc_driver = { - .description = hcd_name, - .product_desc ="AT91 OHCI" , - .hcd_priv_size =sizeof (struct ohci_hcd ), - -/* -* generic hardware linkage -*/ - .irq = ohci_irq, - .flags =HCD_USB11 |HCD_MEMORY , - -/* -* basic lifecycle operations -*/ - .reset = ohci_at91_reset, - .start = ohci_at91_start, - .stop = ohci_stop, - .shutdown = ohci_shutdown, - -/* -* managing i/o requests and associated device resources -*/ - .urb_enqueue = ohci_urb_enqueue, - .urb_dequeue = ohci_urb_dequeue, - .endpoint_disable = ohci_endpoint_disable, - -/* -* scheduling support -*/ - .get_frame_number = ohci_get_frame, - -/* -* root hub support -*/ - .hub_status_data = ohci_at91_hub_status_data, - .hub_control = ohci_at91_hub_control, -#ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, -#endif - .start_port_reset = ohci_start_port_reset, -}; - -/*-------------------------------------------------------------------------*/ -static irqreturn_t ohci_hcd_at91_overcurrent_irq (int irq,void *data) {struct platform_device *pdev = data;@@ -703,7 +648,11 @@ ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg)* REVISIT: some boards will be able to turn VBUS off... */ if (at91_suspend_entering_slow_clock ()) { -ohci_usb_reset (ohci); + ohci->hc_control =ohci_readl (ohci, &ohci->regs->control); + ohci->hc_control &=OHCI_CTRL_RWC ; +ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); + ohci->rh_state =OHCI_RH_HALTED ; +/* flush the writes */ (void )ohci_readl (ohci, &ohci->regs->control);at91_stop_clock ();@@ -730,8 +679,6 @@ static int ohci_hcd_at91_drv_resume(struct platform_device *pdev)#define ohci_hcd_at91_drv_resume NULL#endif -MODULE_ALIAS ("platform:at91_ohci" ); -static struct platform_driver ohci_hcd_at91_driver = { .probe = ohci_hcd_at91_drv_probe, .remove = ohci_hcd_at91_drv_remove,@@ -744,3 +691,40 @@ static struct platform_driver ohci_hcd_at91_driver = { .of_match_table = of_match_ptr(at91_ohci_dt_ids), }, }; + +static int __init ohci_at91_init (void ) +{ +if (usb_disabled ()) +return -ENODEV ; + +pr_info ("%s: " DRIVER_DESC "\n" , hcd_name); +ohci_init_driver (&ohci_at91_hc_driver,NULL ); + +/* +* The Atmel HW has some unusual quirks, which require Atmel-specific +* workarounds. We override certain hc_driver functions here to +* achieve that. We explicitly do not enhance ohci_driver_overrides to +* allow this more easily, since this is an unusual case, and we don't +* want to encourage others to override these functions by making it +* too easy. +*/ + + orig_ohci_hub_control = ohci_at91_hc_driver.hub_control; + orig_ohci_hub_status_data = ohci_at91_hc_driver.hub_status_data; + + ohci_at91_hc_driver.hub_status_data = ohci_at91_hub_status_data; + ohci_at91_hc_driver.hub_control = ohci_at91_hub_control; + +return platform_driver_register (&ohci_hcd_at91_driver); +} +module_init (ohci_at91_init); + +static void __exit ohci_at91_cleanup(void) +{ +platform_driver_unregister (&ohci_hcd_at91_driver); +} +module_exit (ohci_at91_cleanup); + +MODULE_DESCRIPTION (DRIVER_DESC ); +MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:at91_ohci" );drivers/usb/host/ohci-hcd.c +0
-18@@ -1192,11 +1192,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_AT91 -#include "ohci-at91.c" -#define AT91_PLATFORM_DRIVER ohci_hcd_at91_driver -#endif -#ifdef CONFIG_ARCH_LPC32XX #include "ohci-nxp.c" #define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver@@ -1310,12 +1305,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef AT91_PLATFORM_DRIVER - retval =platform_driver_register (&AT91_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_at91; -#endif -#ifdef NXP_PLATFORM_DRIVER retval =platform_driver_register (&NXP_PLATFORM_DRIVER );if (retval <0 )@@ -1339,10 +1328,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&NXP_PLATFORM_DRIVER ); error_nxp:#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); - error_at91: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:@@ -1394,9 +1379,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef NXP_PLATFORM_DRIVER platform_driver_unregister (&NXP_PLATFORM_DRIVER );#endif -#ifdef AT91_PLATFORM_DRIVER -platform_driver_unregister (&AT91_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
Signature · 1 line
Nicolas Ferre
PATCH v5 5/9 USB: OHCI: make ohci-at91 a separate driver
In reply to Manjunath GoudarManjunath,
Quoted 3 lines · Manjunath Goudar
Separate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
This broke booting on atmel sama5 boards (and likely others with the same conversion)...
[...]
Review
Quoted 7 lines
(quoted diff) +7
-0+static int __init ohci_at91_init(void) +{ + if (usb_disabled()) + return -ENODEV; + + pr_info("%s: " DRIVER_DESC "\n", hcd_name); + ohci_init_driver(&ohci_at91_hc_driver, NULL);
ohci_init_driver() doesn't have any sanity checks for NULL overrides, so it blindly dereferences and faults.
Some of the other conversions have this same problem (at least omap3). Did anyone test this series on hardware?
I'm not too familiar with OHCI, but something like the patch below is probably needed along with this series.
Kevin
Quoted 1 line
From
a3b5cc90e74038a6449fbd25e0d720ea02884f30Mon Sep 17 00:00:00 2001
From: Kevin Hilman <[email protected]>
Date: Fri, 27 Sep 2013 08:07:19 -0700
Subject: [PATCH] USB: OHCI: ohci_init_driver(): sanity check overrides
Check for non-NULL overrides before dereferencing since platforms may pass in NULL overrides.
--- drivers/usb/host/ohci-hcd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/usb/host/ohci-hcd.c +6 -4
@@ -1161,10 +1161,12 @@ void ohci_init_driver(struct hc_driver *drv,/* Copy the generic table to drv and then apply the overrides */ *drv = ohci_hc_driver; - drv->product_desc = over->product_desc; - drv->hcd_priv_size += over->extra_priv_size; -if (over->reset) - drv->reset = over->reset; +if (over) { + drv->product_desc = over->product_desc; + drv->hcd_priv_size += over->extra_priv_size; +if (over->reset) + drv->reset = over->reset; + } }EXPORT_SYMBOL_GPL (ohci_init_driver);
Signature · 1 line
1.8.3
PATCH v5 5/9 USB: OHCI: make ohci-at91 a separate driver
Quoted 10 lines · Kevin Hilman
Manjunath,
Quoted 3 lines · Manjunath Goudar
Separate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
This broke booting on atmel sama5 boards (and likely others with the same conversion)...
Crap.
And it looks like Manjunath is now no longer working at Linaro, so these patches are "abandoned" :(
Unless someone at Linaro steps up in the next few days to fix these, I'll have to go revert them all. Again.
bleah.
greg k-h
Alan Stern
maintainerPATCH v5 5/9 USB: OHCI: make ohci-at91 a separate driver
Quoted 14 lines · Greg KH
Quoted 10 lines · Kevin Hilman
Manjunath,
Quoted 3 lines · Manjunath Goudar
Separate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
This broke booting on atmel sama5 boards (and likely others with the same conversion)...
Crap.
Quoted 7 lines
And it looks like Manjunath is now no longer working at Linaro, so these patches are "abandoned" :(
Unless someone at Linaro steps up in the next few days to fix these, I'll have to go revert them all. Again.
bleah.
It's not so bad as all that. The patch Kevin wrote duplicates what ehci-hcd does. It's an obvious oversight; I need to work harder at keeping the two drivers in sync.
Alan Stern
PATCH v5 5/9 USB: OHCI: make ohci-at91 a separate driver
Quoted 19 lines · Alan Stern
Quoted 17 lines · Greg KH
Quoted 10 lines · Kevin Hilman
Manjunath,
Quoted 3 lines · Manjunath Goudar
Separate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
This broke booting on atmel sama5 boards (and likely others with the same conversion)...
Crap.
And it looks like Manjunath is now no longer working at Linaro, so these patches are "abandoned" :(
Quoted 8 lines
Quoted 4 lines
Unless someone at Linaro steps up in the next few days to fix these, I'll have to go revert them all. Again.
bleah.
It's not so bad as all that. The patch Kevin wrote duplicates what ehci-hcd does. It's an obvious oversight; I need to work harder at keeping the two drivers in sync.
Ah, ok, so Kevin's patch should resolve it all? That's good, I'll go queue it up.
greg k-h
Alan Stern
maintainerPATCH v5 5/9 USB: OHCI: make ohci-at91 a separate driver
In reply to Kevin HilmanQuoted 56 lines · Kevin Hilman
Manjunath,
Quoted 3 lines · Manjunath Goudar
Separate the TI OHCI Atmel host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
This broke booting on atmel sama5 boards (and likely others with the same conversion)...
[...]
Review
Quoted 7 lines
(quoted diff) +7
-0+static int __init ohci_at91_init(void) +{ + if (usb_disabled()) + return -ENODEV; + + pr_info("%s: " DRIVER_DESC "\n", hcd_name); + ohci_init_driver(&ohci_at91_hc_driver, NULL);
ohci_init_driver()doesn't have any sanity checks for NULL overrides, so it blindly dereferences and faults.Some of the other conversions have this same problem (at least omap3). Did anyone test this series on hardware?
I'm not too familiar with OHCI, but something like the patch below is probably needed along with this series.
Kevin
From
a3b5cc90e74038a6449fbd25e0d720ea02884f30Mon Sep 17 00:00:00 2001
From: Kevin Hilman <[email protected]>
Date: Fri, 27 Sep 2013 08:07:19 -0700
Subject: [PATCH] USB: OHCI:ohci_init_driver(): sanity check overridesCheck for non-NULL overrides before dereferencing since platforms may pass in NULL overrides.
Signed-off-by Kevin Hilman <[email protected]>--- drivers/usb/host/ohci-hcd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)drivers/usb/host/ohci-hcd.c +0
-2@@ -1161,10 +1161,12 @@ void ohci_init_driver(struct hc_driver *drv,/* Copy the generic table to drv and then apply the overrides */ *drv = ohci_hc_driver; - drv->product_desc = over->product_desc; - drv->hcd_priv_size += over->extra_priv_size;
drivers/usb/host/ohci-hcd.c void ohci_init_driver(struct hc_driver *drv, · line 1171
Quoted 10 lines
drivers/usb/host/ohci-hcd.c +6
-2-if (over->reset) - drv->reset = over->reset; +if (over) { + drv->product_desc = over->product_desc; + drv->hcd_priv_size += over->extra_priv_size; +if (over->reset) + drv->reset = over->reset; + } }EXPORT_SYMBOL_GPL (ohci_init_driver);
Yes, this is exactly what ehci-hcd does and it clearly is necessary.
PATCH v5 6/9 USB: OHCI: make ohci-s3c2410 a separate driver
In reply to Manjunath GoudarSeparate the Samsung OHCI S3C24xx/S3C64xx host controller driver from ohci-hcd host code so that it can be built as a separate driver module.This work is part of enabling multi-platform.
V4->V5:
- String "s3cxxxx" is replaced by "s3c2410".
V3->V4:
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of functions.
V2->V3:
-Kconfig wrong parentheses discription fixed. -ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V1->V2:
-Set non-standard fields in ohci_s3c2410_hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------ drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++++++---------------------- 4 files changed, 66 insertions(+), 89 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -382,6 +382,14 @@ config USB_OHCI_HCD_SPEAR Enables support for the on-chip OHCI controller on ST SPEAr chips. +config USB_OHCI_HCD_S3C2410 + tristate "OHCI support for Samsung S3C24xx/S3C64xx SoC series" + depends on USB_OHCI_HCD && (ARCH_S3C24XX || ARCH_S3C64XX) + default y + ---help--- + Enables support for the on-chip OHCI controller on + S3C24xx/S3C64xx chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -51,6 +51,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP1) += ohci-omap.o obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o +obj-$(CONFIG_USB_OHCI_HCD_S3C2410) += ohci-s3c2410.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1177,11 +1177,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_ARCH_S3C24XX ) || defined(CONFIG_ARCH_S3C64XX ) -#include "ohci-s3c2410.c" -#define S3C2410_PLATFORM_DRIVER ohci_hcd_s3c2410_driver -#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)#include "ohci-pxa27x.c" #define PLATFORM_DRIVER ohci_hcd_pxa27x_driver
@@ -1293,12 +1288,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef S3C2410_PLATFORM_DRIVER - retval =platform_driver_register (&S3C2410_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_s3c2410; -#endif -#ifdef EP93XX_PLATFORM_DRIVER retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER );if (retval <0 )
@@ -1332,10 +1321,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); - error_s3c2410: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:
@@ -1382,9 +1367,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif -#ifdef S3C2410_PLATFORM_DRIVER -platform_driver_unregister (&S3C2410_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif
drivers/usb/host/ohci-s3c2410.c +57 -71
180 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 7/9 USB: OHCI: make ohci-nxp a separate driver
In reply to Manjunath GoudarSeparate the OHCI NXP host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
Many place function name and struct name started with usb, current scenario replaced usb with ohci for proper naming.
V1->V2:
- Directive check NXP_PLATFORM_DRIVER block has been removed.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-nxp.c | 123 +++++++++++++++++-------------------------- 4 files changed, 57 insertions(+), 93 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -390,6 +390,14 @@ config USB_OHCI_HCD_S3C2410 Enables support for the on-chip OHCI controller on S3C24xx/S3C64xx chips. +config USB_OHCI_HCD_LPC32XX + tristate "Support for LPC on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_LPC32XX + default y + ---help--- + Enables support for the on-chip OHCI controller on + NXP chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -52,6 +52,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_OHCI_HCD_S3C2410) += ohci-s3c2410.o +obj-$(CONFIG_USB_OHCI_HCD_LPC32XX) += ohci-nxp.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1187,11 +1187,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_LPC32XX -#include "ohci-nxp.c" -#define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver -#endif -#ifdef CONFIG_ARCH_DAVINCI_DA8XX #include "ohci-da8xx.c" #define DAVINCI_PLATFORM_DRIVER ohci_hcd_da8xx_driver
@@ -1294,12 +1289,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef NXP_PLATFORM_DRIVER - retval =platform_driver_register (&NXP_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_nxp; -#endif -#ifdef DAVINCI_PLATFORM_DRIVER retval =platform_driver_register (&DAVINCI_PLATFORM_DRIVER );if (retval <0 )
@@ -1313,10 +1302,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:#endif -#ifdef NXP_PLATFORM_DRIVER -platform_driver_unregister (&NXP_PLATFORM_DRIVER ); - error_nxp: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1361,9 +1346,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif -#ifdef NXP_PLATFORM_DRIVER -platform_driver_unregister (&NXP_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-nxp.c +48 -75
195 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 8/9 USB: OHCI: make ohci-ep93xx a separate driver
In reply to Manjunath GoudarSeparate the OHCI EP93XX host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V2->V3:
-Unused *ohci variable has been removed.
V1->V2:
-ohci_hcd_init() statements are removed,
because by default it is called in ohci_setup().
--- drivers/usb/host/Kconfig | 8 +++++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-ep93xx.c | 72 +++++++++++++++++----------------------- drivers/usb/host/ohci-hcd.c | 18 ---------- 4 files changed, 40 insertions(+), 59 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -398,6 +398,14 @@ config USB_OHCI_HCD_LPC32XX Enables support for the on-chip OHCI controller on NXP chips. +config USB_OHCI_HCD_EP93XX + tristate "Support for EP93XX on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_EP93XX + default y + ---help--- + Enables support for the on-chip OHCI controller on + EP93XX chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -53,6 +53,7 @@ obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_OHCI_HCD_S3C2410) += ohci-s3c2410.o obj-$(CONFIG_USB_OHCI_HCD_LPC32XX) += ohci-nxp.o +obj-$(CONFIG_USB_OHCI_HCD_EP93XX) += ohci-ep93xx.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-ep93xx.c +31 -41
100 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1182,11 +1182,6 @@ MODULE_LICENSE ("GPL");#define PLATFORM_DRIVER ohci_hcd_pxa27x_driver#endif -#ifdef CONFIG_ARCH_EP93XX -#include "ohci-ep93xx.c" -#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver -#endif -#ifdef CONFIG_ARCH_DAVINCI_DA8XX #include "ohci-da8xx.c" #define DAVINCI_PLATFORM_DRIVER ohci_hcd_da8xx_driver
@@ -1283,12 +1278,6 @@ static int __init ohci_hcd_mod_init(void) goto error_tmio;#endif -#ifdef EP93XX_PLATFORM_DRIVER - retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_ep93xx; -#endif -#ifdef DAVINCI_PLATFORM_DRIVER retval =platform_driver_register (&DAVINCI_PLATFORM_DRIVER );if (retval <0 )
@@ -1302,10 +1291,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:#endif -#ifdef EP93XX_PLATFORM_DRIVER -platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); - error_ep93xx: -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER ); error_tmio:
@@ -1346,9 +1331,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif -#ifdef EP93XX_PLATFORM_DRIVER -platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); -#endif #ifdef TMIO_OHCI_DRIVER platform_driver_unregister (&TMIO_OHCI_DRIVER );#endif
Signature · 1 line
1.7.9.5
PATCH v5 9/9 USB: OHCI: make ohci-pxa27x a separate driver
In reply to Manjunath GoudarSeparate the OHCI pxa27x/pxa3xx host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
V2->V3:
-Rewrite the macro definition of to_pxa27x_ohci. -clk_put() function has been called before usb_put_hcd().
V1->V2:
-Changed ohci_hcd and pxa27x_ohci struct variable names.
1 ohci_hcd struct variable name is ohci.
2 pxa27x_ohci struct variable name is pxa_ohci.
--- drivers/usb/host/Kconfig | 8 ++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 5 - drivers/usb/host/ohci-pxa27x.c | 240 +++++++++++++++++----------------------- 4 files changed, 113 insertions(+), 141 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -406,6 +406,14 @@ config USB_OHCI_HCD_EP93XX Enables support for the on-chip OHCI controller on EP93XX chips. +config USB_OHCI_HCD_PXA27X + tristate "Support for PXA27X/PXA3XX on-chip OHCI USB controller" + depends on USB_OHCI_HCD && (PXA27x || PXA3xx) + default y + ---help--- + Enables support for the on-chip OHCI controller on + PXA27x/PXA3xx chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -54,6 +54,7 @@ obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_OHCI_HCD_S3C2410) += ohci-s3c2410.o obj-$(CONFIG_USB_OHCI_HCD_LPC32XX) += ohci-nxp.o obj-$(CONFIG_USB_OHCI_HCD_EP93XX) += ohci-ep93xx.o +obj-$(CONFIG_USB_OHCI_HCD_PXA27X) += ohci-pxa27x.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -5
@@ -1177,11 +1177,6 @@ MODULE_LICENSE ("GPL");#define SA1111_DRIVER ohci_hcd_sa1111_driver#endif -#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) -#include "ohci-pxa27x.c" -#define PLATFORM_DRIVER ohci_hcd_pxa27x_driver -#endif -#ifdef CONFIG_ARCH_DAVINCI_DA8XX #include "ohci-da8xx.c" #define DAVINCI_PLATFORM_DRIVER ohci_hcd_da8xx_driver
drivers/usb/host/ohci-pxa27x.c +104 -136
413 lines not on this page · raw message
Signature · 1 line
1.7.9.5