mmc: refactor SD startup to make it easier to support new modes
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Fri, 12 May 2017 18:16:27 +0000 (20:16 +0200)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:37:10 +0000 (02:37 +0800)
commit50e572ed591721ed69df5f8acd4aade00fb7ab5f
tree05eb6e677182ecedfa398bc149e7f41070b84134
parent88e1f9cdec39fb767567734d332f906ae6165f01
mmc: refactor SD startup to make it easier to support new modes

The SDcard startup process currently handles only 2 modes. To make it
easier to add support for more modes, let's make the process more generic
and use a list of the modes to try.
The major functional change is that when a mode fails we try the next one.
Not all modes are tried, only those supported by the card and the host.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/mmc/mmc.c
include/mmc.h