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 e169b77..2d6cb31 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;
 }