From patchwork Sat Apr 4 13:17:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 237165 List-Id: U-Boot discussion From: festevam at gmail.com (Fabio Estevam) Date: Sat, 4 Apr 2020 10:17:58 -0300 Subject: i.MX8QXP hangs in SPL after a "reboot" command In-Reply-To: References: Message-ID: On Thu, Apr 2, 2020 at 4:21 PM Fabio Estevam wrote: > U-Boot SPL 2020.04-rc4-00061-ge0718b3ab7 (Apr 02 2020 - 16:14:22 -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 ### I added the following debug line: } And this is what I got after issuing a 'reboot' command in Linux: # reboot # Stopping network: OK Saving random seed: [ 5.255229] random: dd: uninitialized urandom read (512 bytes read) OK Stopping klogd: OK Stopping syslogd: OK umount: devtmpfs busy - remounted read-only [ 5.309631] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null) The system is going down NOW! Sent SIGTERM to all processes Sen[ 7.318988] kvm: exiting hardware virtualization [ 7.339445] reboot: Restarting system U-Boot SPL 2020.04-rc4-00062-g1e193557d5-dirty (Apr 04 2020 - 10:14:43 -0300) Normal Boot WDT: Not found! Trying to boot from MMC2_2 ****** -ECOMM comming from 1 ****** -ECOMM comming from 1 spl: mmc init failed with error: -70 SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ### Any ideas as to why CMD_ERR bit is being set in the irqstat register? Thanks --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -499,6 +499,7 @@ static int esdhc_send_cmd_common(struct fsl_esdhc_priv *priv, struct mmc *mmc, irqstat = esdhc_read32(®s->irqstat); if (irqstat & CMD_ERR) { + printf("****** -ECOMM comming from 1\n"); err = -ECOMM; goto out;