usb: ehci: more bus glues as separate modules
Subsystems (3)
v2 cover usb: ehci: more bus glues as separate modules
Separate the SOC On-Chip host controller driver from ehci-hcd host code into its own driver module
V2:
Modified the patches, based on the first version review comments
Manjunath Goudar (8):
USB: EHCI: make ehci-spear a separate driver
USB: EHCI: make ehci-atmel a separate driver
USB: EHCI: make ehci-s5p a separate driver
USB: EHCI: make ehci-mv as separate static driver
USB: EHCI: make ehci-vt8500 a separate driver
USB: EHCI: make ehci-msm a separate driver
USB: EHCI: make ehci-w90X900 a separate driver
USB: EHCI: make ehci-orion a separate driver
drivers/usb/host/Kconfig | 40 +++++++++++++++-- drivers/usb/host/Makefile | 9 +++- drivers/usb/host/ehci-atmel.c | 76 ++++++++++++++++---------------- drivers/usb/host/ehci-hcd.c | 52 +++++----------------- drivers/usb/host/ehci-msm.c | 85 ++++++++++++++++-------------------- drivers/usb/host/ehci-mv.c | 78 +++++++++++++++------------------ drivers/usb/host/ehci-orion.c | 90 ++++++++++++++++++-------------------- drivers/usb/host/ehci-s5p.c | 67 +++++++++++++++------------- drivers/usb/host/ehci-spear.c | 77 +++++++++++++++++---------------- drivers/usb/host/ehci-vt8500.c | 73 ++++++++++++++----------------- drivers/usb/host/ehci-w90x900.c | 91 +++++++++++++++++---------------------- drivers/usb/host/ehci.h | 2 +- 12 files changed, 358 insertions(+), 382 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v2 2/8 USB: EHCI: make ehci-atmel a separate driver
Separate the Atmel host controller driver from ehci-hcd host code into its own driver module.
In V2:
Resolved below compiler error.drivers/usb/host/ehci-atmel.c: In function 'ehci_atmel_drv_remove':drivers/usb/host/ehci-atmel.c:167: error: implicit declaration of function 'ehci_shutdown'
--- drivers/usb/host/Kconfig | 8 +++++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-atmel.c | 76 ++++++++++++++++++++++------------------- drivers/usb/host/ehci-hcd.c | 10 ++---- drivers/usb/host/ehci.h | 2 +- 5 files changed, 53 insertions(+), 44 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -170,6 +170,14 @@ config USB_EHCI_HCD_SPEAR Enables support for the on-chip EHCI controller on ST SPEAr chips. +config USB_EHCI_HCD_AT91 + tristate "Support for Atmel on-chip EHCI USB controller" + depends on USB_EHCI_HCD && ARCH_AT91 + default y + ---help--- + Enables support for the on-chip EHCI controller on + Atmel chips. + config USB_EHCI_MSM bool "Support for MSM on-chip EHCI USB controller" depends on USB_EHCI_HCD && ARCH_MSM
drivers/usb/host/Makefile +1 -0
@@ -29,6 +29,7 @@ obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o obj-$(CONFIG_USB_EHCI_HCD_SPEAR)+= ehci-spear.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o +obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o
drivers/usb/host/ehci-atmel.c +40 -36
94 lines not on this page · raw message
drivers/usb/host/ehci-hcd.c +3 -7
@@ -352,7 +352,7 @@ static void ehci_silence_controller(struct ehci_hcd *ehci)* This forcibly disables dma and IRQs, helping kexec and other cases * where the next system software may expect clean state. */ -static void ehci_shutdown (struct usb_hcd *hcd) +void ehci_shutdown (struct usb_hcd *hcd) {struct ehci_hcd *ehci =hcd_to_ehci (hcd);
@@ -366,7 +366,7 @@ static void ehci_shutdown(struct usb_hcd *hcd)hrtimer_cancel (&ehci->hrtimer); } - +EXPORT_SYMBOL_GPL (ehci_shutdown);/*-------------------------------------------------------------------------*/ /*
@@ -1282,11 +1282,6 @@ MODULE_LICENSE ("GPL");#define PLATFORM_DRIVER ehci_hcd_w90x900_driver#endif -#ifdef CONFIG_ARCH_AT91 -#include "ehci-atmel.c" -#define PLATFORM_DRIVER ehci_atmel_driver -#endif -#ifdef CONFIG_USB_OCTEON_EHCI #include "ehci-octeon.c" #define PLATFORM_DRIVER ehci_octeon_driver
@@ -1343,6 +1338,7 @@ MODULE_LICENSE ("GPL"); !IS_ENABLED (CONFIG_USB_EHCI_MXC ) && \ !IS_ENABLED (CONFIG_PLAT_SPEAR ) && \ !defined (PLATFORM_DRIVER ) && \ + !IS_ENABLED (CONFIG_ARCH_AT91 ) && \ !defined (PS3_SYSTEM_BUS_DRIVER ) && \ !defined (OF_PLATFORM_DRIVER ) && \ !defined (XILINX_OF_PLATFORM_DRIVER )
drivers/usb/host/ehci.h +1 -1
@@ -798,7 +798,7 @@ struct ehci_driver_overrides {extern void ehci_init_driver (struct hc_driver *drv,const struct ehci_driver_overrides *over);extern int ehci_setup (struct usb_hcd *hcd); - +extern void ehci_shutdown (struct usb_hcd *hcd);#ifdef CONFIG_PM extern int ehci_suspend (struct usb_hcd *hcd,bool do_wakeup);extern int ehci_resume (struct usb_hcd *hcd,bool hibernated);
Signature · 1 line
1.7.9.5
Re: [V2 2/8] USB: EHCI: make ehci-atmel a separate driver
Quoted 124 lines · Manjunath Goudar
Separate the Atmel host controller driver from ehci-hcd host code into its own driver module.
In V2:
Resolved below compiler error.drivers/usb/host/ehci-atmel.c: In function 'ehci_atmel_drv_remove':drivers/usb/host/ehci-atmel.c:167: error: implicit declaration of function 'ehci_shutdown'Signed-off-by Manjunath Goudar<[email protected]>Cc Alan Stern<[email protected]>Cc Greg KH<[email protected]>Cc Grant Likely<[email protected]>Cc Rob Herring<[email protected]>Cc Andrew Victor<[email protected]>Cc Nicolas Ferre<[email protected]>Cc Jean-Christophe Plagniol-Villard<[email protected]>Cc linux-usb at vger.kernel.orgCc linux-kernel at vger.kernel.org--- drivers/usb/host/Kconfig | 8 +++++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-atmel.c | 76 ++++++++++++++++++++++------------------- drivers/usb/host/ehci-hcd.c | 10 ++---- drivers/usb/host/ehci.h | 2 +- 5 files changed, 53 insertions(+), 44 deletions(-)drivers/usb/host/Kconfig +8
-0@@ -170,6 +170,14 @@ config USB_EHCI_HCD_SPEAR Enables support for the on-chip EHCI controller on ST SPEAr chips. +config USB_EHCI_HCD_AT91 + tristate "Support for Atmel on-chip EHCI USB controller" + depends on USB_EHCI_HCD&& ARCH_AT91 + default y + ---help--- + Enables support for the on-chip EHCI controller on + Atmel chips. + config USB_EHCI_MSM bool "Support for MSM on-chip EHCI USB controller" depends on USB_EHCI_HCD&& ARCH_MSMdrivers/usb/host/Makefile +1
-0@@ -29,6 +29,7 @@ obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o obj-$(CONFIG_USB_EHCI_HCD_SPEAR)+= ehci-spear.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o +obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.odrivers/usb/host/ehci-atmel.c +13
-35@@ -15,6 +15,19 @@#include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_platform.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/usb.h> +#include <linux/usb/hcd.h> +#include <linux/io.h> +#include <linux/dma-mapping.h> + +#include "ehci.h" + +#define DRIVER_DESC "EHCI atmel driver" + +static const char hcd_name[] ="ehci-atmel" ; +static struct hc_driver __read_mostly ehci_atmel_hc_driver;/* interface and function clocks */ static struct clk *iclk, *fclk;@@ -60,41 +73,6 @@ static int ehci_atmel_setup(struct usb_hcd *hcd)return ehci_setup (hcd); } -static const struct hc_driver ehci_atmel_hc_driver = { - .description = hcd_name, - .product_desc ="Atmel EHCI UHP HS" , - .hcd_priv_size =sizeof (struct ehci_hcd ), - -/* generic hardware linkage */ - .irq = ehci_irq, - .flags =HCD_MEMORY |HCD_USB2 , - -/* basic lifecycle operations */ - .reset = ehci_atmel_setup, - .start = ehci_run, - .stop = ehci_stop, - .shutdown = ehci_shutdown, - -/* managing i/o requests and associated device resources */ - .urb_enqueue = ehci_urb_enqueue, - .urb_dequeue = ehci_urb_dequeue, - .endpoint_disable = ehci_endpoint_disable, - .endpoint_reset = ehci_endpoint_reset, - -/* scheduling support */ - .get_frame_number = ehci_get_frame, - -/* root hub support */ - .hub_status_data = ehci_hub_status_data, - .hub_control = ehci_hub_control, - .bus_suspend = ehci_bus_suspend, - .bus_resume = ehci_bus_resume, - .relinquish_port = ehci_relinquish_port, - .port_handed_over = ehci_port_handed_over, - - .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, -}; -static u64 at91_ehci_dma_mask =DMA_BIT_MASK (32 );static int ehci_atmel_drv_probe (struct platform_device *pdev)
drivers/usb/host/ehci-atmel.c static struct platform_driver ehci_atmel_driver = { · line 191
Quoted 5 lines
drivers/usb/host/ehci-atmel.c +1
-1@@ -210,7 +188,33 @@ static struct platform_driver ehci_atmel_driver = { .remove = ehci_atmel_drv_remove, .shutdown = usb_hcd_platform_shutdown, .driver = { - .name = "atmel-ehci", + .name = hcd_name,
This change will cause atmel ehci won't work with the none device tree kernel.
it can be fixed with replace other places using "atmel-ehci" with <hcd_name>, that means replace "atmel-ehci" with "ehci-atmel" at other places.
Best Regards,
Bo Shen
Re: [V2 2/8] USB: EHCI: make ehci-atmel a separate driver
Quoted 9 lines · Bo Shen
drivers/usb/host/ehci-atmel.c static struct platform_driver ehci_atmel_driver = { · line 191
Quoted 2 lines
drivers/usb/host/ehci-atmel.c +1
-1- .name = "atmel-ehci", + .name = hcd_name,This change will cause atmel ehci won't work with the none device tree kernel.
it can be fixed with replace other places using "atmel-ehci" with <
hcd_name>, that means replace "atmel-ehci" with "ehci-atmel" at other places.
Ah, that is right. Thanks for pointing it out!
Manjunath, please revert this change and ensure you are not changing the contents of the 'platform_driver->name' field in any of the drivers.
Arnd
PATCH v2 4/8 USB: EHCI: make ehci-mv as separate static driver
In reply to Manjunath GoudarSeparate the mv host controller driver from ehci-hcd host code into its own static driver module.
In V2:
No changes only Cc list changed in this patch.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-hcd.c | 6 +--- drivers/usb/host/ehci-mv.c | 78 +++++++++++++++++++------------------------ 4 files changed, 38 insertions(+), 49 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -221,7 +221,7 @@ config USB_EHCI_S5P Enable support for the S5P SOC's on-chip EHCI controller. config USB_EHCI_MV - bool "EHCI support for Marvell on-chip controller" + tristate "EHCI support for Marvell on-chip controller" depends on USB_EHCI_HCD && (ARCH_PXA || ARCH_MMP) select USB_EHCI_ROOT_HUB_TT ---help---
drivers/usb/host/Makefile +1 -0
@@ -31,6 +31,7 @@ obj-$(CONFIG_USB_EHCI_HCD_SPEAR)+= ehci-spear.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o obj-$(CONFIG_USB_EHCI_S5P) += ehci-s5p.o +obj-$(CONFIG_USB_EHCI_MV) += ehci-mv.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o
drivers/usb/host/ehci-hcd.c +1 -5
@@ -1317,11 +1317,6 @@ MODULE_LICENSE ("GPL");#define PLATFORM_DRIVER ehci_grlib_driver#endif -#ifdef CONFIG_USB_EHCI_MV -#include "ehci-mv.c" -#define PLATFORM_DRIVER ehci_mv_driver -#endif -#ifdef CONFIG_MIPS_SEAD3 #include "ehci-sead3.c" #define PLATFORM_DRIVER ehci_hcd_sead3_driver
@@ -1335,6 +1330,7 @@ MODULE_LICENSE ("GPL"); !defined (PLATFORM_DRIVER ) && \ !IS_ENABLED (CONFIG_ARCH_AT91 ) && \ !IS_ENABLED (CONFIG_USB_EHCI_S5P ) && \ + !IS_ENABLED (CONFIG_USB_EHCI_MV ) && \ !defined (PS3_SYSTEM_BUS_DRIVER ) && \ !defined (OF_PLATFORM_DRIVER ) && \ !defined (XILINX_OF_PLATFORM_DRIVER )
drivers/usb/host/ehci-mv.c +35 -43
99 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 5/8 USB: EHCI: make ehci-vt8500 a separate driver
In reply to Manjunath GoudarSeparate the vt8500 host controller driver from ehci-hcd host code into its own driver module.
In V2:
Change the GPL to GPL v2 MODULE_LICENSE
--- drivers/usb/host/Kconfig | 8 +++++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-hcd.c | 6 +--- drivers/usb/host/ehci-vt8500.c | 73 ++++++++++++++++++---------------------- 4 files changed, 43 insertions(+), 45 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -162,6 +162,14 @@ config USB_EHCI_HCD_OMAP Enables support for the on-chip EHCI controller on OMAP3 and later chips. +config USB_EHCI_HCD_VT8500 + tristate "Support for VT8500 on-chip EHCI USB controller" + depends on USB_EHCI_HCD && ARCH_VT8500 + default y + ---help--- + Enables support for the on-chip EHCI controller on + VT8500 chips. + config USB_EHCI_HCD_SPEAR tristate "Support for ST SPEAr on-chip EHCI USB controller" depends on USB_EHCI_HCD && PLAT_SPEAR
drivers/usb/host/Makefile +1 -0
@@ -32,6 +32,7 @@ obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o obj-$(CONFIG_USB_EHCI_S5P) += ehci-s5p.o obj-$(CONFIG_USB_EHCI_MV) += ehci-mv.o +obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o
drivers/usb/host/ehci-hcd.c +1 -5
@@ -1287,11 +1287,6 @@ MODULE_LICENSE ("GPL");#define PLATFORM_DRIVER ehci_octeon_driver#endif -#ifdef CONFIG_ARCH_VT8500 -#include "ehci-vt8500.c" -#define PLATFORM_DRIVER vt8500_ehci_driver -#endif -#ifdef CONFIG_USB_EHCI_MSM #include "ehci-msm.c" #define PLATFORM_DRIVER ehci_msm_driver
@@ -1331,6 +1326,7 @@ MODULE_LICENSE ("GPL"); !IS_ENABLED (CONFIG_ARCH_AT91 ) && \ !IS_ENABLED (CONFIG_USB_EHCI_S5P ) && \ !IS_ENABLED (CONFIG_USB_EHCI_MV ) && \ + !IS_ENABLED (CONFIG_ARCH_VT8500 ) && \ !defined (PS3_SYSTEM_BUS_DRIVER ) && \ !defined (OF_PLATFORM_DRIVER ) && \ !defined (XILINX_OF_PLATFORM_DRIVER )
drivers/usb/host/ehci-vt8500.c +33 -40
96 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerRe: [V2 5/8] USB: EHCI: make ehci-vt8500 a separate driver
Quoted 5 lines · Manjunath Goudar
Separate the vt8500 host controller driver from ehci-hcd host code into its own driver module.
In V2:
Change the GPL to GPL v2MODULE_LICENSE
Same comments as for the other patches.
You know, when you submit a series of patches all doing basically the same sort of thing, and somebody makes a suggestion to improve one of them, you should always consider whether that suggestion could also apply to the other patches in the series. It's silly for us to send you 8 separate emails, each telling you to make the same change to one particular patch in the series.
Therefore you should consider each of the problems I have described in the last several emails, and think about which of your patches they apply to. Some of them do apply to more than one patch, even though I didn't say so explicitly at the time.
Alan Stern
PATCH v2 6/8 USB: EHCI: make ehci-msm a separate driver
In reply to Manjunath GoudarSeparate the Qualcomm On-Chip host controller driver from ehci-hcd host code into its own driver module.
In V2:
Tegra patch related changes removed from this patch.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-hcd.c | 6 +-- drivers/usb/host/ehci-msm.c | 85 +++++++++++++++++++------------------------ 4 files changed, 40 insertions(+), 54 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -187,7 +187,7 @@ config USB_EHCI_HCD_AT91 Atmel chips. config USB_EHCI_MSM - bool "Support for MSM on-chip EHCI USB controller" + tristate "Support for MSM on-chip EHCI USB controller" depends on USB_EHCI_HCD && ARCH_MSM select USB_EHCI_ROOT_HUB_TT select USB_MSM_OTG
drivers/usb/host/Makefile +1 -0
@@ -33,6 +33,7 @@ obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o obj-$(CONFIG_USB_EHCI_S5P) += ehci-s5p.o obj-$(CONFIG_USB_EHCI_MV) += ehci-mv.o obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o +obj-$(CONFIG_USB_EHCI_MSM) += ehci-msm.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o
drivers/usb/host/ehci-hcd.c +1 -5
@@ -1287,11 +1287,6 @@ MODULE_LICENSE ("GPL");#define PLATFORM_DRIVER ehci_octeon_driver#endif -#ifdef CONFIG_USB_EHCI_MSM -#include "ehci-msm.c" -#define PLATFORM_DRIVER ehci_msm_driver -#endif -#ifdef CONFIG_TILE_USB #include "ehci-tilegx.c" #define PLATFORM_DRIVER ehci_hcd_tilegx_driver
@@ -1327,6 +1322,7 @@ MODULE_LICENSE ("GPL"); !IS_ENABLED (CONFIG_USB_EHCI_S5P ) && \ !IS_ENABLED (CONFIG_USB_EHCI_MV ) && \ !IS_ENABLED (CONFIG_ARCH_VT8500 ) && \ + !IS_ENABLED (CONFIG_USB_EHCI_MSM ) && \ !defined (PS3_SYSTEM_BUS_DRIVER ) && \ !defined (OF_PLATFORM_DRIVER ) && \ !defined (XILINX_OF_PLATFORM_DRIVER )
drivers/usb/host/ehci-msm.c +37 -48
108 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerRe: [V2 6/8] USB: EHCI: make ehci-msm a separate driver
drivers/usb/host/ehci-msm.c line 43
Quoted 7 lines · Manjunath Goudar
Separate the Qualcomm On-Chip host controller driver from ehci-hcd host code into its own driver module.
drivers/usb/host/ehci-msm.c +1
-0+static const char hcd_name[] ="msm_hsusb_host" ;
This should be something more like "ehci-msm". Of course, that means you have to leave the ehci_msm_driver.driver.name field unchanged.
Alan Stern
PATCH v2 7/8 USB: EHCI: make ehci-w90X900 a separate driver
In reply to Manjunath GoudarSeparate the Nuvoton On-Chip host controller driver from ehci-hcd host code into its own static driver module.
In V2:
No changes.
--- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-hcd.c | 6 +-- drivers/usb/host/ehci-w90x900.c | 91 +++++++++++++++++---------------------- 4 files changed, 43 insertions(+), 57 deletions(-)
drivers/usb/host/Kconfig +1 -1
@@ -238,7 +238,7 @@ config USB_EHCI_MV only be EHCI host. OTG is controller that can switch to host mode. config USB_W90X900_EHCI - bool "W90X900(W90P910) EHCI support" + tristate "W90X900(W90P910) EHCI support" depends on USB_EHCI_HCD && ARCH_W90X900 ---help--- Enables support for the W90X900 USB controller
drivers/usb/host/Makefile +1 -0
@@ -34,6 +34,7 @@ obj-$(CONFIG_USB_EHCI_S5P) += ehci-s5p.o obj-$(CONFIG_USB_EHCI_MV) += ehci-mv.o obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o obj-$(CONFIG_USB_EHCI_MSM) += ehci-msm.o +obj-$(CONFIG_USB_W90X900_EHCI) += ehci-w90x900.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o
drivers/usb/host/ehci-hcd.c +1 -5
@@ -1277,11 +1277,6 @@ MODULE_LICENSE ("GPL");#define PLATFORM_DRIVER ehci_orion_driver#endif -#ifdef CONFIG_USB_W90X900_EHCI -#include "ehci-w90x900.c" -#define PLATFORM_DRIVER ehci_hcd_w90x900_driver -#endif -#ifdef CONFIG_USB_OCTEON_EHCI #include "ehci-octeon.c" #define PLATFORM_DRIVER ehci_octeon_driver
@@ -1323,6 +1318,7 @@ MODULE_LICENSE ("GPL"); !IS_ENABLED (CONFIG_USB_EHCI_MV ) && \ !IS_ENABLED (CONFIG_ARCH_VT8500 ) && \ !IS_ENABLED (CONFIG_USB_EHCI_MSM ) && \ + !IS_ENABLED (CONFIG_USB_W90X900_EHCI ) && \ !defined (PS3_SYSTEM_BUS_DRIVER ) && \ !defined (OF_PLATFORM_DRIVER ) && \ !defined (XILINX_OF_PLATFORM_DRIVER )
drivers/usb/host/ehci-w90x900.c +40 -51
119 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerRe: [V2 7/8] USB: EHCI: make ehci-w90X900 a separate driver
drivers/usb/host/Kconfig config USB_EHCI_MV · line 241
Quoted 11 lines · Manjunath Goudar
Separate the Nuvoton On-Chip host controller driver from ehci-hcd host code into its own static driver module.
drivers/usb/host/Kconfig +1
-1@@ -238,7 +238,7 @@ config USB_EHCI_MV only be EHCI host. OTG is controller that can switch to host mode. config USB_W90X900_EHCI - bool "W90X900(W90P910) EHCI support" + tristate "W90X900(W90P910) EHCI support"
Whitespace error. You inserted an extra space character.
Alan Stern
PATCH v2 8/8 USB: EHCI: make ehci-orion a separate driver
In reply to Manjunath GoudarSeparate the Orion host controller driver from ehci-hcd host code into its own static driver module.
In V2:
Tegra patch related changes removed from this patch.
--- drivers/usb/host/Kconfig | 8 ++++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-hcd.c | 6 +-- drivers/usb/host/ehci-orion.c | 90 +++++++++++++++++++---------------------- 4 files changed, 52 insertions(+), 53 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -162,6 +162,14 @@ config USB_EHCI_HCD_OMAP Enables support for the on-chip EHCI controller on OMAP3 and later chips. +config USB_EHCI_HCD_ORION + tristate "Support for Marvell Orion on-chip EHCI USB controller" + depends on USB_EHCI_HCD && PLAT_ORION + default y + ---help--- + Enables support for the on-chip EHCI controller on + Morvell Orion chips. + config USB_EHCI_HCD_VT8500 tristate "Support for VT8500 on-chip EHCI USB controller" depends on USB_EHCI_HCD && ARCH_VT8500
drivers/usb/host/Makefile +1 -0
@@ -35,6 +35,7 @@ obj-$(CONFIG_USB_EHCI_MV) += ehci-mv.o obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o obj-$(CONFIG_USB_EHCI_MSM) += ehci-msm.o obj-$(CONFIG_USB_W90X900_EHCI) += ehci-w90x900.o +obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o
drivers/usb/host/ehci-hcd.c +1 -5
@@ -1272,11 +1272,6 @@ MODULE_LICENSE ("GPL");#define XILINX_OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver#endif -#ifdef CONFIG_PLAT_ORION -#include "ehci-orion.c" -#define PLATFORM_DRIVER ehci_orion_driver -#endif -#ifdef CONFIG_USB_OCTEON_EHCI #include "ehci-octeon.c" #define PLATFORM_DRIVER ehci_octeon_driver
@@ -1319,6 +1314,7 @@ MODULE_LICENSE ("GPL"); !IS_ENABLED (CONFIG_ARCH_VT8500 ) && \ !IS_ENABLED (CONFIG_USB_EHCI_MSM ) && \ !IS_ENABLED (CONFIG_USB_W90X900_EHCI ) && \ + !IS_ENABLED (CONFIG_PLAT_ORION ) && \ !defined (PS3_SYSTEM_BUS_DRIVER ) && \ !defined (OF_PLATFORM_DRIVER ) && \ !defined (XILINX_OF_PLATFORM_DRIVER )
drivers/usb/host/ehci-orion.c +42 -48
121 lines not on this page · raw message
Signature · 1 line
1.7.9.5
v2 cover usb: ehci: more bus glues as separate modules
In reply to Manjunath GoudarQuoted 6 lines · Manjunath Goudar
Separate the SOC On-Chip host controller driver from ehci-hcd host code into its own driver module
V2:
Modified the patches, based on the first version review comments
The series looks good to me now, great work!
Please add my 'Acked-by: Arnd Bergmann <[email protected]>' for each patch.
Alan, Greg: I realize that it's too late to take the entire series for 3.9, but with the move of more ARM platforms to CONFIG_ARCH_MULTIPLATFORM, it is now possible to enable OMAP, VT8500 and ORION concurrently, along with the ones that are already moved out.
You should have a patch for OMAP, but that has not made it into linux-next yet. It would be good to have at least two out the three I mentioned merged into 3.9, in order to keep allyesconfig building, and take the rest after the merge window, for integration into 3.10.
What I get today with linux-next ARM allyesconfig is this:
/home/arnd/arm-soc/drivers/usb/host/ehci-hcd.c:1277:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
#define PLATFORM_DRIVER ehci_orion_driver
^/home/arnd/arm-soc/drivers/usb/host/ehci-hcd.c:1257:0: note: this is the location of the previous definition
#define PLATFORM_DRIVER ehci_hcd_omap_driver
^/home/arnd/arm-soc/drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
#define PLATFORM_DRIVER vt8500_ehci_driver
^/home/arnd/arm-soc/drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definition
#define PLATFORM_DRIVER ehci_orion_driver
^/home/arnd/arm-soc/drivers/usb/host/ehci-hcd.c:1277:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
#define PLATFORM_DRIVER ehci_orion_driver
^/home/arnd/arm-soc/drivers/usb/host/ehci-hcd.c:1257:0: note: this is the location of the previous definition
#define PLATFORM_DRIVER ehci_hcd_omap_driver
^/home/arnd/arm-soc/drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
#define PLATFORM_DRIVER vt8500_ehci_driver
^/home/arnd/arm-soc/drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definition
#define PLATFORM_DRIVER ehci_orion_driver
^
In 3.10, we are going to need spear and s5p as well, possibly also atmel, mv and tegra, but Manjunath has done all the ARM platforms now (the tegra patch still has issues).
Arnd
Greg KH
maintainerv2 cover usb: ehci: more bus glues as separate modules
Quoted 17 lines · Arnd Bergmann
Quoted 6 lines · Manjunath Goudar
Separate the SOC On-Chip host controller driver from ehci-hcd host code into its own driver module
V2:
Modified the patches, based on the first version review commentsThe series looks good to me now, great work!
Please add my 'Acked-by: Arnd Bergmann <[email protected]>' for each patch.
Alan, Greg: I realize that it's too late to take the entire series for 3.9, but with the move of more ARM platforms to
CONFIG_ARCH_MULTIPLATFORM, it is now possible to enable OMAP, VT8500 and ORION concurrently, along with the ones that are already moved out.
Quoted 4 lines
You should have a patch for OMAP, but that has not made it into linux-next yet. It would be good to have at least two out the three I mentioned merged into 3.9, in order to keep allyesconfig building, and take the rest after the merge window, for integration into 3.10.
I have no idea what to do with _ANY_ of these patches as they are all sent without proper changelog comments saying why they are needed, come in random series without proper ordering, get sent multiple times in the same series with no known differences between them, and probably other issues that I just don't even know about.
So I can't take these this late in the development process, sorry, that would be negligent of me.
Manjunath, please get this all working properly, as it is, I've deleted all of your patches from my "to-apply" queue for all of the above reasons.
greg k-h
v2 cover usb: ehci: more bus glues as separate modules
Quoted 10 lines · Greg KH
Quoted 9 lines
Alan, Greg: I realize that it's too late to take the entire series for 3.9, but with the move of more ARM platforms to
CONFIG_ARCH_MULTIPLATFORM, it is now possible to enable OMAP, VT8500 and ORION concurrently, along with the ones that are already moved out.You should have a patch for OMAP, but that has not made it into linux-next yet. It would be good to have at least two out the three I mentioned merged into 3.9, in order to keep allyesconfig building, and take the rest after the merge window, for integration into 3.10.
Quoted 8 lines
I have no idea what to do with ANY of these patches as they are all sent without proper changelog comments saying why they are needed, come in random series without proper ordering, get sent multiple times in the same series with no known differences between them, and probably other issues that I just don't even know about.
So I can't take these this late in the development process, sorry, that would be negligent of me.
Yes, as I said above I think we should only merge two of them for 3.9 in order to keep the bus glues that are now conflicting (omap, orion and vt8500) working when you enable all of the EHCI back-ends.
These three are actually all pretty popular targets (vt8500 not yet so much, but it's used in some of the new sub-$100 tablets and HDMI stick computers), so I would actually expect that distros like Debin will want to enable them all together.
The other patches are mainly there to solve the problem for all ARM platforms so we don't have to deal with them one by one as we make the remaining platforms multiplatform capable.
Quoted 3 lines
Manjunath, please get this all working properly, as it is, I've deleted all of your patches from my "to-apply" queue for all of the above reasons.
Sorry for the time this is causing you, I'm still teaching Manjunath how to follow all the processes and it took us a bit longer than expected to get this far. I'll try to make this less painful for you with the rest of the patches that should go into 3.10, and I'll send you the two patches that I'd like to still see in 3.9 with a proper changelog and in a form that applies on your usb-next branch.
Arnd
PATCH 1/2 USB: EHCI: make ehci-vt8500 a separate driver
From: Manjunath Goudar <[email protected]>
With the multiplatform changes in arm-soc tree, it becomes possible to enable the vt8500 platform at the same time as other platforms that require a conflicting EHCI bus glue. At the moment, this results in a warning like
drivers/usb/host/ehci-hcd.c:1277:0: warning: "PLATFORM_DRIVER" redefined [enabled by default] drivers/usb/host/ehci-hcd.c:1257:0: note: this is the location of the previous definition drivers/usb/host/ehci-omap.c:319:31: warning: 'ehci_hcd_omap_driver' defined but not used [-Wunused-variable]
and an ehci driver that only works on one of them.
With the infrastructure added by Alan Stern in patch 3e0232039 "USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the vt8500 bus glue.
--- drivers/usb/host/Kconfig | 8 +++++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-hcd.c | 6 +--- drivers/usb/host/ehci-vt8500.c | 73 +++++++++++++++++++----------------------- 4 files changed, 43 insertions(+), 45 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -162,6 +162,14 @@ config USB_EHCI_HCD_OMAP Enables support for the on-chip EHCI controller on OMAP3 and later chips. +config USB_EHCI_HCD_VT8500 + tristate "Support for VT8500 on-chip EHCI USB controller" + depends on USB_EHCI_HCD && ARCH_VT8500 + default y + ---help--- + Enables support for the on-chip EHCI controller on + VT8500 chips. + config USB_EHCI_MSM bool "Support for MSM on-chip EHCI USB controller" depends on USB_EHCI_HCD && ARCH_MSM
drivers/usb/host/Makefile +1 -0
@@ -29,6 +29,7 @@ obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o +obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o
drivers/usb/host/ehci-hcd.c +1 -5
@@ -1292,11 +1292,6 @@ MODULE_LICENSE ("GPL");#define PLATFORM_DRIVER ehci_octeon_driver#endif -#ifdef CONFIG_ARCH_VT8500 -#include "ehci-vt8500.c" -#define PLATFORM_DRIVER vt8500_ehci_driver -#endif -#ifdef CONFIG_PLAT_SPEAR #include "ehci-spear.c" #define PLATFORM_DRIVER spear_ehci_hcd_driver
@@ -1347,6 +1342,7 @@ MODULE_LICENSE ("GPL"); !IS_ENABLED (CONFIG_USB_CHIPIDEA_HOST ) && \ !IS_ENABLED (CONFIG_USB_EHCI_MXC ) && \ !defined (PLATFORM_DRIVER ) && \ + !IS_ENABLED (CONFIG_ARCH_VT8500 ) && \ !defined (PS3_SYSTEM_BUS_DRIVER ) && \ !defined (OF_PLATFORM_DRIVER ) && \ !defined (XILINX_OF_PLATFORM_DRIVER )
drivers/usb/host/ehci-vt8500.c +33 -40
96 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 2/2 USB: EHCI: make ehci-orion a separate driver
From: Manjunath Goudar <[email protected]>
With the multiplatform changes in arm-soc tree, it becomes possible to enable the mvebu platform (which uses ehci-orion) at the same time as other platforms that require a conflicting EHCI bus glue. At the moment, this results in a warning like
drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default] drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definition drivers/usb/host/ehci-orion.c:334:31: warning: 'ehci_orion_driver' defined but not used [-Wunused-variable]
and an ehci driver that only works on one of them.
With the infrastructure added by Alan Stern in patch 3e0232039 "USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the orion bus glue.
--- drivers/usb/host/Kconfig | 8 ++++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-hcd.c | 6 +-- drivers/usb/host/ehci-orion.c | 90 ++++++++++++++++++++----------------------- 4 files changed, 52 insertions(+), 53 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -162,6 +162,14 @@ config USB_EHCI_HCD_OMAP Enables support for the on-chip EHCI controller on OMAP3 and later chips. +config USB_EHCI_HCD_ORION + tristate "Support for Marvell Orion on-chip EHCI USB controller" + depends on USB_EHCI_HCD && PLAT_ORION + default y + ---help--- + Enables support for the on-chip EHCI controller on + Morvell Orion chips. + config USB_EHCI_HCD_VT8500 tristate "Support for VT8500 on-chip EHCI USB controller" depends on USB_EHCI_HCD && ARCH_VT8500
drivers/usb/host/Makefile +1 -0
@@ -30,6 +30,7 @@ obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o +obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o
drivers/usb/host/ehci-hcd.c +1 -5
@@ -1272,11 +1272,6 @@ MODULE_LICENSE ("GPL");#define XILINX_OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver#endif -#ifdef CONFIG_PLAT_ORION -#include "ehci-orion.c" -#define PLATFORM_DRIVER ehci_orion_driver -#endif -#ifdef CONFIG_USB_W90X900_EHCI #include "ehci-w90x900.c" #define PLATFORM_DRIVER ehci_hcd_w90x900_driver
@@ -1343,6 +1338,7 @@ MODULE_LICENSE ("GPL"); !IS_ENABLED (CONFIG_USB_EHCI_MXC ) && \ !defined (PLATFORM_DRIVER ) && \ !IS_ENABLED (CONFIG_ARCH_VT8500 ) && \ + !IS_ENABLED (CONFIG_PLAT_ORION ) && \ !defined (PS3_SYSTEM_BUS_DRIVER ) && \ !defined (OF_PLATFORM_DRIVER ) && \ !defined (XILINX_OF_PLATFORM_DRIVER )
drivers/usb/host/ehci-orion.c +42 -48
121 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 2/2 USB: EHCI: make ehci-orion a separate driver
Quoted 23 lines · Arnd Bergmann
From: Manjunath Goudar <[email protected]>
With the multiplatform changes in arm-soc tree, it becomes possible to enable the mvebu platform (which uses ehci-orion) at the same time as other platforms that require a conflicting EHCI bus glue. At the moment, this results in a warning like
drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definitiondrivers/usb/host/ehci-orion.c:334:31: warning: 'ehci_orion_driver' defined but not used [-Wunused-variable]and an ehci driver that only works on one of them.
With the infrastructure added by Alan Stern in patch
3e0232039"USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the orion bus glue.Signed-off-by Manjunath Goudar <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>
Quoted 6 lines
--- drivers/usb/host/Kconfig | 8 ++++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-hcd.c | 6 +-- drivers/usb/host/ehci-orion.c | 90 ++++++++++++++++++++----------------------- 4 files changed, 52 insertions(+), 53 deletions(-)
This looks sane to me, but I unfortunately don't have time to test atm. So if Arnd has been working with you:
thx,
Jason.
PATCH 2/2 USB: EHCI: make ehci-orion a separate driver
In reply to Arnd BergmannQuoted 23 lines · Arnd Bergmann
From: Manjunath Goudar <[email protected]>
With the multiplatform changes in arm-soc tree, it becomes possible to enable the mvebu platform (which uses ehci-orion) at the same time as other platforms that require a conflicting EHCI bus glue. At the moment, this results in a warning like
drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definitiondrivers/usb/host/ehci-orion.c:334:31: warning: 'ehci_orion_driver' defined but not used [-Wunused-variable]and an ehci driver that only works on one of them.
With the infrastructure added by Alan Stern in patch
3e0232039"USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the orion bus glue.Signed-off-by Manjunath Goudar <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>
Quoted 6 lines
--- drivers/usb/host/Kconfig | 8 ++++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-hcd.c | 6 +-- drivers/usb/host/ehci-orion.c | 90 ++++++++++++++++++++----------------------- 4 files changed, 52 insertions(+), 53 deletions(-)
I booted with this patch on a Kirkwood based QNAP NAS box. The USB bus enumerated as expected.
Andrew
PATCH 2/2 USB: EHCI: make ehci-orion a separate driver
In reply to Arnd BergmannHi Arnd,
Quoted 35 lines · Arnd Bergmann
From: Manjunath Goudar <[email protected]>
With the multiplatform changes in arm-soc tree, it becomes possible to enable the mvebu platform (which uses ehci-orion) at the same time as other platforms that require a conflicting EHCI bus glue. At the moment, this results in a warning like
drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definitiondrivers/usb/host/ehci-orion.c:334:31: warning: 'ehci_orion_driver' defined but not used [-Wunused-variable]and an ehci driver that only works on one of them.
With the infrastructure added by Alan Stern in patch
3e0232039"USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the orion bus glue.Signed-off-by Manjunath Goudar <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>--- drivers/usb/host/Kconfig | 8 ++++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-hcd.c | 6 +-- drivers/usb/host/ehci-orion.c | 90 ++++++++++++++++++++----------------------- 4 files changed, 52 insertions(+), 53 deletions(-)drivers/usb/host/Kconfig +0
-0
drivers/usb/host/Kconfig config USB_EHCI_HCD_OMAP · line 171
Quoted 10 lines
drivers/usb/host/Kconfig +7
-0@@ -162,6 +162,14 @@ config USB_EHCI_HCD_OMAP Enables support for the on-chip EHCI controller on OMAP3 and later chips. +config USB_EHCI_HCD_ORION + tristate "Support for Marvell Orion on-chip EHCI USB controller" + depends on USB_EHCI_HCD && PLAT_ORION + default y + ---help--- + Enables support for the on-chip EHCI controller on + Morvell Orion chips.
s/Morvell/Marvell
Just this tiny nitpick.
Thanks,
Signature · 3 lines
Ezequiel Garc?a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com
PATCH 1/1 USB: update host controller Kconfig entries
Quoted 4 lines · Ezequiel Garcia
s/Morvell/Marvell
Just this tiny nitpick.
Thanks for pointing this out! Tony Prisk had another comment about the VT8500 patch, so I figured it would be good to update both here, and I found a few more outdated changeset comments about drivers that have become used on more platforms now. Greg, please apply to whichever release you see fit. This is based on your current usb-next branch.
Arnd
8<-----------
Subject: USB: update host controller Kconfig entries
The recent patches from Manjunath Goudar introduced two small mistakes in the Kconfig help text for the new options. Let's fix those and the other entries that have become stale over time.
--- drivers/usb/host/Kconfig | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-)
drivers/usb/host/Kconfig +17 -9
@@ -163,23 +163,28 @@ config USB_EHCI_HCD_OMAP OMAP3 and later chips. config USB_EHCI_HCD_ORION - tristate "Support for Marvell Orion on-chip EHCI USB controller" + tristate "Support for Marvell EBU on-chip EHCI USB controller" depends on USB_EHCI_HCD && PLAT_ORION default y ---help--- Enables support for the on-chip EHCI controller on - Morvell Orion chips. + Marvell's embedded ARM SoCs, including Orion, + Kirkwood, Dove, Armada XP, Armada 370. + This is different from the EHCI implementation on + Marvell's mobile PXA and MMP SoC, see USB_EHCI_MV + for those. + config USB_EHCI_HCD_VT8500 - tristate "Support for VT8500 on-chip EHCI USB controller" + tristate "Support for VIA/Wondermedia on-chip EHCI USB controller" depends on USB_EHCI_HCD && ARCH_VT8500 default y ---help--- Enables support for the on-chip EHCI controller on - VT8500 chips. + VIA VT8500 and Wondermedia WM8x50 chips. config USB_EHCI_MSM - bool "Support for MSM on-chip EHCI USB controller" + bool "Support for Qualcomm QSD/MSM on-chip EHCI USB controller" depends on USB_EHCI_HCD && ARCH_MSM select USB_EHCI_ROOT_HUB_TT select USB_MSM_OTG
@@ -215,10 +220,11 @@ config USB_EHCI_SH If you use the PCI EHCI controller, this option is not necessary. config USB_EHCI_S5P - boolean "S5P EHCI support" - depends on USB_EHCI_HCD && PLAT_S5P - help - Enable support for the S5P SOC's on-chip EHCI controller. + boolean "EHCI support for Samsung S5P/EXYNOS SoC Series" + depends on USB_EHCI_HCD && PLAT_S5P + help + Enable support for the Samsung S5Pxxxx and Exynos3/4/5 SOC's + on-chip EHCI controller. config USB_EHCI_MV bool "EHCI support for Marvell on-chip controller"
@@ -228,6 +234,8 @@ config USB_EHCI_MV Enables support for Marvell (including PXA and MMP series) on-chip USB SPH and OTG controller. SPH is a single port host, and it can only be EHCI host. OTG is controller that can switch to host mode. + Note that there is a separate driver for Marvell's embedded ARM + SoCs, see USB_EHCI_HCD_ORION for those. config USB_W90X900_EHCI bool "W90X900(W90P910) EHCI support"
Alan Stern
maintainerPATCH 2/2 USB: EHCI: make ehci-orion a separate driver
In reply to Arnd BergmannQuoted 22 lines · Arnd Bergmann
From: Manjunath Goudar <[email protected]>
With the multiplatform changes in arm-soc tree, it becomes possible to enable the mvebu platform (which uses ehci-orion) at the same time as other platforms that require a conflicting EHCI bus glue. At the moment, this results in a warning like
drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definitiondrivers/usb/host/ehci-orion.c:334:31: warning: 'ehci_orion_driver' defined but not used [-Wunused-variable]and an ehci driver that only works on one of them.
With the infrastructure added by Alan Stern in patch
3e0232039"USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the orion bus glue.
drivers/usb/host/Makefile obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o · line 33
Quoted 4 lines
drivers/usb/host/Makefile +1
-0@@ -30,6 +30,7 @@ obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o +obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o
Both of these two new lines should be formatted like the other lines in this file (i.e., with tabs at the corresponding places), and they should come before the OXU210HP_HCD entry so that they are next to the other EHCI-related lines.
drivers/usb/host/ehci-orion.c line 23
Quoted 10 lines
drivers/usb/host/ehci-orion.c +4
-0@@ -17,6 +17,13 @@#include <linux/of.h> #include <linux/of_device.h> #include <linux/of_irq.h> +#include <linux/usb.h> +#include <linux/usb/hcd.h> +#include <linux/io.h> +#include <linux/dma-mapping.h>
Is this line really needed?
drivers/usb/host/ehci-orion.c line 52
Quoted 13 lines
drivers/usb/host/ehci-orion.c +9
-0@@ -34,6 +41,17 @@#define USB_PHY_IVREF_CTRL 0x440#define USB_PHY_TST_GRP_CTRL 0x450 +#define DRIVER_DESC "EHCI orion driver" + +static const char hcd_name[] ="ehci-orion" ; + +static struct hc_driver __read_mostly ehci_orion_hc_driver; + +static const struct ehci_driver_overrides orion_overrides__initdata = { + .reset = ehci_setup, +};
This is not necessary; ehci_setup is the default value anyway. This structure can be omitted.
Quoted 10 lines
drivers/usb/host/ehci-orion.c +0
-2@@ -323,8 +296,6 @@ static int __exit ehci_orion_drv_remove(struct platform_device *pdev)return 0 ; } -MODULE_ALIAS ("platform:orion-ehci" ); -static const struct of_device_id ehci_orion_dt_ids[] = { { .compatible ="marvell,orion-ehci" , }, {},
drivers/usb/host/ehci-orion.c static struct platform_driver ehci_orion_driver = { · line 310
Quoted 5 lines
drivers/usb/host/ehci-orion.c +1
-1@@ -336,8 +307,31 @@ static struct platform_driver ehci_orion_driver = { .remove = __exit_p(ehci_orion_drv_remove), .shutdown = usb_hcd_platform_shutdown, .driver = { - .name = "orion-ehci", + .name = hcd_name,
Is this really what you want -- changing the driver name from "orion-ehci" to "ehci-orion"? Is that liable to cause trouble?
drivers/usb/host/ehci-orion.c static struct platform_driver ehci_orion_driver = { · line 335
Quoted 2 lines
drivers/usb/host/ehci-orion.c +2
-0+MODULE_DESCRIPTION (DRIVER_DESC ); +MODULE_ALIAS ("platform:ehci-orion" );
And is this really what you want -- changing the alias from "platform:orion-ehci" to "platform:ehci-orion"?
Alan Stern
PATCH 2/2 USB: EHCI: make ehci-orion a separate driver
Quoted 83 lines · Alan Stern
Quoted 22 lines · Arnd Bergmann
From: Manjunath Goudar <[email protected]>
With the multiplatform changes in arm-soc tree, it becomes possible to enable the mvebu platform (which uses ehci-orion) at the same time as other platforms that require a conflicting EHCI bus glue. At the moment, this results in a warning like
drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definitiondrivers/usb/host/ehci-orion.c:334:31: warning: 'ehci_orion_driver' defined but not used [-Wunused-variable]and an ehci driver that only works on one of them.
With the infrastructure added by Alan Stern in patch
3e0232039"USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the orion bus glue.drivers/usb/host/Makefile obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o · line 33
Quoted 4 lines
drivers/usb/host/Makefile +1
-0@@ -30,6 +30,7 @@ obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o +obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.oBoth of these two new lines should be formatted like the other lines in this file (i.e., with tabs at the corresponding places), and they should come before the
OXU210HP_HCDentry so that they are next to the other EHCI-related lines.drivers/usb/host/ehci-orion.c line 23
Quoted 10 lines
drivers/usb/host/ehci-orion.c +4
-0@@ -17,6 +17,13 @@#include <linux/of.h> #include <linux/of_device.h> #include <linux/of_irq.h> +#include <linux/usb.h> +#include <linux/usb/hcd.h> +#include <linux/io.h> +#include <linux/dma-mapping.h> Is this line really needed?
drivers/usb/host/ehci-orion.c line 52
Quoted 13 lines
drivers/usb/host/ehci-orion.c +9
-0@@ -34,6 +41,17 @@#define USB_PHY_IVREF_CTRL 0x440#define USB_PHY_TST_GRP_CTRL 0x450 +#define DRIVER_DESC "EHCI orion driver" + +static const char hcd_name[] ="ehci-orion" ; + +static struct hc_driver __read_mostly ehci_orion_hc_driver; + +static const struct ehci_driver_overrides orion_overrides__initdata = { + .reset = ehci_setup, +};This is not necessary;
ehci_setupis the default value anyway. This structure can be omitted.Quoted 10 lines
drivers/usb/host/ehci-orion.c +0
-2@@ -323,8 +296,6 @@ static int __exit ehci_orion_drv_remove(struct platform_device *pdev)return 0 ; } -MODULE_ALIAS ("platform:orion-ehci" ); -static const struct of_device_id ehci_orion_dt_ids[] = { { .compatible ="marvell,orion-ehci" , }, {},drivers/usb/host/ehci-orion.c static struct platform_driver ehci_orion_driver = { · line 310
Quoted 5 lines
drivers/usb/host/ehci-orion.c +1
-1@@ -336,8 +307,31 @@ static struct platform_driver ehci_orion_driver = { .remove = __exit_p(ehci_orion_drv_remove), .shutdown = usb_hcd_platform_shutdown, .driver = { - .name = "orion-ehci", + .name = hcd_name,Is this really what you want -- changing the driver name from "orion-ehci" to "ehci-orion"? Is that liable to cause trouble?
Quoted 5 lines
drivers/usb/host/ehci-orion.c static struct platform_driver ehci_orion_driver = { · line 335
Quoted 2 lines
drivers/usb/host/ehci-orion.c +2
-0+MODULE_DESCRIPTION (DRIVER_DESC ); +MODULE_ALIAS ("platform:ehci-orion" );And is this really what you want -- changing the alias from "platform:orion-ehci" to "platform:ehci-orion"?
Hi Manjunath
I can confirm that this breaks non DT based kirkwood systems. The driver does not get loaded.
Sorry for not testing and finding this case earlier, i just tested a DT based system.
GregKH: Please can you drop this patch from usb-next. It breaks more than it fixes.
Andrew
PATCH 2/2 USB: EHCI: make ehci-orion a separate driver
Andrew Lunn <[email protected]> writes:
Hi,
[...]
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/usb/host/ehci-orion.c +2
-0+ +static const char hcd_name[] ="ehci-orion" ;
[...]
Quoted 6 lines
Quoted 6 lines
drivers/usb/host/ehci-orion.c static int __exit ehci_orion_drv_remove(struct platform_device *pdev) · line 300
Quoted 6 lines
}
drivers/usb/host/ehci-orion.c +0
-2-MODULE_ALIAS ("platform:orion-ehci" ); -static const struct of_device_id ehci_orion_dt_ids[] = { { .compatible ="marvell,orion-ehci" , },
orion-ehci here ...
Quoted 7 lines
Quoted 7 lines
drivers/usb/host/ehci-orion.c static struct platform_driver ehci_orion_driver = { · line 310
Quoted 7 lines
drivers/usb/host/ehci-orion.c +1
-1{},@@ -336,8 +307,31 @@ static struct platform_driver ehci_orion_driver = { .remove = __exit_p(ehci_orion_drv_remove), .shutdown = usb_hcd_platform_shutdown, .driver = { - .name = "orion-ehci", + .name = hcd_name,
... and ehci-orion here. This would explain why only DT case seems to work. I'm wondering why it has not been changed given that it has been changed everywhere else, breaking stuff.
Quoted 10 lines
Quoted 9 lines
Is this really what you want -- changing the driver name from "orion-ehci" to "ehci-orion"? Is that liable to cause trouble?
drivers/usb/host/ehci-orion.c static struct platform_driver ehci_orion_driver = { · line 335
Quoted 2 lines
drivers/usb/host/ehci-orion.c +2
-0+MODULE_DESCRIPTION (DRIVER_DESC ); +MODULE_ALIAS ("platform:ehci-orion" );And is this really what you want -- changing the alias from "platform:orion-ehci" to "platform:ehci-orion"?
Quoted 7 lines
Hi Manjunath
I can confirm that this breaks non DT based kirkwood systems. The driver does not get loaded.
Sorry for not testing and finding this case earlier, i just tested a DT based system.
Maybe doing a mass renaming from orion-ehci to ehci-orion in arch/arm/* files would be enough ? [ well, not necessary everywhere, I'm not sure if changing the clock name in mach-kirkwood/board-dt.c would be a good idea given the of node didn't change its name ]
Arnaud
Greg KH
maintainerPATCH 2/2 USB: EHCI: make ehci-orion a separate driver
In reply to Andrew LunnQuoted 3 lines · Andrew Lunn
GregKH: Please can you drop this patch from usb-next. It breaks more than it fixes.
I've now reverted both of these, and the follow-on patch that Arnd sent in.
Arnd, sorry, but please be more careful, especially when you ask for patches to be rushed into the tree...
greg k-h
PATCH 2/2 USB: EHCI: make ehci-orion a separate driver
Quoted 10 lines · Greg KH
Quoted 3 lines · Andrew Lunn
GregKH: Please can you drop this patch from usb-next. It breaks more than it fixes.
I've now reverted both of these, and the follow-on patch that Arnd sent in.
Arnd, sorry, but please be more careful, especially when you ask for patches to be rushed into the tree...
Yes, I understand. I'll try to come up with a less invasive way to deal with the build error in 3.9 once the ARM multiplatform branch gets pulled.
I guess we could either forbid the combinations that are now broken using Kconfig dependencies, or add just add separate registriation paths to ehci_hcd_init() and ehci_hcd_cleanup() as we have for powerpc, although Alan did not like that too much last time I suggested it.
Arnd
A message that is not in the archive (sent off-list or not yet received): CAJFYCKGCNDTSq9OYZUYXx8XNSgSHD=p=hw+9_7N=EhM=bUu=bg@mail.gmail.com
PATCH 2/2 USB: EHCI: make ehci-orion a separate driver
Quoted 8 lines · Manjunath Goudar
Quoted 3 lines
This is not necessary;
ehci_setupis the default value anyway. This structure can be omitted.
ehci_init_driverfunction we are passing orion_overrides,if we are removing above struct initialization, what should we need to pass in
theehci_init_driverfunction.
ehci_init_driver already checks if you pass an override in there, and does not override anything in that case, so you can simply pass NULL as the argument.
Arnd
Alan Stern
maintainerPATCH 2/2 USB: EHCI: make ehci-orion a separate driver
Quoted 5 lines · Arnd Bergmann
Quoted 4 lines · Manjunath Goudar
Quoted 3 lines
This is not necessary;
ehci_setupis the default value anyway. This structure can be omitted.
Quoted 8 lines
Quoted 4 lines
ehci_init_driverfunction we are passing orion_overrides,if we are removing above struct initialization, what should we need to pass in
theehci_init_driverfunction.
ehci_init_driveralready checks if you pass an override in there, and does not override anything in that case, so you can simply pass NULL as the argument.
That's right. Manjunath, you can answer at lot of questions like this for yourself very easily, simply by reading the source code.
Alan Stern
Alan Stern
maintainerPATCH 2/2 USB: EHCI: make ehci-orion a separate driver
In reply to Arnd BergmannQuoted 12 lines · Arnd Bergmann
From: Manjunath Goudar <[email protected]>
With the multiplatform changes in arm-soc tree, it becomes possible to enable the mvebu platform (which uses ehci-orion) at the same time as other platforms that require a conflicting EHCI bus glue. At the moment, this results in a warning like
drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definitiondrivers/usb/host/ehci-orion.c:334:31: warning: 'ehci_orion_driver' defined but not used [-Wunused-variable]
Quoted 6 lines
and an ehci driver that only works on one of them.
With the infrastructure added by Alan Stern in patch
3e0232039"USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the orion bus glue.
One more comment on this patch...
drivers/usb/host/Kconfig config USB_EHCI_HCD_OMAP · line 171
Quoted 13 lines
drivers/usb/host/Kconfig +7
-0@@ -162,6 +162,14 @@ config USB_EHCI_HCD_OMAP Enables support for the on-chip EHCI controller on OMAP3 and later chips. +config USB_EHCI_HCD_ORION + tristate "Support for Marvell Orion on-chip EHCI USB controller" + depends on USB_EHCI_HCD && PLAT_ORION + default y + ---help--- + Enables support for the on-chip EHCI controller on + Morvell Orion chips.
Currently there is no Kconfig option to control specifically whether the ehci-orion driver gets built; it always gets built whenever CONFIG_PLAT_ORION and CONFIG_USB_EHCI_HCD are both enabled.
Do you think it is a good idea to add an option for this? Should it at least be non-interactive, so that the driver always gets built under the same conditions as currently? A later patch can make it interactive, if desired.
Alan Stern
PATCH 2/2 USB: EHCI: make ehci-orion a separate driver
Quoted 8 lines · Alan Stern
Currently there is no
Kconfigoption to control specifically whether the ehci-orion driver gets built; it always gets built wheneverCONFIG_PLAT_ORIONandCONFIG_USB_EHCI_HCDare both enabled.Do you think it is a good idea to add an option for this? Should it at least be non-interactive, so that the driver always gets built under the same conditions as currently? A later patch can make it interactive, if desired.
I think it's good to have it interactive, because we are now building for multiplatform with Orion being one of many. It's useful to be able to build EHCI_HCD=y AND EHCD_HCD_ORION=m.
However, you are right that this is a change that was not mentioned in the patch description and would better have been kept separate or at least explicitly spelled out.
Arnd
PATCH 2/2 USB: EHCI: make ehci-orion a separate driver
Alan,
Quoted 5 lines · Arnd Bergmann
Quoted 4 lines · Alan Stern
Currently there is no
Kconfigoption to control specifically whether the ehci-orion driver gets built; it always gets built wheneverCONFIG_PLAT_ORIONandCONFIG_USB_EHCI_HCDare both enabled.
Quoted 8 lines
Quoted 4 lines
Do you think it is a good idea to add an option for this? Should it at least be non-interactive, so that the driver always gets built under the same conditions as currently? A later patch can make it interactive, if desired.
I think it's good to have it interactive, because we are now building for multiplatform with Orion being one of many. It's useful to be able to build EHCI_HCD=y AND EHCD_HCD_ORION=m.
Yes, explicit is preferable. On kirkwood usb has it's own gateable clock. The user should be able to conserve power by unloading the module or building without it.
thx,
Jason.
PATCH 1/2 USB: EHCI: make ehci-vt8500 a separate driver
In reply to Arnd BergmannQuoted 35 lines · Arnd Bergmann
From: Manjunath Goudar <[email protected]>
With the multiplatform changes in arm-soc tree, it becomes possible to enable the vt8500 platform at the same time as other platforms that require a conflicting EHCI bus glue. At the moment, this results in a warning like
drivers/usb/host/ehci-hcd.c:1277:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]drivers/usb/host/ehci-hcd.c:1257:0: note: this is the location of the previous definitiondrivers/usb/host/ehci-omap.c:319:31: warning: 'ehci_hcd_omap_driver' defined but not used [-Wunused-variable]and an ehci driver that only works on one of them.
With the infrastructure added by Alan Stern in patch
3e0232039"USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the vt8500 bus glue.Signed-off-by Manjunath Goudar <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>Cc Tony Prisk <[email protected]>Cc Alexey Charkov <[email protected]>--- drivers/usb/host/Kconfig | 8 +++++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-hcd.c | 6 +--- drivers/usb/host/ehci-vt8500.c | 73 +++++++++++++++++++----------------------- 4 files changed, 43 insertions(+), 45 deletions(-)drivers/usb/host/Kconfig +0
-0@@ -162,6 +162,14 @@ config USB_EHCI_HCD_OMAP Enables support for the on-chip EHCI controller on
drivers/usb/host/Kconfig config USB_EHCI_HCD_OMAP · line 172
Quoted 10 lines
drivers/usb/host/Kconfig +8
-0OMAP3 and later chips. +config USB_EHCI_HCD_VT8500 + tristate "Support for VT8500 on-chip EHCI USB controller" + depends on USB_EHCI_HCD && ARCH_VT8500 + default y + ---help--- + Enables support for the on-chip EHCI controller on + VT8500 chips. +
This should also mention Wondermedia SoCs I guess since the same driver is used for VT8500, WM8505, WM8650 etc etc.
Other than that:
v2 cover usb: ehci: more bus glues as separate modules
In reply to Manjunath GoudarHi Manjunath,
Nice job!
Quoted 6 lines · Manjunath Goudar
Separate the SOC On-Chip host controller driver from ehci-hcd host code into its own driver module
V2:
Modified the patches, based on the first version review comments
If at all possible, I'd still like to see a better commit message explaining why we need this at all, as it has been previously requested.
I guess there has been some discussion about this rework somewhere. It would be nice to add a link to that discussion in the commit message or in the cover letter so reviewers can have better context.
Quoted 10 lines
Manjunath Goudar (8):
USB: EHCI: make ehci-spear a separate driver
USB: EHCI: make ehci-atmel a separate driver
USB: EHCI: make ehci-s5p a separate driver
USB: EHCI: make ehci-mv as separate static driver
USB: EHCI: make ehci-vt8500 a separate driver
USB: EHCI: make ehci-msm a separate driver
USB: EHCI: make ehci-w90X900 a separate driver
USB: EHCI: make ehci-orion a separate driver
Quoted 17 lines
drivers/usb/host/Kconfig | 40 +++++++++++++++-- drivers/usb/host/Makefile | 9 +++- drivers/usb/host/ehci-atmel.c | 76 ++++++++++++++++---------------- drivers/usb/host/ehci-hcd.c | 52 +++++----------------- drivers/usb/host/ehci-msm.c | 85 ++++++++++++++++-------------------- drivers/usb/host/ehci-mv.c | 78 +++++++++++++++------------------ drivers/usb/host/ehci-orion.c | 90 ++++++++++++++++++-------------------- drivers/usb/host/ehci-s5p.c | 67 +++++++++++++++------------- drivers/usb/host/ehci-spear.c | 77 +++++++++++++++++---------------- drivers/usb/host/ehci-vt8500.c | 73 ++++++++++++++----------------- drivers/usb/host/ehci-w90x900.c | 91 +++++++++++++++++---------------------- drivers/usb/host/ehci.h | 2 +- 12 files changed, 358 insertions(+), 382 deletions(-)Signature · 1 line
1.7.9.5
Thanks a lot,
Signature · 3 lines
Ezequiel Garc?a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com