public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 0/2] Change behaviour of CONFIG_TIMER_EARLY
@ 2022-03-11 17:11 Johannes Krottmayer
  2022-03-11 17:11 ` [PATCH 1/2] lib: time: " Johannes Krottmayer
  2022-03-11 17:11 ` [PATCH 2/2] common: board_f: Fix CONFIG_TIMER_EARLY issue (EAGAIN) Johannes Krottmayer
  0 siblings, 2 replies; 4+ messages in thread
From: Johannes Krottmayer @ 2022-03-11 17:11 UTC (permalink / raw)
  To: u-boot
  Cc: Johannes Krottmayer, Wolfgang Denk, Thomas Chou, Rick Chen, Leo,
	Bin Meng, Sean Anderson, Anup Patel

When CONFIG_TIMER_EARLY is selected and the timer driver implements
timer_early_get_count() and timer_early_get_rate() this leads to
an EAGAIN error one some configurations in...

common/board_f.c:initf_dm()

initf_dm() invokes dm_timer_init(), but this function returns with
an EAGAIN error in, because the DM virtual root driver isn't
initialized yet in...

drivers/timer/timer-class.c:dm_timer_init()

Moved error handling to...

lib/time.c

For details you can read the description in the patches.

Affected drivers:
drivers/timer/andes_plmt_timer.c
drivers/timer/sifive_clint_timer.c
drivers/timer/riscv_timer.c

I don't know who maintains these base libraries and base
functions, so I used the copyright holders. For the driver
I added the required maintainers to CC.

Signed-off-by: Johannes Krottmayer <krjdev@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Thomas Chou <thomas@wytron.com.tw>
Cc: Rick Chen <rick@andestech.com>
Cc: Leo <ycliang@andestech.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Sean Anderson <seanga2@gmail.com>
Cc: Anup Patel <anup@brainfault.org>
Cc: Thomas Chou <thomas@wytron.com.tw>
---
Johannes Krottmayer (2):
  lib: time: Change behaviour of CONFIG_TIMER_EARLY
  common: board_f: Fix CONFIG_TIMER_EARLY issue (EAGAIN)

 common/board_f.c |  6 ------
 lib/time.c       | 42 +++++++++++++++++++++++++++++++++---------
 2 files changed, 33 insertions(+), 15 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-20 17:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-11 17:11 [PATCH 0/2] Change behaviour of CONFIG_TIMER_EARLY Johannes Krottmayer
2022-03-11 17:11 ` [PATCH 1/2] lib: time: " Johannes Krottmayer
2022-03-20 17:56   ` Sean Anderson
2022-03-11 17:11 ` [PATCH 2/2] common: board_f: Fix CONFIG_TIMER_EARLY issue (EAGAIN) Johannes Krottmayer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox