2 * linux/arch/arm/mach-omap2/board-2430sdp-usb.c
4 * Copyright (C) 2007 MontaVista Software, Inc. <source@mvista.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #include <linux/types.h>
13 #include <linux/errno.h>
14 #include <linux/delay.h>
15 #include <linux/platform_device.h>
16 #include <linux/clk.h>
17 #include <linux/usb/musb.h>
19 #include <asm/arch/hardware.h>
20 #include <asm/arch/pm.h>
21 #include <asm/arch/usb.h>
23 static struct resource musb_resources[] = {
25 .start = OMAP243X_HS_BASE,
26 .end = OMAP243X_HS_BASE + SZ_8K - 1,
27 .flags = IORESOURCE_MEM,
29 [1] = { /* general IRQ */
30 .start = INT_243X_HS_USB_MC,
31 .flags = IORESOURCE_IRQ,
34 .start = INT_243X_HS_USB_DMA,
35 .flags = IORESOURCE_IRQ,
39 static int usbhs_ick_on;
41 static int musb_set_clock(struct clk *clk, int state)
51 if (usbhs_ick_on == 0)
62 static struct musb_hdrc_platform_data musb_plat = {
63 #ifdef CONFIG_USB_MUSB_OTG
65 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
67 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
68 .mode = MUSB_PERIPHERAL,
72 .set_clock = musb_set_clock,
75 static u64 musb_dmamask = ~(u32)0;
77 static struct platform_device musb_device = {
81 .dma_mask = &musb_dmamask,
82 .coherent_dma_mask = 0xffffffff,
83 .platform_data = &musb_plat,
85 .num_resources = ARRAY_SIZE(musb_resources),
86 .resource = musb_resources,
89 void __init sdp2430_usb_init(void)
91 if (platform_device_register(&musb_device) < 0) {
92 printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");