imx8qxp_mek: Start with USDHC2 unpowered
authorFabio Estevam <festevam@gmail.com>
Wed, 15 Apr 2020 18:01:34 +0000 (15:01 -0300)
committerStefano Babic <sbabic@denx.de>
Fri, 17 Apr 2020 16:58:48 +0000 (18:58 +0200)
commit168fff26a88fe0bd9034beb8035f61b4c9460048
treee99f3262fcb3b12fc681486872be26ce99ef8d11
parent8f660ba7bb96e2ae69a521721d727ecf2fe16fba
imx8qxp_mek: Start with USDHC2 unpowered

After triggering a "reboot" command in Linux the following
hang in SPL is observed:

U-Boot SPL 2020.04 (Apr 15 2020 - 10:49:29 -0300)
Normal Boot
WDT:   Not found!
Trying to boot from MMC2_2
spl: mmc init failed with error: -70
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

This error happens because the CMD_ERR bit is set in the IRQ status
register after booting from Linux.

To ensure a fresh start, force the VMMC supply to get unpowered first.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
board/freescale/imx8qxp_mek/spl.c