]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
zynq: sdhci: Calculate minimum frequency based on max frequency
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Wed, 25 Nov 2015 06:21:37 +0000 (11:51 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 7 Dec 2015 09:14:29 +0000 (10:14 +0100)
Calculate the minimum sd clock based on max clock. This will
be done by add_sdhci() if we pass minimum clock as zero.
It also does based on SD host contoller version.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/mmc/zynq_sdhci.c

index e169b774932aa91e91cc95afcf6ef2ed578aaee7..2d6cb31e12ee63d316eb3b1d423d61be5f5449f7 100644 (file)
@@ -29,7 +29,7 @@ int zynq_sdhci_init(phys_addr_t regbase)
                       SDHCI_QUIRK_BROKEN_R1B;
        host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
 
-       add_sdhci(host, CONFIG_ZYNQ_SDHCI_MAX_FREQ, 52000000 >> 9);
+       add_sdhci(host, CONFIG_ZYNQ_SDHCI_MAX_FREQ, 0);
        return 0;
 }