aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2013-10-21 16:39:04 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-29 19:43:37 -0400
commite55f7cd2467631980f749fb0aef197c06ce38d6a (patch)
tree65aeb5dedd0f2cdd228ea9b39e96775c1f3cf2ea /arch/arm/mach-ep93xx
parentf55055b4648416a9d31e5666a5425d406c05f626 (diff)
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. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Ryan Mallon <rmallon@gmail.com> Cc: Lennert Buytenhek <kernel@wantstofly.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Olof Johansson <olof@lixom.net> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r--arch/arm/mach-ep93xx/clock.c2
-rw-r--r--arch/arm/mach-ep93xx/core.c39
2 files changed, 35 insertions, 6 deletions
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c
index c95dbce2468e..39ef3b613912 100644
--- a/arch/arm/mach-ep93xx/clock.c
+++ b/arch/arm/mach-ep93xx/clock.c
@@ -212,7 +212,7 @@ static struct clk_lookup clocks[] = {
212 INIT_CK(NULL, "hclk", &clk_h), 212 INIT_CK(NULL, "hclk", &clk_h),
213 INIT_CK(NULL, "apb_pclk", &clk_p), 213 INIT_CK(NULL, "apb_pclk", &clk_p),
214 INIT_CK(NULL, "pll2", &clk_pll2), 214 INIT_CK(NULL, "pll2", &clk_pll2),
215 INIT_CK("ep93xx-ohci", NULL, &clk_usb_host), 215 INIT_CK("ohci-platform", NULL, &clk_usb_host),
216 INIT_CK("ep93xx-keypad", NULL, &clk_keypad), 216 INIT_CK("ep93xx-keypad", NULL, &clk_keypad),
217 INIT_CK("ep93xx-fb", NULL, &clk_video), 217 INIT_CK("ep93xx-fb", NULL, &clk_video),
218 INIT_CK("ep93xx-spi.0", NULL, &clk_spi), 218 INIT_CK("ep93xx-spi.0", NULL, &clk_spi),
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 3f12b885c083..d95ee28a616a 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -36,6 +36,7 @@
36#include <linux/export.h> 36#include <linux/export.h>
37#include <linux/irqchip/arm-vic.h> 37#include <linux/irqchip/arm-vic.h>
38#include <linux/reboot.h> 38#include <linux/reboot.h>
39#include <linux/usb/ohci_pdriver.h>
39 40
40#include <mach/hardware.h> 41#include <mach/hardware.h>
41#include <linux/platform_data/video-ep93xx.h> 42#include <linux/platform_data/video-ep93xx.h>
@@ -297,25 +298,53 @@ static struct platform_device ep93xx_rtc_device = {
297 .resource = ep93xx_rtc_resource, 298 .resource = ep93xx_rtc_resource,
298}; 299};
299 300
301/*************************************************************************
302 * EP93xx OHCI USB Host
303 *************************************************************************/
304
305static struct clk *ep93xx_ohci_host_clock;
306
307static int ep93xx_ohci_power_on(struct platform_device *pdev)
308{
309 if (!ep93xx_ohci_host_clock) {
310 ep93xx_ohci_host_clock = devm_clk_get(&pdev->dev, NULL);
311 if (IS_ERR(ep93xx_ohci_host_clock))
312 return PTR_ERR(ep93xx_ohci_host_clock);
313 }
314
315 return clk_enable(ep93xx_ohci_host_clock);
316}
317
318static void ep93xx_ohci_power_off(struct platform_device *pdev)
319{
320 clk_disable(ep93xx_ohci_host_clock);
321}
322
323static struct usb_ohci_pdata ep93xx_ohci_pdata = {
324 .power_on = ep93xx_ohci_power_on,
325 .power_off = ep93xx_ohci_power_off,
326 .power_suspend = ep93xx_ohci_power_off,
327};
300 328
301static struct resource ep93xx_ohci_resources[] = { 329static struct resource ep93xx_ohci_resources[] = {
302 DEFINE_RES_MEM(EP93XX_USB_PHYS_BASE, 0x1000), 330 DEFINE_RES_MEM(EP93XX_USB_PHYS_BASE, 0x1000),
303 DEFINE_RES_IRQ(IRQ_EP93XX_USB), 331 DEFINE_RES_IRQ(IRQ_EP93XX_USB),
304}; 332};
305 333
334static u64 ep93xx_ohci_dma_mask = DMA_BIT_MASK(32);
306 335
307static struct platform_device ep93xx_ohci_device = { 336static struct platform_device ep93xx_ohci_device = {
308 .name = "ep93xx-ohci", 337 .name = "ohci-platform",
309 .id = -1, 338 .id = -1,
339 .num_resources = ARRAY_SIZE(ep93xx_ohci_resources),
340 .resource = ep93xx_ohci_resources,
310 .dev = { 341 .dev = {
311 .dma_mask = &ep93xx_ohci_device.dev.coherent_dma_mask, 342 .dma_mask = &ep93xx_ohci_dma_mask,
312 .coherent_dma_mask = DMA_BIT_MASK(32), 343 .coherent_dma_mask = DMA_BIT_MASK(32),
344 .platform_data = &ep93xx_ohci_pdata,
313 }, 345 },
314 .num_resources = ARRAY_SIZE(ep93xx_ohci_resources),
315 .resource = ep93xx_ohci_resources,
316}; 346};
317 347
318
319/************************************************************************* 348/*************************************************************************
320 * EP93xx physmap'ed flash 349 * EP93xx physmap'ed flash
321 *************************************************************************/ 350 *************************************************************************/