usb: ohci: remove ep93xx bus glue platform driver
Subsystems (5)
PATCH v4 2/2 usb: ohci: remove ep93xx bus glue platform driver
Convert ep93xx to use the OHCI platform driver and remove the ohci-ep93xx bus glue driver.
Enable CONFIG_OHCI_HCD_PLATFORM in the ep93xx_defconfig so that USB is still enabled by default on the EP93xx platform.
--- arch/arm/configs/ep93xx_defconfig | 1 + arch/arm/mach-ep93xx/clock.c | 2 +- arch/arm/mach-ep93xx/core.c | 38 +++++++- drivers/usb/host/ohci-ep93xx.c | 184 -------------------------------------- drivers/usb/host/ohci-hcd.c | 18 ---- 5 files changed, 36 insertions(+), 207 deletions(-) delete mode 100644 drivers/usb/host/ohci-ep93xx.c
arch/arm/configs/ep93xx_defconfig +1 -0
@@ -83,6 +83,7 @@ CONFIG_USB=y CONFIG_USB_DEBUG=y CONFIG_USB_DYNAMIC_MINORS=y CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PLATFORM=y CONFIG_USB_STORAGE=y CONFIG_USB_SERIAL=y CONFIG_USB_SERIAL_CONSOLE=y
arch/arm/mach-ep93xx/clock.c +1 -1
@@ -212,7 +212,7 @@ static struct clk_lookup clocks[] = {INIT_CK (NULL ,"hclk" , &clk_h),INIT_CK (NULL ,"apb_pclk" , &clk_p),INIT_CK (NULL ,"pll2" , &clk_pll2), -INIT_CK ("ep93xx-ohci" ,NULL , &clk_usb_host), +INIT_CK ("ohci-platform" ,NULL , &clk_usb_host),INIT_CK ("ep93xx-keypad" ,NULL , &clk_keypad),INIT_CK ("ep93xx-fb" ,NULL , &clk_video), INIT_CK("ep93xx-spi.0", NULL, &clk_spi),
arch/arm/mach-ep93xx/core.c +34 -4
@@ -36,6 +36,7 @@#include <linux/export.h> #include <linux/irqchip/arm-vic.h> #include <linux/reboot.h> +#include <linux/usb/ohci_pdriver.h> #include <mach/hardware.h> #include <linux/platform_data/video-ep93xx.h>
@@ -297,22 +298,51 @@ static struct platform_device ep93xx_rtc_device = { .resource = ep93xx_rtc_resource, }; +/************************************************************************* +* EP93xx OHCI USB Host +*************************************************************************/ + +static struct clk *ep93xx_ohci_host_clock; + +static int ep93xx_ohci_power_on (struct platform_device *pdev) +{ +if (!ep93xx_ohci_host_clock) { + ep93xx_ohci_host_clock =devm_clk_get (&pdev->dev,NULL ); +if (IS_ERR (ep93xx_ohci_host_clock)) +return PTR_ERR (ep93xx_ohci_host_clock); + } + +return clk_enable (ep93xx_ohci_host_clock); +} + +static void ep93xx_ohci_power_off (struct platform_device *pdev) +{ +clk_disable (ep93xx_ohci_host_clock); +} + +static struct usb_ohci_pdata ep93xx_ohci_pdata = { + .power_on = ep93xx_ohci_power_on, + .power_off = ep93xx_ohci_power_off, + .power_suspend = ep93xx_ohci_power_off, +};static struct resource ep93xx_ohci_resources[] = {DEFINE_RES_MEM (EP93XX_USB_PHYS_BASE ,0x1000 ),DEFINE_RES_IRQ (IRQ_EP93XX_USB ), }; +static u64 ep93xx_ohci_dma_mask =DMA_BIT_MASK (32 );static struct platform_device ep93xx_ohci_device = { - .name ="ep93xx-ohci" , + .name ="ohci-platform" , .id =-1 , + .num_resources =ARRAY_SIZE (ep93xx_ohci_resources), + .resource = ep93xx_ohci_resources, .dev = { - .dma_mask = &ep93xx_ohci_device.dev.coherent_dma_mask, + .dma_mask = &ep93xx_ohci_dma_mask, .coherent_dma_mask =DMA_BIT_MASK (32 ), + .platform_data = &ep93xx_ohci_pdata, }, - .num_resources =ARRAY_SIZE (ep93xx_ohci_resources), - .resource = ep93xx_ohci_resources, };
drivers/usb/host/ohci-ep93xx.c deleted +0 -184
184 lines not on this page · raw message
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1204,11 +1204,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_AT91 #include "ohci-at91.c" #define AT91_PLATFORM_DRIVER ohci_hcd_at91_driver
@@ -1344,12 +1339,6 @@ static int __init ohci_hcd_mod_init(void) goto error_exynos;#endif -#ifdef EP93XX_PLATFORM_DRIVER - retval =platform_driver_register (&EP93XX_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_ep93xx; -#endif -#ifdef AT91_PLATFORM_DRIVER retval =platform_driver_register (&AT91_PLATFORM_DRIVER );if (retval <0 )
@@ -1393,10 +1382,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&AT91_PLATFORM_DRIVER ); error_at91:#endif -#ifdef EP93XX_PLATFORM_DRIVER -platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); - error_ep93xx: -#endif #ifdef EXYNOS_PLATFORM_DRIVER platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER ); error_exynos:
@@ -1462,9 +1447,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef AT91_PLATFORM_DRIVER platform_driver_unregister (&AT91_PLATFORM_DRIVER );#endif -#ifdef EP93XX_PLATFORM_DRIVER -platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); -#endif #ifdef EXYNOS_PLATFORM_DRIVER platform_driver_unregister (&EXYNOS_PLATFORM_DRIVER );#endif
Signature · 1 line
1.8.3.2
Alan Stern
maintainerQuoted 6 lines · H Hartley Sweeten
Convert ep93xx to use the OHCI platform driver and remove the ohci-ep93xx bus glue driver.
Enable
CONFIG_OHCI_HCD_PLATFORMin theep93xx_defconfigso that USB is still enabled by default on the EP93xx platform.
Quoted 7 lines
Signed-off-by H Hartley Sweeten <[email protected]>Acked-by Alan Stern <[email protected]>Cc Ryan Mallon <[email protected]>Cc Lennert Buytenhek <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Olof Johansson <[email protected]>Cc Russell King <[email protected]>
Good work; thanks a lot for doing this.
Greg, please merge both of these v4 patches.
Alan Stern
Greg KH
maintainerQuoted 16 lines · Alan Stern
Quoted 6 lines · H Hartley Sweeten
Convert ep93xx to use the OHCI platform driver and remove the ohci-ep93xx bus glue driver.
Enable
CONFIG_OHCI_HCD_PLATFORMin theep93xx_defconfigso that USB is still enabled by default on the EP93xx platform.Quoted 7 lines
Signed-off-by H Hartley Sweeten <[email protected]>Acked-by Alan Stern <[email protected]>Cc Ryan Mallon <[email protected]>Cc Lennert Buytenhek <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Olof Johansson <[email protected]>Cc Russell King <[email protected]>
Quoted 3 lines
Good work; thanks a lot for doing this.
Greg, please merge both of these v4 patches.
Will do, thanks for reviewing them.
greg k-h
Greg KH
maintainerQuoted 13 lines · H Hartley Sweeten
Convert ep93xx to use the OHCI platform driver and remove the ohci-ep93xx bus glue driver.
Enable
CONFIG_OHCI_HCD_PLATFORMin theep93xx_defconfigso that USB is still enabled by default on the EP93xx platform.Signed-off-by H Hartley Sweeten <[email protected]>Acked-by Alan Stern <[email protected]>Cc Ryan Mallon <[email protected]>Cc Lennert Buytenhek <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Olof Johansson <[email protected]>Cc Russell King <[email protected]>
Quoted 8 lines
--- arch/arm/configs/ep93xx_defconfig | 1 + arch/arm/mach-ep93xx/clock.c | 2 +- arch/arm/mach-ep93xx/core.c | 38 +++++++- drivers/usb/host/ohci-ep93xx.c | 184 -------------------------------------- drivers/usb/host/ohci-hcd.c | 18 ---- 5 files changed, 36 insertions(+), 207 deletions(-) delete mode 100644 drivers/usb/host/ohci-ep93xx.c
This patch doesn't apply to my usb-next branch of usb.git at all, what happened? Did Alan's other recent changes interfere with this?
Can you refresh this against my tree and resend it so that I can apply it? I've applied the 1/2 patch already.
thanks,
greg k-h
Quoted 23 lines · Greg KH
Quoted 13 lines · H Hartley Sweeten
Convert ep93xx to use the OHCI platform driver and remove the ohci-ep93xx bus glue driver.
Enable
CONFIG_OHCI_HCD_PLATFORMin theep93xx_defconfigso that USB is still enabled by default on the EP93xx platform.Signed-off-by H Hartley Sweeten <[email protected]>Acked-by Alan Stern <[email protected]>Cc Ryan Mallon <[email protected]>Cc Lennert Buytenhek <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Olof Johansson <[email protected]>Cc Russell King <[email protected]>Quoted 8 lines
--- arch/arm/configs/ep93xx_defconfig | 1 + arch/arm/mach-ep93xx/clock.c | 2 +- arch/arm/mach-ep93xx/core.c | 38 +++++++- drivers/usb/host/ohci-ep93xx.c | 184 -------------------------------------- drivers/usb/host/ohci-hcd.c | 18 ---- 5 files changed, 36 insertions(+), 207 deletions(-) delete mode 100644 drivers/usb/host/ohci-ep93xx.c
Quoted 2 lines
This patch doesn't apply to my usb-next branch of usb.git at all, what happened? Did Alan's other recent changes interfere with this?
With the temporary linux-next shutdown it appears that I based this on the mainline git tree. Sorry about that.
Quoted 2 lines
Can you refresh this against my tree and resend it so that I can apply it? I've applied the 1/2 patch already.
I'll try to pull usb-next today and rebase this.
Regards,
Hartley
Quoted 8 lines · Greg KH
Quoted 7 lines · H Hartley Sweeten
Convert ep93xx to use the OHCI platform driver and remove the ohci-ep93xx bus glue driver.
Enable
CONFIG_OHCI_HCD_PLATFORMin theep93xx_defconfigso that USB is still enabled by default on the EP93xx platform.Signed-off-by H Hartley Sweeten <[email protected]>
[snip]
Quoted 5 lines
This patch doesn't apply to my usb-next branch of usb.git at all, what happened? Did Alan's other recent changes interfere with this?
Can you refresh this against my tree and resend it so that I can apply it? I've applied the 1/2 patch already.
Greg,
I just refreshed this patch against usb-next and sent it as v5.
Thanks,
Hartley