mmc: sdhci: Fix the SD clock stop sequence
authorWenyou Yang <wenyou.yang@atmel.com>
Tue, 22 Sep 2015 06:59:25 +0000 (14:59 +0800)
committerAndreas Bießmann <andreas.devel@googlemail.com>
Tue, 3 Nov 2015 13:21:30 +0000 (14:21 +0100)
commit79667b7b769405ec510baf2afed566eae58ec713
treee28a44fc5b06321e1007254de3eee7f0fa6ee7ab
parentce39680f7e560236213487ac6bf1baa66b6f74e3
mmc: sdhci: Fix the SD clock stop sequence

According to the SDHC specification, stopping the SD Clock is by setting
the SD Clock Enable bit in the Clock Control register at 0, instead of
setting all bits at 0.

Before stopping the SD clock, we need to make sure all SD transactions
to complete, so add checking the CMD and DAT bits in the Presen State
register, before stopping the SD clock.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
drivers/mmc/sdhci.c