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

The MMC startup process currently handles 4 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