mmc: Make ID freq configurable
authorHein Tibosch <hein_tibosch@yahoo.es>
Mon, 6 Sep 2010 01:37:19 +0000 (09:37 +0800)
committerChris Ball <cjb@laptop.org>
Sat, 23 Oct 2010 13:11:15 +0000 (21:11 +0800)
commit88ae8b866488031b0e2fc05a27440fefec5e6927
tree07fba0c9aab5c50230fcac22e74506622fa19c68
parent176d1ed426a2a73a87c62a8aa05f6d002353cd50
mmc: Make ID freq configurable

In the latest releases of the mmc driver, the freq during initialization
is set to a fixed 400 Khz.  This was reportedly too fast for several
users.  As there doesn't seem to be an ideal frequency
which-works-for-all, Pierre suggested to let the driver try several
frequencies.

This patch implements that idea. It will try mmc-initialization using
several frequencies from an array 400, 300, 200 and 100.

In case SDIO is broken, it'll still try to detect SDMEM, also at different
freqs.

Signed-off-by: Hein Tibosch <hein_tibosch@yahoo.es>
Cc: Pierre Ossman <pierre@ossman.eu>
Reviewed-by: Chris Ball <cjb@laptop.org>
Tested-by: Chris Ball <cjb@laptop.org>
Cc: Ben Nizette <bn@niasdigital.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Matt Fleming <matt@console-pimps.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/core.c
include/linux/mmc/host.h