linux-next: manual merge of the usb tree with the omap tree

From: Stephen Rothwell
Date: Wed Mar 02 2011 - 00:58:20 EST


Hi Greg,

Today's linux-next merge of the usb tree got a conflict in
arch/arm/mach-omap2/usb-musb.c between commit
18a26892d62d2786c2b259ba4605ee10bba0ba13 ("OMAP2+: musb: hwmod adaptation
for musb registration") from the omap tree and commit
fb91cde49c327ff957c55d91805bc6abda59b311 ("usb: musb: OMAP4430: Power
down the PHY during board init") from the usb tree.

Just context changes. I fixed it up (see below) and can carry the fix as
necessary.

Interestingly, the patch in the usb tree looks as though it would have
been broken as the "dev" variable passed to omap4430_phy_init() does not
exist in the version of that file in the usb tree.

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc arch/arm/mach-omap2/usb-musb.c
index a9d4d14,241fc94..0000000
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@@ -132,35 -212,12 +132,39 @@@ void __init usb_musb_init(struct omap_m
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";
+ }
+
+ 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(musb_plat), 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;
+ }
+
+ pdev = &od->pdev;
+ dev = &pdev->dev;
+ get_device(dev);
+ dev->dma_mask = &musb_dmamask;
+ dev->coherent_dma_mask = musb_dmamask;
+ put_device(dev);
+
+ if (cpu_is_omap44xx())
+ omap4430_phy_init(dev);
+
}

#else
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/