omap_hsmmc: Wait for CMDI to be clear
authorTom Rini <trini@ti.com>
Mon, 30 Jan 2012 11:22:25 +0000 (11:22 +0000)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 25 Mar 2012 20:15:16 +0000 (23:15 +0300)
commit2984fb8aeaca0ef42ef1670f488de9175a1e9cb0
tree39f94719e4aab7e3a698edfc332ae4d872af566c
parentc42db8a7f0d7fb29c1b8412dd89b312173822241
omap_hsmmc: Wait for CMDI to be clear

Before we can send a command we need both the DATI (command inhibit on
mmc_dat line) bit and CMDI (command inhibit on mmc_cmd line) are clear.
The previous behavior of only checking on DATI was insufficient on some
cards and incorrect behavior in any case.  This makes the code check
for both bits being clear and makes the error print more clear as
to what happened.  DATI_CMDDIS is removed as it was unused elsewhere
in the code and stood for 'DATI is set, cmds are disabled still'.

Fix originally spotted by Peter Bigot.

Tested-by: Peter A. Bigot <bigotp@acm.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Tom Rini <trini@ti.com>
Tested-by: Andreas Müller <schnitzeltony@googlemail.com>
arch/arm/include/asm/arch-omap3/mmc_host_def.h
arch/arm/include/asm/arch-omap4/mmc_host_def.h
arch/arm/include/asm/arch-omap5/mmc_host_def.h
drivers/mmc/omap_hsmmc.c