From: Adrian Hunter <adrian.hunter@intel.com>
To: Erick Shepherd <erick.shepherd@ni.com>
Cc: <brad.mouring@ni.com>, <gratian.crisan@emerson.com>,
<kyle.roeschley@ni.com>, <linux-kernel@vger.kernel.org>,
<linux-mmc@vger.kernel.org>, <ulf.hansson@linaro.org>
Subject: Re: [PATCH] mmc: core: Wait for Vdd to settle on card power off
Date: Fri, 14 Mar 2025 07:56:19 +0200 [thread overview]
Message-ID: <5f17df10-2622-4062-b2ae-f6f94ac22ac8@intel.com> (raw)
In-Reply-To: <20250313204439.1582652-1-erick.shepherd@ni.com>
On 13/03/25 22:44, Erick Shepherd wrote:
>> sdhci is used by a number of drivers (drivers/mmc/host/sdhci*)
>> that typically use the regulator framework to meet voltage
>> requirements. So that is not the right place to make changes.
>
>> It would be best to put the affected PCI device IDs into
>> sdhci_intel_set_power() as I showed.
>
> I see, that makes sense. The majority of our devices are using either
> Apollo Lake or Bay Trail host controllers. Would it be ok to expand
> your solution to include both? I tested the following change on a few
> of our devices and confirmed the delay is called. If this looks good I
> can submit a V2 of this patch.
>
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -610,9 +610,12 @@ static void sdhci_intel_set_power(struct sdhci_host *host, unsigned char mode,
>
> sdhci_set_power(host, mode, vdd);
>
> - if (mode == MMC_POWER_OFF)
> + if (mode == MMC_POWER_OFF) {
> + if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_APL_SD ||
> + slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BYT_SD)
> + usleep_range(15000, 17500);
> return;
> -
> + }
> /*
> * Bus power might not enable after D3 -> D0 transition due to the
> * present state not yet having propagated. Retry for up to 2ms.
That would be fine
next prev parent reply other threads:[~2025-03-14 5:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 21:46 [PATCH] mmc: core: Wait for Vdd to settle on card power off Erick Shepherd
2025-02-13 10:22 ` Avri Altman
2025-03-05 18:38 ` Adrian Hunter
2025-03-07 17:46 ` Erick Shepherd
2025-03-07 18:53 ` Adrian Hunter
2025-03-07 21:16 ` Erick Shepherd
2025-03-12 12:44 ` Adrian Hunter
2025-03-13 3:35 ` Erick Shepherd
2025-03-13 8:20 ` Adrian Hunter
2025-03-13 20:44 ` Erick Shepherd
2025-03-14 5:56 ` Adrian Hunter [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-09-21 17:47 Kyle Roeschley
2017-09-22 9:38 ` Ulf Hansson
2017-09-22 13:57 ` Kyle Roeschley
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=5f17df10-2622-4062-b2ae-f6f94ac22ac8@intel.com \
--to=adrian.hunter@intel.com \
--cc=brad.mouring@ni.com \
--cc=erick.shepherd@ni.com \
--cc=gratian.crisan@emerson.com \
--cc=kyle.roeschley@ni.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox