All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas Stach <dev@lynxeye.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] mci: sdhci: arasan: use correct input clock for divider calculation
Date: Thu, 12 Dec 2024 23:10:33 +0100	[thread overview]
Message-ID: <20241212221034.210933-1-dev@lynxeye.de> (raw)

Use the clock rate going into the core to calculate the divider.
Fixes broken SD card transfers on Zynq 7000.

Fixes: 2a879e436a5f ("mci: sdhci: arasan: Use sdhci_set_clock()")
Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 drivers/mci/arasan-sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mci/arasan-sdhci.c b/drivers/mci/arasan-sdhci.c
index 37be06dffdfe..2af9ad10bed7 100644
--- a/drivers/mci/arasan-sdhci.c
+++ b/drivers/mci/arasan-sdhci.c
@@ -210,7 +210,7 @@ static void arasan_sdhci_set_clock(struct mci_host *mci, unsigned int clock)
 	clk_set_phase(clk_data->sdcardclk,
 		      clk_data->clk_phase_out[mci->mci->host->timing]);
 
-	sdhci_set_clock(&host->sdhci, clock, host->sdhci.max_clk);
+	sdhci_set_clock(&host->sdhci, clock, mci->f_max);
 }
 
 static void arasan_sdhci_set_ios(struct mci_host *mci, struct mci_ios *ios)
-- 
2.47.1




             reply	other threads:[~2024-12-12 22:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12 22:10 Lucas Stach [this message]
2024-12-12 22:10 ` [PATCH 2/2] mci: sdhci: arasan: remove dead no 1.8V quirk Lucas Stach
2024-12-16  8:26 ` [PATCH 1/2] mci: sdhci: arasan: use correct input clock for divider calculation Sascha Hauer

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=20241212221034.210933-1-dev@lynxeye.de \
    --to=dev@lynxeye.de \
    --cc=barebox@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.