From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Tue, 3 Nov 2015 14:24:42 +0100 Subject: [U-Boot] [U-Boot, v2] mmc: sdhci: Fix the SD clock stop sequence In-Reply-To: <1442905166-27966-1-git-send-email-wenyou.yang@atmel.com> (from Wenyou Yang on Tue, 22 Sep 2015 14:59:25 +0800) References: <1442905166-27966-1-git-send-email-wenyou.yang@atmel.com> Message-ID: <1446557082-32644-1-git-send-email-andreas.devel@googlemail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wenyou Yang, Wenyou Yang writes: >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 >--- > >Changes in v2: > - Add timeout to wait for the cmd & data inhibit bit > > drivers/mmc/sdhci.c | 20 ++++++++++++++++++-- > 1 file changed, 18 insertions(+), 2 deletions(-) applied to u-boot-atmel/master, thanks! Best regards, Andreas Bie?mann