[bug] timer: orion-timer: static variable patch breaks armada-388-clearfog boot

Hi,
Commit 5387b093 was a fix for early_init_done causing issues on Pogo v4 [1]. The fix breaks armada-388-clearfog because the boot hangs indefinitely.
It appears that the cause is an infinite loop in __udelay due to get_ticks() always returning 0. After adding some printf statements it became apparent that the timer was never getting initialised.
git-blame identified the "timer: orion-timer: Fix problem with early static variable" patch as a likely issue. Reverting the commit restores boot for armada-388-clearfog.
Patching the issue is a bit beyond me without understanding the Pogo v4 issue, but I'm happy to test any patches that are developed.
Regards
Martin
[1] https://lore.kernel.org/u-boot/20221221091849.1018783-1-sr@denx.de/

Hi Martin,
On Sat, Jan 14, 2023 at 9:31 PM Martin Rowe martin.p.rowe@gmail.com wrote:
Hi,
Commit 5387b093 was a fix for early_init_done causing issues on Pogo v4 [1]. The fix breaks armada-388-clearfog because the boot hangs indefinitely.
It appears that the cause is an infinite loop in __udelay due to get_ticks() always returning 0. After adding some printf statements it became apparent that the timer was never getting initialised.
git-blame identified the "timer: orion-timer: Fix problem with early static variable" patch as a likely issue. Reverting the commit restores boot for armada-388-clearfog.
Did you build this clearfog board as is? i.e. did you make any change in the clearfog_defconfig?
Thanks, Tony
Tony
Patching the issue is a bit beyond me without understanding the Pogo v4 issue, but I'm happy to test any patches that are developed.
Regards
Martin
[1] https://lore.kernel.org/u-boot/20221221091849.1018783-1-sr@denx.de/

Tony,
Did you build this clearfog board as is? i.e. did you make any change in the clearfog_defconfig?
clearfog_defconfig with: CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA=y CONFIG_SPL_SATA=y
Plus a dts patch to sdhci@d8000 to make it work for eMMC (swap cd-gpios for non-removable) Plus a workaround that's not yet merged for a build failure with SATA from [1]
Shouldn't be anything that affects the timer, but I can try a fully clean build with the defconfig if you need it.
Regards
Martin
[1] https://lore.kernel.org/u-boot/20230110161946.3816866-8-trini@konsulko.com/

Hi Martin,
On 1/16/23 06:20, Martin Rowe wrote:
Tony,
Did you build this clearfog board as is? i.e. did you make any change in the clearfog_defconfig?
clearfog_defconfig with: CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA=y CONFIG_SPL_SATA=y
Plus a dts patch to sdhci@d8000 to make it work for eMMC (swap cd-gpios for non-removable) Plus a workaround that's not yet merged for a build failure with SATA from [1]
Shouldn't be anything that affects the timer, but I can try a fully clean build with the defconfig if you need it.
No need for this.
Could you please test with this attached patch, if this fixes this issue on your clearfog?
Thanks, Stefan
participants (3)
-
Martin Rowe
-
Stefan Roese
-
Tony Dinh