]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
usb: musb: adding support for registering nop xceiv
authorAjay Kumar Gupta <ajay.gupta@ti.com>
Thu, 8 Jan 2009 10:53:56 +0000 (16:23 +0530)
committerTony Lindgren <tony@atomide.com>
Fri, 20 Feb 2009 16:44:11 +0000 (08:44 -0800)
Adding support for registering nop usb transceiver for musb
platforms. Tested with OMAP35xx EVM having OTG phy ISP1504
which is autonomous and doesn't require any phy programming.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/usb-musb.c

index 327af7d494fecad537946ef31deccdcf2d42a5e1..81b4195cbefbf54107d8006bc654b16d4fedda99 100644 (file)
@@ -146,6 +146,20 @@ static struct platform_device musb_device = {
        .resource       = musb_resources,
 };
 
+#ifdef CONFIG_NOP_USB_XCEIV
+static u64 nop_xceiv_dmamask = DMA_32BIT_MASK;
+
+static struct platform_device nop_xceiv_device = {
+       .name           = "nop_usb_xceiv",
+       .id             = -1,
+       .dev = {
+               .dma_mask               = &nop_xceiv_dmamask,
+               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .platform_data          = NULL,
+       },
+};
+#endif
+
 void __init usb_musb_init(void)
 {
        if (cpu_is_omap243x()) {
@@ -158,6 +172,13 @@ void __init usb_musb_init(void)
 
        musb_resources[0].end = musb_resources[0].start + SZ_8K - 1;
 
+#ifdef CONFIG_NOP_USB_XCEIV
+       if (platform_device_register(&nop_xceiv_device) < 0) {
+               printk(KERN_ERR "Unable to register NOP-XCEIV device\n");
+               return;
+       }
+#endif
+
        if (platform_device_register(&musb_device) < 0) {
                printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
                return;