add-limit-sdcard-clk-cmdline.patch
commitef2376d29e996d9d21a9e5798cb88aa73f734c83
authorAndy Green <andy@openmoko.com>
Thu, 17 Jul 2008 09:02:35 +0000 (17 10:02 +0100)
committerAndy Green <agreen@localhost.localdomain>
Thu, 17 Jul 2008 09:02:35 +0000 (17 10:02 +0100)
treecc794bf0579c8eca700859bc67130960dab16ff3
parent5d70edcbe3ff5f6d5aef54ee9e278ad1ce431fd5
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