Merge branch 'android-4.9' into amlogic-4.9-dev
authorVictor Wan <victor.wan@amlogic.com>
Tue, 7 Aug 2018 06:43:24 +0000 (14:43 +0800)
committerVictor Wan <victor.wan@amlogic.com>
Tue, 7 Aug 2018 06:43:24 +0000 (14:43 +0800)
Signed-off-by: Victor Wan <victor.wan@amlogic.com>
 Conflicts:
drivers/md/dm-bufio.c
drivers/media/dvb-core/dvb_frontend.c
drivers/usb/dwc3/core.c
drivers/usb/gadget/function/f_fs.c

33 files changed:
1  2 
Makefile
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/process.c
drivers/android/binder.c
drivers/block/loop.c
drivers/cpufreq/cpufreq.c
drivers/dma-buf/sync_file.c
drivers/gpio/gpiolib.c
drivers/md/Kconfig
drivers/md/dm-verity-target.c
drivers/media/dvb-core/dmxdev.c
drivers/media/dvb-core/dvb_frontend.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/pci/quirks.c
drivers/staging/android/ion/ion_heap.c
drivers/usb/core/quirks.c
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h
drivers/usb/gadget/function/f_fs.c
drivers/usb/host/xhci-mem.c
include/linux/mm.h
kernel/sched/core.c
kernel/sched/cpufreq_schedutil.c
kernel/sched/fair.c
kernel/sysctl.c
kernel/workqueue.c
mm/page_alloc.c
mm/vmscan.c
net/dccp/ipv4.c
net/dccp/ipv6.c
net/ipv4/tcp_input.c
net/xfrm/xfrm_state.c
net/xfrm/xfrm_user.c

diff --cc Makefile
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 09bffbcc1db18e749a3ac0237f4ce1b5868095f4,2f054db8807be89152c54980c79b8b6d0e4c6245..b1cee95601933e78db793bdef6dcf7be21fe5db6
@@@ -255,11 -250,21 +255,24 @@@ static void dvb_frontend_add_event(stru
  
        wake_up_interruptible (&events->wait_queue);
  }
 +#ifdef CONFIG_AMLOGIC_DVB_COMPAT
 +EXPORT_SYMBOL(dvb_frontend_add_event);
 +#endif
+ static int dvb_frontend_test_event(struct dvb_frontend_private *fepriv,
+                                  struct dvb_fe_events *events)
+ {
+       int ret;
+       up(&fepriv->sem);
+       ret = events->eventw != events->eventr;
+       down(&fepriv->sem);
+       return ret;
+ }
  static int dvb_frontend_get_event(struct dvb_frontend *fe,
-                           struct dvb_frontend_event *event, int flags)
+                                 struct dvb_frontend_event *event, int flags)
  {
        struct dvb_frontend_private *fepriv = fe->frontend_priv;
        struct dvb_fe_events *events = &fepriv->events;
Simple merge
Simple merge
index c7c090734f60a5d42811bade2bd5f14e46b37f57,53b26e978d90e566a0cc4f13a461b28665ce2bd3..a4d1b837063f8e3ef0c42e6afe8a8b05753be887
@@@ -170,97 -166,23 +171,111 @@@ static int dwc3_core_soft_reset(struct 
                udelay(1);
        } while (--retries);
  
+       phy_exit(dwc->usb3_generic_phy);
+       phy_exit(dwc->usb2_generic_phy);
        return -ETIMEDOUT;
+ done:
+       /*
+        * For DWC_usb31 controller, once DWC3_DCTL_CSFTRST bit is cleared,
+        * we must wait at least 50ms before accessing the PHY domain
+        * (synchronization delay). DWC_usb31 programming guide section 1.3.2.
+        */
+       if (dwc3_is_usb31(dwc))
+               msleep(50);
+       return 0;
  }
  
 +#else
 +/**
 + * dwc3_core_soft_reset - Issues core soft reset and PHY reset
 + * @dwc: pointer to our context structure
 + */
 +static int dwc3_core_soft_reset(struct dwc3 *dwc)
 +{
 +      u32             reg;
 +      int             ret;
 +
 +      /* Before Resetting PHY, put Core in Reset */
 +      reg = dwc3_readl(dwc->regs, DWC3_GCTL);
 +      reg |= DWC3_GCTL_CORESOFTRESET;
 +      dwc3_writel(dwc->regs, DWC3_GCTL, reg);
 +
 +      /* Assert USB3 PHY reset */
 +      reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0));
 +      reg |= DWC3_GUSB3PIPECTL_PHYSOFTRST;
 +      dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg);
 +
 +      /* Assert USB2 PHY reset */
 +      reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
 +      reg |= DWC3_GUSB2PHYCFG_PHYSOFTRST;
 +      dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
 +
 +      reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(1));
 +      reg |= DWC3_GUSB2PHYCFG_PHYSOFTRST;
 +      dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(1), reg);
 +
 +      reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(2));
 +      reg |= DWC3_GUSB2PHYCFG_PHYSOFTRST;
 +      dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(2), reg);
 +
 +      reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(3));
 +      reg |= DWC3_GUSB2PHYCFG_PHYSOFTRST;
 +      dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(3), reg);
 +
 +      usb_phy_init(dwc->usb2_phy);
 +      usb_phy_init(dwc->usb3_phy);
 +
 +      ret = phy_init(dwc->usb2_generic_phy);
 +      if (ret < 0)
 +              return ret;
 +
 +      ret = phy_init(dwc->usb3_generic_phy);
 +      if (ret < 0) {
 +              phy_exit(dwc->usb2_generic_phy);
 +              return ret;
 +      }
 +
 +      udelay(1000);
 +
 +      /* Clear USB3 PHY reset */
 +      reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0));
 +      reg &= ~DWC3_GUSB3PIPECTL_PHYSOFTRST;
 +      dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg);
 +
 +      /* Clear USB2 PHY reset */
 +      reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
 +      reg &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST;
 +      reg &= ~DWC3_GUSB2PHYCFG_SUSPHY;
 +      dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
 +
 +      /* Clear USB2 PHY reset */
 +      reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(1));
 +      reg &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST;
 +      dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(1), reg);
 +
 +      /* Clear USB2 PHY reset */
 +      reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(2));
 +      reg &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST;
 +      dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(2), reg);
 +
 +      /* Clear USB2 PHY reset */
 +      reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(3));
 +      reg &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST;
 +      dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(3), reg);
 +
 +      udelay(1000);
 +
 +      /* After PHYs are stable we can take Core out of reset state */
 +      reg = dwc3_readl(dwc->regs, DWC3_GCTL);
 +      reg &= ~DWC3_GCTL_CORESOFTRESET;
 +      dwc3_writel(dwc->regs, DWC3_GCTL, reg);
 +
 +      return 0;
 +}
 +#endif
  /**
   * dwc3_soft_reset - Issue soft reset
   * @dwc: Pointer to our controller context structure
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc kernel/sysctl.c
Simple merge
Simple merge
diff --cc mm/page_alloc.c
Simple merge
diff --cc mm/vmscan.c
Simple merge
diff --cc net/dccp/ipv4.c
Simple merge
diff --cc net/dccp/ipv6.c
Simple merge
Simple merge
Simple merge
Simple merge