From patchwork Fri Oct 17 17:16:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 38980 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B7E30202DB for ; Fri, 17 Oct 2014 17:19:55 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id m15sf721413wgh.7 for ; Fri, 17 Oct 2014 10:19:54 -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: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=+wW3G1TMy+iPG10N93sOVXR3wrkpGRzGKEvJXwbK0/s=; b=IyW8Blq1YtvyP+td4trmG1ZBNerG3pM2ucxcPFYFg6/LXQ+1sqq3ckdwKjRc34e9Yi zu2f1lUUd1CWVKI2ZlKdChx0WmB0jRvDLPChYXYM4Om0+kQz9p0rO26F3eOx74OL8hKd d0sWuIDnZdZEsFPPErUK1zMM7iOvxRRsmuqhblEfId6HXQewT0TZkziO9e589O5a42yo 9XrExNczHGcKaQPKqJ3NCiK5LOiUx/dTczuu2vmWKKJqM+u9L2CZUdYZor90P3701ktk eifmuwZR43iLv/0xQLYO6+mtnSXGiHq3dQZUXJ9mg28ykX1ekVDYASOaD0och+nFufpe IZ4w== X-Gm-Message-State: ALoCoQl184rQyJAWENxVCpK5CC3jas+vfkNClnsz7NE0i+ZnniK9X/swJh0RDKriorr4ijD5pTCE X-Received: by 10.112.95.133 with SMTP id dk5mr1595038lbb.3.1413566394797; Fri, 17 Oct 2014 10:19:54 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.5 with SMTP id f5ls273073lah.62.gmail; Fri, 17 Oct 2014 10:19:54 -0700 (PDT) X-Received: by 10.152.30.33 with SMTP id p1mr10085179lah.78.1413566394659; Fri, 17 Oct 2014 10:19:54 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id ue9si3043005lac.20.2014.10.17.10.19.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 10:19:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id pn19so1063926lab.14 for ; Fri, 17 Oct 2014 10:19:54 -0700 (PDT) X-Received: by 10.153.8.164 with SMTP id dl4mr10228240lad.29.1413566394584; Fri, 17 Oct 2014 10:19:54 -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.112.84.229 with SMTP id c5csp268388lbz; Fri, 17 Oct 2014 10:19:53 -0700 (PDT) X-Received: by 10.68.221.162 with SMTP id qf2mr4359711pbc.152.1413566393048; Fri, 17 Oct 2014 10:19:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ap1si1616281pbc.152.2014.10.17.10.19.52 for ; Fri, 17 Oct 2014 10:19:53 -0700 (PDT) Received-SPF: none (google.com: linux-usb-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753471AbaJQRRx (ORCPT + 3 others); Fri, 17 Oct 2014 13:17:53 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:44297 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752638AbaJQRRk (ORCPT ); Fri, 17 Oct 2014 13:17:40 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9HHHRVS008009; Fri, 17 Oct 2014 12:17:27 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHHQVt029173; Fri, 17 Oct 2014 12:17:26 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Fri, 17 Oct 2014 12:17:26 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHHPTV030532; Fri, 17 Oct 2014 12:17:26 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Greg KH , , Paul Zimmerman , , , , , , , Felipe Balbi Subject: [PATCH 01/67] usb: dwc3: core: write LINUX_VERSION_CODE to our GUID register Date: Fri, 17 Oct 2014 12:16:08 -0500 Message-ID: <1413566234-13537-2-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT In-Reply-To: <1413566234-13537-1-git-send-email-balbi@ti.com> References: <1413566234-13537-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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) 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: , DWC3's GUID register is supposed to be used to write any sort of version we might want. It helps when getting bug reports for platforms you don't have HW to know which kernel version of the driver was running on the platform. Because we don't really track driver version, but we _do_ track the kernel version, let's write LINUX_VERSION_CODE to that register and use it for debugging. Reviewed-by: Paul Zimmerman Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index b0f4d52..ddfe771 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -19,6 +19,7 @@ * along with this program. If not, see . */ +#include #include #include #include @@ -384,6 +385,12 @@ static int dwc3_core_init(struct dwc3 *dwc) } dwc->revision = reg; + /* + * Write Linux Version Code to our GUID register so it's easy to figure + * out which kernel version a bug was found. + */ + dwc3_writel(dwc->regs, DWC3_GUID, LINUX_VERSION_CODE); + /* Handle USB2.0-only core configuration */ if (DWC3_GHWPARAMS3_SSPHY_IFC(dwc->hwparams.hwparams3) == DWC3_GHWPARAMS3_SSPHY_IFC_DIS) {