X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Fmmc%2Fhost%2Fmmci.c;h=56e9a41682649349608f8e1ad7e31e026dacb869;hp=fef7140eb1d03e45ec7da6f6a106d11d347a08d7;hb=b6844e8f64920cdee620157252169ba63afb0c89;hpb=a7e1aabb28e8154ce987b622fd78d80a1ca39361 diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index fef7140eb1d0..56e9a4168264 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -1184,7 +1184,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