Regression: i.MX6ULL reset not working

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

On Thu, Dec 28, 2023 at 04:49:33PM +0100, Francesco Dolcini wrote:
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?).
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

Hi Francesco,
On Thu, Dec 28, 2023 at 12:49 PM Francesco Dolcini francesco@dolcini.it wrote:
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/9043adee3ea67f4a71498e8f06023e3f63...
but it needs to be more generic, at the SoC level, instead of per board.

On Thu, Dec 28, 2023 at 01:35:31PM -0300, Fabio Estevam wrote:
Hi Francesco,
On Thu, Dec 28, 2023 at 12:49 PM Francesco Dolcini francesco@dolcini.it wrote:
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/9043adee3ea67f4a71498e8f06023e3f63...
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

On Thu, Dec 28, 2023 at 1:46 PM Francesco Dolcini francesco@dolcini.it wrote:
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.

On Thu, Dec 28, 2023 at 02:08:33PM -0300, Fabio Estevam wrote:
On Thu, Dec 28, 2023 at 1:46 PM Francesco Dolcini francesco@dolcini.it wrote:
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

On Thu, Dec 28, 2023 at 2:23 PM Francesco Dolcini francesco@dolcini.it wrote:
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.
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.
participants (2)
-
Fabio Estevam
-
Francesco Dolcini