From patchwork Thu May 26 15:23:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 626733 X-Patchwork-Delegate: treding@nvidia.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rFtG223jfz9t3x for ; Fri, 27 May 2016 01:23:38 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=CwhLNVW+; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753374AbcEZPXh (ORCPT ); Thu, 26 May 2016 11:23:37 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33365 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751545AbcEZPXf (ORCPT ); Thu, 26 May 2016 11:23:35 -0400 Received: by mail-pf0-f193.google.com with SMTP id b124so9247216pfb.0; Thu, 26 May 2016 08:23:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=x9CA/ITfRGN4lNevFSiXPPSnWRpphxm5sQecf3GSGso=; b=CwhLNVW+sM+1cBcyaFXrYIPoP85gCy7mayWxo0rdp/DJlnBzxuakcyYlta1v90tqP0 BoSL5CV5TWA6slPQdUPnnN/5q0OyiWYr4Sp3h7KeUqK87JOFfqXLXtDx3DlQlhrjVZSc N01l062v6g/SF+K8WKvyS5+kVz3yPrStdEKJ+65aJW8AEsp+MgNrwTpbu79fAldHx9qv aY1/m7jen6h3M1DplblXFxDxeUnHypuFI+ZdkssJJ/HV7q7Cd8Xmpx2sAKkEQXr9U32/ omWlQk2MZ++hECHoKrgved2MtNslViHWKtEiSiCYVC8IJWiz7GsRi1GyczX6Lfw1rFq1 f2vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=x9CA/ITfRGN4lNevFSiXPPSnWRpphxm5sQecf3GSGso=; b=UCJRg0N+d87S/cndEo+sHjChqCBgG1qKNsC57N5MiwbB7VRXR4p2YfXZ9DTks16YjB Jf7fFsh5qo/6Ur6aKnCueTiNPG5NGCXwYYbefoOpu/tm5h4qNflr9WKCMhorpO3nbwUw HaxC++L7wveZCRdFBHZshmiUra8ckQ/1jj6ugsXmqMYEwALbOOdx2VcsNo9FCVg3GfkQ +IrLD9WkTs79gn9po8FbjB/c+ncOtjN4pprYjwKA/wZBHV7j1YDV/jVLE8Tgy9iKxHZL zD9EwOl7y5nyXgJG4AGCw2BIJunpWntJnnFwmtWIcD3sCIeX1CxVAuKhLStpG5nNa0wp KPEQ== X-Gm-Message-State: ALyK8tLO94wP31bN38PKx2YeBhIGOne8B/P4uf8UzBiY1+DpJrGzlAFhmyolnv9175wohg== X-Received: by 10.98.29.77 with SMTP id d74mr14913460pfd.164.1464276214681; Thu, 26 May 2016 08:23:34 -0700 (PDT) Received: from localhost (port-54928.pppoe.wtnet.de. [46.59.215.64]) by smtp.gmail.com with ESMTPSA id hk7sm21355689pad.25.2016.05.26.08.23.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 May 2016 08:23:33 -0700 (PDT) From: Thierry Reding To: Alan Stern , Greg Kroah-Hartman Cc: Stephen Warren , Thierry Reding , Alexandre Courbot , Jon Hunter , linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH v4 1/2] usb: host: ehci-tegra: Grab the correct UTMI pads reset Date: Thu, 26 May 2016 17:23:29 +0200 Message-Id: <20160526152330.10929-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.8.3 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org From: Thierry Reding There are three EHCI controllers on Tegra SoCs, each with its own reset line. However, the first controller contains a set of UTMI configuration registers that are shared with its siblings. These registers will only be reset as part of the first controller's reset. For proper operation it must be ensured that the UTMI configuration registers are reset before any of the EHCI controllers are enabled, irrespective of the probe order. Commit a47cc24cd1e5 ("USB: EHCI: tegra: Fix probe order issue leading to broken USB") introduced code that ensures the first controller is always reset before setting up any of the controllers, and is never again reset afterwards. This code, however, grabs the wrong reset. Each EHCI controller has two reset controls attached: 1) the USB controller reset and 2) the UTMI pads reset (really the first controller's reset). In order to reset the UTMI pads registers the code must grab the second reset, but instead it grabbing the first. Fixes: a47cc24cd1e5 ("USB: EHCI: tegra: Fix probe order issue leading to broken USB") Acked-by: Jon Hunter Cc: stable@vger.kernel.org Signed-off-by: Thierry Reding --- Changes in v4: - add stable@vger.kernel.org to stable and add Fixes: tag - add Jon's Acked-by drivers/usb/host/ehci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 4031b372008e..c1c1024a054c 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -89,7 +89,7 @@ static int tegra_reset_usb_controller(struct platform_device *pdev) if (!usb1_reset_attempted) { struct reset_control *usb1_reset; - usb1_reset = of_reset_control_get(phy_np, "usb"); + usb1_reset = of_reset_control_get(phy_np, "utmi-pads"); if (IS_ERR(usb1_reset)) { dev_warn(&pdev->dev, "can't get utmi-pads reset from the PHY\n");