Skip to contentSkip to conversation

Regression: i.MX6ULL reset not working

DISCUSSION Francesco Dolcini 2 participants 7 messages Dec 28, 2023

lore
Share & tools
lore
#0 lore raw

Hello Marek and all,
I just tried latest master on colibri-imx6ull-emmc and the reset command is broken - it does nothing.

From a bisect the issue was introduced with commit 68dcbdd594d4 ("ARM:
imx: Add weak default reset_cpu()"), U-Boot releases >= v2023.07 are broken.

Any hint? I did not try to debug it myself (yet?).

Francesco

#1 lore raw
Quoted 9 lines · Francesco Dolcini

Hello Marek and all,
I just tried latest master on colibri-imx6ull-emmc and the reset command is broken - it does nothing.

Quoted 1 line

From a bisect the issue was introduced with commit 68dcbdd594d4 ("ARM:

imx: Add weak default reset_cpu()"), U-Boot releases >= v2023.07 are broken.

Any hint? I did not try to debug it myself (yet?).

Ok, the reason for the bug is simple.

Before that change we had drivers/watchdog/imx_watchdog.c:reset_cpu() implementing the reset. However that function is also weak and now the newly defined and empty weak is taking precedence.

I assume every i.MX that is not i.MX8M* or i.MX7ULP is now broken, not just i.MX6ULL nor just the colibri.

Francesco

#2 lore raw
In reply to Francesco Dolcini

Hi Francesco,

Quoted 10 lines · Francesco Dolcini

Hello Marek and all,
I just tried latest master on colibri-imx6ull-emmc and the reset command is broken - it does nothing.

From a bisect the issue was introduced with commit 68dcbdd594d4 ("ARM:
imx: Add weak default reset_cpu()"), U-Boot releases >= v2023.07 are broken.

Any hint? I did not try to debug it myself (yet?).

I think we need something like this:
https://gitlab.com/u-boot/u-boot/-/commit/9043adee3ea67f4a71498e8f06023e3f63d7668f

but it needs to be more generic, at the SoC level, instead of per board.

#3 lore raw
Quoted 12 lines · Fabio Estevam

Hi Francesco,

Quoted 9 lines · Francesco Dolcini

Hello Marek and all,
I just tried latest master on colibri-imx6ull-emmc and the reset command is broken - it does nothing.

From a bisect the issue was introduced with commit 68dcbdd594d4 ("ARM:
imx: Add weak default reset_cpu()"), U-Boot releases >= v2023.07 are broken.

Quoted 6 lines
Quoted 1 line

Any hint? I did not try to debug it myself (yet?).

I think we need something like this:
https://gitlab.com/u-boot/u-boot/-/commit/9043adee3ea67f4a71498e8f06023e3f63d7668f

but it needs to be more generic, at the SoC level, instead of per board.

With that we would have to enable the watchdog, something that is not done today. Any potential downside on doing it?

Francesco

#4 lore raw
Quoted 2 lines · Francesco Dolcini

With that we would have to enable the watchdog, something that is not done today. Any potential downside on doing it?

I don't see any.

The watchdog was being used originally too, but not via DM.

#5 lore raw
Quoted 8 lines · Fabio Estevam
Quoted 2 lines · Francesco Dolcini

With that we would have to enable the watchdog, something that is not done today. Any potential downside on doing it?

I don't see any.

The watchdog was being used originally too, but not via DM.

Are you sure? After the related kconfig changes you'll have CONFIG_WDT enabled, and with that the watchdog is started and you need to periodically refresh it. At the moment the watchdog is not enabled at boot and it is used only for the reset.

While the change might be fine, my concern is that this might affect some use cases. Debugging? Kernel not having the watchdog driver enabled? Any other fancy use-case?

Assuming I am not getting this all wrong, and enabling CONFIG_WDT has no real effects, please correct me if I'm wrong.

Francesco

#6 lore raw
Quoted 4 lines · Francesco Dolcini

Are you sure? After the related kconfig changes you'll have CONFIG_WDT enabled, and with that the watchdog is started and you need to periodically refresh it. At the moment the watchdog is not enabled at boot and it is used only for the reset.

Ok, I understand now what you mean.

Quoted 3 lines

While the change might be fine, my concern is that this might affect some use cases. Debugging? Kernel not having the watchdog driver enabled? Any other fancy use-case?

I am not aware of issues in this area.

imx8m boards handle the watchdog via CONFIG_WDT and I haven't seen problems with that.