add-limit-sdcard-clk-cmdline.patchsd-clk-test
commit48726b4cb4c2cd264ecc87beed5ee5600b5f012f
authorAndy Green <andy@openmoko.com>
Tue, 15 Jul 2008 16:21:45 +0000 (15 17:21 +0100)
committerAndy Green <andy@openmoko.com>
Tue, 15 Jul 2008 16:21:45 +0000 (15 17:21 +0100)
treebcbf0ca6d105abaca28f5f34af965166112b792f
parent5cb541702a40dc61fababe4613f6838df1c2acbd
add-limit-sdcard-clk-cmdline.patch

This patch allows you to control the maximum clock rate that will
be selected for SD Card access, from the kernel commandline using

 glamo_mci.sd_max_clk=10000000

and also from

 echo 10000000 > /sys/module/glamo_mci/parameters/sd_max_clk

although you have to suspend and resume to make the limit operational
on the actual SD_CLK line.

Clocks that are possible are divided down from ~50MHz, so 25000000,
166666661250000010000000, etc.  With Freerunner A5 revision that
has 100R series resistors in SD Card signals, I didn't get reliable
operation above 16MHz.  With A6 revision the series resistors went
down to 75R, maybe it can work at 25MHz.

Reducing the clock rate is something to try if you find that your
SD Card is not communicating properly with the default speed.

Signed-off-by: Andy Green <andy@openmoko.com>
drivers/mfd/glamo/glamo-mci.c