[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250313204439.1582652-1-erick.shepherd@ni.com>
Date: Thu, 13 Mar 2025 15:44:38 -0500
From: Erick Shepherd <erick.shepherd@...com>
To: <adrian.hunter@...el.com>
CC: <brad.mouring@...com>, <erick.shepherd@...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
> 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.
--
Regards,
Erick
Powered by blists - more mailing lists