diff mbox series

i.MX8QXP hangs in SPL after a "reboot" command

Message ID CAOMZO5DCG9cz-N2zaujQ0Rcqi7ziGLeJAMpRNYoC3QPRBK5A0g@mail.gmail.com
State New
Headers show
Series i.MX8QXP hangs in SPL after a "reboot" command | expand

Commit Message

Fabio Estevam April 4, 2020, 1:17 p.m. UTC
On Thu, Apr 2, 2020 at 4:21 PM Fabio Estevam <festevam at gmail.com> 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

Comments

Peng Fan April 8, 2020, 12:47 a.m. UTC | #1
> Subject: Re: i.MX8QXP hangs in SPL after a "reboot" command
> 
> On Thu, Apr 2, 2020 at 4:21 PM Fabio Estevam <festevam at gmail.com>
> 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 ###

Do you enable M4 partition in your image?

Regards,
Peng.

> 
> I added the following debug line:
> 
> --- 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(&regs->irqstat);
> 
>         if (irqstat & CMD_ERR) {
> +               printf("****** -ECOMM comming from 1\n");
>                 err = -ECOMM;
>                 goto out;
>         }
> 
> 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
Fabio Estevam April 8, 2020, 1:45 a.m. UTC | #2
Hi Peng,

On Tue, Apr 7, 2020 at 9:47 PM Peng Fan <peng.fan at nxp.com> wrote:
>
> > Subject: Re: i.MX8QXP hangs in SPL after a "reboot" command
> >
> > On Thu, Apr 2, 2020 at 4:21 PM Fabio Estevam <festevam at gmail.com>
> > 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 ###
>
> Do you enable M4 partition in your image?

I haven't done anything with regards to the M4 partition.

What should I do exactly?

Thanks
Peng Fan April 8, 2020, 2:05 a.m. UTC | #3
> Subject: Re: i.MX8QXP hangs in SPL after a "reboot" command
> 
> Hi Peng,
> 
> On Tue, Apr 7, 2020 at 9:47 PM Peng Fan <peng.fan at nxp.com> wrote:
> >
> > > Subject: Re: i.MX8QXP hangs in SPL after a "reboot" command
> > >
> > > On Thu, Apr 2, 2020 at 4:21 PM Fabio Estevam <festevam at gmail.com>
> > > 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 ###
> >
> > Do you enable M4 partition in your image?
> 
> I haven't done anything with regards to the M4 partition.
> 
> What should I do exactly?

Ok, then I think you not have M4 used.
Which kernel are you using? Which SCFW/SECO?

Regards,
Peng.

> 
> Thanks
Fabio Estevam April 8, 2020, 10:14 a.m. UTC | #4
Hi Peng,

On Tue, Apr 7, 2020 at 11:06 PM Peng Fan <peng.fan at nxp.com> wrote:

> Ok, then I think you not have M4 used.

What needs to be done in order to use the M4?

> Which kernel are you using? Which SCFW/SECO?

I am using kernel 5.6.2.

SCFW is imx-sc-firmware-1.2.7.1
SECO is imx-seco-2.3.1

If I use the NXP U-Boot from the imx_4.19.35_1.1.0 BSP the reboot works fine.

Any suggestions?

Thanks
diff mbox series

Patch

--- 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(&regs->irqstat);

        if (irqstat & CMD_ERR) {
+               printf("****** -ECOMM comming from 1\n");
                err = -ECOMM;
                goto out;