From: Johan Rudholm Date: Mon, 28 Jan 2013 14:08:28 +0000 (+0100) Subject: mmc: core: Fixup signal voltage switch X-Git-Tag: v3.9-rc1~78^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0797e5f1453b2bedc08bbcbea0ea4fbe20350823;p=pandora-kernel.git mmc: core: Fixup signal voltage switch When switching SD and SDIO cards from 3.3V to 1.8V signal levels, the clock should be gated for 5 ms during the step. After enabling the clock, the host should wait for at least 1 ms before checking for failure. Failure by the card to switch is indicated by dat[0:3] being pulled low. The host should check for this condition and power-cycle the card if failure is indicated. Add a retry mechanism for the SDIO case. If the voltage switch fails repeatedly, give up and continue the initialization using the original voltage. This patch places a couple of requirements on the host driver: 1) mmc_set_ios with ios.clock = 0 must gate the clock 2) mmc_power_off must actually cut the power to the card 3) The card_busy host_ops member must be implemented if these requirements are not fulfilled, the 1.8V signal voltage switch will still be attempted but may not be successful. Signed-off-by: Johan Rudholm Signed-off-by: Kevin Liu Acked-by: Ulf Hansson Tested-by: Wei WANG Signed-off-by: Chris Ball --- Reading git-diff-tree failed