From patchwork Fri Apr 12 13:38:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Petrosyan X-Patchwork-Id: 10898379 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B529914DB for ; Fri, 12 Apr 2019 13:38:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9203628B74 for ; Fri, 12 Apr 2019 13:38:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8FF4028DFB; Fri, 12 Apr 2019 13:38:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2541628C9C for ; Fri, 12 Apr 2019 13:38:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726973AbfDLNit (ORCPT ); Fri, 12 Apr 2019 09:38:49 -0400 Received: from smtprelay.synopsys.com ([198.182.60.111]:41162 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726876AbfDLNit (ORCPT ); Fri, 12 Apr 2019 09:38:49 -0400 Received: from mailhost.synopsys.com (dc2-mailhost1.synopsys.com [10.12.135.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtprelay.synopsys.com (Postfix) with ESMTPS id 1143310C29D9; Fri, 12 Apr 2019 06:38:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1555076329; bh=LU2gAx+I/X/6jnrfYmmbpVF2WfkmeV+jJefdKmYPfRY=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=K5APkZfCvFerglCPohK4fagOhk9wu5v9cUGPqafTWWgXrFPeQJfeDQFbJ6gxZpnfL cJr69vScc7LAvIeX5vYveXdEAZSLrWWic9t4zgd4uaHcrShlFgO7p4UWOH4LYoYNcC XQnd/4kXIGhLbmbRyb5S4lG3qUzurWt5FfRVxUAchqylvbC6g+/c65Q1QB4edP9mmU zwlZsgst5CbN+W9qxvYp+q/ZI9Lk/h3Da5SQKMJ92xwifAzZEfugwcuj9mejYqNXmt gdf3ZHhpQtcPXjVLAa8O+gRn4c0NKEfycADc7H06SYuwgcmQMDnrRE/C//CfkJSMt8 /LXGsm3iS3LQw== Received: from us01wehtc1.internal.synopsys.com (us01wehtc1-vip.internal.synopsys.com [10.12.239.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mailhost.synopsys.com (Postfix) with ESMTPS id D709AA0070; Fri, 12 Apr 2019 13:38:48 +0000 (UTC) Received: from US01HYBRID2.internal.synopsys.com (10.15.246.24) by us01wehtc1.internal.synopsys.com (10.12.239.231) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 12 Apr 2019 06:38:48 -0700 Received: from NAM05-BY2-obe.outbound.protection.outlook.com (10.13.134.195) by mrs.synopsys.com (10.15.246.24) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 12 Apr 2019 06:38:48 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synopsys.onmicrosoft.com; s=selector1-synopsys-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LU2gAx+I/X/6jnrfYmmbpVF2WfkmeV+jJefdKmYPfRY=; b=gKB6eYcgFlmbb0HEajlm4DlXnfQy/cw+9c5DEJzOiQcOAs7K5O5qKbF5apCvtFTHGwbPdUYUUbENYW8nl53PZnDtoEg99D3hY73c282LrfEOwUvuDH9clX+qXgPPQBmfFpeHgxl1m2VHMPRoyW8YnenBtGdls6P866VjipvdjPs= Received: from SN1PR12MB2431.namprd12.prod.outlook.com (52.132.195.146) by SN1PR12MB0589.namprd12.prod.outlook.com (10.163.208.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.19; Fri, 12 Apr 2019 13:38:46 +0000 Received: from SN1PR12MB2431.namprd12.prod.outlook.com ([fe80::5ca6:ee5f:1147:df5a]) by SN1PR12MB2431.namprd12.prod.outlook.com ([fe80::5ca6:ee5f:1147:df5a%4]) with mapi id 15.20.1771.021; Fri, 12 Apr 2019 13:38:46 +0000 From: Artur Petrosyan To: Felipe Balbi , Greg Kroah-Hartman , Minas Harutyunyan , "linux-usb@vger.kernel.org" CC: John Youn , Artur Petrosyan Subject: [PATCH 02/14] usb: dwc2: Add descriptive debug messages for Partial Power Down mode. Thread-Topic: [PATCH 02/14] usb: dwc2: Add descriptive debug messages for Partial Power Down mode. Thread-Index: AQHU8TUNz/+9g0+U80Cc3M0UfRZsTQ== Date: Fri, 12 Apr 2019 13:38:46 +0000 Message-ID: <819a32be398efe3d3682d880a392a1fa54cde9df.1555075928.git.arturp@synopsys.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR08CA0109.eurprd08.prod.outlook.com (2603:10a6:800:d4::11) To SN1PR12MB2431.namprd12.prod.outlook.com (2603:10b6:802:27::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=arturp@synopsys.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [84.53.141.184] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e37b52ef-4333-44de-21e4-08d6bf4c2f35 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(2017052603328)(7193020);SRVR:SN1PR12MB0589; x-ms-traffictypediagnostic: SN1PR12MB0589: x-microsoft-antispam-prvs: x-forefront-prvs: 0005B05917 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(346002)(396003)(376002)(39840400004)(136003)(189003)(199004)(52116002)(256004)(76176011)(110136005)(81156014)(68736007)(2906002)(316002)(8936002)(99286004)(54906003)(81166006)(25786009)(86362001)(7736002)(106356001)(305945005)(97736004)(8676002)(71200400001)(478600001)(71190400001)(4326008)(107886003)(118296001)(14454004)(186003)(2501003)(105586002)(476003)(446003)(26005)(66066001)(486006)(15650500001)(386003)(5660300002)(3846002)(6506007)(6512007)(2616005)(6486002)(11346002)(36756003)(6436002)(53936002)(14444005)(6116002)(102836004);DIR:OUT;SFP:1102;SCL:1;SRVR:SN1PR12MB0589;H:SN1PR12MB2431.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: synopsys.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: BPBePV28AqE+9EUW3VE9RNiak8DaluBiL2Dsluvx69G+TXq2NjUZKI9iKtkeCgxKYSChAI9VQ8Ov9dZ2L6uzly8czw2R2NXDcRiY/mvG5fEk+9bpgdfBBjnwQ/geYDBWayQjXx+T+yKSCJQQalYebPXq/sHil1QVzRzzwowSX9J0waznB5PK9s/yKEmz6UZH95oYlrfqnj1c59oyQ4AZVFDqq4JwanMB0YwRGu8IhsyuYONzQcmfIAY+InGX328fwjd6o3WMCXwYV/7PSKtIAStDDW6RS7QGWRodEo8vYQ4jqwTeJIxwEyKA+jriUFt9Yrz0HDJL9Cy6iL8SA7YZtchKfgPMRsRu/4t9hlCTmie8Gw/nXghDoUc2UF8bOJznMsGxS7L5A+984hi+Ywc9v9H44/NSWkSPs3KIlvJoAXk= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: e37b52ef-4333-44de-21e4-08d6bf4c2f35 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Apr 2019 13:38:46.2533 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c33c9f88-1eb7-4099-9700-16013fd9e8aa X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0589 X-OriginatorOrg: synopsys.com Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Added dev_dbg() messages when entering and exiting from partial power down. It is now more visible when core enters partial power down and when exits form it. Debug messages are added in the following functions. - dwc2_exit_partial_power_down() - dwc2_enter_partial_power_down() Signed-off-by: Artur Petrosyan --- drivers/usb/dwc2/core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 55d5ae2a7ec7..fb471d18a3de 100644 --- a/drivers/usb/dwc2/core.c +++ b/drivers/usb/dwc2/core.c @@ -141,6 +141,8 @@ int dwc2_exit_partial_power_down(struct dwc2_hsotg *hsotg, bool restore) if (hsotg->params.power_down != DWC2_POWER_DOWN_PARAM_PARTIAL) return -ENOTSUPP; + dev_dbg(hsotg->dev, "Exiting of Partial Power Down started.\n"); + pcgcctl = dwc2_readl(hsotg, PCGCTL); pcgcctl &= ~PCGCTL_STOPPCLK; dwc2_writel(hsotg, pcgcctl, PCGCTL); @@ -178,6 +180,8 @@ int dwc2_exit_partial_power_down(struct dwc2_hsotg *hsotg, bool restore) } } + dev_dbg(hsotg->dev, "Exit Partial Power Down completes here.\n"); + return ret; } @@ -194,6 +198,8 @@ int dwc2_enter_partial_power_down(struct dwc2_hsotg *hsotg) if (!hsotg->params.power_down) return -ENOTSUPP; + dev_dbg(hsotg->dev, "Start of Partial Power Down completed\n"); + /* Backup all registers */ ret = dwc2_backup_global_registers(hsotg); if (ret) { @@ -238,6 +244,8 @@ int dwc2_enter_partial_power_down(struct dwc2_hsotg *hsotg) pcgcctl |= PCGCTL_STOPPCLK; dwc2_writel(hsotg, pcgcctl, PCGCTL); + dev_dbg(hsotg->dev, "Partial Power Down completed\n"); + return ret; }