All of lore.kernel.org
 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 2/2] common: board_f: Fix CONFIG_TIMER_EARLY issue (EAGAIN)
Date: Fri, 11 Mar 2022 18:11:51 +0100	[thread overview]
Message-ID: <20220311171151.29004-3-krjdev@gmail.com> (raw)
In-Reply-To: <20220311171151.29004-1-krjdev@gmail.com>

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()

[WORKAROUND]

Move error handling to (next patch in this serie)...

lib/time.c

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>
---
 common/board_f.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index a68760092a..fc883c1742 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -785,12 +785,6 @@ static int initf_dm(void)
 	bootstage_accum(BOOTSTAGE_ID_ACCUM_DM_F);
 	if (ret)
 		return ret;
-
-	if (IS_ENABLED(CONFIG_TIMER_EARLY)) {
-		ret = dm_timer_init();
-		if (ret)
-			return ret;
-	}
 #endif
 
 	return 0;
-- 
2.34.1


      parent 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 [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 ` Johannes Krottmayer [this message]

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-3-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.