mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] mci: sdhci: arasan: use correct input clock for divider calculation
@ 2024-12-12 22:10 Lucas Stach
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Lucas Stach @ 2024-12-12 22:10 UTC (permalink / raw)
  To: barebox

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] mci: sdhci: arasan: remove dead no 1.8V quirk
  2024-12-12 22:10 [PATCH 1/2] mci: sdhci: arasan: use correct input clock for divider calculation Lucas Stach
@ 2024-12-12 22:10 ` Lucas Stach
  2024-12-16  8:26 ` [PATCH 1/2] mci: sdhci: arasan: use correct input clock for divider calculation Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Lucas Stach @ 2024-12-12 22:10 UTC (permalink / raw)
  To: barebox

Since 21e5f283cb72 ("mci: sdhci: arasan: Use sdhci_setup_host()"), the
no-1-8-v DT property is handled by the common mci_of_parse. Remove the
dead quirk from the driver.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 drivers/mci/arasan-sdhci.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/mci/arasan-sdhci.c b/drivers/mci/arasan-sdhci.c
index 2af9ad10bed7..112fb5a669d5 100644
--- a/drivers/mci/arasan-sdhci.c
+++ b/drivers/mci/arasan-sdhci.c
@@ -70,7 +70,6 @@ struct arasan_sdhci_host {
 	struct sdhci_arasan_clk_data clk_data;
 /* Controller does not have CD wired and will not function normally without */
 #define SDHCI_ARASAN_QUIRK_FORCE_CDTEST		BIT(0)
-#define SDHCI_ARASAN_QUIRK_NO_1_8_V		BIT(1)
 /*
  * Some of the Arasan variations might not have timing requirements
  * met at 25MHz for Default Speed mode, those controllers work at
@@ -768,9 +767,6 @@ static int arasan_sdhci_probe(struct device *dev)
 	if (of_property_read_bool(np, "xlnx,fails-without-test-cd"))
 		arasan_sdhci->quirks |= SDHCI_ARASAN_QUIRK_FORCE_CDTEST;
 
-	if (of_property_read_bool(np, "no-1-8-v"))
-		arasan_sdhci->quirks |= SDHCI_ARASAN_QUIRK_NO_1_8_V;
-
 	if (of_device_is_compatible(np, "xlnx,zynqmp-8.9a")) {
 		if (IS_ENABLED(CONFIG_MCI_TUNING))
 			mci->ops.execute_tuning = arasan_zynqmp_execute_tuning;
-- 
2.47.1




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] mci: sdhci: arasan: use correct input clock for divider calculation
  2024-12-12 22:10 [PATCH 1/2] mci: sdhci: arasan: use correct input clock for divider calculation Lucas Stach
  2024-12-12 22:10 ` [PATCH 2/2] mci: sdhci: arasan: remove dead no 1.8V quirk Lucas Stach
@ 2024-12-16  8:26 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2024-12-16  8:26 UTC (permalink / raw)
  To: barebox, Lucas Stach


On Thu, 12 Dec 2024 23:10:33 +0100, Lucas Stach wrote:
> Use the clock rate going into the core to calculate the divider.
> Fixes broken SD card transfers on Zynq 7000.
> 
> 

Applied, thanks!

[1/2] mci: sdhci: arasan: use correct input clock for divider calculation
      https://git.pengutronix.de/cgit/barebox/commit/?id=b6225b579bbd (link may not be stable)
[2/2] mci: sdhci: arasan: remove dead no 1.8V quirk
      https://git.pengutronix.de/cgit/barebox/commit/?id=72939ae3594d (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-16  8:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-12 22:10 [PATCH 1/2] mci: sdhci: arasan: use correct input clock for divider calculation Lucas Stach
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox