public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Johannes Krottmayer <krjdev@gmail.com>
To: u-boot@lists.denx.de
Cc: Johannes Krottmayer <krjdev@gmail.com>,
	Wolfgang Denk <wd@denx.de>, Thomas Chou <thomas@wytron.com.tw>,
	Rick Chen <rick@andestech.com>, Leo <ycliang@andestech.com>,
	Bin Meng <bmeng.cn@gmail.com>, Sean Anderson <seanga2@gmail.com>,
	Anup Patel <anup@brainfault.org>
Subject: [PATCH 0/2] Change behaviour of CONFIG_TIMER_EARLY
Date: Fri, 11 Mar 2022 18:11:49 +0100	[thread overview]
Message-ID: <20220311171151.29004-1-krjdev@gmail.com> (raw)

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


             reply	other threads:[~2022-03-11 17:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 17:11 Johannes Krottmayer [this message]
2022-03-11 17:11 ` [PATCH 1/2] lib: time: Change behaviour of CONFIG_TIMER_EARLY 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220311171151.29004-1-krjdev@gmail.com \
    --to=krjdev@gmail.com \
    --cc=anup@brainfault.org \
    --cc=bmeng.cn@gmail.com \
    --cc=rick@andestech.com \
    --cc=seanga2@gmail.com \
    --cc=thomas@wytron.com.tw \
    --cc=u-boot@lists.denx.de \
    --cc=wd@denx.de \
    --cc=ycliang@andestech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox