[U-Boot] [PATCH v2] mmc: fsl_esdhc: Avoid infinite loop in esdhc_send_cmd_common()

Fabio Estevam festevam at gmail.com
Sat Dec 8 14:58:35 UTC 2018


Hi Jaehoon,

On Mon, Nov 19, 2018 at 10:31 AM Fabio Estevam <festevam at gmail.com> wrote:
>
> The following hang is observed on a Hummingboard 2 MicroSOM
> i2eX iMX6D - rev 1.3 with no eMMC populated on board:
>
> U-Boot SPL 2018.11+gf6206f8587 (Nov 16 2018 - 00:56:34 +0000)
> Trying to boot from MMC1
>
> U-Boot 2018.11+gf6206f8587 (Nov 16 2018 - 00:56:34 +0000)
>
> CPU:   Freescale i.MX6D rev1.5 996 MHz (running at 792 MHz)
> CPU:   Extended Commercial temperature grade (-20C to 105C) at 33C
> Reset cause: POR
> Board: MX6 HummingBoard2
> DRAM:  1 GiB
> MMC:   FSL_SDHC: 0, FSL_SDHC: 1
> Loading Environment from MMC... *** Warning - bad CRC, using default environment
>
> No panel detected: default to HDMI
> Display: HDMI (1024x768)
> In:    serial
> Out:   serial
> Err:   serial
> ---> hangs
>
> which is caused by the following infinite loop inside esdhc_send_cmd_common()
>
>         while (!(esdhc_read32(&regs->irqstat) & flags))
>                 ;
>
> Instead of looping forever, provide an exit path so that a timeout
> error can be propagated in the case irqstat does not report
> any interrupts, which may happen when no eMMC is populated on
> board.
>
> Reported-by: Ricardo Salveti <rsalveti at rsalveti.net>
> Signed-off-by: Fabio Estevam <festevam at gmail.com>

Could this one be applied to 2019.01?


More information about the U-Boot mailing list