The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Judith Mendez <jm@ti.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
	<linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v2 2/2] mmc: sdhci_am654: Add prints to tuning algorithm
Date: Wed, 21 Aug 2024 14:24:35 -0500	[thread overview]
Message-ID: <20240821192435.1619271-3-jm@ti.com> (raw)
In-Reply-To: <20240821192435.1619271-1-jm@ti.com>

Add debug prints to tuning algorithm for debugging.
Also add error print if we fail tuning.

Signed-off-by: Judith Mendez <jm@ti.com>
---
Changes since v1:
- Change prints to dev_dbg
- Add print for failing itaps
---
 drivers/mmc/host/sdhci_am654.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
index 612f29fd7dfef..9cac520d5c15c 100644
--- a/drivers/mmc/host/sdhci_am654.c
+++ b/drivers/mmc/host/sdhci_am654.c
@@ -457,11 +457,13 @@ static u32 sdhci_am654_calculate_itap(struct sdhci_host *host, struct window
 
 	if (!num_fails) {
 		/* Retry tuning */
+		dev_dbg(dev, "No failing region found, retry tuning\n");
 		return -1;
 	}
 
 	if (fail_window->length == ITAPDLY_LENGTH) {
 		/* Retry tuning */
+		dev_dbg(dev, "No passing itapdly, retry tuning\n");
 		return -1;
 	}
 
@@ -527,6 +529,7 @@ static int sdhci_am654_do_tuning(struct sdhci_host *host,
 		if (!curr_pass) {
 			fail_window[fail_index].end = itap;
 			fail_window[fail_index].length++;
+			dev_dbg(dev, "Failed itapdly=%d\n", itap);
 		}
 
 		if (curr_pass && !prev_pass)
@@ -562,10 +565,12 @@ static int sdhci_am654_platform_execute_tuning(struct sdhci_host *host,
 	}
 
 	if (itapdly >= 0) {
+		dev_dbg(dev, "Passed tuning, final itapdly=%d\n", itapdly);
 		sdhci_am654_write_itapdly(sdhci_am654, itapdly, sdhci_am654->itap_del_ena[timing]);
 		/* Save ITAPDLY */
 		sdhci_am654->itap_del_sel[timing] = itapdly;
 	} else {
+		dev_err(dev, "Failed to find itapdly, fail tuning\n");
 		ret = -1;
 	}
 
-- 
2.46.0


      parent reply	other threads:[~2024-08-21 19:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 19:24 [PATCH v2 0/2] Add retry tuning sequence Judith Mendez
2024-08-21 19:24 ` [PATCH v2 1/2] mmc: sdhci_am654: Add retry tuning Judith Mendez
2024-08-23 13:45   ` Adrian Hunter
2024-08-23 20:44     ` Judith Mendez
2024-08-21 19:24 ` Judith Mendez [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=20240821192435.1619271-3-jm@ti.com \
    --to=jm@ti.com \
    --cc=adrian.hunter@intel.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