]> git.dujemihanovic.xyz Git - u-boot.git/commit
timer: orion-timer: Fix problem with early static variable
authorStefan Roese <sr@denx.de>
Wed, 21 Dec 2022 09:18:49 +0000 (10:18 +0100)
committerStefan Roese <sr@denx.de>
Mon, 2 Jan 2023 08:14:16 +0000 (09:14 +0100)
commit5387b093cb7914b3c0404da928fa4bafdffac291
tree9a61931429bc320ad8e105a28ff5fdeb0d3098e9
parent3089d12a02efd1dc5dce01e0ec0fda9142693b11
timer: orion-timer: Fix problem with early static variable

We've noticed that at least one Kirkwood board (Pogo v4) has problems
with the new orion DM timer implementation. Debugging revealed that this
issue is related with the static variable "early_init_done" which does
not work correctly before relocation in all cases.

This patch removes this static variable and replaces it's functionality
via a function that detects if the timer is already initialized.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Pali Rohár <pali@kernel.org>
Cc: Michael Walle <michael@walle.cc>
Cc: Tony Dinh <mibodhi@gmail.com>
Tested-by: Tony Dinh <mibodhi@gmail.com>
drivers/timer/orion-timer.c