[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5f17df10-2622-4062-b2ae-f6f94ac22ac8@intel.com>
Date: Fri, 14 Mar 2025 07:56:19 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Erick Shepherd <erick.shepherd@...com>
CC: <brad.mouring@...com>, <gratian.crisan@...rson.com>,
<kyle.roeschley@...com>, <linux-kernel@...r.kernel.org>,
<linux-mmc@...r.kernel.org>, <ulf.hansson@...aro.org>
Subject: Re: [PATCH] mmc: core: Wait for Vdd to settle on card power off
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
Powered by blists - more mailing lists