]> git.baikalelectronics.ru Git - kernel.git/commit
sdhci: get rid of "frequency too high" flood when using eSDHC
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Wed, 29 Jul 2009 22:04:16 +0000 (15:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 30 Jul 2009 02:10:36 +0000 (19:10 -0700)
commitcb659c196994e25d9a24f20a4500d7913cf64102
treeb58b2843370fb743a4877e5e40ee649533e361c4
parent63fbbc31cecc7ae018c3d4204c01575d48d4d3e1
sdhci: get rid of "frequency too high" flood when using eSDHC

Since commit a06beb7cf5faa6213f768459e6a9540e578876d6 ("MMC core: limit
minimum initialization frequency to 400kHz") MMC core checks for minimum
frequency, and that causes following messages flood when using eSDHC
controllers:

  ...
  mmc0: Minimum clock frequency too high for identification mode
  mmc0: Minimum clock frequency too high for identification mode
  ...

The warnings are legitimate, since if we'd use 133 MHz clocks for standard
SDHCI controllers, we'd not able to scale frequency down to 400 kHz.

But eSDHC controllers have a non-standard SD clock management, so we can
divide clock by 256 * 16, not just 256.

This patch introduces get_min_clock() callback for sdhci core and
implements it for sdhci-of driver, and thus fixes the issue.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Matt Fleming <matt@console-pimps.org>
Cc: Ian Molton <ian@mnementh.co.uk>
Cc: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Cc: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/mmc/host/sdhci-of.c
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h