]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sdhci: zynq: Fix tap delay for SD on Versal NET
authorSimek, Michal <michal.simek@amd.com>
Thu, 18 Apr 2024 08:06:13 +0000 (20:06 -1200)
committerMichal Simek <michal.simek@amd.com>
Mon, 17 Jun 2024 14:02:29 +0000 (16:02 +0200)
I can't see any way how tap delays are setup on Versal NET platform because
xlnx,versal-8.9a compatible string is also used there but driver is not
letting to setup tap delays. Not sure if versal_iclk_phases[] is also valid
for Versal NET but the patch is made to investigate it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/e535cfc1a59b5146a5c9a3ab389dc770de80440c.1713427490.git.michal.simek@amd.com
drivers/mmc/zynq_sdhci.c

index 898be5a0913a89d700e540c6220f680a13673778..8a83adef43429ae6a91cd0c5bb0a3a7934a6b191 100644 (file)
@@ -865,7 +865,8 @@ static int arasan_sdhci_set_tapdelay(struct sdhci_host *host)
                ret = sdhci_zynqmp_sdcardclk_set_phase(host, oclk_phase);
                if (ret)
                        return ret;
-       } else if (IS_ENABLED(CONFIG_ARCH_VERSAL) &&
+       } else if ((IS_ENABLED(CONFIG_ARCH_VERSAL) ||
+                   IS_ENABLED(CONFIG_ARCH_VERSAL_NET)) &&
                   device_is_compatible(dev, "xlnx,versal-8.9a")) {
                ret = sdhci_versal_sampleclk_set_phase(host, iclk_phase);
                if (ret)
@@ -941,7 +942,8 @@ static void arasan_dt_parse_clk_phases(struct udevice *dev)
                }
        }
 
-       if (IS_ENABLED(CONFIG_ARCH_VERSAL) &&
+       if ((IS_ENABLED(CONFIG_ARCH_VERSAL) ||
+            IS_ENABLED(CONFIG_ARCH_VERSAL_NET)) &&
            device_is_compatible(dev, "xlnx,versal-8.9a")) {
                for (i = 0; i <= MMC_TIMING_MMC_HS400; i++) {
                        clk_data->clk_phase_in[i] = versal_iclk_phases[i];