From patchwork Tue Feb 25 19:40:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 25307 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4372E20143 for ; Tue, 25 Feb 2014 19:42:21 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id o6sf3346809oag.6 for ; Tue, 25 Feb 2014 11:42:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=c8NX8hvHSyzEmqBmPEx87fVk5UWLsSksGrbnWxa1Bfw=; b=irDcbcJPoqfwQ9s+PaAQ2GCZVzc58RghUx1sD52LNvR58lrWlCEUjlEtt4uY0HoTaV gCYcSAIF1YTE/deKGG+LQHXSukCMGxXopa+Xt9nsJLa5ztotKtgJqt4+9+yk9mGZWhfk XD+SwtMvh14u2ko944cFUr9KiwkF0zqYuFcYyQnGecFy+8/nHVLJo46oRznibXhib5Hk LgReYrXtplNfECsDAZWxyHgcvqyUtfMvx0eqt5GD3P9z2FVRjIN63pjgMd6ZB615GX1/ effxriaKe5Db/F/cSbMXBWcXmysp1vdEjukcg5eO9Cqml0dnX+ZYLIAoq9+haOgHOZIX yL3g== X-Gm-Message-State: ALoCoQl5IADcjn6VPsUmhiZox4z7qUtoIsz9+672Fqw8Qhwe1oEBL2OAsduJpus5oA82QziDlMYY X-Received: by 10.43.92.73 with SMTP id bp9mr661254icc.26.1393357340795; Tue, 25 Feb 2014 11:42:20 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.36.7 with SMTP id o7ls2493388qgo.15.gmail; Tue, 25 Feb 2014 11:42:20 -0800 (PST) X-Received: by 10.58.59.100 with SMTP id y4mr2400668veq.4.1393357340658; Tue, 25 Feb 2014 11:42:20 -0800 (PST) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id tr5si7082132vdc.0.2014.02.25.11.42.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 11:42:20 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id jw12so1014184veb.18 for ; Tue, 25 Feb 2014 11:42:20 -0800 (PST) X-Received: by 10.52.118.242 with SMTP id kp18mr1969010vdb.27.1393357340567; Tue, 25 Feb 2014 11:42:20 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp163114vcz; Tue, 25 Feb 2014 11:42:20 -0800 (PST) X-Received: by 10.68.171.4 with SMTP id aq4mr1646205pbc.150.1393357339722; Tue, 25 Feb 2014 11:42:19 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tm9si21575346pab.250.2014.02.25.11.42.19; Tue, 25 Feb 2014 11:42:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753468AbaBYTmR (ORCPT + 3 others); Tue, 25 Feb 2014 14:42:17 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:53841 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753463AbaBYTmP (ORCPT ); Tue, 25 Feb 2014 14:42:15 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1PJgFt4028783 for ; Tue, 25 Feb 2014 13:42:15 -0600 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1PJgFWU026962 for ; Tue, 25 Feb 2014 13:42:15 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Tue, 25 Feb 2014 13:42:14 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1PJgEhU029284; Tue, 25 Feb 2014 13:42:14 -0600 From: Felipe Balbi To: Linux USB Mailing List CC: Felipe Balbi Subject: [PATCH 07/11] usb: dwc3: core: enable Suspend bit for USB2/3 PHYs Date: Tue, 25 Feb 2014 13:40:39 -0600 Message-ID: <1393357243-2958-8-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1393357243-2958-1-git-send-email-balbi@ti.com> References: <1393357243-2958-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , That bit still needs to be set for recent versions of the IP. When necessary, IP will automatically take PHYs out of suspend. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 2864aad..745c1a0 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -412,6 +412,14 @@ static int dwc3_core_init(struct dwc3 *dwc) dwc3_writel(dwc->regs, DWC3_GCTL, reg); + reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); + reg |= DWC3_GUSB3PIPECTL_SUSPHY; + dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); + + reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); + reg |= DWC3_GUSB2PHYCFG_SUSPHY; + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); + ret = dwc3_alloc_scratch_buffers(dwc); if (ret) goto err1;