]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'remotes/stable/linux-4.4.y' into karo-tx6-mainline karo-tx6-stable v4.4.15-KARO
authorLothar Waßmann <LW@KARO-electronics.de>
Tue, 12 Jul 2016 09:14:35 +0000 (11:14 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 12 Jul 2016 09:14:35 +0000 (11:14 +0200)
1  2 
drivers/usb/musb/musb_core.c

index 81ff12dd66152626d0b13c9806917db26ef00a1c,00eed5d66fda50b5fd3aae9c7579960aa513da89..bc1fd12581fa8d798fbf6911f857f536c73c192e
@@@ -765,6 -765,7 +765,6 @@@ static irqreturn_t musb_stage0_irq(stru
                default:
                        /* "should not happen" */
                        musb->is_active = 0;
 -                      break;
                }
        }
  
@@@ -817,6 -818,7 +817,6 @@@ b_host
                                if (hcd)
                                        hcd->self.is_b_host = 0;
                        }
 -                      break;
                }
  
                musb_host_poke_root_hub(musb);
                default:
                        WARNING("unhandled DISCONNECT transition (%s)\n",
                                usb_otg_state_string(musb->xceiv->otg->state));
 -                      break;
                }
        }
  
@@@ -1981,7 -1984,7 +1981,7 @@@ musb_init_controller(struct device *dev
         * Fail when the board needs a feature that's not enabled.
         */
        if (!plat) {
 -              dev_dbg(dev, "no platform_data?\n");
 +              dev_err(dev, "no platform_data?\n");
                status = -ENODEV;
                goto fail0;
        }
  
        switch (musb->port_mode) {
        case MUSB_PORT_MODE_HOST:
 -              status = musb_host_setup(musb, plat->power);
 +              status = musb_platform_set_mode(musb, MUSB_HOST);
                if (status < 0)
                        goto fail3;
 -              status = musb_platform_set_mode(musb, MUSB_HOST);
 +              status = musb_host_setup(musb, plat->power);
                break;
        case MUSB_PORT_MODE_GADGET:
 -              status = musb_gadget_setup(musb);
 +              status = musb_platform_set_mode(musb, MUSB_PERIPHERAL);
                if (status < 0)
                        goto fail3;
 -              status = musb_platform_set_mode(musb, MUSB_PERIPHERAL);
 +              status = musb_gadget_setup(musb);
                break;
        case MUSB_PORT_MODE_DUAL_ROLE:
 +              status = musb_platform_set_mode(musb, MUSB_OTG);
 +              if (status < 0)
 +                      goto fail3;
                status = musb_host_setup(musb, plat->power);
                if (status < 0)
                        goto fail3;
                        musb_host_cleanup(musb);
                        goto fail3;
                }
 -              status = musb_platform_set_mode(musb, MUSB_OTG);
                break;
        default:
                dev_err(dev, "unsupported port mode %d\n", musb->port_mode);
 -              break;
        }
  
        if (status < 0)
@@@ -2399,7 -2401,8 +2399,8 @@@ static void musb_restore_context(struc
        musb_writew(musb_base, MUSB_INTRTXE, musb->intrtxe);
        musb_writew(musb_base, MUSB_INTRRXE, musb->intrrxe);
        musb_writeb(musb_base, MUSB_INTRUSBE, musb->context.intrusbe);
-       musb_writeb(musb_base, MUSB_DEVCTL, musb->context.devctl);
+       if (musb->context.devctl & MUSB_DEVCTL_SESSION)
+               musb_writeb(musb_base, MUSB_DEVCTL, musb->context.devctl);
  
        for (i = 0; i < musb->config->num_eps; ++i) {
                struct musb_hw_ep       *hw_ep;