All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Ulf Hansson <ulf.hansson@linaro.org>, Kamal Dasu <kdasu.kdev@gmail.com>
Cc: robh+dt@kernel.org, krzk+dt@kernel.org, alcooperx@gmail.com,
	bcm-kernel-feedback-list@broadcom.com, adrian.hunter@intel.com,
	linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/4] mmc: sdhci-brcmstb: Enable Clock Gating to save power
Date: Wed, 27 Apr 2022 14:43:46 -0700	[thread overview]
Message-ID: <96eef806-72df-71bc-8abb-70c26e947b3d@gmail.com> (raw)
In-Reply-To: <CAPDyKFrW7DHzc32BYE5ZiPdOdMWqGo1ch4CZZHaM1jVNjpvpWw@mail.gmail.com>

On 4/27/22 14:39, Ulf Hansson wrote:
> On Wed, 27 Apr 2022 at 20:09, Kamal Dasu <kdasu.kdev@gmail.com> wrote:
>>
>> From: Al Cooper <alcooperx@gmail.com>
>>
>> Enabling this feature will allow the controller to stop the bus
>> clock when the bus is idle. The feature is not part of the standard
>> and is unique to newer Arasan cores and is enabled with a bit in a
>> vendor specific register. This feature will only be enabled for
>> non-removable devices because they don't switch the voltage and
>> clock gating breaks SD Card volatge switching.
> 
> Rather than using a HW specific thing for this, it may be better to
> use runtime PM. There are plenty of examples to get inspired from, so
> it should be rather easy to implement, I think. More importantly, it
> should work for both (e)MMC and SD cards, unless there are some
> specific things to manage for this controller.
> 
> When it comes to SDIO, some driver simply bumps the runtime PM usage
> count (pm_runtime_get_noresume()) to prevent the device from being
> runtime suspended. There are ways to work around this, let me know if
> you need some guidance around how to fix that too.
> 
> That said, I am not entirely opposed to $subject patch, but I wanted
> to point out that there are better alternatives.

This is a good suggestion, I would not consider runtime PM and enabling 
the clock gating as being alternatives to one another, but rather 
complementary.
-- 
Florian

WARNING: multiple messages have this Message-ID (diff)
From: Florian Fainelli <f.fainelli@gmail.com>
To: Ulf Hansson <ulf.hansson@linaro.org>, Kamal Dasu <kdasu.kdev@gmail.com>
Cc: robh+dt@kernel.org, krzk+dt@kernel.org, alcooperx@gmail.com,
	bcm-kernel-feedback-list@broadcom.com, adrian.hunter@intel.com,
	linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/4] mmc: sdhci-brcmstb: Enable Clock Gating to save power
Date: Wed, 27 Apr 2022 14:43:46 -0700	[thread overview]
Message-ID: <96eef806-72df-71bc-8abb-70c26e947b3d@gmail.com> (raw)
In-Reply-To: <CAPDyKFrW7DHzc32BYE5ZiPdOdMWqGo1ch4CZZHaM1jVNjpvpWw@mail.gmail.com>

On 4/27/22 14:39, Ulf Hansson wrote:
> On Wed, 27 Apr 2022 at 20:09, Kamal Dasu <kdasu.kdev@gmail.com> wrote:
>>
>> From: Al Cooper <alcooperx@gmail.com>
>>
>> Enabling this feature will allow the controller to stop the bus
>> clock when the bus is idle. The feature is not part of the standard
>> and is unique to newer Arasan cores and is enabled with a bit in a
>> vendor specific register. This feature will only be enabled for
>> non-removable devices because they don't switch the voltage and
>> clock gating breaks SD Card volatge switching.
> 
> Rather than using a HW specific thing for this, it may be better to
> use runtime PM. There are plenty of examples to get inspired from, so
> it should be rather easy to implement, I think. More importantly, it
> should work for both (e)MMC and SD cards, unless there are some
> specific things to manage for this controller.
> 
> When it comes to SDIO, some driver simply bumps the runtime PM usage
> count (pm_runtime_get_noresume()) to prevent the device from being
> runtime suspended. There are ways to work around this, let me know if
> you need some guidance around how to fix that too.
> 
> That said, I am not entirely opposed to $subject patch, but I wanted
> to point out that there are better alternatives.

This is a good suggestion, I would not consider runtime PM and enabling 
the clock gating as being alternatives to one another, but rather 
complementary.
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-04-27 21:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 18:08 [PATCH v2 0/4] mmc: sdhci-brcmstb: host controller clock enhancements Kamal Dasu
2022-04-27 18:08 ` Kamal Dasu
2022-04-27 18:08 ` [PATCH v2 1/4] mmc: sdhci-brcmstb: Re-organize flags Kamal Dasu
2022-04-27 18:08   ` Kamal Dasu
2022-05-04 10:37   ` Ulf Hansson
2022-05-04 10:37     ` Ulf Hansson
2022-04-27 18:08 ` [PATCH v2 2/4] mmc: sdhci-brcmstb: Enable Clock Gating to save power Kamal Dasu
2022-04-27 18:08   ` Kamal Dasu
2022-04-27 21:39   ` Ulf Hansson
2022-04-27 21:39     ` Ulf Hansson
2022-04-27 21:43     ` Florian Fainelli [this message]
2022-04-27 21:43       ` Florian Fainelli
2022-05-04 10:37   ` Ulf Hansson
2022-05-04 10:37     ` Ulf Hansson
2022-04-27 18:08 ` [PATCH v2 3/4] dt-bindings: mmc: Add Broadcom optional sdio_freq clock Kamal Dasu
2022-04-27 18:08   ` Kamal Dasu
2022-04-28  8:12   ` Krzysztof Kozlowski
2022-04-28  8:12     ` Krzysztof Kozlowski
2022-04-28  8:14   ` Krzysztof Kozlowski
2022-04-28  8:14     ` Krzysztof Kozlowski
2022-04-27 18:08 ` [PATCH v2 4/4] mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0 Kamal Dasu
2022-04-27 18:08   ` Kamal Dasu
2022-04-27 21:49   ` Florian Fainelli
2022-04-27 21:49     ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=96eef806-72df-71bc-8abb-70c26e947b3d@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=alcooperx@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kdasu.kdev@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.