Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Erick Shepherd <erick.shepherd@ni.com>
To: <adrian.hunter@intel.com>
Cc: <andy-ld.lu@mediatek.com>, <avri.altman@wdc.com>,
	<cw9316.lee@samsung.com>, <dsimic@manjaro.org>,
	<erick.shepherd@ni.com>, <keita.aihara@sony.com>,
	<linux-kernel@vger.kernel.org>, <linux-mmc@vger.kernel.org>,
	<quic_jjohnson@quicinc.com>, <ricardo@marliere.net>,
	<ulf.hansson@linaro.org>, <victor.shih@genesyslogic.com.tw>,
	<wsa+renesas@sang-engineering.com>
Subject: Re: [RFC PATCH V2 1/2] mmc: Update sdhci tune function to return errors
Date: Tue, 18 Feb 2025 12:41:12 -0600	[thread overview]
Message-ID: <20250218184112.574772-1-erick.shepherd@ni.com> (raw)
In-Reply-To: <8002f01b-97cd-4c30-b00c-c73d0cbccdc3@intel.com>

I see, in my case intel_execute_tuning() in sdhci-pci-core.c is what
is calling into sdhci_execute_tuning() so I should check the value of
tuning_err there and possibly return it? The issue I'm trying to solve
is only for DDR50 cards that do not support tuning so I could
conditionally return tuning_err if the timing mode is DDR50. Maybe
something like this?

---
 drivers/mmc/host/sdhci-pci-core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 1f0bd723f011..9aedb476bd5d 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -725,6 +725,9 @@ static int intel_execute_tuning(struct mmc_host *mmc, u32 opcode)
 	if (err)
 		return err;
 
+	if (host->tuning_err && mmc->ios.timing == MMC_TIMING_UHS_DDR50)
+		return host->tuning_err;
+
 	/*
 	 * Tuning can leave the IP in an active state (Buffer Read Enable bit
 	 * set) which prevents the entry to low power states (i.e. S0i3). Data
-- 

Regards
Erick

      reply	other threads:[~2025-02-18 18:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-06 21:08 [RFC PATCH V2 1/2] mmc: Update sdhci tune function to return errors Erick Shepherd
2025-02-06 21:08 ` [RFC PATCH V2 2/2] mmc: allow card to disable tuning Erick Shepherd
2025-02-15  1:08   ` Adrian Hunter
2025-02-18 18:41     ` Erick Shepherd
2025-03-06 14:01       ` Adrian Hunter
2025-03-07 17:45         ` Erick Shepherd
2025-03-07 18:44           ` Adrian Hunter
2025-03-07 21:17             ` Erick Shepherd
2025-03-11 15:20               ` Adrian Hunter
2025-03-13 16:32                 ` Erick Shepherd
2025-02-06 22:34 ` [RFC PATCH V2 1/2] mmc: Update sdhci tune function to return errors Ricardo B. Marlière
2025-02-15  1:05 ` Adrian Hunter
2025-02-18 18:41   ` Erick Shepherd [this message]

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=20250218184112.574772-1-erick.shepherd@ni.com \
    --to=erick.shepherd@ni.com \
    --cc=adrian.hunter@intel.com \
    --cc=andy-ld.lu@mediatek.com \
    --cc=avri.altman@wdc.com \
    --cc=cw9316.lee@samsung.com \
    --cc=dsimic@manjaro.org \
    --cc=keita.aihara@sony.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=quic_jjohnson@quicinc.com \
    --cc=ricardo@marliere.net \
    --cc=ulf.hansson@linaro.org \
    --cc=victor.shih@genesyslogic.com.tw \
    --cc=wsa+renesas@sang-engineering.com \
    /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