Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759556AbcCDSXq (ORCPT ); Fri, 4 Mar 2016 13:23:46 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:36607 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758360AbcCDSXc (ORCPT ); Fri, 4 Mar 2016 13:23:32 -0500 From: Douglas Anderson To: johnyoun@synopsys.com, balbi@kernel.org, Heiko Stuebner Cc: linux@mniewoehner.de, caesar.upstream@gmail.com, huangtao@rock-chips.com, repk@triplefau.lt, stefan.wahren@i2se.com, Julius Werner , Douglas Anderson , gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFT PATCH 2/2] Revert "usb: dwc2: Fix probe problem on bcm2835" Date: Fri, 4 Mar 2016 10:23:06 -0800 Message-Id: <1457115786-11370-2-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: <1457115786-11370-1-git-send-email-dianders@chromium.org> References: <1457115786-11370-1-git-send-email-dianders@chromium.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 941 Lines: 28 This reverts commit 192cb07f7928 ("usb: dwc2: Fix probe problem on bcm2835") now that we've found the root cause. See the change titled ("usb: dwc2: Add a 10 ms delay to dwc2_core_reset()"). Signed-off-by: Douglas Anderson --- drivers/usb/dwc2/core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 8710b2d3e770..7c4a6cf4c73a 100644 --- a/drivers/usb/dwc2/core.c +++ b/drivers/usb/dwc2/core.c @@ -353,6 +353,12 @@ static bool dwc2_force_mode(struct dwc2_hsotg *hsotg, bool host) set = host ? GUSBCFG_FORCEHOSTMODE : GUSBCFG_FORCEDEVMODE; clear = host ? GUSBCFG_FORCEDEVMODE : GUSBCFG_FORCEHOSTMODE; + /* + * If the force mode bit is already set, don't set it. + */ + if ((gusbcfg & set) && !(gusbcfg & clear)) + return false; + gusbcfg &= ~clear; gusbcfg |= set; dwc2_writel(gusbcfg, hsotg->regs + GUSBCFG); -- 2.7.0.rc3.207.g0ac5344