Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp47156pxu; Tue, 24 Nov 2020 18:10:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7tiS9GbDJhF8SzP95NYtHtE4iugX48mbTvVEwUKSng7AKM5MwFC2Gtk3FtReE+dthwXnR X-Received: by 2002:a17:906:3648:: with SMTP id r8mr1215697ejb.145.1606270249227; Tue, 24 Nov 2020 18:10:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606270249; cv=none; d=google.com; s=arc-20160816; b=mQQXUzBM9DBiQaqUVq/XavWiJ30dj9GTE7kIxuDv++JL5kZX4zrRC2o80tId9fROB7 fIQ33VV0VmybSSSBhtwpNzjW/9duOKzYN+CCCFS8aM4dzgtPMzMfshErVK/qDKVvC7Fi IccMTI/oNGNi/nh6CX97IQIsE5whY+WvysSVFMvwsz9JLNgidFi+j85nhTRd5GkI4z4P hKHVrmypOIde5IRqNibLCo1pe9qjkzWq0QaCIivi/7dit4II8p2qt8SLYZkG3+1JF7k9 7OU8Tu1Wqao1PT111NUWPZcctpFCAsj9G6wSJ4uikpadgw3jzI2AmgvJx6UHR8ei8s/l KdBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=DT2VV0QdqZenIkzRRGGu7GK5OFXsOFdMYtbDob6PZ60=; b=KKagIpGL5M9wuPbGaDjtKjh2OiToJFjohqwIf0/tLY5Rxyx1JzOnWBIteegMDlmoM5 Z589fSlDOcJveYprhZ/Y2K96t7OzRULE2sjJSYAFlFiygTLvTpS8QjTmz46pCoT5RwR7 Y9OtU/JzVEdIT3We2VKu+pY+KmPzAZI9j0bMjONwM20DZpIC9P/weJxBS/HMLj4WvDZl F4VcuYKCjfK30lPDBsHHdsmqhmp5WonPJ79QauRg4CKKTvpuCGwPfrbZuGh8NPYaIkEe J2YUYZ+YMYikwu4osPyVGQzg7YyVjg6zbrKgzyokBZdLgIdlETbY+Ofnp1IwDGbNz+8n 1FAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=e7lDpzYx; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q7si361012edc.249.2020.11.24.18.10.26; Tue, 24 Nov 2020 18:10:49 -0800 (PST) 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=@mg.codeaurora.org header.s=smtp header.b=e7lDpzYx; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726908AbgKYCDM (ORCPT + 99 others); Tue, 24 Nov 2020 21:03:12 -0500 Received: from z5.mailgun.us ([104.130.96.5]:34772 "EHLO z5.mailgun.us" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726155AbgKYCDM (ORCPT ); Tue, 24 Nov 2020 21:03:12 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1606269791; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=DT2VV0QdqZenIkzRRGGu7GK5OFXsOFdMYtbDob6PZ60=; b=e7lDpzYxShsTeTgR+NUd7wfHCNtC4cyeHdKp4rE3cvHbIV4+yROPcdu76gwuYWK1KvBk6H8R oRHgrKFO92I6V77lyhb2xPvu7j26co5ERTUPMmCTBKmtGYW9UttMVaHijFTGa6U5+EBOFuqa +L2/2+J8hXdmg9zgwgikk7eshD4= X-Mailgun-Sending-Ip: 104.130.96.5 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-west-2.postgun.com with SMTP id 5fbdbb3deb04c00160615dd7 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 25 Nov 2020 02:02:37 GMT Sender: hongwus=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id BBC87C43460; Wed, 25 Nov 2020 02:02:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: hongwus) by smtp.codeaurora.org (Postfix) with ESMTPSA id 042DFC433C6; Wed, 25 Nov 2020 02:02:36 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 25 Nov 2020 10:02:36 +0800 From: hongwus@codeaurora.org To: Can Guo Cc: asutoshd@codeaurora.org, nguyenb@codeaurora.org, ziqichen@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, Andy Gross , Bjorn Andersson , Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] scsi: ufs-qcom: Keep core_clk_unipro ON while link is active In-Reply-To: <1606202906-14485-3-git-send-email-cang@codeaurora.org> References: <1606202906-14485-1-git-send-email-cang@codeaurora.org> <1606202906-14485-3-git-send-email-cang@codeaurora.org> Message-ID: X-Sender: hongwus@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-11-24 15:28, Can Guo wrote: > If we want to disable clocks to save power but still keep the link > active, > core_clk_unipro, as same as ref_clk, should not be the one being > disabled. > > Signed-off-by: Can Guo > --- > drivers/scsi/ufs/ufs-qcom.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c > index f9d6ef3..70df357 100644 > --- a/drivers/scsi/ufs/ufs-qcom.c > +++ b/drivers/scsi/ufs/ufs-qcom.c > @@ -977,6 +977,7 @@ static int ufs_qcom_init(struct ufs_hba *hba) > struct platform_device *pdev = to_platform_device(dev); > struct ufs_qcom_host *host; > struct resource *res; > + struct ufs_clk_info *clki; > > if (strlen(android_boot_dev) && strcmp(android_boot_dev, > dev_name(dev))) > return -ENODEV; > @@ -1075,6 +1076,11 @@ static int ufs_qcom_init(struct ufs_hba *hba) > } > } > > + list_for_each_entry(clki, &hba->clk_list_head, list) { > + if (!strcmp(clki->name, "core_clk_unipro")) > + clki->always_on_while_link_active = true; > + } > + > err = ufs_qcom_init_lane_clks(host); > if (err) > goto out_variant_clear; Reviewed-by: Hongwu Su