From patchwork Tue Apr 22 14:41:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 28825 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E8920203AC for ; Tue, 22 Apr 2014 14:43:39 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id 29sf18362582yhl.5 for ; Tue, 22 Apr 2014 07:43:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :reply-to:references:mime-version:content-type:content-disposition :in-reply-to:user-agent:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=W2G4hmhPOeGVN3A/mcDdWjaUatrtFyNMHX8i2MmHlqI=; b=FJ8t/FxkQfqi7topyXREUgJNetOmRf1F9S0hdN17lIA/uw/dbAVQBNnC2FvihwXbEi Ssy3lI78R2csGI2BpTKLsPplxEPbq4WMsSBuljLpCxIeIaAxG/0I1nWdr3RXu/DGSbnX bLYA00EzPPHtiYDODfD+iOXIWa0UkqdyzgsF5ovwArNqWv+BHJ1AqEGWrPlCrv5n9klC MLrdbW+uvJ/bp3Oy7mXO43SWgu3qTOgM6KJzSnKxeawCw+8cYq/fmpfnh+T6psPaiCNk wzx1oKBptVO38pFyv7HPLxZkRszaox68zPlGpd40YyNNy/t5sKf0/Va6gzbMvzUukiYJ 2Caw== X-Gm-Message-State: ALoCoQnS1+lrOoAfJql8XmyWR/m2b8uWBy9JfAsjC9mk9KrkT72YbERbceF7ClrZRfv45PayBKhR X-Received: by 10.58.202.10 with SMTP id ke10mr21413008vec.8.1398177819702; Tue, 22 Apr 2014 07:43:39 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.232 with SMTP id 95ls136545qgp.68.gmail; Tue, 22 Apr 2014 07:43:39 -0700 (PDT) X-Received: by 10.58.122.164 with SMTP id lt4mr40314970veb.2.1398177819496; Tue, 22 Apr 2014 07:43:39 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id k20si6934387vcm.205.2014.04.22.07.43.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Apr 2014 07:43:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hr9so1401266vcb.15 for ; Tue, 22 Apr 2014 07:43:39 -0700 (PDT) X-Received: by 10.52.78.231 with SMTP id e7mr7322519vdx.28.1398177819415; Tue, 22 Apr 2014 07:43:39 -0700 (PDT) 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.221.72 with SMTP id ib8csp30158vcb; Tue, 22 Apr 2014 07:43:38 -0700 (PDT) X-Received: by 10.68.162.1 with SMTP id xw1mr9955495pbb.128.1398177818064; Tue, 22 Apr 2014 07:43:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e10si22997575paw.128.2014.04.22.07.43.37; Tue, 22 Apr 2014 07:43:37 -0700 (PDT) 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 S932237AbaDVOng (ORCPT + 3 others); Tue, 22 Apr 2014 10:43:36 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:40211 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751346AbaDVOnf (ORCPT ); Tue, 22 Apr 2014 10:43:35 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s3MEhRCN031628; Tue, 22 Apr 2014 09:43:27 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3MEhRj6000830; Tue, 22 Apr 2014 09:43:27 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Tue, 22 Apr 2014 09:43:26 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3MEhQ0r004116; Tue, 22 Apr 2014 09:43:26 -0500 Date: Tue, 22 Apr 2014 09:41:06 -0500 From: Felipe Balbi To: Pratyush Anand CC: Felipe Balbi , "linux-usb@vger.kernel.org" , "mathias.nyman@linux.intel.com" Subject: Re: [PATCH 3/4] dwc3: host: Set xhci lpm support quirk Message-ID: <20140422144106.GD5524@saruman.home> Reply-To: References: <46dec5d965480e9e1e4a57dc3fe6435e84d69a12.1398226042.git.pratyush.anand@st.com> <20140422044355.GA11547@saruman.home> <20140422051613.GC2871@pratyush-vbox> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140422051613.GC2871@pratyush-vbox> User-Agent: Mutt/1.5.23 (2014-03-12) 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.220.170 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: , On Tue, Apr 22, 2014 at 10:46:13AM +0530, Pratyush Anand wrote: > On Tue, Apr 22, 2014 at 12:43:55PM +0800, Felipe Balbi wrote: > > On Tue, Apr 22, 2014 at 09:57:29AM +0530, Pratyush Anand wrote: > > > All dwc3 based xhci host controller supports USB3.0 LPM functionality. > > > Therefore enable quirk flag to support it for dwc3 xhci host driver. > > > > > > Signed-off-by: Pratyush Anand > > > Tested-by: Aymen Bouattay > > > --- > > > drivers/usb/dwc3/host.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c > > > index a362ed9..b0e4669 100644 > > > --- a/drivers/usb/dwc3/host.c > > > +++ b/drivers/usb/dwc3/host.c > > > @@ -86,6 +86,7 @@ int dwc3_host_init(struct dwc3 *dwc) > > > hcd = platform_get_drvdata(xhci); > > > xhci_dev = hcd_to_xhci(hcd); > > > xhci_dev->shared_hcd->phy = dwc->usb3_phy; > > > + xhci_dev->quirks |= XHCI_LPM_SUPPORT; > > > > weird... what sort of changes do you have which you didn't send yet ? > > dwc3/host.c does not create the xHCI device. dwc3_host_init() is > > basically a wrapper to platform_add_device() > > There is nothing, and it works. > > Adding platform xhci driver in defconfig and selecting dwc3 in DT is sufficient. > Did I get, what you were asking? this little hunk below will never apply to dwc3/host.c: #include #include "core.h" int dwc3_host_init(struct dwc3 *dwc) { struct platform_device *xhci; int ret; xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); if (!xhci) { dev_err(dwc->dev, "couldn't allocate xHCI device\n"); ret = -ENOMEM; goto err0; } dma_set_coherent_mask(&xhci->dev, dwc->dev->coherent_dma_mask); xhci->dev.parent = dwc->dev; xhci->dev.dma_mask = dwc->dev->dma_mask; xhci->dev.dma_parms = dwc->dev->dma_parms; dwc->xhci = xhci; ret = platform_device_add_resources(xhci, dwc->xhci_resources, DWC3_XHCI_RESOURCES_NUM); if (ret) { dev_err(dwc->dev, "couldn't add resources to xHCI device\n"); goto err1; } ret = platform_device_add(xhci); if (ret) { dev_err(dwc->dev, "failed to register xHCI device\n"); goto err1; } return 0; err1: platform_device_put(xhci); err0: return ret; } void dwc3_host_exit(struct dwc3 *dwc) { platform_device_unregister(dwc->xhci); } as you can see, there is no such thing as xhci_dev variable. diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index a362ed9..b0e4669 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -86,6 +86,7 @@ int dwc3_host_init(struct dwc3 *dwc) hcd = platform_get_drvdata(xhci); xhci_dev = hcd_to_xhci(hcd); xhci_dev->shared_hcd->phy = dwc->usb3_phy; + xhci_dev->quirks |= XHCI_LPM_SUPPORT; here are dwc3/host.c contents as of v3.15-rc2 (removed comments)