From 5e06d8a4564a07a9479913c8cc6f9d0f09c140de Mon Sep 17 00:00:00 2001 From: Kisang Lee Date: Mon, 30 Jul 2018 19:48:27 +0900 Subject: [PATCH] [9610] usb: dwc3: modify code to fix conflict Change-Id: I99a9bd21bc713548e267fe9d6515264cc95d44b5 Signed-off-by: Kisang Lee --- drivers/usb/dwc3/core.c | 10 ---------- drivers/usb/dwc3/gadget.c | 31 ------------------------------- drivers/usb/host/xhci-hub.c | 11 ----------- drivers/usb/host/xhci-plat.c | 19 ------------------- 4 files changed, 71 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 6cfe22075b25..30da1c0050c8 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -434,16 +434,6 @@ int dwc3_soft_reset(struct dwc3 *dwc) cpu_relax(); } while (true); -======= -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); ->>>>>>> 818299f6bdae return 0; } diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 47fa932a4c9e..d4e0718a4047 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -192,31 +192,11 @@ void dwc3_gadget_del_and_unmap_request(struct dwc3_ep *dep, if (req->request.status == -EINPROGRESS) req->request.status = status; -<<<<<<< HEAD - /* - * NOTICE we don't want to unmap before calling ->complete() if we're - * dealing with a bounced ep0 request. If we unmap it here, we would end - * up overwritting the contents of req->buf and this could confuse the - * gadget driver. - */ - if (req->trb) { - if (dwc->ep0_bounced && dep->number <= 1) { - dwc->ep0_bounced = false; - unmap_after_complete = true; - } else { - usb_gadget_unmap_request_by_dev(dwc->sysdev, - &req->request, req->direction); - req->trb = NULL; - } - } - -======= if (req->trb) usb_gadget_unmap_request_by_dev(dwc->sysdev, &req->request, req->direction); req->trb = NULL; ->>>>>>> 818299f6bdae trace_dwc3_gadget_giveback(req); if (dep->number > 1) @@ -243,17 +223,6 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, spin_unlock(&dwc->lock); usb_gadget_giveback_request(&dep->endpoint, &req->request); spin_lock(&dwc->lock); -<<<<<<< HEAD - - if (unmap_after_complete) - usb_gadget_unmap_request_by_dev(dwc->sysdev, - &req->request, req->direction); - req->trb = NULL; - - if (dep->number > 1) - pm_runtime_put(dwc->dev); -======= ->>>>>>> 818299f6bdae } /** diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 8234cdf6d940..191dda592475 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -1572,18 +1572,7 @@ int xhci_bus_suspend(struct usb_hcd *hcd) t2 |= PORT_WKOC_E | PORT_WKCONN_E; t2 &= ~PORT_WKDISC_E; } -<<<<<<< HEAD } else { -======= - - if ((xhci->quirks & XHCI_U2_DISABLE_WAKE) && - (hcd->speed < HCD_USB3)) { - if (usb_amd_pt_check_port(hcd->self.controller, - port_index)) - t2 &= ~PORT_WAKE_BITS; - } - } else ->>>>>>> 818299f6bdae t2 &= ~PORT_WAKE_BITS; } diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index abd3109c4033..72817f130a2e 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -565,7 +565,6 @@ static int xhci_plat_remove(struct platform_device *dev) static int __maybe_unused xhci_plat_suspend(struct device *dev) { -<<<<<<< HEAD /* *struct usb_hcd *hcd = dev_get_drvdata(dev); *struct xhci_hcd *xhci = hcd_to_xhci(hcd); @@ -573,10 +572,6 @@ static int __maybe_unused xhci_plat_suspend(struct device *dev) */ pr_info("[%s] \n",__func__); -======= - struct usb_hcd *hcd = dev_get_drvdata(dev); - struct xhci_hcd *xhci = hcd_to_xhci(hcd); ->>>>>>> 818299f6bdae /* * xhci_suspend() needs `do_wakeup` to know whether host is allowed @@ -586,7 +581,6 @@ static int __maybe_unused xhci_plat_suspend(struct device *dev) * reconsider this when xhci_plat_suspend enlarges its scope, e.g., * also applies to runtime suspend. */ -<<<<<<< HEAD /* *ret = xhci_suspend(xhci, device_may_wakeup(dev)); @@ -595,14 +589,10 @@ static int __maybe_unused xhci_plat_suspend(struct device *dev) * clk_disable_unprepare(xhci->clk); */ return 0; -======= - return xhci_suspend(xhci, device_may_wakeup(dev)); ->>>>>>> 818299f6bdae } static int __maybe_unused xhci_plat_resume(struct device *dev) { -<<<<<<< HEAD /* *struct usb_hcd *hcd = dev_get_drvdata(dev); *struct xhci_hcd *xhci = hcd_to_xhci(hcd); @@ -610,15 +600,6 @@ static int __maybe_unused xhci_plat_resume(struct device *dev) */ pr_info("[%s] \n",__func__); -======= - struct usb_hcd *hcd = dev_get_drvdata(dev); - struct xhci_hcd *xhci = hcd_to_xhci(hcd); - int ret; - - ret = xhci_priv_resume_quirk(hcd); - if (ret) - return ret; ->>>>>>> 818299f6bdae /* *if (!device_may_wakeup(dev) && !IS_ERR(xhci->clk)) -- 2.20.1