Hello.

On 16-02-2011 15:28, Hema HK wrote:

Using omap_device_build API instead of platform_device_register for
OMAP2430,OMAP3xxx, OMAP4430 and AM35x musb device registration.
The device specific resources defined in centralized
database will be used.

Signed-off-by: Hema HK<[email protected]>
Cc: Felipe Balbi<[email protected]>
Cc: Tony Lindgren<[email protected]>
Cc: Kevin Hilman<[email protected]>
Cc: Cousson, Benoit<[email protected]>
Cc: Paul Walmsley<[email protected]>
[...]

Index: linux-2.6/arch/arm/mach-omap2/usb-musb.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-omap2/usb-musb.c
+++ linux-2.6/arch/arm/mach-omap2/usb-musb.c
[...]
@@ -115,8 +88,35 @@ void __init usb_musb_init(struct omap_mu
        musb_plat.mode = board_data->mode;
        musb_plat.extvbus = board_data->extvbus;

-       if (platform_device_register(&musb_device)<  0)
-               printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
+       if (cpu_is_omap3517() || cpu_is_omap3505()) {
+               oh_name = "am35x_otg_hs";
+               name = "musb-am35x";
+       } else {
+               oh_name = "usb_otg_hs";
+               name = "musb-omap2430";
+       }

   The following code is over-indented...

+               oh = omap_hwmod_lookup(oh_name);
+               if (!oh) {
+                       pr_err("Could not look up %s\n", oh_name);
+                       return;
+               }
+
+               od = omap_device_build(name, bus_id, oh, &musb_plat,
+                                      sizeof(*pdata), omap_musb_latency,
+                                      ARRAY_SIZE(omap_musb_latency), false);
+               if (IS_ERR(od)) {
+                       pr_err("Could not build omap_device for %s %s\n",
+                                                       name, oh_name);
+                       return;
+

   Empty line not needed here...

+               }
+               pdev =&od->pdev;
+               dev =&pdev->dev;
+               get_device(dev);
+               dev->dma_mask = &musb_dmamask;
+               dev->coherent_dma_mask = musb_dmamask;
+               put_device(dev);
+

   And here...

  }

  #else

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to