]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/mmc/host/mmci.c
Merge branches 'btc', 'dma', 'entry', 'fixes', 'linker-layout', 'misc', 'mmci', ...
[karo-tx-linux.git] / drivers / mmc / host / mmci.c
index fe140724a02eb878f83e45ab0654ec7e9dfeda43..50f4f77ed20250466511d8d12b94165ad64329ba 100644 (file)
@@ -1063,7 +1063,15 @@ static int __devinit mmci_probe(struct amba_device *dev,
        }
 
        mmc->ops = &mmci_ops;
-       mmc->f_min = (host->mclk + 511) / 512;
+       /*
+        * The ARM and ST versions of the block have slightly different
+        * clock divider equations which means that the minimum divider
+        * differs too.
+        */
+       if (variant->st_clkdiv)
+               mmc->f_min = DIV_ROUND_UP(host->mclk, 257);
+       else
+               mmc->f_min = DIV_ROUND_UP(host->mclk, 512);
        /*
         * If the platform data supplies a maximum operating
         * frequency, this takes precedence. Else, we fall back