mci: sdhci: arasan: use correct input clock for divider calculation
PATCH 1/2 mci: sdhci: arasan: use correct input clock for divider calculation
Use the clock rate going into the core to calculate the divider. Fixes broken SD card transfers on Zynq 7000.
--- drivers/mci/arasan-sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mci/arasan-sdhci.c +1 -1
@@ -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)
Signature · 1 line
2.47.1
PATCH 2/2 mci: sdhci: arasan: remove dead no 1.8V quirk
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.
--- drivers/mci/arasan-sdhci.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/mci/arasan-sdhci.c +0 -4
@@ -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;
Signature · 1 line
2.47.1
Sascha Hauer
AppliedQuoted 4 lines · Lucas Stach
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,
Signature · 1 line
Sascha Hauer <[email protected]>