Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1504180

Re: [PATCH 08/10] ufs-qcom: phy/hcd: Refactoring phy clock handling

From Vivek Gautam <vivek.gautam@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH 08/10] ufs-qcom: phy/hcd: Refactoring phy clock handling
Date 2016-10-19 19:50 +0200
Message-ID <su3a1-4te-7@gated-at.bofh.it> (permalink)
References <stDyW-2Sj-5@gated-at.bofh.it> <stDyX-2Sj-43@gated-at.bofh.it> <stJ1D-6T9-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,


On Wed, Oct 19, 2016 at 1:43 AM, Subhash Jadavani
<subhashj@codeaurora.org> wrote:
> On 2016-10-18 07:28, Vivek Gautam wrote:
>>
>> Add phy clock enable code to phy_power_on/off callbacks, and
>> remove explicit calls to enable these phy clocks from the
>> ufs-qcom hcd driver.
>>
>> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
>> ---
>>
>> Changes since v1:
>>  - staticized ufs_qcom_phy_enable(/disable)_ref_clk(),
>>  - staticized ufs_qcom_phy_enable(/disable)_iface_clk()
>>  - removed function declaration and export symbol for these APIs.

[snip]

>> --- a/drivers/scsi/ufs/ufs-qcom.c
>> +++ b/drivers/scsi/ufs/ufs-qcom.c
>> @@ -1112,17 +1112,6 @@ static int ufs_qcom_setup_clocks(struct ufs_hba
>> *hba, bool on)
>>                 return 0;
>>
>>         if (on) {
>> -               err = ufs_qcom_phy_enable_iface_clk(host->generic_phy);
>> -               if (err)
>> -                       goto out;
>> -
>> -               err = ufs_qcom_phy_enable_ref_clk(host->generic_phy);
>> -               if (err) {
>> -                       dev_err(hba->dev, "%s enable phy ref clock failed,
>> err=%d\n",
>> -                               __func__, err);
>> -                       ufs_qcom_phy_disable_iface_clk(host->generic_phy);
>> -                       goto out;
>> -               }
>
>
> Now that you are moving these ref clk enable/disable to phy_power_on/off and
> these phy_power_on/off are called only in runtime suspend/resume (3 seconds
> after last UFS access).
> Goal is to disable the phy reference clock during aggressive gating (10ms
> from last UFS access) so shouldn't we call the phy_power_on/off from these
> setup_clocks() function as well?
>

So setup_clocks() is called for aggressive clock gating as well ?
If that's the case then yes, we may need to call. But we should try to
understand here. The phy_power_off turns off all the clocks - reflclk,
and other interface clocks. Do we want all of them to be turned off ?

phy_power_off will also turn off the PHY. Do we want all this for aggressive
clock gating ?


[snip]


Regards
Vivek

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/10] ufs-qcom: phy/hcd: Clean up qcom-ufs phy and ufs-qcom hcd Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-18 16:30 +0200
  [PATCH v2 07/10] phy: qcom-ufs-qmp-xx: Move clock and regulator init out of phy init Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-18 16:30 +0200
  [PATCH v2 02/10] phy: qcom-ufs: Remove unnecessary BUG_ON Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-18 16:30 +0200
  [PATCH v2 01/10] phy: qcom-ufs: remove failure when rx/tx_iface_clk are absent Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-18 16:30 +0200
    Re: [PATCH v2 01/10] phy: qcom-ufs: remove failure when  rx/tx_iface_clk are absent Subhash Jadavani <subhashj@codeaurora.org> - 2016-10-18 20:40 +0200
    Re: [PATCH v2 01/10] phy: qcom-ufs: remove failure when  rx/tx_iface_clk are absent Stephen Boyd <sboyd@codeaurora.org> - 2016-10-18 23:20 +0200
      Re: [PATCH v2 01/10] phy: qcom-ufs: remove failure when  rx/tx_iface_clk are absent Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-19 19:30 +0200
  [PATCH v2 10/10] phy: qcom-ufs: Remove common layer phy exit callback Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-18 16:30 +0200
    Re: [PATCH v2 10/10] phy: qcom-ufs: Remove common layer phy exit  callback Subhash Jadavani <subhashj@codeaurora.org> - 2016-10-19 02:10 +0200
  [PATCH 08/10] ufs-qcom: phy/hcd: Refactoring phy clock handling Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-18 16:30 +0200
    Re: [PATCH 08/10] ufs-qcom: phy/hcd: Refactoring phy clock handling Subhash Jadavani <subhashj@codeaurora.org> - 2016-10-18 22:20 +0200
      Re: [PATCH 08/10] ufs-qcom: phy/hcd: Refactoring phy clock handling Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-19 19:50 +0200
        Re: [PATCH 08/10] ufs-qcom: phy/hcd: Refactoring phy clock handling Subhash Jadavani <subhashj@codeaurora.org> - 2016-10-19 21:20 +0200
          Re: [PATCH 08/10] ufs-qcom: phy/hcd: Refactoring phy clock handling Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-20 05:50 +0200
  [PATCH v2 06/10] phy: qcom-ufs: Remove unnecessary function declarations Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-18 16:30 +0200
    Re: [PATCH v2 06/10] phy: qcom-ufs: Remove unnecessary function  declarations Subhash Jadavani <subhashj@codeaurora.org> - 2016-10-18 20:50 +0200
  [PATCH v2 05/10] phy: qcom-ufs: Cleanup clock and regulator initialization Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-18 16:40 +0200
  [PATCH v2 04/10] phy: qcom-ufs-qmp-xx: Discard remove callback for drivers. Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-18 16:40 +0200
    Re: [PATCH v2 04/10] phy: qcom-ufs-qmp-xx: Discard remove callback  for drivers. Kishon Vijay Abraham I <kishon@ti.com> - 2016-10-26 22:30 +0200
  [PATCH v2 09/10] scsi/ufs: qcom: Add phy_exit call in hcd exit path Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-18 16:40 +0200
    Re: [PATCH v2 09/10] scsi/ufs: qcom: Add phy_exit call in hcd exit  path Subhash Jadavani <subhashj@codeaurora.org> - 2016-10-18 22:20 +0200
  Re: [PATCH v2 00/10] ufs-qcom: phy/hcd: Clean up qcom-ufs phy and ufs-qcom hcd "Martin K. Petersen" <martin.petersen@oracle.com> - 2016-10-25 02:50 +0200
    Re: [PATCH v2 00/10] ufs-qcom: phy/hcd: Clean up qcom-ufs phy and  ufs-qcom hcd Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-25 08:10 +0200

csiph-web