]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
Merge tag 'musb-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Sep 2012 20:56:29 +0000 (13:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Sep 2012 20:56:29 +0000 (13:56 -0700)
usb: musb: patches for v3.7 merge window

Here we have a bunch of miscellaneous cleanups and fixes
to the musb driver. It fixes a bunch of mistakes errors
which nobody has triggered before, so I'm not Ccing stable
tree.

We are finally improving OMAP's VBUS/ID Mailbox usage so
that we can introduce our PHY drivers properly. Also, we're
adding support for multiple instances of the MUSB IP in
the same SoC, as seen on some platforms from TI which
have 2 MUSB instances.

Other than that, we have some small fixes like not kicking
DMA for a zero byte transfer, or properly handling NAK timeout
on MUSB's host side, and the enabling of DMA Mode1 for any
transfers which are aligned to wMaxPacketSize.

All patches have been pending on mailing list for a long time
and I don't expect any big surprises with this pull request.

1  2 
drivers/usb/musb/Kconfig
drivers/usb/musb/am35x.c
drivers/usb/musb/blackfin.c
drivers/usb/musb/da8xx.c
drivers/usb/musb/davinci.c
drivers/usb/musb/musb_dsps.c
drivers/usb/musb/tusb6010.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index c20b8776aafad60b703d3b56132c535fa7eba79c,2785e28ec4a94f2652cd55958847e439112f8fc8..444346e1e10d768086b1e10487f6b6428c892897
@@@ -480,12 -479,19 +480,19 @@@ static int __devinit dsps_create_musb_p
                ret = -ENODEV;
                goto err0;
        }
 -      strcpy((u8 *)res->name, "mc");
        res->parent = NULL;
        resources[1] = *res;
 +      resources[1].name = "mc";
  
+       /* get the musb id */
+       musbid = musb_get_id(dev, GFP_KERNEL);
+       if (musbid < 0) {
+               dev_err(dev, "failed to allocate musb id\n");
+               ret = -ENOMEM;
+               goto err0;
+       }
        /* allocate the child platform device */
-       musb = platform_device_alloc("musb-hdrc", -1);
+       musb = platform_device_alloc("musb-hdrc", musbid);
        if (!musb) {
                dev_err(dev, "failed to allocate musb device\n");
                ret = -ENOMEM;
@@@ -573,14 -624,16 +618,19 @@@ static int __devinit dsps_probe(struct 
        ret = pm_runtime_get_sync(&pdev->dev);
        if (ret < 0) {
                dev_err(&pdev->dev, "pm_runtime_get_sync FAILED");
-       /* create the child platform device for first instances of musb */
-       ret = dsps_create_musb_pdev(glue, 0);
-       if (ret != 0) {
-               dev_err(&pdev->dev, "failed to create child pdev\n");
-               goto err3;
 +              goto err2;
 +      }
 +
+       /* create the child platform device for all instances of musb */
+       for (i = 0; i < wrp->instances ; i++) {
+               ret = dsps_create_musb_pdev(glue, i);
+               if (ret != 0) {
+                       dev_err(&pdev->dev, "failed to create child pdev\n");
+                       /* release resources of previously created instances */
+                       for (i--; i >= 0 ; i--)
+                               dsps_delete_musb_pdev(glue, i);
+                       goto err3;
+               }
        }
  
        return 0;
Simple merge