Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2658285pxb; Tue, 13 Apr 2021 07:13:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1tVkg/dY8AzHA/LsDcJujzym2EF1z0G8/64BdBhXvhw9V0+bNLFl+Vm/VaL72o7ddRfpN X-Received: by 2002:aa7:d14f:: with SMTP id r15mr20828305edo.130.1618323212442; Tue, 13 Apr 2021 07:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618323212; cv=none; d=google.com; s=arc-20160816; b=kjKX4Km81h2a1g39Jrp7LJKpnw8Ptg5DBNIFwkcbOrTs0KbKX9CsPd21YiXH/RhJEn tz8AK030EMSvbXE+8B9OTmGda4mmxkH/pEVvqsHQPxNP0SrscwM7RQd1bm2aT+5Wr3kq RoIL8V6Ry+Krj3+xD88uI3BtSSjaOg2xqsssTYzVcmmQMFrP3t8mkz7TCjAZKwKrEEJz Yt8coFbfrWibkcyeXKoid/ftnoQ3liQ0U+nItsbhal6YUvpLAE6e7gWmly0zP2V0Yacy Jx4kzBRE9pq1Hl1FtVNkvHMnZk9sMFg3rqbnBrBzg1ynM001g+kV4hNmo4ZVQBZtt2Zq zWZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=FwfRq003k7c0sRHU/LeK71oNXIIg9f2Cbnxik0Fz0nQ=; b=KsGq9XoaI2IgJ2cp0r51dz4zkXtoWzhFVthCR3eJumFcqs1nxiZRu/rnvAraAQdSFy E7Os0TwOVhYjy7zSeK5qqCEX+9SRvdFrlt7lqdr8IhqgSpWyh0ghjt4zUHQzFKDLe/sU dfLeZ9lcuQqbNDpLuBFxnEoqM22qawG0fxVBq50DUHa7DYgQyKuHgUfL0LzYGV6ihivQ y/iYgCE05d3A6hbBPZT4wga0LJD5ADPUJEculG5jkwzWpK9hAnqN6zA7xlPJ/wjcSu6E GYFVtPX5jGJVIQyPrSev3xxBsfNShWI9IuarFU8k+VzHXxB0z34kOMKcrr36BgPsKJtB fuyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="sX9K/Ljt"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id el22si6071323ejc.48.2021.04.13.07.13.09; Tue, 13 Apr 2021 07:13:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="sX9K/Ljt"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238905AbhDMJXE (ORCPT + 99 others); Tue, 13 Apr 2021 05:23:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229641AbhDMJXC (ORCPT ); Tue, 13 Apr 2021 05:23:02 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1428C061574; Tue, 13 Apr 2021 02:22:42 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id 12so26099774lfq.13; Tue, 13 Apr 2021 02:22:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FwfRq003k7c0sRHU/LeK71oNXIIg9f2Cbnxik0Fz0nQ=; b=sX9K/Ljtw95FMyxwNsVeoUIlNF84+/1r6bcvSO2rZa/nVv3pL8NFbCap12feHhWX6w Uwap89QRhz3qiiB+KT8l3PcB4khbA8iSdLl2EwFlhLAc3QzDlcbpnFqsa+xd/7jn9nnt vaydNMI+Pw15HYPTB7RvIcQ0HNSHwve/2fwxG6xPxHe24sIV0cCNDiRHYMXiBgkSAX25 TPu3zwBrZhJSCyPms4AxExcU9BOBE8aVf6GFFb0kN8FyTl3Q1n4CuNqER90h87T32psb WLK1eae0UejYFG21t8RQmGKlQXJoe25PnUAe8n7fogtci1wksP578IkXtPe9pecJrlY5 b1Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=FwfRq003k7c0sRHU/LeK71oNXIIg9f2Cbnxik0Fz0nQ=; b=Ut5LiG9HSmapLxASegmDXM7Z6oVEA4aIQQ/dTshreFjuWiwP6KHzOEuTVcxtA9k6Mn a3nxIcWFVKP0dfbLBolvy6XvYn4m5u99wlFXEKk2zgTA/VD286/EY9BRZC+VgR06IQCL z8edKcGj6TlT2LuScy9UGFw3tE8JilVZ8rL77SqqKNQvOokmlyfSUVxmPSpkUNY5JNa8 OUwZCFQodbJecUAAfiAxQEdmEkeRcCRPT5TT21PbvmqxEqqOQ5Jh6mYEz3W9gfyeB85p NCogf3ec+sRSASI5peEsEQjsnZzRb3Y2Jiw+hwWPaEwB1qIfAxnm32elibD8REL9wS0t Atkw== X-Gm-Message-State: AOAM530A7tqbKk/B3EVblKKovwg4knn4niQDroMjFbZBuLVi3wV+amuB oq5mzbNgFEVtVBy+j7mDW8s= X-Received: by 2002:a05:6512:1324:: with SMTP id x36mr19139873lfu.189.1618305761247; Tue, 13 Apr 2021 02:22:41 -0700 (PDT) Received: from [192.168.1.100] ([178.176.76.152]) by smtp.gmail.com with ESMTPSA id u25sm3167643lfu.293.2021.04.13.02.22.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Apr 2021 02:22:40 -0700 (PDT) Subject: Re: [PATCH 07/12] usb: dwc2: Update enter clock gating when port is suspended To: Artur Petrosyan , Felipe Balbi , Greg Kroah-Hartman , Minas Harutyunyan , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: John Youn References: <9ed1da9780cddf995841cc5867f195024f5a16d9.1618297800.git.Arthur.Petrosyan@synopsys.com> From: Sergei Shtylyov Organization: Brain-dead Software Message-ID: <2dc3798a-6a89-b363-aade-e127decfdf20@gmail.com> Date: Tue, 13 Apr 2021 12:22:35 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <9ed1da9780cddf995841cc5867f195024f5a16d9.1618297800.git.Arthur.Petrosyan@synopsys.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On 13.04.2021 10:17, Artur Petrosyan wrote: > Updates the implementation of entering clock gating mode > when core receives port suspend. > Instead of setting the required bit fields of the registers > inline, called the "dwc2_host_enter_clock_gating()" function. > > Signed-off-by: Artur Petrosyan > --- > drivers/usb/dwc2/hcd.c | 19 ++++--------------- > 1 file changed, 4 insertions(+), 15 deletions(-) > > diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c > index 27f030d5de54..e1225fe6c61a 100644 > --- a/drivers/usb/dwc2/hcd.c > +++ b/drivers/usb/dwc2/hcd.c [...] > @@ -3323,22 +3322,12 @@ int dwc2_port_suspend(struct dwc2_hsotg *hsotg, u16 windex) > break; > case DWC2_POWER_DOWN_PARAM_HIBERNATION: > case DWC2_POWER_DOWN_PARAM_NONE: > - default: > - hprt0 = dwc2_read_hprt0(hsotg); > - hprt0 |= HPRT0_SUSP; > - dwc2_writel(hsotg, hprt0, HPRT0); > - hsotg->bus_suspended = true; > /* > - * If power_down is supported, Phy clock will be suspended > - * after registers are backuped. > + * If not hibernation nor partial power down are supported, s/not/neither/? MBR, Sergei