]> git.baikalelectronics.ru Git - uboot.git/commit
timer: orion-timer: Fix problem in early_init_done()
authorStefan Roese <sr@denx.de>
Mon, 16 Jan 2023 08:01:48 +0000 (09:01 +0100)
committerStefan Roese <sr@denx.de>
Tue, 17 Jan 2023 06:06:37 +0000 (07:06 +0100)
commit192a7c4ef547cc058d1705d679a37f24f12d93f3
treeac3c2ad1a9e979d1a3379753e4d3afd1a771dbff
parentc56b670492edc9487075fff903bd5a9421104e7e
timer: orion-timer: Fix problem in early_init_done()

It was noticed that Clearfog is currently broken with this newly
introduced early_init_done() function. Apparently the timer is enabled
here when U-Boot is run but not configured - at least not correctly.
Resulting in a hangup in the timer reading functions.

To fix this, also read the value of the reload register and check it's
value with the one written to by U-Boot. Only if this matches, the
init has already been done.

Fixes: 17d6d2133494 ("timer: orion-timer: Fix problem with early static variable")
Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Pali Rohár <pali@kernel.org>
Cc: Martin Rowe <martin.p.rowe@gmail.com>
Cc: Tony Dinh <mibodhi@gmail.com>
Cc: Pali Rohár <pali@kernel.org>
Cc: Michael Walle <michael@walle.cc>
drivers/timer/orion-timer.c